I frequently use the command line because of its speed and am using ohmyzsh to make the experience more valuable and enjoyable. I configure ohmyzsh to use the powerlevel9k theme which provides lots of useful information as well as looking fancy.
We are more connected to the work we do if its an enjoyable experience.
Read on for details on how to configure Ubuntu with zsh, ohmyzsh and powerlevel9k theme.
Ubuntu has a package for
zsh so its easy to install
sudo apt install zsh
You could try this new shell by typing
zsh in the terminal window, however its not going to be as nice without some configuration first. So lets add that next.
Oh-My-Zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins and lots of themes to make your command line look fancy!
ohmyzsh with either wget or curl. I prefer wget on Ubuntu as its installed by default
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
See the ohmyzsh website for alternative installation information.
Powerlevel9k is a theme for ZSH which is easy to customise and feature rich. The theme works for your own custom zsh setup as well as ohmyzsh, prezto and other configuration.
Clone the powerlevel9k theme into the existing
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
./zshrc file and set the theme to powerlevel9k
Ensure that there is only one theme set with this value.
The powerlevel9k theme uses Powerline Fonts so we need to install them too.
There are several powerline packages in the ubuntu archives, so either install the powerline fonts or use the powerline meta-package to include powerline support for python too.
## just the fonts
To find the packages I simply searched the Ubuntu archives using the command
apt-cache search --names-only powerline
Once you are happy with your new setup, you can make zsh the default for the Ubuntu terminal. Run
terminal and edit the profile you are using to run zsh:
Profile Preferences > Command > Custom command >
Change the default login shell by running the
chsh command. This will prompt you for your login password and then show you the current login shell. Type
/usr/bin/zsh if the current shell is not zsh.
With a few Ubuntu packages and two cloned repositories you can quickly create an enhanced experience in your command line.
Take a look at how others have configured the powerlevel9k theme for there own needs
This work is licensed under a Creative Commons Attribution 4.0 ShareAlike License, including custom images & stylesheets. Permissions beyond the scope of this license may be available at @jr0cket