chsh 更改 shell

发布时间: 更新时间: 总字数:74 阅读时间:1m 作者: 分享 复制网址

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

使用

  • help
$ chsh -h
Usage: chsh [options] [LOGIN]

Options:
  -h, --help                    display this help message and exit
  -R, --root CHROOT_DIR         directory to chroot into
  -s, --shell SHELL             new login shell for the user account
  • 禁止用户登录
chsh <user> -s /sbin/nologin
  • 设置用户使用bash
chsh <user> -s /bin/bash
最新评论
加载中...
Home Archives Categories Tags Statistics