How to increase limit of file descriptors (or sockets) in Linux Mint

In this post i am going to show you the simple way to set up your systemd-based linux, and make it able to handle more than default 1024 file descriptors per process. It was painful for me, so, despite it's short and easy, i have decided that i'm going to write about it anyway.

The Prodecure

1. Use ulimit -a command to see current number of available descriptors. You should see line like: open files (-n) 1024.
2. Open (as the root) file /etc/systemd/system.conf in some text editor. Ex.: sudo nano /etc/systemd/system.conf
3. Find line: "#DefaultLimitNOFILE=", and change it to: DefaultLimitNOFILE=65536
4. Now, open (as the root) file /etc/systemd/user.conf in some text editor. Ex.: sudo nano /etc/systemd/user.conf
5. Find line: "#DefaultLimitNOFILE=", and change it to: DefaultLimitNOFILE=65536
6. RESTART your computer. Yes! RESTART!

That's it. I hope it helped you. 🙂