I really was unsure how to phrase the question title. What I mean is that when I use the terminal to start a program, most of the time when the terminal is closed it also exits the programs started from it.

Now this makes sense if we look at it from a hierarchical standpoint of the terminal being the parent process which spawns child processes, and any halt of the parent causes subsequent halting of the children as well.

However, I've noticed this to not always be the case. For example, I downloaded Sublime Text Editor and created a symlink in PATH. I can start this program by issuing a sublime command from the terminal, but subsequent closure of the terminal program does nothing to sublime.

However, other times either the child process that was started it also closed or it hangs up and causes problems.

tl;dr: Is it always the case that programs started from a closed parent process will be closed when the parent is exited? And if so, is there way to start a program from the terminal and then close the terminal without exiting the started process?

The whole point here is to start programs from the terminal so I do not overly-populate my desktop with symlinks.

  • You can also install a "run" dialog, like gmrunrc, and not deal with terminals at all. – Aviator45003 Jun 9 '14 at 0:49

You can disown a process using the name.

$ nedit &
$ disown nedit
$ exit

and nedit will still exist.

Some programs fork themselves so the program you started started ANOTHER program that runs on its own.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.