Well, out-of-the-box ZSH comes with all sorts of cool things like better tab completion, syntax highlighting, better aliasing and all sorts of cool things but really the main reason I switched over was so that I could specifically use this framework. ZSH coupled with Oh My ZSH offers a much nicer experience in my opinion than the standard BASH which comes as standard on every Raspberry Pi. This is because you can have different and easily installable themes, there are hundreds of different plug-ins for different bits of software and tons of other things to numerous to go into here but will definitely make your Terminal emulator experience nicer.
Will your Raspberry Pi work well without ZSH? Certainly. Will it work better with ZSH and Oh My ZSH? In my humble opinion, yes it will!
Update your Raspberry Pi
Before you do anything major on your Raspberry Pi, you should always update and upgrade the software first. This is very simply done with the following command:
sudo apt-get update && sudo apt-get upgrade
Installing Git and ZSH
sudo apt-get install git zsh
Make ZSH your Default Shell
After installing zsh, you need to make it the default shell on your Raspberry Pi. This is done with the following command, after you’ve issued this you need to log out and log back in for the change to take affect:
chsh -s /bin/zsh
That done, using the ZShell by itself would be all kinds of awesome, but Oh My ZSH takes it to a place that makes geeks go tingly. Seriously.
Installing Oh My ZSH
So, how do we begin the massively complicated installation process that such awesomeness would surely require? Well, you almost certainly shouldn’t take some random command offer random blog and run it on your machine without checking what it does first, that’s just common sense. However, I didn’t check and I used one of the commands below to install Oh My ZSH and nothing has exploded yet.1 Who knows, maybe the Chinese are tracking everything I do!
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
That’s it, when the installation script has finished running you should have a fully working version of Oh My ZSH! You may have to log out of your raspberry and log back in, but I’ve only had to do that in the rarest of cases.
This post is intended to just get you up and running using Oh My ZSH, however if you’d like to delve a little further into what it can do is a list of resources I’ve found useful whilst using ZShell. In particular, Intridea’s Blog post was absolutely invaluable.
- Unix ZSHell Reloaded
- Cheatsheet - oh-my-zsh Wiki
- It’s not enough to bash in heads, you’ve got to bash in minds…with ZSH
- Mooduino: Z Shell on Mac OS X
- Oh My ZSH Build Podcast
- RailsCasts episode on oh-my-zsh
Let me know if you need any help getting setup!
What was that about convenience vs security? ↩