前言#
What to do if the terminal is ugly? What to do if it lacks functionality? Use zsh!
Environment: Ubuntu 22.04
zsh 安裝#
Use the following command to check if zsh is already installed:
zsh --version
If the output is similar to zsh 5.8.1 (x86_64-ubuntu-linux-gnu)
, it is already installed, and you can proceed to the next chapter on oh-my-zsh installation.
If it is not installed, use the following command to install it:
apt install zsh
oh-my-zsh 安裝#
Execute the following command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
If the following output is displayed, the installation is complete.
修改主題#
After installation, we can apply various built-in themes ourselves. Theme List.
Located in the .zshrc
file, modify the content after the equal sign in ZSH_THEME=
, and don't forget to run the following command to apply the changes.
source ~/.zshrc
常見問題#
Please note that at this point, the default bash shell file should be changed to .zshrc
instead of .bashrc
. For example, if you cannot find a command after installing certain programs, please check if the configuration command has been added to .bashrc
by default. Please manually add it to .zshrc
.