官方的安装步骤
https://software.opensuse.org/download.html?project=shells%3Afish%3Arelease%3A3&package=fish
对于 CentOS 8,请以根用户 root 运行下面命令:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/shells:fish:release:3/CentOS_8/shells:fish:release:3.repo
yum install fish
对于 CentOS 7,请以根用户 root 运行下面命令:
cd /etc/yum.repos.d/
wget https://download.opensuse.org/repositories/shells:fish:release:3/CentOS_7/shells:fish:release:3.repo
yum install fish
*修改系统默认shell
#查看当前默认shell
echo $SHELL
#查看可以用shell
chsh -l
#修改默认shell
chsh -s /usr/bin/fish
#重启bash