LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

limits.conf

PAM configuration file that sets resource limits for users and groups

TLDR

Set maximum open files for user
$ [username] hard nofile [65535]
copy
Set memory limit
$ [username] hard as [4194304]
copy
Set for all users
$ * soft nproc [1024]
copy
Set for group
$ @[groupname] hard maxlogins [10]
copy

SYNOPSIS

/etc/security/limits.conf

DESCRIPTION

limits.conf is a PAM configuration file that sets resource limits for users and groups. Limits are enforced when users log in through PAM-enabled services.The format is: domain type item value. Domain can be username, @groupname, or * for all users.

PARAMETERS

hard

Hard limit (maximum value).
soft
Soft limit (default value).
nofile
Maximum open files.
nproc
Maximum processes.
as
Address space limit.
maxlogins
Maximum logins.
memlock
Maximum locked memory.
stack
Maximum stack size.

EXAMPLE CONFIG

$ # /etc/security/limits.conf
* soft nofile 4096
* hard nofile 65535
@developers soft nproc 2048
root hard nproc unlimited
copy

CAVEATS

Requires pam_limits module. Changes apply at next login. Systemd services may need LimitNOFILE in unit files. Check with ulimit -a.

SEE ALSO

ulimit(1), pam(8), pam_limits(8), sysctl(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid