su - root:表示人以root身份登录
just like login as root, then the shell is login shell,
which mean it will expericene a login process,
usually .bash_profile and .bashrc will be sourced
su root:表示与root建立一个链接,通过root执行命令
like you open an interactive shell in root name,
then only .bashrc will be sourced.
su - root 和 su root 的区别
最新推荐文章于 2021-04-29 05:24:59 发布