Ubuntu sudo报错command not found的解决方法

2023-12-04 0 417

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

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悠久资源 Ubuntu/Debian Ubuntu sudo报错command not found的解决方法 https://www.u-9.cn/system/ubuntudebian/80617.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务