大佬教程收集整理的这篇文章主要介绍了linux – CentOS中的`su`和`su -`有什么区别?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
例如,默认情况下,在普通用户的路径中找不到/ sbin中的ifconfig命令,但是对于“root”,可以找到该命令.当我运行su时,我仍然得到bash:当我尝试运行ifconfig时,ifconfig:命令找不到输出.
但是,当我运行su – 时,ifconfig才有效.
su和su有什么区别 – 在CentOS中?
-l Simulate a full login. The environment is discarded except for HOME,SHelL,PATH,TERM,and USER. HOME and SHelL are modified as above. USER is set to the target login. PATH is set to ``/bin:/usr/bin''. TERM is imported from your current environment. The invoked sHell is the target login's,and su will change directory to the target login's home directory. - (no letter) The same as -l.
以上是大佬教程为你收集整理的linux – CentOS中的`su`和`su -`有什么区别?全部内容,希望文章能够帮你解决linux – CentOS中的`su`和`su -`有什么区别?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。