首页 > 系统服务 > 详细

Ubuntu解决sudo: source: command not found错误

时间:2017-08-07 00:58:51      阅读:318      评论:0      收藏:0      [点我收藏+]

Ubuntu Server上执行以下命令,可以看到默认打开的文件数限制为1024个。

$ ulimit -n

1024

编辑/etc/profile配置文件,在最后添加一行:

ulimit -SHn 65535

要让配置生效:

$ sudo source /etc/profile

sudo: source: command not found

我们直接执行ulimit -SHn 65535命令又会怎么样呢?

$ ulimit -SHn 65535

-bash: ulimit: open files: cannot modify limit: Operation not permitted

$ sudo ulimit -SHn 65535

sudo: ulimit: command not found

普通用户获得root权限后反而提示找不到命令了,该如何解决这个问题呢?

$ sudo -s

# source /etc/profile

再次执行ulimit,可以看到打开文件的限制数已改为65535了。

# ulimit -n

65535

转自:http://www.linuxidc.com/Linux/2014-04/100160.htm

Ubuntu解决sudo: source: command not found错误

原文:http://www.cnblogs.com/syuf/p/7296563.html

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