When you’re using Linux, the majority of the user time you spend in a terminal. An attractive terminal allows us to improve personal productivity and enjoy the process of work. If you’d like to customize your terminal and make it look professional, we’ll show you how you can use Oh My Zsh to achieve this goal. In this article, we’ll describe how to install and configure a beautiful terminal for your Ubuntu Linux.
Oh My Zsh
Zsh has a lot more useful functions, themes, helpers, plugins, and other features that will help you get more out of your shell.
Currently Oh My Zsh is capable of supporting 150 themes and 275 plugins.
Now, let’s head towards the process of customizing Oh My Zsh on Ubuntu.
Oh My Zsh installation
In this section we’ll cover the Oh My Zsh installation process.
Before making any changes in my system I’d prefer to test them first. The ideal option is to use Ubuntu Docker image. The primary reason here is an ability to reset the container if something goes wrong.
To launch Docker container use the following commands:
docker run -it ubuntu:20.04 /bin/bash
Default Ubuntu Docker image does not contain Zsh, you, you have to install it first:
apt-get update apt-get install -y zsh
Now, you can launch Zsh terminal:
zsh --version zsh
Starting from now, all commands will be the same for Ubuntu Docker container and your Ubuntu system.
First, we need to make sure, that we have required packages on our system which include
apt-get update && apt install -y curl wget git
Next, install the latest version of Oh My Zsh framework:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Answer Y to switch your default shell to Zsh.
Setting up Oh My Zsh theme
In addition to all other features of Oh My Zsh, I especially enjoy the themes collection that comes with the installation.
It enhances the terminal appearance and increases productivity.
By default, all Zsh themes installed to
The default theme for the Zsh shell is “robbyrussell“.
To modify this theme, update the
~/.zshrc file and set
ZSH_THEME variable value with the name of the theme you want to use:
Try to use crunch, for example:
Now, use the following command to install powerline fonts:
|apt-get install -y powerline fonts-powerline|
To apply theme changes, execute the following command:
Setting up Oh My Zsh plugins
Oh My Zsh supports a large number of plugins and it is easy to set them up. If you’d like to start using any plugin, you need to download the plugin kit and add its name to the
plugins variable in
The default installation of Zsh comes with a
git plugin which allows you to get information about branch, commits and status of your local git repository.
As an example, let’s add two additional useful plugins:
To install first plugin, just clone it to the Zsh plugins directory:
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
Same thing should be done for the second plugin:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
Now, add the names of downloaded plugins in the plugin parameter of
Modify the plugins variable:
To apply the changes, use source command:
Setting up Oh My Zsh updates
Every two weeks Oh My Zsh automatically checks up for the updates.
You can also disable this function by setting the
DISABLE_AUTO_UPDATE variable to
Or you can change the update interval time by changing the value of
For manual update, use the following command:
To enable syntax highlighting, add it to
echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
Finally, apply the changes:
In this article, we covered the basics of customizing your Zsh shell in Ubuntu Linux using Oh My Zsh. We showed how to set up Zsh themes, install additional powerline fonts, enable syntax highlighting, install plugins, and do automatic and manual Oh My Zsh updates.
We hope you’ve found this article useful. If so, please, help us to spread it to the world!