答案 0 :(得分:0)
来自man sudo
:
-s, --shell Run the shell specified by the SHELL environment variable if it is set or the shell specified by the invoking user's password database entry. If a command is specified, it is passed to the shell for execution via the shell's -c option. If no command is specified, an interactive shell is executed.
所以-s
保留你当前的shell(在这种情况下为bash),而省略它则使用root用户的shell(sh)。我自己,我更喜欢sudo -Es
保留我的shell和环境变量。