Installing Powerline9k

The online documentation for this process seems scattered among multiple  README’s  and tutorials. Here’s how I got up and running with Powerline9k.

Install ZSH

ZSH is a layer that runs on top of your Linux distributions Command Line. Rather than using the default shell, ZSH is just as functional, but also more pleasant to look at. To install ZSH on Ubuntu, run this command to install the framework for which Powerline9k depends on.

sudo apt-get install zsh

Starting the ZSH Shell

The command line wizard for ZSH
The command line wizard for ZSH

After the installation is complete, you will need to activate your ZSH instance. You can do this simply by issuing the command.

zsh

This command will open up a command-line wizard. The wizard is run once in order for you to configure the program. So you will see something like the last photo.

Unless you’re a savvy user, just go ahead with the default configuration for now.  Type in 0, and wait for the program to terminate. You should now be dropped into a ZSH shell.

A vanilla ZSH shell
A vanilla ZSH shell

Installing Powerline

Next, you need to download Powerline.

sudo apt-get install powerline

Installing PowerLevel9k

Powerline9k installed

One can install PowerLevel9k many ways. But for the scope of this tutorial, were going to stick to installing PowerLevel9k on a vanilla ZSH shell.


$ git clone https://github.com/bhilburn/powerlevel9k.git ~/powerlevel9k

Once the program is finished downloading,  run the following commands to activate your new PowerLevel9k theme.

$ echo 'source  ~/powerlevel9k/powerlevel9k.zsh-theme' >> ~/.zshrc
$ zsh

This will activate the shell for you with your newly installed PowerLevel9k Theme.

Installing Fonts

Now you might get lucky and the last step made everything work. More than likely though, you will have to install the custom fonts.  Powerline uses a style of fonts not included with every distribution. That’s why sometimes, you will see weird characters in your shell.

Clone the powerline fonts repository from GitHub.

git clone https://github.com/powerline/fonts.git

Once downloaded, the directory will be called ‘fonts‘. Change into that directory and run the install.sh script. This will install the fonts in a folder called ~/.local/share/fonts.

cd fonts ./install.sh

/home/yourusername/.local/share/fonts

If you get an error that says “directory does not exist” or something along those lines, you need to create the folder yourself, and re-run the install script.

mkdir /home/username/.local/share/fonts
./install.sh

Enable Custom Fonts

Default Console Prefferences
If you have the default shell, your preferences will look like this

In your new ZSH shell running PowerLevel9k, right click on the terminal. A context menu appears, and you’ll want to click on the preferences tab.

In the text tab, check mark the”custom font” box, and select one of the fonts you just installed. You will know if a font is meant for PowerLine, because it will have the word power-line in the font name.

For example, Source Code Pro for Powerline Bold Italic. You should see the changes immediately. If not, close the preferences box, exit out of the terminal, and restart zsh by using  zsh or source .zshrc

Enjoying Your New Shell

Try out different themes in your new shell.

Add custom styles to the shell.

Converse with the community about PowerLine9k on Blind.

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *