SETSID(1)

โœจ SETSID โœจ

okay bestie, quick vibe check: this is setsid, a lil user command from the util-linux fam ๐Ÿ’– and its whole thing is run a program in a new session. yes, that kind of session. no cap.


๐Ÿซถ SYNOPSIS

setsid [options] program [arguments]

๐ŸŒธ DESCRIPTION

so like. setsid runs a program in a new session. that's it, that's the job ๐Ÿ’…

here's the tea tho, because the way it does that is kinda specific: if the process is already a process group leader, the command calls fork(2) first. if it's not, it just goes ahead and executes a program in the current process โ€” no fork, no extra steps, straight to business. slay.

and that default behavior? yeah, you can override it with the --fork option. iconic of you to want that.


๐Ÿ‘‘ OPTIONS

  • -c, --ctty โ€” set the controlling terminal to the current one. your terminal, your rules ๐Ÿ’…
  • -f, --fork โ€” always create a new process. like, always always. no exceptions, no shortcuts.
  • -w, --wait โ€” wait for the execution of the program to end, and return the exit status of this program as the exit status of setsid. yes, it literally hands you the exit status like a lil gift ๐ŸŽ€
  • -h, --help โ€” display help text and exit. the classic "just tell me what's up" move.
  • -V, --version โ€” display version and exit. flex the numbers, periodt.

๐Ÿฆ‹ AUTHORS

Rick Sladkey <jrs@world.std.com> โ€” shoutout to the original main character ๐Ÿ’œ


๐ŸŒˆ SEE ALSO

setsid(2) โ€” the syscall sibling, iykyk ๐Ÿ”ฅ


๐Ÿ› REPORTING BUGS

found a bug? bestie, don't suffer in silence ๐Ÿ˜ญ take it to the issue tracker:

<https://github.com/util-linux/util-linux/issues>


๐Ÿ“ AVAILABILITY

the setsid command is part of the util-linux package, which you can download from the Linux Kernel Archive:

<https://www.kernel.org/pub/linux/utils/util-linux/>


okay that's the whole page, you're all caught up ๐Ÿงš and for the cute sign-off: this was util-linux 2.42.4, dated 2026-09-21, and it's giving SETSID(1) energy forever โญ go run something in a new session, you got this ๐Ÿ’–

๐Ÿ“ฆ where this page comes from
  • arch rolling: util-linux 2.42.4-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND ISC AND LGPL-2.1-or-later AND LicenseRef-PublicDomain
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms