Ubuntu sudo error command not found how to do?

  
                

In Ubuntu system operation, when using sudo, sudo:source:command not found error message. How to deal with this problem? The following small series will introduce the solution to the error sudo:source:command not found in the Ubuntu system.

on the Ubuntu Server execute the following command, you can see the default number of open files is limited to 1024.

$ ulimit -n

1024

Edit the /etc/profile configuration file and add a line at the end:

ulimit -SHn 65535

For the configuration to take effect:

$ sudo source /etc/profile

sudo: source: command not found

We directly execute the ulimit -SHn 65535 command again What?

$ ulimit -SHn 65535

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

$ sudo ulimit -SHn 65535

Sudo: ulimit: command not found

After getting the root privilege, the normal user can't find the command. How can I solve this problem?

$ sudo -s

# source /etc/profile

Execute ulimit again, you can see that the limit for opening files has been changed to 65535.

# ulimit -n

65535

The above is how Ubuntu solves the sudo:source:command not found error. If you encounter this problem, try to use it. The methods described in this article are handled and I hope to help you.

Copyright © Windows knowledge All Rights Reserved