Skip to content

zhihao0797/iterm2-with-oh-my-zsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Install Oh My Zsh and Configure on macOS with iTerm2


1. Install iTerm2

  • Download iTerm2 from iTerm2 Official Website.
  • Optionally, set it as the default terminal: Preferences → General → "Make iTerm2 Default Term".

2. Install Zsh

  • Zsh is pre-installed on macOS. To upgrade:
    brew install zsh
  • Verify installation:
    zsh --version
  • Set Zsh as the default shell:
    chsh -s $(which zsh)
  • Restart iTerm2.

3. Install Oh My Zsh

  • Run the following command:
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

4. Install Plugins

  • Open the configuration file:
    nano ~/.zshrc
  • Add plugins:
    plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)

Install additional plugins:

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

5. Install Powerlevel10k

  • Clone the theme:
    git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
  • Set the theme:
    ZSH_THEME="powerlevel10k/powerlevel10k"
  • Reload Zsh:
    source ~/.zshrc
  • Configure the theme:
    p10k configure

6. Install Nerd Font

  • Download a Nerd Font from Nerd Fonts. Recommended: Hack Nerd Font or MesloLGS NF.
  • Install the font by opening the .ttf file.
  • Set the font in iTerm2: Preferences → Profiles → Text → Change Font → Select the Nerd Font.

7. Reload Configuration

source ~/.zshrc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published