What is a Shell ?
A Shell is an interface that acts between you and your Linux System. It take commands entered by the user and tell the system to do what ever the tasks those commands specify.
There are different kind of shells.
- Bash Shell
- Ksh shell
- Tcsh/Csh Shell
- Z Shell (Zsh)
- Korn Shell
- Bourne Shell
- And may more…
What is Zsh or Z Shell ?
Zsh is a Unix shell which is derived from Bourne Shell. Zsh has plenty of new features including Spelling correction and approximate completion, recursive path expansion, automatic cd etc…
Plugin and theme support gives us the power to customize our shell. This is the coolest feature of ZSH.
Before installing Zsh there are few pre-requisites that you need to have installed in your computer. Please make sure that the following tools are installed in your computer.
If not install them using the following command.
sudo apt-get install wget curl git
- First of all let’s check which shell is already installed in your computer. To check that run one of the following two commands in your terminal. (By default ubuntu comes with bash shell)
echo $0 echo $SHELL
- Install Zsh using the following command.
sudo apt install zsh
- Once the installation is done, you can verify the installed Zsh version using the following command.
Now, inorder to make Zsh as your default shell follow the below steps.
- Find out the path of the Zsh shell using the following command.
- Now set Zsh as the default shell for the user you are logged in as using the following command.
sudo usermod -s /usr/bin/zsh $(whoami)
- As the final step Logout and login to your account in order to use Zsh as your new default shell. Once you logged in and open your terminal you will be prompted to set your Zsh startup files as in the following screenshot. Choose option 2 to populate your
~/.zshrcwith the default configuration settings.
- Now you can verify that Zsh is actually your default shell using the same commands used in first step.
Now you have Zsh as your default shell. Thank you for reading.
Also Read: Best Linux Distributions 2019