- 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.
- Dreamweaver CS3+Flash CS3+Fireworks CS3創(chuàng)意網(wǎng)站構(gòu)建實(shí)例詳解
- Java開發(fā)技術(shù)全程指南
- 計(jì)算機(jī)控制技術(shù)
- Mastering D3.js
- 嵌入式Linux上的C語(yǔ)言編程實(shí)踐
- Expert AWS Development
- WordPress Theme Development Beginner's Guide(Third Edition)
- 永磁同步電動(dòng)機(jī)變頻調(diào)速系統(tǒng)及其控制(第2版)
- 基于Xilinx ISE的FPAG/CPLD設(shè)計(jì)與應(yīng)用
- Cloud Security Automation
- Visual Studio 2010 (C#) Windows數(shù)據(jù)庫(kù)項(xiàng)目開發(fā)
- 貫通Java Web輕量級(jí)應(yīng)用開發(fā)
- 工業(yè)機(jī)器人操作
- Mastering DynamoDB
- 實(shí)戰(zhàn)突擊