不加“-”能行?作者: kachipawei 时间: 2010-04-21 16:45
-
Specifies that the process environment is to be set as if the user
had logged in to the system using the login command. Nothing in
the current environment is propagated to the new shell.
这是man su 中的说明,用xmanger登入后,普通用户已经设定了DISPLAY变量了,楼主为了省去设定DISPLAY变量,就可以直接用su root来获得普通用户的环境,如果root用户自己的.profile中特殊的变量定义的话,还得重新运行一下. /.profile,如果在这个中有定义DISPLAY变量的话,就得另外考虑了作者: yoyosys 时间: 2010-04-21 16:56
不加-就是继承SU之前用户的环境变量,楼主可以试下!作者: smileslee 时间: 2010-04-22 10:45
我试了,ok,多谢各位。作者: AIX深入敌后 时间: 2010-04-22 18:43
学习了