Personal blog of Gunnari Auvinen. I enjoy writing about software engineering topics.

Picture of the author, Gunnari

iTerm2 and Oh My Zsh Setup

October 5, 2014

Setting Up My Personal Work Environment at Home

Now that I've finished DBC, I now have the time to setup all of the useful workflow tools at home that were introduced to me or that I discovered while there. Some tools in particular that I really, really liked were iTerm2 with zsh. The combination of these two things gave me incredibly important information that my standard terminal installation did not provide me. They enable me to see what git branch I am working on, whether it is clean or dirty with respect to git, and iTerm2 allows me to split my terminal windows vertically (CMD+D) and horizontally (CMD+SHFT+D)!

The last one specifically enables a lot of productivity for me, as I'm able to keep all of the information that used to be over several tabs in my terminal, on one single pane now instead. Standardly I have the following panes going: my Rails server, Rails console, React JSX compiler, and another pane to perform git workflow within. Having all of this information contained in one view allows me to quickly isolate problems, rather than having it over multiple tabs, which can hide critical debugging information from immediate sight.

How to Setup iTerm2, zsh, and oh-my-zsh

Downloading and setting up iTerm2 is incredibly easy, you can download it here. Once you've downloaded the compressed file, you just need to unpack it and then move that file into your Applications folder. That's it for that part!

There is a great guide on how to set up oh my zsh, which is a framework for managing your zsh configuration, on github. If zsh isn't already installed on your machine, this stackoverflow post explains how you can install it quite easily. Make sure that after you've completed your install, that you open a new terminal window to check the version of zsh.

zsh checks for updates automatically with its default settings and the only problem I ran into was when it returned an error that required sudo privileges. The command to run the Oh My Zsh upgrade again is upgrade_oh_my_zsh.

Oh My Zsh allows the easy integration of plugins via editing the .zshrc file which is located at ~/.zshrc in a standard install of Oh My Zsh. After reading over the plugin options, I chose to use the following plugins: git, node, npm, osx, sublime, and web-search. There are a lot of excellent shortcuts and work-flow optimizations available in these plugins as well as all of the other ones that are available.

I'm using this setup on my MacBook Air, which is running OS X Mavericks 10.9.5. After installing everything I have iTerm 2 v2.0, zsh 5.0.6, and Oh My Zsh, which are all working lovely together!