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 ulimit supports GNU-style long options for all switches. yes, all of them 😌
  • fish ulimit does not support the -p option 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 for SIGPIPE. 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 ulimit does not support getting or setting multiple limits in one command, except reporting all values using the -a switch. 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 πŸ₯Ί


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