Open In App

setsid command in Linux with Examples

setsid command in Linux system is used to run a program in a new session. The command will call the fork(2) if already a process group leader. Else, it will execute a program in the current process.

Syntax:



setsid [options] program [arguments]

Example: It will execute our shell script in a new session.



Options:

Article Tags :