- Download iTerm2 from https://www.iterm2.com/downloads.html
- Double click the downloaded ZIP file to extract the application,
- Move the iTerm application to Applications.
iTerm2 configuration
Use .bashrc for configuration
When you start iTerm, it reads its own config file, ~/.zshrc To keep using the standard ~/.bashrc config file
- Create the ~/.zshrc file and have only one line in it:source ~/.bashrc
Set case-insensitive tab completion
Add these lines to the ~/.zshrc file
# Set case insensitive comparison when lower case letters are typed.
# Upper case typed letters only match upper case file names
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
autoload -Uz compinit && compinit
Enable unlimited scroll back
- Start iTerm2 and open the preferences window by pressing ⌘, (command-comma)
- On the Profiles, Terminal tab click the Unlimited scrollback check box.
Set the highlight color
By default the highlighted text just a little different from the rest. When we search for something, it is hard to notice the found text.


To change the highlighted text color
- Start iTerm
- In the iTemr2 menu select Preferences…
- On the Profiles, Colors tab set the color of the Selection and Selected Text
Start iTerm2 from Finder
To be able to open iTerm2 in any folder from Finder follow the steps below based on https://gist.github.com/shuntaroy/e5ce3ad61c0deb7e27f0
- Start Automator,
- Select Quick Action and click Choose,
- On the top of the screen set Workflow receives selected to files and folders,
- Set in to Finder,
- On the second side bar from the left double click Run AppleScript to open the editor window,
- Paste the code from the website referenced above into the editor window replacing the sample script in the editor window,
- In the File menu save the script,
- Do not run it, it does not execute in the Automator.
To use it
- Open Finder and navigate to the location you want to work in,
- Right click a folder to work in that folder or a file to work in the current folder
- Select Services, iTerm2 in Finder

“Solarized” color scheme
- Download the color scheme to the Desktop with the following Bash command:curl -o ~/Desktop/solarized.itermcolors https://raw.githubusercontent.com/altercation/solarized/master/iterm2-colors-solarized/Solarized%20Dark.itermcolors
- Import the color scheme to iTerm2
- Press ⌘, (command-comma) to open the Preferences window
- Select Profiles
- In the lower right corner of the Colors tab click the Color Presets… drop down
- Select Import…
- On the Desktop select the downloaded solarized.itermcolors file
- In the Color Presets… drop down select Solarized Dark
Meslo Powerline font
- Import the Meslo Powerline font with the following bash command:git clone https://github.com/powerline/fonts.git && cd fonts && ./install.sh
- Select the font in iTerm2
- Press ⌘, (command-comma) to open the Preferences window
- Select Profiles
- On the Font section of the Text tab click the Change Font button
- Select the 12pt Meslo LG L Regular for Powerline
Make the prompt shorter
to remove your username@computername from the prompt
- Edit the ~/.bashrc file
- Add the following lineDEFAULT_USER=”YOUR_USER_NAME”
Colored prompt
To color the prompt:
- Download the agnoster theme
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- Edit the ~/.bashrc file and set the ZSH_THEME to ZSH_THEME=”agnoster”
More configuration suggestions are at
https://ruigomes.me/blog/perfect-iterm-osx-terminal-installation/
https://gist.github.com/kevin-smets/8568070
Information on how terminals read settings at https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/
Hi, i run c, c++ and java in vim(iTerm2) or emacs, the problem I have is that none of the codes wait for user input then necessery, it doesn’t happen in IDEs. I cannot find answer to this problem. Can you help…
Rob
Hi Rob,
I personally never experienced this, maybe someone has a suggestion…
Laszlo