How to Install ZSH and Oh-My-Zsh in Linux Ubuntu

Ankur SaxenaAnkur Saxena
2 min read

What is Zsh Shell

Zsh (short for "Z Shell") is a Unix shell or command-line interpreter that is an alternative to the traditional Bourne shell (sh) and the more common Bash shell. It was developed as an extended version of the Bourne shell with additional features and enhancements.

Zsh is highly customizable and offers features such as autocompletion, spelling correction, path expansion, and advanced globbing, making it a powerful and efficient shell for advanced users and developers. It also supports plugins and themes, allowing users to customize their shell's appearance and behavior.

Zsh is available on most Unix-based systems, including Linux, macOS, and BSD, and can be installed using the system's package manager. It is also the default shell on some Linux distributions, such as macOS and some flavors of FreeBSD.

Overall, Zsh is a powerful and flexible shell that provides advanced features and customization options for users who work with the command line frequently.

Install Zsh on Linux Ubuntu

You can easily install the zsh terminal on Ubuntu and make it the default terminal by following these steps:

  1. Open a terminal window by pressing "Ctrl + Alt + T" or by searching for "Terminal" in the Application menu.

  2. Update package manager list by running the following command:

sudo apt update
  1. Enter your sudo password or user password and press Enter.

  2. Install zsh by running the following command:

sudo apt install zsh
  1. Once the installation is complete, you can verify that zsh has been installed by running the following command:
zsh --version

Set Zsh as the default shell

  1. Open .bashrc file in a text editor:
vim .bashrc
  1. Set Zsh as default shell:
exec zsh
  1. Close and reopen the terminal to use Zsh.

Install Oh-My-Zsh

  1. Install Oh My Zsh using following command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  1. Close and reopen the terminal.

That's it! You have successfully installed zsh on Ubuntu and made it the default shell. You can now enjoy the features and benefits of using zsh as your default terminal.

0
Subscribe to my newsletter

Read articles from Ankur Saxena directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ankur Saxena
Ankur Saxena