mac terminal environment configuration
Download iterm2
Download iTerm2 first
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Of course, you can also use brew to install iterm2
brew install iterm2
Install and configure Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
1. Install Powerlevel10k, link: https://github.com/romkatv/powerlevel10k
We quickly install it to /themes/powerlevel10k in the zsh directory
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
2. Configure oh my zsh theme
Open .zshrc in the ~ directory, and press shift+command+.
Change the ZSH_THEME configuration item to the following
ZSH_THEME="powerlevel10k/powerlevel10k“
3. Install and configure powerfont fonts
Font link: https://github.com/ryanoasis/nerd-fonts#font-installation You can directly enter the following command to install
brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
Then open the .zshrc configuration file to modify configuration items:POWERLEVEL9K_MODE='nerdfont-complete'
iTerm2 applies color and font
First open the link to download the official color theme of iTerm2
https://github.com/mbadolato/iTerm2-Color-Schemes
Choose the color you like, open iTerm2 and press the shortcut key command+i, select the color page, and select import in the color Presets in the lower right corner to import the desired color package in the schemes folder.
After opening iTerm2, press the shortcut key command+i, select the test page, and select the nerd font font in the font in the lower left corner
It's done~
mac default terminal applies color and font
Choose the color you like, open iTerm2 and press the shortcut key command+, , click the description file, click import in the lower left corner, select import to import the desired color package in the terminal folder in the downloaded color package, and set it as the default color
Similarly, the font selection is fixed width->nerd font font
This configures the default terminal~