Skip to content

Latest commit

 

History

History
114 lines (79 loc) · 2.13 KB

zsh-installation.md

File metadata and controls

114 lines (79 loc) · 2.13 KB

Installation

For Ubuntu Linux

sudo apt-get update && sudo apt-get install zsh 

Install oh-my-zsh from https://github.com/ohmyzsh/ohmyzsh

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

OR

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

Change the default shell to z-shell

chsh -s /bin/zsh 

For Mac OSX

brew update 
brew install zsh

Install oh-my-zsh from https://github.com/ohmyzsh/ohmyzsh

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

OR

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

Change the default shell to z-shell

# You don't need it for the new macOS
chsh -s /usr/local/bin/zsh 

Install Powerline Fonts for agnoster theme

It is not necessary for Server

cd to/wherever/you/like 
git clone https://github.com/powerline/fonts powerline-fonts 
cd powerline-fonts 
./install.sh 
  • Open ~/.zshrc and change (Do only this on Server)
ZSH_THEME="robbyrussell"

to

ZSH_THEME="agnoster"
  • Now, you need to change the terminal font to one of powerline ones.

e.g.) Mac OS X

Mac OS X Terminal: Use Powerline Font

FiraCode

I also recommend FiraCode font, which supports ligatures. Both macOS's Terminal and iTerm2 support ligatures.

In iTerm2, Open Preferences (Cmd+,)

  1. Profiles tab
  2. Select the profile you're using (or just the default one with *)
  3. Move to the Text tab
  4. Check the Use ligatures option

iTerm2 settings to use ligatures

Install zsh-syntax-highlighting plugin

cd ~/.oh-my-zsh/custom/plugins 
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git 
  • Open ~/.zshrc and change
plugins=(git)

to

plugins=(git zsh-syntax-highlighting)