Mac configuration Iterm2+oh-my-zsh+powerlevel10k to create a cool terminal

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.Insert picture description here

begin

Install Iterm2

Download and install from the official website: https://iterm2.com/

Install zsh

Enter the command line zsh --versionto check whether zsh is already supported.
Insert picture description here

If it is not supported, you can use it brew install zshto 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 ~/.zshrcfile, find the ZSH_THEME configuration item in it, and set it toZSH_THEME="powerlevel10k/powerlevel10k"
Insert picture description here

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 the p10k configurecommand to reconfigure at any time .
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_52777294/article/details/114708621
Recommended