This quick tutorial shows you how to install ZSH Shell on your OSX, Ubuntu or any similar environment, like Vagrant. Why would you want to do this? Pretty syntax highlighting, plugins, auto complete and much more! Now it’s not as fast as bash but i notice almost no difference.
Ok let’s get started.
First, Install ZSH
open terminal and type
sudo apt-get update && sudo apt-get install zsh
If above Apt is not working then do this:
If you get command not found (you might get this if running Mac OSX Sierra) we are going to install Brew package manager. If you already have it installed then skip the step below:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You might get a prompt about installing Xcode. You just need to agree and then you should be set. Once brew is installed then just do
brew install zsh zsh-completions
Setup Oh My Zsh
This will allow theming and other plugins using Oh My Zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
Change shell to ZSH and make it default
chsh -s /bin/zsh
Log out and log back in out of the terminal and you will be all set! You can now edit the .zshrc file and customize your themes as well as plugins. The .zshrc is located at ~/.zshrc
You can see how all themes look by going to: http://zshthem.es/all/
Another good plugin to get is syntax highlighting
It basically highlights commands as you type, green if its valid
Yellow if it’s not valid yet:
Red if it’s invalid
Additional cool highlighting (like if you are root, or matching brackets etc can also be enabled by looking at the doc here)
Hope this helps you being even more productive, let me know how it worked out in the comments.
Not sure OSX uses Aptitude…
Yep, you are right. Sorry about that, i’ll update the guide. You can use brew to install it on OSX
Not sure OSX uses Aptitude…
Yep, you are right. Sorry about that, i’ll update the guide. You can use brew to install it on OSX