1.安装 Zsh
1-1.打开你的 Ubuntu 终端,更新你的包列表
sudo apt update
1-2.安装 Zsh
sudo apt install zsh
1-3.切换到zsh
安装完成后,你可以通过运行
zsh
来切换到 Zsh shell,或者你可以将其设置为默认的 shell
chsh -s $(which zsh)
You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment. That will prevent this function being run again.
(1) Continue to the main menu.
(2) Populate your ~/.zshrc with the configuration recommended by the system administrator and exit (you will need toedit the file by hand, if so desired).
-- Type one of the keys in parentheses ---
如果出现上面的界面,就选 2。
之后将改变默认的 shell。注销并重新登录或者关闭并重新打开 Ubuntu 终端,以使这个更改生效。