0

In Ubuntu Mate 16.04.4LTS, every time I run the command:

$ ulimit -a

I get:

open files                      (-n) 1024

I tried to increase this limit adding at the /etc/security/limits.conf the command:

  myusername      hard   nofile    100000

but doesn't matter this value 1024 persist if I run ulimit -a. I rebooted the system after the modification yet the problem persist. Also, if I run

  ulimit -n 100000

I get the response:

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

and if I run

   sudo ulimit -n 100000

I get:

   sudo: ulimit: command not found

Any ideas on how to increse that limit?

thx

Jose Cabrera Zuniga
  • 2,348
  • 3
  • 31
  • 56

2 Answers2

0

From man bash under ulimit:

-n     The maximum number of open file descriptors (most systems do not allow this value to be set)

Maybe your problem is simply that your system does not support modifying this limit?

Guilherme Simas
  • 111
  • 1
  • 3
0

I found the solution, just after I posted this question. Based on:

https://askubuntu.com/questions/162229/how-do-i-increase-the-open-files-limit-for-a-non-root-user

I also edited:

  /etc/pam.d/common-session 

and added the following line to the end:

  session required pam_limits.so

All works now.

Jose Cabrera Zuniga
  • 2,348
  • 3
  • 31
  • 56