When people ask me why I'm using a Mac instead of a Windows device for doing all my stuff, I always end up with a single but significant reason: I have a real shell! Most hardcore Windows fans are answering to this comment: 'Well there is PowerShell' or: 'Hey we have Cygwin' but to be honest, those are no alternatives to a real shell 🙂
A 7-year-old critical remote code execution vulnerability has been discovered in iTerm2 macOS terminal emulator app—one of the most popular open source replacements for Mac's built-in terminal app. ITerm2 is a fork of the older iTerm project. ITerm2 is a Terminal replacement and the successor of iTerm. It focuses on speed, internationalization, and building new features to improve your life. ITerm2 is a free and open source terminal emulator that offers users a robust search tool coupled with auto-complete commands, multiple panes in independent sessions, multiple profile support, several customization options, etc.
A few people asked me over the time which configuration/theme and stuff I use within my terminal and because I've to set up a new device in these days (a stunning brand new 13' MBP Retina with ForceTouch)
I'll use the chance to explain my setup a bit…
- Since we're going to be spending a lot of time in the command-line, let's install a better terminal than the default one. Download and install iTerm2. In Finder, drag and drop the iTerm Application file into the Applications folder. You can now launch iTerm, through the Launchpad for instance.
- Oh-my-posh seems to cause iTerm2 to show an alert with every prompt. I don't know what is causing this. I'll happy dig into this if you could give me a clue where to look? I'm using the same font (Cascadia Mono PL) in iTerm2 with oh-my-z.
iTerm2
iTerm2 is an alternative to Apple's OOB Terminal App. Both can be installed side by side. So no worry, you will not break anything when installing it.
Either you can download iTerm2 from here or you can install it using homebrew by executing
Installing Solarized Theme for iTerm2
Make iTerm2 comfortable by applying the Solarized theme.
After downloading the theme open iTerm2 and import the downloaded solarized theme through
iTerm -> Preferences -> Profiles -> Colors -> load presets -> Import
OH-MY-ZSH
OH-MY-ZSH is a replacement for the default bash on macOS. OH-MY-ZSH also runs side-by-side with bash, so again no worries.
Install it by invoking
After installation has finished open ~/.zshrc
in any editor and set the theme for ZSHZSH_THEME='agnoster'
.
Installing PowerLine
Powerline font is responsible for bringing some kind and helpful icons to the terminal. For example, it's displaying branches in the following way
You can download the font from here, install this font on your system and then apply it in iTerm2 through
iTerm -> preferences -> profiles -> text
I've chosen 11pt as font-size for my setup, so apply PowerLine for Regular Font and Non-ASCII Font by clicking each Change Font button and select the PowerLine font.
More Power with Plugins
OH-MY-ZSH ships with support for plugins. Their documentation on GitHub is listing which plugins were currently part of the release. By default, those plugins were not enabled. To enable them, you've to list them inside of your .zshrc
Webstorm 2020.1.1. File. I use only a few plugins to keep things simple.
Open your .zshrc
file and look for plugins=()
, once you find that line, list all plugins you want to use within the braces as shown here: plugins=(git bower sublime brew history node npm sudo web-search)
.
Plugins can either extend the auto-completion tab, create new key bindings or create new aliases within your terminal. So take a minute and read through the descriptions of those plugins before enabling them. It's worth reading the description for each plugin, because you may end up with being even more productive.
That's it for iTerm, but
Now you've installed and configured a good starting point. However, you should not stop here. I've written another article on how to setup NVM on your system to switch and maintain multiple Node.js installations easily. Go and read the article now!
I decided to dedicate my first review in 2019 to an app that I've been using for a long time now. iTerm2. The superb macOS terminal app.
The first time I started using a terminal app was back in the days when News47ell was hosted by DigitalOcean. I used to SSH into my server when I needed to manage the backend of my site.
Now, I use the terminal to build and manage News47ell on GitHub.
If you are someone who just started using Terminal.app, I recommend that you switch to iTerm2. And if you're someone who's looking for the best terminal app for macOS, congratulations, you've found it.
Even if you have no idea why you are here and you clicked on this link by mistake and kept reading all the way until here, first, Thank you and second, this app is for you.
In all seriousness, iTerm2 is great. It packs a lot of features that are missing from Terminal.app that allow you to customize the app and make it truly yours.
So let's take a closer look at it
Hotkey Window #
Have you ever played Counter-Strike and you wanted to enter a cheat code? You press the ~ button and a console menu appear from the top. Well, you can do the same thing with iTerm2.
The Hotkey Window feature allows you to register a hotkey that will bring iTerm2 to the foreground so you can quickly use it even if you're inside another app.
Split Panes #
This feature allows you to work and keep an eye on multiple things at the same time.
For example: When I work on this site, I have 3 panes opened at the same time.
- One for VIM.
- One for Hugo server running at all time.
- And the last one for general things like a file manager.
Iterm2 For Mac
Instant Replay #
Well, this should be obvious. iTerm2 allow you to have an instant replay of everything that you did inside the terminal window. A line you edited, a code you executed, a file you opened, everything is recorded and you can watch a replay of it instantly.
Inline Images #
Iterm2 For Mac
I had no idea about this one until I started writing the review. You can view images and GIFS inside iTerm2.
It uses two shell scripts, imgcat to display full resolution images and imgls to list all images.
Profiles #
I have 3 profiles set up and I switch between them depending on what work am doing inside the terminal.
The first profile is the default one which I use for full-screen writing when I want to write a new article using vim.
Download Iterm2 For Mac
More Power with Plugins
OH-MY-ZSH ships with support for plugins. Their documentation on GitHub is listing which plugins were currently part of the release. By default, those plugins were not enabled. To enable them, you've to list them inside of your .zshrc
Webstorm 2020.1.1. File. I use only a few plugins to keep things simple.
Open your .zshrc
file and look for plugins=()
, once you find that line, list all plugins you want to use within the braces as shown here: plugins=(git bower sublime brew history node npm sudo web-search)
.
Plugins can either extend the auto-completion tab, create new key bindings or create new aliases within your terminal. So take a minute and read through the descriptions of those plugins before enabling them. It's worth reading the description for each plugin, because you may end up with being even more productive.
That's it for iTerm, but
Now you've installed and configured a good starting point. However, you should not stop here. I've written another article on how to setup NVM on your system to switch and maintain multiple Node.js installations easily. Go and read the article now!
I decided to dedicate my first review in 2019 to an app that I've been using for a long time now. iTerm2. The superb macOS terminal app.
The first time I started using a terminal app was back in the days when News47ell was hosted by DigitalOcean. I used to SSH into my server when I needed to manage the backend of my site.
Now, I use the terminal to build and manage News47ell on GitHub.
If you are someone who just started using Terminal.app, I recommend that you switch to iTerm2. And if you're someone who's looking for the best terminal app for macOS, congratulations, you've found it.
Even if you have no idea why you are here and you clicked on this link by mistake and kept reading all the way until here, first, Thank you and second, this app is for you.
In all seriousness, iTerm2 is great. It packs a lot of features that are missing from Terminal.app that allow you to customize the app and make it truly yours.
So let's take a closer look at it
Hotkey Window #
Have you ever played Counter-Strike and you wanted to enter a cheat code? You press the ~ button and a console menu appear from the top. Well, you can do the same thing with iTerm2.
The Hotkey Window feature allows you to register a hotkey that will bring iTerm2 to the foreground so you can quickly use it even if you're inside another app.
Split Panes #
This feature allows you to work and keep an eye on multiple things at the same time.
For example: When I work on this site, I have 3 panes opened at the same time.
- One for VIM.
- One for Hugo server running at all time.
- And the last one for general things like a file manager.
Iterm2 For Mac
Instant Replay #
Well, this should be obvious. iTerm2 allow you to have an instant replay of everything that you did inside the terminal window. A line you edited, a code you executed, a file you opened, everything is recorded and you can watch a replay of it instantly.
Inline Images #
Iterm2 For Mac
I had no idea about this one until I started writing the review. You can view images and GIFS inside iTerm2.
It uses two shell scripts, imgcat to display full resolution images and imgls to list all images.
Profiles #
I have 3 profiles set up and I switch between them depending on what work am doing inside the terminal.
The first profile is the default one which I use for full-screen writing when I want to write a new article using vim.
Download Iterm2 For Mac
The second profile is tmux.
Last profile is a dropdown profile which I talked about in the Hotkey Window feature section.
Customization #
There are many options to choose from and to make iTerm2 YOUR terminal.
Like the option to enable/disable GPU rendering, dimming of inactive windows, borderless windows, colors and fonts, and a ton of experimental features.
Development #
Although both Terminal.app and iTerm2 are still in development and both receive updates, with Terminal.app, you have to wait until a new version of macOS to get new features while with iTerm2, anytime the developer pushes a new update, you receive it right away.
I don't like waiting a year to receive an app update. That's why I like to stay away from all the apps that are made by Apple.
Conclustion #
Download Iterm2 For Mac
You really should use iTerm2. There's no other way of putting it.
The app has much more features than the ones I mentioned like tmux Integration Mouseless Copy, Autocomplete and Shell Integration. There's a big community out there that uses the app on a daily basis. It's free, but you can always donate to the developer George Nachman.