Ubuntu fix Sudo:source:command not found error

Source: Internet
Author: User

You can see that the default number of open files is limited to 1024 by executing the following command on Ubuntu server.

$ ulimit-n

1024

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

Ulimit-shn 65535

To have the configuration take effect:

$ sudo source/etc/profile

Sudo:source:command not found

What happens when we execute the ULIMIT-SHN 65535 command directly?

$ ulimit-shn 65535

-bash:ulimit:open Files:cannot Modify limit:operation not permitted

$ sudo ulimit-shn 65535

Sudo:ulimit:command not found

When a normal user is given root permission to prompt for no command, how to solve the problem?

$ sudo-s

# Source/etc/profile

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

# Ulimit-n

65535

Transferred from: http://www.linuxidc.com/Linux/2014-04/100160.htm

Ubuntu fix Sudo:source:command not found error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.