-i 参数(即 sudo -i ),在 sudo 的 man page 里指明了,会加载 [.profile,.bash_profile or .login will be read by the shell.] , 同时呢,会跳到 /root 家目录。
那使用 sudo -s 的时候,我是知道,不会跳转 /root 家目录,会留在当前目录。 我想问下, -s 参数 [ sudo -s ] 是否也会加载 [.profile,.bash_profile ] 这类环境变量定义文件呢? 在 man page 里没有说明,
请教从哪里可以验证呢? 要去看源码吗?