Enhance your terminal with Oh-My-Zsh
Oh-My-Zsh is an enhanced terminal software that allows you to customize the themes and plugins. Your experience with the terminal will be much better with it. Let me take a note about how to install it.
- Install ZSH
sudo apt install zsh -y
- Install Oh-My-Zsh:
the system will prompt whether you need to switch to zsh, or you can switch to zsh on your own with chsh -s $(which zsh)
, and then you can confirm the shell you are using with echo $SHELL
(reconnect to your server may be needed).
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Fetch the recommended font and click to install it, then set the font of your terminal to
MesloLGS NF
:wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf && wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf && wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf && wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf
Remove the installed font and install the theme and the plugins:
# remove the installed font
rm -rf MesloLGS*.ttf
# powerlevel10k
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# edit the zshrc
vi ~/.zshrc
# Change the theme of zsh
ZSH_THEME="powerlevel10k/powerlevel10k"
# Enable the plugins
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
Then reconnect to your server, normally, you will enter the configuration of Oh-My-Zsh.
Have a fun