How can I check the available shells in Mac OSX?

自作多情 提交于 2020-08-02 05:12:05

问题


How can I check all the different shells that I can use in OSX Terminal application?

The default one is bash, and I know zsh because I tried and it worked. I wonder how can I check if there are any more than this two.


回答1:


The easy way is go to /etc and check the shells file. The content is the list of shells available in Mac OSX.

The included by default are:

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

Alternatively, you can check their binaries by going to /bin and recognising them visually. Naturally, you have to know them in order to recognise them.




回答2:


In MacOS the following command will list the available shells on your system

$ ls -l /bin/*sh
-r-xr-xr-x  1 root  wheel   618448 Nov 19 00:26 /bin/bash
-rwxr-xr-x  1 root  wheel   380016 Feb  7 16:11 /bin/csh
-r-xr-xr-x  1 root  wheel  1287040 Sep 21 00:35 /bin/ksh
-r-xr-xr-x  1 root  wheel   618512 Nov 19 00:26 /bin/sh
-rwxr-xr-x  1 root  wheel   380016 Feb  7 16:11 /bin/tcsh
-rwxr-xr-x  1 root  wheel   610288 Sep 21 00:35 /bin/zsh


来源:https://stackoverflow.com/questions/37421026/how-can-i-check-the-available-shells-in-mac-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!