ULIMIT(1)
π ULIMIT(1) β fish-shell, bestie edition β¨
okay so this is the ulimit page from the fish-shell manual and I'm gonna explain it to you like we're texting at 1am, because honestly that's when my brain works best π
πΈ NAME πΈ
ulimit β set or get resource usage limits. like, the vibes of your shell's boundaries. yes we're doing boundaries today π«Ά
π¦ SYNOPSIS π¦
ulimit [OPTIONS] [LIMIT]
π DESCRIPTION π
So ulimit sets or outputs the resource usage limits of the shell and any processes spawned by it. If a new limit value is omitted, the current value of the limit of the resource is printed; otherwise, the specified limit is set to the new value. read that again if you need to, no rush π
Use one of the following switches to specify which resource limit to set or report:
-b,--socket-buffersβ the max size of socket buffers π§¦-c,--core-sizeβ the max size of core files created. set this limit to zero and boom, core dumps are disabled. girl math but it works π-d,--data-sizeβ the max size of a process' data segment π¦-e,--niceβ controls the maximum nice value; on Linux, this value is subtracted from 20 to give the effective value. literally 20 minus this, that's the whole tea β-f,--file-sizeβ the max size of files created by a process π-i,--pending-signalsβ the max number of signals that may be queued. yes they queue, it's giving β¨organized chaosβ¨-l,--lock-sizeβ the max size that may be locked into memory π-m,--resident-set-sizeβ the max resident set size π-n,--file-descriptor-countβ the max number of open file descriptors ποΈ-q,--queue-sizeβ the max size of data in POSIX message queues π¬-r,--realtime-priorityβ the max realtime scheduling priority. main character energy only π-s,--stack-sizeβ the max stack size π₯-t,--cpu-timeβ the max amount of CPU time in seconds β±οΈ-u,--process-countβ the max number of processes available to the current user π₯-w,--swap-sizeβ the max swap space available to the current user π-v,--virtual-memory-sizeβ the max amount of virtual memory available to the shell π-y,--realtime-maxtimeβ the max contiguous realtime CPU time in microseconds π¬-K,--kernel-queuesβ the max number of kqueues (kernel queues) for the current user π§΅-P,--ptysβ the max number of pseudo-terminals for the current user π₯οΈ-T,--threadsβ the max number of simultaneous threads for the current user πͺ‘
heads up bestie: not all these limits are available in all operating systems; consult the documentation for setrlimit in your operating system. it's not me being vague, it's genuinely a your-OS thing π
The value of limit can be a number in the unit specified for the resource or one of the special values hard, soft, or unlimited, which stand for the current hard limit, the current soft limit, and no limit, respectively. three little magic words, iconic π
If limit is given, it is the new value of the specified resource. If no option is given, then -f is assumed. Values are in kilobytes, except for -t, which is in seconds and -n and -u, which are unscaled values. The exit status is 0 unless an invalid option or argument is supplied, or an error occurs while setting a new limit. noted, noted, and noted fr fr π
π what type of limit tho π
ulimit also accepts the following options that determine what type of limit to set:
-H,--hardβ sets hard resource limit. final boss, no takebacks πΏ-S,--softβ sets soft resource limit. flexible queen π
A hard limit can only be decreased. Once it is set it cannot be increased; a soft limit may be increased up to the value of the hard limit. If neither -H nor -S is specified, both the soft and hard limits are updated when assigning a new limit value, and the soft limit is used when reporting the current value. this is the whole dynamic, don't fight it π
β the extra little guys β
The following additional options are also understood by ulimit:
-a,--allβ prints all current limits. the full haul, the whole collection π-h,--helpβ displays help about using this command. when in doubt π«Ά
π fish vs bash: the lore π
The fish implementation of ulimit should behave identically to the implementation in bash, except for these differences:
- fish
ulimitsupports GNU-style long options for all switches. yes, all of them π - fish
ulimitdoes not support the-poption for getting the pipe size. The bash implementation consists of a compile-time check that empirically guesses this number by writing to a pipe and waiting forSIGPIPE. fish does not do this because this method of determining pipe size is unreliable. Depending on bash version, there may also be further additional limits to set in bash that do not exist in fish. like... that's not a measurement bestie, that's a hope π - fish
ulimitdoes not support getting or setting multiple limits in one command, except reporting all values using the-aswitch. one resource at a time, we're being intentional β¨
π₯ EXAMPLE π₯
ulimit -Hs 64
sets the hard stack size limit to 64 kB. a tiny little stack. babygirl stack π₯Ί
π Copyright π
fish-shell developers π
okay that's the whole page, you ate that, go set some limits responsibly πΈ
β with love, from the fish-shell crew, version 4.9, dated Sep 08, 2026 π¦β¨
π¦ where this page comes from
- arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms