How do I install the Z shell ( zsh ) shell under FreeBSD 9 operating systems?
The Z shell (zsh) is a Unix shell and command interpreter for shell scripting. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.
Install zsh under FreeBSD
Type the following command as the root user to install binary zsh package. You can switch to the root user by typing su - and entering the root password, when prompted.
# pkg_add -r zsh
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.0-release/Latest/zsh.tbz... Done. Updating /etc/shells
Alternatively, you can use the Freebsd ports:
# cd /usr/ports/shell/zsh
# make install clean
How do I install zsh?
Simply type zsh at the shell prompt:
You will get the following screen:
Just follow on-screen instruction to finish zsh configuration.
How do I set zsh as my default shell?
You need to use chsh command to change your default shell under Unix like operating system:
$ chsh -s zsh
$ chsh -s zsh vivek
Make sure zsh is set as a new shell for vivek user:
$ grep vivek /etc/passwd
How do I customize zsh shell?
You need to edit ~/.zshrc file. A sample ~/.zshrc file:
$ cat ~/.zshrc
HISTFILE=~/.histfile HISTSIZE=1000 SAVEHIST=1000 setopt appendhistory autocd extendedglob unsetopt beep bindkey -e
Because zsh contains many features, I recommend that you go through the zsh manual page which has been split into a number of sections:
% man zsh
- 30 Cool Open Source Software I Discovered in 2013
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012
- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop