-s [command]
The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in the pass-word database. If a command is specified, it is passed to the shell for execution via the shell's -c option. If no command is spec-ified, an interactive shell is executed.
不指定command,直接运行sudo -s ,就是用root权限运行默认的shell。
参考如下操作:
bash-4.3$ id
uid=501(www) gid=501(www)
bash-4.3$ sudo -s
bash-4.3# id
uid=0(root) gid=0(root)
bash-4.3# exit
exit
bash-4.3$ id
uid=501(www) gid=501(www)
bash-4.3$