Tips for Making Your Terminal Usable and Pretty using iTerm2

Ian Lintner
Pour Over
Published in
3 min readNov 16, 2015

The terminal or command line has always been about bare bones utilitarianism. The terminal is just text input and output, but the truth is you can apply a little bit of UX and make your terminal far more usable and at the same time pretty.

This article is going to focus on iTerm2 for Mac. The reason is that it offers some Features & UI customization that allows us to create a killer workflow.

Terminal Profiles

One of the important features is profiles in iTerm2. It allows us to quickly open a new session in a tab or window that has a customized UI and run commands on start up. Particularly import is being able to open a SSH or login into a Docker shell.

Terminal Profile Features

  • Change Fonts / Colors (Theme)
  • Background Images
  • Run a command on startup
  • Hotkeys
  • Window/Tab Settings
Profile Preferences iTerm2

Profile Strategy

I create a profile for each of my common SSH connections and standard Docker containers so I can quickly open a new tab and have my ssh session rather than starting the new session in my current window.

I have a couple dozen SSH environments and local docker containers that I have to connect to so this provides a good way to manage all of these connections in one place.

SSH Profile Example

I use a profile per connection.

Then when you are in your terminal window you can quickly look up your profiles with ⌘-o

Profile UI

So the biggest feature I use besides running a command on startup is background image. I created a background image with server and the environment for each profile. So when I cycle through my tabs I have an instant visual indicator that I have the right session.

Example environmental background image

Another option is to use different themes and set the background/text colors to represent different environments. This works and doesn’t require creating the images in an editor. E.g. use a shade of red for production servers to remind you that you are working in production.

Now we know which server we are connected to

Misc Tip — Hotkey

One of my favorite features in iTerm2 is the ability to use a hotkey. I prefer ⌘-` to quickly bring up my terminal in full screen aka ‘visor’ mode. As a developer I am constantly needing to run a command here or run some of my development tools. It removes the need to take my hands off the keyboard.

Conclusion

Taking a few minutes and creating profiles for each of your most used connections and nice background or color scheme. Can drastically optimize your workflow. It has the added benefit of reminding you which server you are connected to and thereby reducing the chance of running a command on the wrong server… basically any administrators worst nightmare.

Happy Hacking!

--

--

Ian Lintner
Pour Over

Full Stack Software Engineer, Local Food Producer, Digital Philosopher. https://www.linkedin.com/in/ianlintner