Ubuntu sudo报错command not found的解决方法
Ubuntu sudo报错command not found的解决方法
发布时间:2016-12-27 来源:查字典编辑
摘要:Ubuntu系统操作中,在使用sudo的时候出现sudo:source:commandnotfound错误提示,遇到这种问题要如何处理呢?下...

Ubuntu系统操作中,在使用sudo的时候出现sudo:source:command not found错误提示,遇到这种问题要如何处理呢?下面小编就给大家介绍下Ubuntu系统中报错sudo:source:command not found的解决方法。

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

上面就是Ubuntu解决sudo:source:command not found错误的方法介绍了,如果你碰到这个问题,可是尝试使用本文介绍的方法进行处理,希望对你有所帮助。

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Ubuntu/Debian学习
热门Ubuntu/Debian学习
操作系统子分类