Ubuntu sudo报错command not found的解决方法_Ubuntu/Debian_操作系统_

更新时间:2023-03-27 20:24:00      浏览量:297

  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错误的方法介绍了,如果你碰到这个问题,可是尝试使用本文介绍的方法进行处理,希望对你有所帮助。

网站类容多为转载,如有侵权,请联系站长删除

-六神源码网 出售域名-六神源码网 网站出售-六神源码网 微信公众号抽奖-六神源码网 vr全景制作-六神源码网 网站出售带数据-六神源码网 听歌-六神源码网