The ZSH or Z Shell is a Unix based shell or can be called as a command-line interpreter. It is an extended version of the good old Bourne shell (sh). It does have some features form Bash with lots of added features like automatic cd (Change Directory), spell check, path expansion, and many more. It also supports plugins and themes.
Installing ZSH on Ubuntu
Step 1: First, we will have to update the repository by running the following command:
sudo apt-get update
Step 2: Now we will install the zsh by running the following command:
sudo apt-get install zsh -y
Step 3: Now we have to make the zsh as our default shell using the following command:
chsh -s /usr/bin/zsh
Note: You will need to enter your password for the user after running the command.
Step 4: Now that we have set the zsh as our default shell, we have to configure it. So, we will run zsh in the terminal to execute it. This will show the Z shell configuration.
Step 5: Here you can do what is specified by typing the character given at the start of every line. You can quit, go in the main menu and configure the shell your self or you can go for the recommended configuration for the shell by pressing 2, which is what we have done.
Step 6: After this, the Z shell is ready to use. But the shell is not changed from bash to zsh.
Step 7: You will have to logout of your system and log back in to see the change. Open terminal and you should see the Z shell started. To check run the following command:
As you can see, it showed /usr/bin/zsh, which means it is successfully set as the default shell.