Iterm For Mac



ITerm2 is a free and open source terminal emulator that offers users a robust search tool.

  1. Iterm 2 Download
  2. Iterm Shortcut For Mac
  3. Iterm For Mac Catalina

Outline

Usually, the meta key is mapped to Alt key on Windows and Linux. However, in iTerm, I could not find a way to map this meta key to either Option or Command key on my MacBook Pro. It seems that in OS X, the meta key is by default mapped to ESC key. So you can use ESC-f, ESC-b on iTerm. However, ESC key is apparently not practical to use. Windows console emulator with tabs, which presents multiple consoles and simple GUI. ITerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.12 or newer. ITerm2 brings the terminal into the modern age with features you never knew you always wanted. Why Do I Want It? Check out the impressive features and screenshots. If you spend a lot of time in a terminal, then you'll appreciate all the little things that add up to a lot.

I try to write how to configure the development environment from very first time on Mac. this blog is a series. if you want to know other development environment, see other blog posts.

in here, I’ll introduce how to configure iTerm and zsh on Mac.

iTerm Installation

click the link below to go to iTerm download page.

  • iTerm download: Download

you can see the screen like below, click Stable Releases to download.

unzip zip file you downloaded and install it.

if iTerm asks you Full Disk Access permission, click Open System Preferences on the right bottom.

you can see the nice explanation and Security & Privacy is activated. click the lock shape on the left bottom, and insert your password to make editable.

select Privacy on the top tab, and click Full Disk Accesss on the left list.

click + button on the right side. go to Applications, and select iTerm and click Open.

if Mac asks you that you want to quit iTerm, click Quit Now to quit iTerm.

after it, check iTerm is executed.

zsh

zsh makes Terminal easier to use. if you want to know more details, click the link below.

  • zsh official site: zsh

you can find the installation on zsh official site like below.

open iTerm or Terminal and execute the command below.

after installing, you can see the screen like below.

Configure zsh to iTerm Default Terminal

iTerm’s default is to use the basic shell. let’s set iTerm uses basically zsh.

execute iTerm and click iTerms2 > Preferences... on the left top.

you can see the screen like above. click Profiles tab on the top. insert /bin/zsh in Command on Command section on the right middle.

Iterm 2 Download

after it, restart iTerm. you can see zsh is executed by default.

Configure iTerm Theme.

Iterm For Mac

there are many themes for iTerm. you can configure the theme what you want. in here, I’ll introduce how to set iterm2-solarized theme.

click the link below to download the theme.

when you click the link above, you can see the theme file contents. push command + s to save it.

before you download it, change to All Files on Format on the bottom. and check the end of the file is .itermcolors.

open Preferences of iTerm again.

click Profiles > Colors like above, and click Color Preset... > import... on the right bottom.

select Solarized Dark - Patched.itermcolors file you downloaded above.

select Color Preset... again, you can see Solarized Dark. click it to change the theme.

Configure Powerlevel9k

to show more information on zsh, let’s configure Powerlevel9k. you can see the screen like below, when you execute current iTerm.

execute the command below to download Powerlevel9k.

zsh’s configuration file is ~/.zshrc. open it and set Powerlevel9k.

find the theme configuration.

change the theme from ZSH_THEME='robbyrussell' to ZSH_THEME='powerlevel9k/powerlevel9k' and save it.

to restart iTerm, you can see the screen like below.

you can see user information and ?. the question mark is shown up when the font is not set. click the link below to go to the font download site.

when you click the link above, you can see the screen lik below. click View Raw to download the font.

after downloading it, click the font file to execute it.

click Install Font on the right bottom to install it. after installing, open Preference on iTerm again and click Profiles > Text > Change Font.

select Meslo LG M Regular for Powerline what we downloaded above.

when you execute iTerm, you can see the screen like above.

I don’t like to show my long username, so I configured it not showing up. execute the command below if you want to hide it.

add the content below to the bottom.

or you can customize it like below.

you can see the details about the option on the official site.

  • official site: https://github.com/bhilburn/powerlevel9k

restart iTerm. you can see the user name not displayed.

Connect vscode and zsh

in here, we’ll set code command of vscode on zsh, and zsh to vscode’s default terminal on vscode.

Configure vscode command to zsh

execute the command below to open zsh configuration file.

add the content below to the bottom of the settings file.

restart iTerm and execute the command below to check vscode activated.

Configure zsh to vscode

click Code > Preferences > Settings on the left top of the vscode.

Iterm

search shell and change /bin/bash to /bin/zsh on Terminal > Integrated > Shell: Osx.

if you see Edit in settings.json instead of the screen above, click the link and add the content below.

also, search fontfamily and set Meslo LG M for Powerline on it like below.

after it, to execute Terminal on vscode, you can see zsh executed.

Github Sponsor

