linux_wiki:zsh_and_oh-my-zsh

This is an old revision of the document!


Zsh And Oh-my-zsh

General Information

Setting up great looking terminals with zsh, oh-my-zsh and theming.

Checklist

  • Fedora 28, Ubuntu 16.04 or Enterprise Linux 7

Install ZSH

Install zsh.

  • Fedora
    sudo dnf install zsh
  • Ubuntu
    sudo apt install zsh
  • EL 7
    sudo yum install zsh

Configure zsh as your default login shell.

  • Fedora, Ubuntu, EL 7
    • Change shell
      chsh -s $(which zsh)
    • Log out and back in
    • Verify
      echo $SHELL

Note: This only works for local accounts. If you are using LDAP, you will need to set your default login shell in your LDAP user profile.


Install oh-my-zsh

Oh-My-Zsh is a framework for managing zsh configuration. It adds tons of themes and plugins to zsh.

Official site: https://ohmyz.sh/

  • Install pre-reqs (git and curl)
    • Fedora
      sudo dnf install git curl
    • Ubuntu
      sudo apt install git curl
    • EL 7
      sudo yum install git curl
  • Install oh-my-zsh
    sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Configure Zsh

Configuring zsh.

Easily change your zsh theme.

List of all theme names/screenshots here: https://github.com/robbyrussell/oh-my-zsh/wiki/Themes

  • Edit zsh config
    vim ~/.zshrc<
     
    # Set theme name here
    ZSH_THEME="agnoster"
  • Re-read config changes
    source ~/.zshrc

The powerline fonts are intended for use with the agnoster theme.

  • Clone the repo
    git clone https://github.com/powerline/fonts.git
  • Install
    cd fonts
    ./install
  • Quit your terminal and re-open it
  • Configure your terminal to use a PowerLine regular font
    • GNOME Terminal
      • Edit > Profile Preferences
      • Check “Custom font”, then click the font name
      • Browse to and select “Meslo LG L for Powerline Regular” (or some other powerline font)

  • linux_wiki/zsh_and_oh-my-zsh.1532808902.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)