Terminal customization

Installing ZSH (Z Shell)

ZSH or Z Shell comes with many useful pre-configurations and features. You default shell is most likely bash. To install ZSH simply run the install command

sudo apt install zsh

Check if ZSH was successfully installed by checking its version

zsh --version

Change your shell from your default to ZSH. Make sure to relog for it to take effect. On your first login with ZSH you'll be presented with few options, choose the full config option by pressing 2

chsh -s $(which zsh)

Double check if your current shell is in fact ZSH

echo $SHELL

Installing oh my ZSH

Oh My ZSH comes with even more features and provides countless plugins and themes for your terminal. To install it simply run the install command

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

Installing agnoster theme

Oh My ZSH already comes with agnoster theme pre-installed, however you'll need to install a patched powerline font on to your system and configure your terminal to use it. Patched fonts provide icons and nice formatting for your terminal. Roboto patched font download

To change your terminal theme to agnoster you'll have to edit the .zshrc config. Find ZSH_THEME and change it to agnoster

vim ~/.zshrc

To change the looks of agnoster theme simply edit theme file

vim ~/.oh-my-zsh/themes/agnoster.zsh-theme

To change color of current directory background simply change yellow to whatever color you want.

# Dir: current working directory
prompt_dir() {
  prompt_segment yellow $CURRENT_FG '%~'
}

Here's an example of how yellow color looks like:

Windows Terminal with agnoster theme

Last updated

Was this helpful?