Mac修改默認shell配置(這裏爲fish)

配置fish爲默認shell

查看所有shell及位置

cat /etc/shells

輸出

#List of acceptable shells for chpass(1).

#Ftpd will not allow users to connect who are not using

#one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

查看當前默認shell

echo $SHELL

不過在使用fish的時候並沒有什麼用 沒有輸出

在不是fish的時候貌似可以

輸出:

/usr/local/Cellar/fish/3.1.0_1/bin/fish

我用Homebrew裝的

這時想要設置fishshell爲默認需要先講fish的位置加入到

/etc/shells

裏不然會提示

non-standard shell

添加好之後使用

chsh -s /usr/local/Cellar/fish/3.1.0_1/bin/fish

就可以了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章