Top 5 iTerm2 Features I Rely On

Jon Ackerland
4 min readDec 24, 2022

--

YALOC2 — Yet Another List Of Crap #2 or a list of (un)common iTerm2 features I use daily.

Photo by Joan Gamell on Unsplash

If you have not heard of iTerm2 and you work as a software engineer or a DevOp, you must have been living under a rock. You absolutely have to give it a try, it’s probably the best terminal emulator for macOS out there.

1. Split Panes

Of course you can use tmux — it works on mac as well. But who wants to spend time learning how to use it? Not me, I prefer to get my job done effectively and fast. That’s why I absolutely love that iTerm2 comes with a built-in tmux abstraction and provides a simple and easy to use interface for it. Using multiple panes absolutely boosts my productivity.

Split panes in all their glory.

2. Broadcast Input

I find myself regularly working with several split panes at once. For example, each pane is a ssh connection to a different machine. What if I need to run the same command in each of the ssh sessions? Easy peasy if I use the broadcast input feature which allows me to broadcast the keyboard input to all or only select terminals on my screen. Absolutely amazing, especially when working with clusters.

Broadcasting input to all panes simultaneously.

3. Password Manager

“Why on earth do I want to use a password manager built into iTerm2?” That is a legitimate question. Since we’re civilized enough to use unique passwords for each set of credentials we need, we stopped writing them down in notepads and switched over to password managers. So why would anyone want to replace their favorite password manager with the one in iTerm2? It’s not about replacing anything. Have you ever needed to ssh into machines using the same, password protected ssh key? Did copy pasting that password from your favorite password manager to the terminal get old really fast? I am sure it did. If you add this credential to iTerm2’s password manager, you can forget about copy pasting. All you’ll need to do is use a keyboard shortcut to open the password manger in iTerm2, select the credential from a list and hit enter. And if you use split panes and need the same password in multiple panes, no problem, just check the broadcast checkbox. Oh and did I mention it detects if the terminal you’re trying to use the credentials in is not asking you for password and will not display the password in plain text even if you by mistake try to apply it in this case? Yes, it’s pretty sweet, definitely improved my quality of life.

Select that credential and boom … you’re in.

4. Search

Have you ever worked with a log, long output, a list of processes etc. and tried to find something specific in the output? Probably anyone who’s dealing with computer engineering problems experienced that at some point in their life. An approach to get your task at hand done is to read all the lines and try to find what you’re looking for. But who has the time for that? You can write scripts to filter our data you need and sometimes that’s the way to go. But iTerm2 has a powerful search feature built-in! It even highlights the hits for you and displays how many there are. And it works with anything on the screen from open files to command outputs. Imagine how happy this makes me as a vi user in environments where I am forced to use nano or emacs 😂

The power of search.

5. Instant Replay

Have you ever lost the content of the screen and needed to run that long running job for the n-th time? Nothing can be more frustrating than that. Happened to me way to often. Just imagine running a long load test on a virtual server and while documenting the results the VM is lost, logs are gone and your terminal scroll history is not going back far enough. You can rerun the test or use iTerm2’s instant replay to go back in time and see what you used to have on your screen. Time travel iTerm2 style.

Time travel with instant replay.

Hope you’ll find some of those features just as useful as I do! ◼️

Jon Ackerland

--

--

Jon Ackerland

Software Engineer, Traveler, Interested in Life and Such