Linux Sysadmin Test Prep

Ulimit

Ulimit

ulimit

To make temporary changes use ulimit

  • ulimit <arguments> <value> username
ArgumentMeaning
-Suse the 'soft' resource limit
-Huse the 'hard' resource limit
-aall current limits are reported
-bthe socket buffer size
-cthe maximum size of core files created

ulimit --help has exhaustive list.

To make permanent changes edit /etc/security/limits.conf (well documented)

format:

<domain> <type> <item> <value>

domains:
  • @group
  • %wildcard or *wildcard
  • user
types:
  • soft
  • hard
items:
ItemsDescription
coreCore file size (in KB)
datamax data size (KB)
fsizemaximum filesize (KB)
memlockmax locked-in-memory address space (KB)
nofilemax number of open file descriptors
cpumax CPU time (MIN)
nprocmax number of processes
maxloginsmax number of logins for this user
nicemax nice priority allowed to raise to values: [-20, 19]
  • changes take effect after re-login

Edit this page on GitHub

On this page