Setup iterm2 for mac
Published: 2023-09-04 10:53:38




1. download Xcode

2. install homebrew

```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

and add homebrew to zsh profile

`echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc`

restart terminal

now you can using the homebrew

3. install iterm2 with homebrew

```
brew install --cask iterm2
```


![install iterm2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6enjdsxuwlg8ofgty8gz.png)

now you can use iterm2

4. install ohmyzsh with curl

[ohmyzsh repo](https://github.com/ohmyzsh/ohmyzsh)

`sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`


![install ohmyzsh](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yz7pxic4gcoc5gs6cvsy.png)


5. install zsh theme powerlevel10k

[powerlevel10k repo](https://github.com/romkatv/powerlevel10k)

- install recomended font
- install powerlevel10k with ohmyzsh

`git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k`

Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc.

and do these step


![install recomended font](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ns7lf4x8doom5z9tsho7.png)

press y


![Quit iterm2 and reopen it](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bymlb1ncw0904emqu4y2.png)

Quit iterm2 and reopen it


![icon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3sc41u0dfwaumvwa4qzt.png)

press y


![lock](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12hauef49g972aa6yecn.png)

![arrow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gv1nbt5irnysk1ltc2y.png)

![icon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x29iyjkhjf1xtksxr2pa.png)

![rainbow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pz5d6gscuchwvf0kj5p8.png)

press 3


![unicode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkay5x7jaeifw8nuyiot.png)

press 1


![24 hour](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hu2855k6d4vi1e8eutub.png)

press 2


![angled](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g62b6153s418h3eg9h9o.png)

press 1


![Blur](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/btsqr4pmn5ew3iuw0maw.png)


![blur front](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpbavsf30tz1o4d75j3o.png)

press 2
![1line](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tc0ez88ph5rfhjc0gjdk.png)

press 1
![compact](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3bfay6ktkcdzauuzjz7b.png)
press 1


![many icon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8crwrrrm08pndmljq5pm.png)

press2


![transient](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oukos0khzmyxp9qtr82x.png)

press n


![verbose rec](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/en7wzwypq69z7f7xsj6r.png)

press 1



![apply change](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/67eylkguioip5u7t4khm.png)
press y

now your terminal look like this

![term](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aplkemzvz8rvegl1zqdk.png)




make command code . work with vscode 

Open the Command Palette via ⌘⇧P and type shell command to find the Shell Command:

![shell command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qn7cuvn9nt2vw0jvlel6.png)


6. add theme to item2

[iterm2 color schemes](https://iterm2colorschemes.com/)


![Brogrammer color](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kkkefyyvi3xccp2pj894.png)

I'm using Brogrammer color scheme

change color preset iterm2

![color preset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9ppzwp7esjf53fmokgs.png)


![Bro](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/549bzaqp865qq15s2doq.png)


7. add zsh plugins

before doing this you have to


[zsh-autosuggestion install.md](https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md)
install zsh-autosuggestion with oh-my-zsh

`git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions`


[zsh-syntax-highlighting install.md](https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md)
install zsh-syntax-highlighting with oh-my-zsh

`git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting`


after run both command you need to add this line to zsh profile
`plugins=(git zsh-autosuggestions zsh-syntax-highlighting)`


![plugin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jtwcru22h52yxdng39fw.png)