Introduction
This is probably the simplest terminal configuration tutorial in the universe.
The following screenshots are my own commonly used configuration effects, which can easily provide some friendly tips, such as the branch used by the current git project, the time of command execution, etc.
begin
Install Iterm2
Download and install from the official website: https://iterm2.com/
Install zsh
Enter the command line
zsh --version
to check whether zsh is already supported.
If it is not supported, you can use it
brew install zsh
to install it.
Install oh-my-zsh
oh-my-zsh can be considered as a theme manager for zsh. Official website: https://ohmyz.sh/
The official provides the following commands to install
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Install powerlevel10k
Official github: https://github.com/romkatv/powerlevel10k
Installation command:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Students who have difficulty accessing github can use this:
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
Configure powerlevel10k
Open the
~/.zshrc
file, find the ZSH_THEME configuration item in it, and set it toZSH_THEME="powerlevel10k/powerlevel10k"
Enter the command line
p10k configure
, the following interface will appear, follow the prompts to operate step by step.
If you are not satisfied with your configuration, you can use thep10k configure
command to reconfigure at any time .