Tag Archives: sudo: source: command not found

Ubuntu solves sudo: Source: command not found error

Why can’t you grab tickets when you travel on holiday?Reveal the key technology of 12306 how to ensure the ticket is not oversold>>>

Execute the following command on the Ubuntu server, and you can see that the number of open files is limited to 1024 by default

$ ulimit -n

1024

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

ulimit -SHn 65535

To make the configuration work:

$ sudo source /etc/profile

sudo: source: command not found

What happens if we directly execute 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

After ordinary users get root permission, they will be prompted that they can’t find the command. How to solve this problem

$ sudo -s

# source /etc/profile

Execute ulimit again, and you can see that the limit number of open files has been changed to 65535

# ulimit -n

65535