follow the below steps to install zsh and make it default shell
sudo apt-get install zsh
sudo chsh -s /bin/zsh USER
sudo apt-get install git
cd ~/Downloads/
wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh
sudo chmod 777 install.sh
sudo ./install.sh
touch ~/.zshrc [[ if the installation is for the first time ]]
copy .zshrc to ~/ [[ if you want to back up configuration from other system to current system ]]
edit .zshrc to use relevant theme from ~/.oh-my-zsh directory
edit the file ~.zshrc and edit the line following line
export ZSH=/home/xeroconf/.oh-my-zsh [[ before editing ]]
export ZSH=/home/$USER/.oh-my-zsh [[ after editing ]]
after changing the default shell from bash to zsh, the auto login through startx will stop working because the setting is defined in ~/.profile which is used by bash and zsh uses ~/.zprofile
add the following line to ~/.zprofile
touch ~/.zprofile
sudo nano ~/.zprofile
(add this line)
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx
(save and exit --> Ctrl-O, enter, Ctrl-X, enter)
logout and login back to see it working
additionally for the system-wide global profile make the entry in the file /etc/zsh/zprofile
sudo nano /etc/zsh/zprofile
(add this line)
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx
(save and exit --> Ctrl-O, enter, Ctrl-X, enter)
logout and login back to see it working
the global files for zsh are present at /etc/zsh/ and applies the configuration from the files in the order zshenv, zprofile, zshrc and zlogin