如何更改默认 shell ? env
命令当前说:
SHELL=/bin/tcsh
我想把它改成 Bash。
最佳答案
试试linux命令chsh
。
详细的命令是chsh -s/bin/bash
。
它会提示您输入密码。
您的默认登录 shell 现在是 /bin/bash
。 您必须退出并重新登录才能看到此更改。
以下内容来自手册页:
The chsh command changes the user login shell. This determines the name of the users initial login command. A normal user may only change the login shell for her own account, the superuser may change the login shell for any account
此命令将永久更改默认登录 shell。
注意:如果您的用户帐户是远程的,例如 Kerberos 身份验证(例如 Enterprise RHEL),那么您将无法使用 chsh
。
关于linux - 在 Linux 中更改默认 shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13046192/