Collecting my attempts to improve at tech, art, and life

Linux

Does any of this enlighten, entertain, or otherwise please you? Please consider a Tip. Every little bit helps!

I last updated this page

An open source operating system initially created as a platform by and for tech enthusiasts. Current primary purpose is extraction of community labor for cloud and mobile device services.

But hey at least it doesn’t come with spyware. So there’s that.

Dealing with “too many open files” on Linux

ulimit shows the maximum number of files you can open

Use -S to see the soft limit

Code Sample
    $ ulimit -S -n
1024

  

And -H for the hard limit

Code Sample
    $ ulimit -H -n
1048576

  

Increase the soft limit — up to your hard limit — for the current session.

Code Sample
    ulimit -n 2048
  

To permanently change file limits

Edit /etc/systemd/system.conf

Code Sample
    DefaultLimitNOFILE=4096:1048576
  

Edit /etc/systemd/user.conf

Code Sample
    DefaultLimitNOFILE=4096:1048576
  

Apply the change with Systemd

Code Sample
    sudo systemctl daemon-reexec