Was my blog helpful? Please leave a comment at the bottom. it will be a great help to me!

I am spending a lot of time on the command line for the daily development work. I decided to install iTerm2 terminal as an alternative terminal for Mac OS because the default terminal app does not offer rich and powerful features to make my development life easier. So I decided to install advanced alternative terminal to replace Mac OS default terminal.

Before you install iTerm2, please refer its features on their website.

If you happy it’s features and power, you can download the iTerm2 from the following link. Alternatively, you can use Homebrew package manager to install this package.

Install iTerm2 terminal

After download iTerm2 installation file, simply drag and drop into the Applications folder to install iterm2 terminal app. Now you can launch iTerm, through the Launchpad for verifying the installation.

Alternatively, you can install iTerms2 via Homebrew package manager. Once you install the package using Homebrew, you will be able to launch iTerm2 via Mac Launchpad.

When you open iTerm2, it’s looks and feel not that pretty impressed by the first look. You need to follow few more steps to get the look you preferred. You can completely change its looks and feel by customizing default features.

Let’s just quickly change some preferences.

Remove computer name and username from the terminal’s bash prompt

Open iTerms2 “Preferences” configurations box. Then click on “Profiles” tab and select “General” tab.

iTerm2 -> Preferences ->Profiles -> General

Add following text under “Send text at start:” text input.

Close the “Preferences” box and reopen iTerm2 terminal and you will be able to see bash prompt without the computer name and username.

Change default colour theme and fonts

You can download more colour themes to install iterm2 terminal from this web site. http://iterm2colorschemes.com/

Download the zip file and unzip it for the preparation of the next step. Now open the “Preferences” settings window.

You can create a different profile other than Default if you wish to do so. I created a new profile for adding custom settings to the iTerm2.

Open iTerms2 “Preferences” configurations box. Then click on “Profiles” tab and select “Colours” tab.

iTerm2 -> Preferences ->Profiles -> Colours

Now click on “Colour Preset” drop-down and click on “Import” option. Navigate to the “schemes” folder previously unzipped colour profile folder. Then select your preferred colour themes and selected colour themes will be added to the “Colour Preset” drop-down after installing.

Now reopen iTerms terminal and see the effect of the new colour theme.

Once I customize iTerm2 colour theme still I did not see expected nicer interface. I decided to install Oh-My-Zsh to add more features.

Before install Oh-My-Zsh, you need to remove the previously modified text input in the iTerm2 preferences.

Because of Oh-My-Zsh, follow the different approach to remove the user@your_machine name from your bash prompt.

Iterm Shortcut For Mac

Oh-My-Zsh is an open source, the community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes,

Install Oh-My-Zsh

It’s a good idea to backup your existing ~/.zshrc file before installing Oh-My-Zsh.

Now you can use the following command on your terminal to install Oh-My-Zsh. You will be able to find more details on their website.

Now you almost have better terminal compared to default one. I decided to use “Agnoster” theme with the Oh-My-Zsh.

You can find many available themes for Oh-My-Zsh here. Before you enable “Agnoster” theme, you need to install Powerline fonts.

After installation completed edit ~/.zshrc and set ZSH_THEME=”agnoster”

After enabling “Agnoster” theme, you may be able to see broken fonts on the iTerm2, follow this GIT issue for fixing this fonts issue.

Users need to set both the Regular font and the Non-ASCII Font in “iTerm > Preferences > Profiles > Text” to use a patched font.

Iterm For Mac

Now you may need to remove user@your_machine name from your bash prompt. Add following lines to your “.zshrc” configuration file and restart your iTerm2 terminal.

After you done all the above customizations, you can find your iTerm2terminall as following.

How to enable packages on Oh-My-Zsh

Oh-My-Zsh by default comes with lots of plugins to take advantage of. You can take a look in the plugins directory to see what’s currently available.

Once you spot a plugin (or several) that you’d like to use with Oh-My-Zsh, you’ll need to enable them in the .zshrc file.

I have enabled following plugins in my configuration file.

How to upgrade Oh-My-Zsh

Iterm For Mac

If you need to upgrade you just run following command on your terminal.

How to uninstall iTerm2 terminal

Uninstalling Oh My Zsh

If you decided to uninstall iTerm2, first remove the Oh-My-Zsh theme. This will revert back your original zsh configurations.

Iterm For Mac Catalina

If you want to uninstall oh-my-zsh, just run uninstall_oh_my_zsh from the command-line. It will remove itself and revert your previous bash or zsh configuration.

Uninstall iTerm2

If you install iTerm2 terminal vis Homebrew package manager, just type the following command on your terminal.

If you download installer file from directly from their website, you just need to trash it from “Application” folder.

I hope you will enjoy the features of iTerm2 terminal and Oh-My-Zsh. Please comment your thoughts below.