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

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.

主站蜘蛛池模板: 东丰县| 白沙| 大足县| 秦安县| 齐齐哈尔市| 陕西省| 隆德县| 邵阳市| 河北省| 阿拉善盟| 高邑县| 正定县| 当雄县| 磐安县| 洛阳市| 盱眙县| 同江市| 靖江市| 涿州市| 亚东县| 吴川市| 平邑县| 且末县| 永清县| 全南县| 公安县| 洞头县| 三台县| 秭归县| 札达县| 舒城县| 虎林市| 南昌市| 霍山县| 鸡泽县| 延庆县| 五峰| 讷河市| 鞍山市| 乳山市| 沙洋县|