Andrey (azangru) wrote,

Note to future self:

To increase the maximum limit of open files on Ubuntu:

1) When logging in via GUI:
Modify the following (commented out) line in /etc/systemd/user.conf and /etc/systemd/system.conf:

(and add the desired upper limit)

2) When logging in via command line:
Add the following lines to /etc/security/limits.conf:
/user/ hard nofile /desired max number of open files/
/user/ soft nofile /desired max number of open files/

e.g.: andrey hard nofile 65535

3) Probably add to .bashrc and .bash_profile the line to change the upper limit for the number of open files:
ulimit -n /desired max number of open files/


Writing this out here, because the readily googlable solution (summarized in step 2 above) did not work on my laptop, and it wasn’t immediately apparent that it’s only suitable for command-line logins.

Dunno if step 3 is still necessary when using step 1.

P.S.: WTF? LJ just went ahead and added a tag to my post. Because I put a hash before DefaultLimitNOFILE. Ugh!
Tags: #defaultlimitnofile

  • (no subject)

    A conversation with Justin Fagnani about what's coming for LitHTML and LitElement. New directives seem reasonable. "Controllers" for reusable chunks…

  • (no subject)

    I have only recently become aware of the audience engagement techniques that twitch streamers are using. They would create automatic overlays that…

  • (no subject)

    From an article on Lenin's medical history: Of the three [Lenin's siblings] who survived past young adulthood, a sister died of a stroke at age 71,…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.