加入收藏 | 设为首页 | 会员中心 | 我要投稿 徐州站长网 (https://www.0516zz.com/)- 智能数字人、图像技术、AI硬件、数据标注、数据治理!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

chsh命令用于更改使用者 shell 设定

发布时间:2023-06-08 07:40:19 所属栏目:Linux 来源:互联网
导读:   Linux常用命令 chsh命令用于更改使用者 shell 设定,下面为大家分享一下Linux常用命令chsh命令具体使用方法。



  语法



   shell>> chsh



  实例



   she
  Linux常用命令 chsh命令用于更改使用者 shell 设定,下面为大家分享一下Linux常用命令chsh命令具体使用方法。
 
  语法
 
   shell>> chsh
 
  实例
 
   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
 
  改变当前的shell。当前的shell 设置为//bin/bash,通过chsh命令,改变shell的设置/bin/csh。
 
   # chsh
 
   Changing shell for root.
 
   New shell [/bin/bash]: /bin/csh //输入新的shell地址
 
   Shell changed.
 
  通过 -s 参数改变当前的shell设置
 
   # chsh -s /bin/csh //改变当前设置为 /bin/csh
 
   Changing shell for root.
 
   Shell not changed.
 

(编辑:徐州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章