3

I want to remove "memorylocked" and "maxproc" limits. I am using tcsh shell. I read that if I use #limit memorylocked unlimited and #limit maxproc unlimited then they will be set to unlimited. I did that as root user. But after I restarted my computer then again they were all restored to their default values. How can I resolve this and set their values and also "openfiles" value of my Linux to unlimited permanently? I am using Ubuntu 12.04 with a 64 bit system.

  • Even a temporary way to unlimit them will be good too. I just found out that with temporary unlimited values, my simulation will be ok too. – Babak H Jan 20 '13 at 7:01
5

You can edit the file /etc/security/limits.conf as follow:

# memlock = memorylocked
* hard memlock unlimited

# nproc = maximum number of processes
* hard nproc unlimited

The first column define who the limit will be apply to:

* - Apply the limit to everyone, as shown in example above.

<user name> - Apply limit to specific user.

@<group name> - Apply limit to all users in specific group.

You can access the man page with man limits.conf.

| improve this answer | |
  • This answer would be useful to even the uninitiated if you were to edit it to explain how – Elder Geek Feb 7 '17 at 15:21
  • @ElderGeek Edited as suggested. I was surprised that I put in such an incomplete answer before :( – John Siu Feb 8 '17 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.