更改 Linux 中的默认 shell [英] Changing default shell in Linux

查看:26
本文介绍了更改 Linux 中的默认 shell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改默认外壳?env 命令当前显示:

How is it possible to change the default shell? The env command currently says:

SHELL=/bin/tcsh

我想把它改成 Bash.

and I want to change that to Bash.

推荐答案

试试linux命令chsh.

详细命令为chsh -s/bin/bash.它会提示您输入密码.你的默认登录 shell 现在是 /bin/bash.您必须注销并重新登录才能看到此更改.

The detailed command is chsh -s /bin/bash. It will prompt you to enter your password. Your default login shell is /bin/bash now. You must log out and log back in to see this change.

以下内容来自手册页:

chsh 命令更改用户登录 shell.这决定了姓名用户初始登录命令.普通用户只能更改为自己的帐户登录shell,超级用户可以更改登录名任何帐户的外壳

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.

This command will change the default login shell permanently.

注意:如果您的用户帐户是远程的,例如 Kerberos 身份验证(例如 Enterprise RHEL),那么您将无法使用 chsh.

Note: If your user account is remote such as on Kerberos authentication (e.g. Enterprise RHEL) then you will not be able to use chsh.

这篇关于更改 Linux 中的默认 shell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