Introduction#
What to do if the terminal is ugly? What to do if it lacks functionality? Use zsh!
Environment: Ubuntu 22.04
zsh Installation#
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 skip 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 Installation#
Execute the following command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
If the output is as follows, the installation is complete:
Changing Themes#
After installation, you can apply various built-in themes. 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
Common Issues#
Note that at this point, the default bash shell file should be changed to .zshrc
instead of .bashrc
. For example, if you can't find a command after installing certain programs, check if the configuration command has been added to .bashrc
by default, and manually add it to .zshrc
.