sudo -i和sudo -s的区别

sudo -h

Options:
  -a type       use specified BSD authentication type
  -b            run command in the background
  -C fd         close all file descriptors >= fd
  -E            preserve user environment when executing command
  -e            edit files instead of running a command
  -g group      execute command as the specified group
  -H            set HOME variable to target user's home dir.
  -h            display help message and exit
  -i [command]  run a login shell as target user
  -K            remove timestamp file completely
  -k            invalidate timestamp file
  -l[l] command list user's available commands
  -n            non-interactive mode, will not prompt user
  -P            preserve group vector instead of setting to target's
  -p prompt     use specified password prompt
  -r role       create SELinux security context with specified role
  -S            read password from standard input
  -s [command]  run a shell as target user
  -t type       create SELinux security context with specified role
  -U user       when listing, list specified user's privileges
  -u user       run command (or edit file) as specified user
  -V            display version information and exit
  -v            update user's timestamp without running a command
  --            stop processing command line arguments

TRANSLATION:

Options:
选项:
-a type ; use specified BSD authentication type
一个类型;使用指定的BSD认证类型
-b ; run command in the background
-在后台运行命令
-C fd ; close all file descriptors >= fd
- C FD;关闭所有文件描述符> FD
-E ; preserve user environment when executing command
e;在执行命令时保存用户环境
-e ; edit files instead of running a command
-编辑文件而不是运行命令
-g group ; execute command as the specified group
- G组;将命令作为指定组执行
-H ; set HOME variable to target user's home dir.
- H;设置家庭变量来定位用户的主页。
-h ; display help message and exit
h;显示帮助消息并退出
-i [command] ; run a login shell as target user
-我[命令];将登录shell作为目标用户运行
-K ;remove timestamp file completely
k;完全删除时间戳文件
-k ;invalidate timestamp file
k;无效时间戳文件
-l[l] ;command list user's available commands
- l;命令列表用户可用命令
-n ; non-interactive mode, will not prompt user
N;非交互模式,不会提示用户
-P ; preserve group vector instead of setting to target's
p;保留组向量,而不是设置到目标的
-p prompt ; use specified password prompt
p提示符;使用指定的密码提示符
-r role ; create SELinux security context with specified role
-r role ; create SELinux security context with specified role
-S ; read password from standard input
-从标准输入读取密码
-s [command]; run a shell as target user
- [命令];将shell作为目标用户运行
-t type ; create SELinux security context with specified role
T型;创建具有指定的角色SELinux的安全上下文
-U user ; when listing, list specified user's privileges
u用户;在列表中,列出指定用户的权限
-u user ; run command (or edit file) as specified user
u用户;按指定用户运行命令(或编辑文件)
-V ; display version information and exit
v;显示版本信息并退出
-v ; update user's timestamp without running a command
v;更新用户的时间戳而不运行命令
-- ; stop processing command line arguments
——停止处理命令行参数

posted @ 2022-01-27 18:36  zhangdaopin  阅读(192)  评论(0编辑  收藏  举报