Alwyn Mathew     Publication     Talks     Teaching     Blog     Resume

Setup Oh-My-Zsh terminal

Oh My Zsh is an open source, community-driven framework for managing your zsh configuration. ZSH is a shell designed for interactive use, although it is also a powerful scripting language. Oh My Zsh comes bundled with tons of helpful functions, plugins, helpers, themes, and a few things that will make you better at the terminal. There are currently 275+ plugins and 150 themes supported.

Prerequisite

Installation of Oh My Zsh can be carried out using “Curl” or “Wget” commands in your terminal. Make sure either of one utility is installed in the OS, if not install them along with git

sudo apt install curl wget git

ZSH

Oh-My-Zsh is a framework for ZSH, the Z shell.

  • In order for Oh-My-Zsh to work, ZSH must be installed.
    • Please run zsh --version to confirm.
    • Expected result: zsh 5.0.8 or more recent
  • Additionally, ZSH should be set as your default shell.
    • Please run echo $SHELL from a new terminal to confirm.
    • Expected result: /usr/bin/zsh or similar

Install ZSH with

sudo apt install zsh

Make ZSH your default shell:

chsh -s $(which zsh)

Test that it worked with echo $SHELL, expected result: /bin/zsh or similar. Or Test with $SHELL --version, expected result: zsh 5.4.2 or similar.

Install Oh My Zsh

Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl, wget or another similar tool.

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

or

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Change theme

Robby’s theme is the default one. It’s not the fanciest one. It’s not the simplest one. Once you find a theme that you’d like to use, you will need to edit the ~/.zshrc file with nano ~/.zshrc. You’ll see an environment variable (all caps) in there that looks like:

ZSH_THEME="robbyrussell"

To use a different theme, simply change the value to match the name of your desired theme. For example:

ZSH_THEME="agnoster"

You have to source (source ~/.zshrc) the file for changes to be effective.

source ~/.zshrc