Zsh + Oh My Zsh + themes + powerlevel10k + plugins / bash replacement

Zsh

Install zsh:

sudo apt-get install zsh

Change the user default shell to zsh:

chsh -s $(which zsh)

Until reboot you can enter the zsh with command zsh.

If you are working in some desktop environment like Gnome you can log out and log in to save the change of default shell.

OMZ

Install Oh My Zsh:

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

Install the recommended font to show icons in command prompt (or any of recommended fonts):

Download and copy to ~/.local/share/fonts

Code:

mkdir -p ~/.local/share/fonts
wget -P ~/.local/share/fonts/ https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf
wget -P ~/.local/share/fonts/ https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf
wget -P ~/.local/share/fonts/ https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf
wget -P ~/.local/share/fonts/ https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf

Set the font in your terminal emulator settings to make it work.

Now you can play with omz command. Just type omz to get available options.

You can change theme to e.g. omz theme set simple etc.

Powerlevel10k

Optionally you can install one of best custom theme which is Powerlevel10k.

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

Set theme:

omz theme set powerlevel10k/powerlevel10k

For the first theme set, the configurator should run itself.

Once you are in powerlevel10k theme you can reconfigure it with p10k configure command.

Plugins

Now you can set plugins. Plugin list with command omz plugin list.

Recommended plugins:

  • git (set by default)
  • autosuggestions (zsh-autosuggestions)
    • install with git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
    • Enable with the command omz plugin enable zsh-autosuggestions

Sources