Customizing Your Linux/Mac OSX Terminal (Sorry Windows)

In this post, we’re going to learn how to customize your terminal. If you’re getting into any software and/or system development, you need to get comfortable with the command line. Because of that, why not explore how to make this tool more personalized?

For this reason, I want to explore customization of your terminal with ZSH.

So what is ZSH? Taken from the ZSH website,

Oh My Zsh is an open source, community-driven framework for managing your Zsh configuration. Sounds boring. Let’s try again. Oh My Zsh will not make you a 10x developer…but you may feel like one!

Opening up the terminal in any Linux or MacOSX distro and you’ll get the plain look of Bash:


It’s exactly as you suspect….boring. With ZSH, you’re able to load the theme of your choice in the ~/.zshrc file located in your home directory. Here are a few examples of what your terminal COULD look it.

As one example, not the fully colored in bar annotating the directory currently in is the master for Github.
Second example, with the same content but of course, different flavor.

I already have this installed on my machine, so for this example, I spun up a Vagrant Ubuntu server to go through the process. I’ll show the debian way of installation, but you can follow this link to install on CentOS, MacOSX, and of course……Windows.
Debian-based Linux Systems

sudo apt update
sudo apt upgrade
sudo apt install zsh

When that is finished installing, follow up with this bad boy:

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

The output from the above shell command should give you this.

Make sure to say Yes to changing your default shell to ZSH. Sometimes, and I mean sometimes, terminal will default back to Bash. If that were to happen, or you just don’t want to run ZSH as your default, you can easily type:

exec zsh 
or
exec bash

These terminal commands will change the terminal you’re working in.

When ZSH installs, it will default to the theme “robbyrussell”. I like it personally, but who wants to stick with default? There are waaaayyyyyy too many themes for you to choose from. Just check out this link to view the different terminal themes.

Simply run the command below, then add in the quotation marks what theme you’d like to use from the above link.

vim ~/.zshrc 
Note: For fun, you should put random in the quotation marks and see what happens. You’ll need to reload zsh for it to take effect.

And, that’s it! This post is mainly to show that you can customize a lot on your machines to make your developing experience more fun.