install zsh and oh-my-zsh
Contents
Reference document:
Install on Ubuntu
-
Install zsh:
sudo apt install zsh
-
View the system all support shell:
cat /etc/shells
. If zsh in the list, you can executechsh -s $(which zsh)
set zsh as default shell. -
Install oh-my-zsh:
- via curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- via wget
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
- via curl
-
Reopen the shell. If it not work, try
reboot
the system. -
Now you can config the theme in ~/.zshrc:
1
ZSH_THEME="ys"
-
You can install plugin:
- autojump:
sudo apt install autojump
- zsh-autosuggestions:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
then add config:
1 2 3 4
plugins=(... autojump zsh-autosuggestions) # autojump [[ -s /home/linfeng/.autojump/etc/profile.d/autojump.sh ]] && source /home/linfeng/.autojump/etc/profile.d/autojump.sh autoload -U compinit && compinit -u
- autojump:
-
you can reopen the shell or execute
zsh
to make the config work.
Author Linfeng
LastMod 2023-08-31