
Linux 中的 chsh 命令用于变更用户的登录 shell 设置。
适用权限:所有用户均可使用。
<code>shell>> chsh</code>
<code>shell>> chsh Changing fihanging shell for user1 Password: [del] New shell [/bin/tcsh]: ### [当前正在使用的 shell] [del] shell>> chsh -l ### 显示 /etc/shells 文件内容 /bin/bash /bin/sh /bin/ash /bin/bsh /bin/tcsh /bin/csh</code>
修改当前 shell。假设当前 shell 为 /bin/bash,使用 chsh 命令将其更改为 /bin/csh。
<code># chsh Changing shell for root. New shell [/bin/bash]: /bin/csh //输入新的 shell 路径 Shell changed.</code>
使用 -s 参数来设置新的登录 shell
<code># chsh -s /bin/csh //将当前 shell 设置为 /bin/csh Changing shell for root. Shell not changed.</code>
以上就是linux更改登录shell是什么-chsh命令使用与实例的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号