现在的位置: 首页 > 综合 > 正文

The difference between su and su -

2013年10月21日 ⁄ 综合 ⁄ 共 543字 ⁄ 字号 评论关闭

"su" is equivalent to "su root"
"su -" is equivalent to "su - root"

"su -" or "su - root"

when you use this command, you are given a new login shell from the
Linux
server
, which is the same as you logout from the existing user and perform a fresh login. if you type "pwd", you will notice that you are
in
root
directory
/root. The environment path will be also change to root's environment.

"su" or "su root"
if you "su" only then basically you just temporary "borrow" the root permission without having all the root

environment
setting
.
You will notice that you are not having sbin path. Which means some root commands you issue at this environment might not work.

抱歉!评论已关闭.