官术网_书友最值得收藏!

Switching the login shell to Bash

Even if it's not the shell that starts up when you log in, Bash may still be installed on your system, and you may still be able to change your login shell to it.

You might be able to start it by just typing bash:

$ bash

If you get output like command not found, you will probably need to install a Bash package specific to your system, or get your system administrator to do it for you. Consult your operating system's documentation to learn how to do this.

If you get a new prompt that looks like the Bash prompts in the previous section, you can then find the location of the bash program:

bash$ declare -p BASH
BASH="/usr/local/bin/bash"

Depending on the system, you might then be able to change Bash to your login shell to that path with the chsh tool:

$ chsh -s /usr/local/bin/bash

This might prompt you for your system password to allow you to make the change.

You may get an error message like this:

chsh: /usr/local/bin/bash is an invalid shell

In this case, the invalid shell part likely means that the path given needs to be added to the /etc/shells file, which specifies the programs the system and its administrator have allowed as login shells. You can inspect this list with cat:

$ cat /etc/shells

If you add your full path to bash on your system to that file, the chsh call should then succeed.

主站蜘蛛池模板: 大理市| 蒙城县| 宿松县| 侯马市| 左权县| 宜宾县| 山西省| 垦利县| 红河县| 南平市| 龙里县| 大安市| 永城市| 阿合奇县| 周宁县| 元谋县| 贵溪市| 昂仁县| 闻喜县| 桦甸市| 万源市| 高台县| 巴彦淖尔市| 临湘市| 赞皇县| 陵水| 静乐县| 武城县| 顺义区| 南华县| 镇远县| 湖南省| 北票市| 沁源县| 阳江市| 武义县| 榆树市| 泽普县| 达州市| 屏边| 无棣县|