In addition to nohup
you can launch the process in background using "&" and subshell:
Suffix the command with & and wrap it in parentheses
$ (thecommand args &)
Lets say your process gains the pid 1922:
$ ps -f
UID PID PPID C STIME TTY TIME CMD
usr 11473 2643 0 15:07 pts/1 00:00:00 bash
usr 11922 1 0 15:11 pts/1 00:00:00 thecommand
Look that it's unattached from the shell process 11473 which was its original parent. So, if you exit or kill the current shell (11473), the process 11922 keep running, and it will be disconnected from the pts.
Try to exit the shell, and enter in a new shell. Even if, this shell is connected to the same pts, you can see the process now without a pts:
$ ps -fp 11922
UID PID PPID C STIME TTY TIME CMD
usr 11922 1 0 15:11 ? 00:00:00 thecommand
I don't how it's called or documented in Posix, but I use this way since 1990 in bsh, ksh and now in bash.
Lastly, you can use the bg
builtin shell command:
Just launch your program and if you decide to pause it, or plan to keep it in background, type CTRL+Z:
$ thecommand
^Z
[1] Stopped thecommand
Now let it continue to run in background:
$ bg
[1]+ thecommand &
If you look to the process infos, it has yet a parent process:
$ ps -f
UID PID PPID C STIME TTY TIME CMD
usr 12046 2643 0 15:18 pts/6 00:00:00 bash
usr 12571 12046 0 16:00 pts/6 00:00:00 thecommand
usr 12601 12046 0 16:04 pts/6 00:00:00 ps -f
So, exit from the current process. The running process in background is unattached from its original parent and keep running in background:
$ exit
Login again and look at process info:
$ ps -f 12571
UID PID PPID C STIME TTY TIME CMD
usr 12571 1 0 16:00 ? 00:00:00 thecommand