首页 > 系统服务 > 详细

Switch User Command in Linux

时间:2014-03-17 23:40:44      阅读:783      评论:0      收藏:0      [点我收藏+]

Switch user command (su) has the following forms:

su

Switch to , without loading environment variables. If is omitted (only "su"), it equals to "su root";

su -

Switch to , and loading environment variables. "-" is the abbreviation of "-l", which means this is a "login" shell, so all .profile will be sourced (man su for details). If is omitted (only "su -"), it equals to "su - root";

su -c ""

Run command with the identity of another user. It is mostly used in one-off command with root privileges:

su -c "" root

The double quotes around can‘t be omitted.

Switch User Command in Linux,布布扣,bubuko.com

Switch User Command in Linux

原文:http://www.cnblogs.com/darkmatter/p/3605647.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!