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.

1
  • 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, 2013 at 7:01

1 Answer 1

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .