码迷,mamicode.com
首页 > 其他好文 > 详细

sudo -E的意思

时间:2016-03-08 19:24:28      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:

1、sudo -E

-E选项在man page中的解释是:

-E

The -E (preserve environment) option indicates to the security policy that the user wishes to preserve their existing environment variables. The security policy may return an error if the -E option is specified and the user does not have permission to preserve the environment.

简单来说,就是加上-E选项后,用户可以在sudo执行时保留当前用户已存在的环境变量,不会被sudo重置,另外,如果用户对于指定的环境变量没有权限,则会报错。

sudo -E的意思

标签:

原文地址:http://www.cnblogs.com/pinganzi/p/5254995.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!