- Bash Quick Start Guide
- Tom Ryder
- 249字
- 2021-07-23 16:58:53
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.
- Mastering VMware vSphere 6.5
- 反饋系統:多學科視角(原書第2版)
- 傳感器技術應用
- AWS Administration Cookbook
- 完全掌握AutoCAD 2008中文版:綜合篇
- 大數據技術與應用
- 21天學通C語言
- 人工智能實踐錄
- 單片機技術一學就會
- 分析力!專業Excel的制作與分析實用法則
- Excel 2010函數與公式速查手冊
- Mastering Geospatial Analysis with Python
- Apache源代碼全景分析(第1卷):體系結構與核心模塊
- 數據要素:全球經濟社會發展的新動力
- Unreal Development Kit Game Design Cookbook