Final result:


The previous article covered a beginner’s guide to WSL2. Next, I will introduce how to customize the terminal.
1. Install ZSH
1 | sudo apt install zsh |
Then configure it as the default shell.
1 | cat /etc/shells # List the shells available on the system |
If you see
su: Authentication failure when logging in as root with su, root may not have a password set. Use the following command to set the root password:
1 | sudo passwd root |
Run exit and open the terminal again. It will now use the zsh shell, and you will see the following screen:

You can press 1 to customize it according to the instructions, press 2 to use the recommended configuration, or press 0 or q to leave it unchanged. When installing ohmyzsh later, a new .zshrc will be generated automatically, and the old .zshrc will be renamed to .zshrc.pre-oh-my-zsh.
1 | echo $SHELL # Check the shell currently in use |
2. Install ohmyzsh
Run the following command:
1 | sh -c "$(curl -fsSL https://install.ohmyz.sh/)" |
There will be a prompt during the process. Just press Enter.
~/.bashrc will not take effect in zsh. You can migrate it to ~/.zshrc yourself.3. Switch Themes
You can choose any theme you like. ohmyzsh includes some themes by default, which you can browse in ohmyzsh Themes.
Here I recommend the theme I have been using: powerlevel10k. It needs to be installed manually, so the installation method is introduced below.
Install Nerd Fonts
Go to the Nerd Fonts website and download a font you like. I use UbuntuMono Nerd Font. Then install it directly on Windows. I am using WSL2 here; if you use another system, install it on the corresponding system. After extracting the archive, select all .ttf files, right-click, and install them.

Then switch the terminal font. Tabby is used as the example here.

There are usually three options. They differ in details such as character width and spacing. You can try them one by one and choose the one you like most from the preview below.

Install powerlevel10k
Run the following command:
1 | git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k" |
Then edit ~/.zshrc and set the value of ZSH_THEME to powerlevel10k/powerlevel10k. Open the terminal again, and powerlevel10k will show its initial setup wizard. Follow the guide to configure it.
4. Install Plugins
ohmyzsh includes many plugins by default. You can enable them yourself. See ohmyzsh Plugins.
Here are a few plugins I recommend.
zsh-syntax-highlighting
This plugin highlights the commands you type. Install it with the following command:
1 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting |
Then add zsh-syntax-highlighting to the plugins entry in ~/.zshrc.
zsh-autosuggestions
This plugin provides smart suggestions for the command you are typing based on commands you have entered before. Install it with the following command:
1 | git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
Then add zsh-autosuggestions to the plugins entry in ~/.zshrc.
zsh-completions
This plugin enhances command completion and provides richer, smarter command and option suggestions. Install it with the following command. Enabling this plugin is slightly different from the previous ones, so refer to the zsh-completions installation instructions.
1 | git clone https://github.com/zsh-users/zsh-completions.git \ |
Then add the following configuration before the source "$ZSH/oh-my-zsh.sh" line in ~/.zshrc.
1 | fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src |
Refresh the zsh completion cache:
1 | rm -f ~/.zcompdump # Delete the old cache |
Here is my final .zshrc configuration:

By the way, here is a GitHub repository that collects many ZSH frameworks, plugins, themes, and tutorials: awesome-zsh-plugins.
5. About fastfetch
fastfetch is a tool that retrieves system information and displays it in a nice-looking format. It is useful and fun, so here is how to install and configure it.
For installation, refer to fastfetch installation.
The version installed with apt on Ubuntu is several versions behind. If you want the latest version, install it from the GitHub repository yourself. Example:
1 | # Find the latest download link for your computer architecture and replace the link below. |
Its configuration file is located at ~/.config/fastfetch/config.jsonc. If the folder or file does not exist, create it yourself.
1 | mkdir -p ~/.config/fastfetch |
Then edit the configuration yourself. You can refer to the official fastfetch presets and the fastfetch configuration wiki.
Finally, run fastfetch to try it out.