安装
$ sudo apt-get install fish // Ubuntu
$ brew install fish // mac
安装请参考 fish官方网站
配置
$ fish // 启动fish
$ chsh // 修改用户默认shell
$ echo $SHELL // 查看当前正在使用的shell
$ cat /etc/shells // 查看系统中安装了哪些shell
fish 的配置文件是 ~/.config/fish/config.fish
,每次 fish 启动都会加载这个文件。
tip: 设置默认shell的其他方式
开机启动
vi /etc/rc.local
//添加
fish
设置登录shell
vi /etc/passwd
//修改
root:x:0:0:root:/root:/usr/local/bin/fish