Skip to main content
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

The best method is to start the process in a terminal multiplexer. Alternatively you can make the process not receive the HUP signal.


A terminal multiplexer provides "virtual" terminals which run independent from the "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). The virtual terminal will keep running even if your real terminal is closed with your ssh session.

All processes started from the virtual terminal will keep running with that virtual terminal. When you reconnect to the server you can reconnect to the virtual terminal and everything will be as if nothing happened, other than the time which passed.

Two popular terminal multiplexers are screen and tmux.

Screen has a steep learning curve. Here is a good tutorial with diagrams explaining the concept: http://www.ibm.com/developerworks/aix/library/au-gnu_screen/


The HUP signal (or SIGHUP) is sent by the terminal to all its child processes when the terminal is closed. The common action upon receiving SIGHUP is to terminate. Thus when your ssh session gets disconnected all your processes will terminate. To avoid this you can make your processes not receive SIGHUP.

Two easy methods to do so are nohup and disown.

For more information about how nohup and disown works read this question and answer: http://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-andhttps://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and

Note: although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal. This method is mainly useful for long running batch processes which, once started, no longer need any user input.

The best method is to start the process in a terminal multiplexer. Alternatively you can make the process not receive the HUP signal.


A terminal multiplexer provides "virtual" terminals which run independent from the "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). The virtual terminal will keep running even if your real terminal is closed with your ssh session.

All processes started from the virtual terminal will keep running with that virtual terminal. When you reconnect to the server you can reconnect to the virtual terminal and everything will be as if nothing happened, other than the time which passed.

Two popular terminal multiplexers are screen and tmux.

Screen has a steep learning curve. Here is a good tutorial with diagrams explaining the concept: http://www.ibm.com/developerworks/aix/library/au-gnu_screen/


The HUP signal (or SIGHUP) is sent by the terminal to all its child processes when the terminal is closed. The common action upon receiving SIGHUP is to terminate. Thus when your ssh session gets disconnected all your processes will terminate. To avoid this you can make your processes not receive SIGHUP.

Two easy methods to do so are nohup and disown.

For more information about how nohup and disown works read this question and answer: http://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and

Note: although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal. This method is mainly useful for long running batch processes which, once started, no longer need any user input.

The best method is to start the process in a terminal multiplexer. Alternatively you can make the process not receive the HUP signal.


A terminal multiplexer provides "virtual" terminals which run independent from the "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). The virtual terminal will keep running even if your real terminal is closed with your ssh session.

All processes started from the virtual terminal will keep running with that virtual terminal. When you reconnect to the server you can reconnect to the virtual terminal and everything will be as if nothing happened, other than the time which passed.

Two popular terminal multiplexers are screen and tmux.

Screen has a steep learning curve. Here is a good tutorial with diagrams explaining the concept: http://www.ibm.com/developerworks/aix/library/au-gnu_screen/


The HUP signal (or SIGHUP) is sent by the terminal to all its child processes when the terminal is closed. The common action upon receiving SIGHUP is to terminate. Thus when your ssh session gets disconnected all your processes will terminate. To avoid this you can make your processes not receive SIGHUP.

Two easy methods to do so are nohup and disown.

For more information about how nohup and disown works read this question and answer: https://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and

Note: although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal. This method is mainly useful for long running batch processes which, once started, no longer need any user input.

added 430 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12

The best method is to use screenstart the process in a terminal multiplexer. Another method is to use nohupAlternatively you can make the process not receive the HUP signal.


Screen is a A terminal multiplexer provides "virtual" terminalterminals which you can run independent from athe "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). ScreenThe virtual terminal will keep running even if your real terminal is closed with your ssh session gets disconnected. Any process which you start in a screen session

All processes started from the virtual terminal will keep running with that screen sessionvirtual terminal. When you reconnect to the server you can reconnect to the screen sessionvirtual terminal and everything will be as if nothing happened, other than the time which passed.

Two popular terminal multiplexers are screen and tmux.

Screen has a steep learning curve. "Speaking UNIX: Stayin' alive with Screen"Here is a nicegood tutorial with diagrams explaining the concept.

An alternative to screen is: tmux.http://www.ibm.com/developerworks/aix/library/au-gnu_screen/


nohup ignores the The HUPHUP signal. The HUP signal(or SIGHUP) is sent by the terminal to all its child processes when the controlling terminal is closed (for example by a disconnected. The common action upon receiving SIGHUP is to terminate. Thus when your ssh session) gets disconnected all your processes will terminate. Processes started withTo avoid this you can make your processes not receive SIGHUP.

Two easy methods to do so are nohup and disown.

For more information about how nohup will not receive theand HUPdisown signal. Althoughworks read this question and answer: http://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and

Note: although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal.

nohup This method is useful mainly useful for long running batch processes which, once started, no longer need any attention.

As an alternative to nohup, the Bash built-in command disown can be used to tell bash to not send the program the HUP signaluser input.

The best method is to use screen. Another method is to use nohup.


Screen is a "virtual" terminal which you can run from a "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). Screen will keep running even if your ssh session gets disconnected. Any process which you start in a screen session will keep running with that screen session. When you reconnect to the server you can reconnect to the screen session and everything will be as if nothing happened, other than the time which passed.

Screen has a steep learning curve. "Speaking UNIX: Stayin' alive with Screen" is a nice tutorial with diagrams explaining the concept.

An alternative to screen is tmux.


nohup ignores the HUP signal. The HUP signal is sent to all child processes when the controlling terminal is closed (for example by a disconnected ssh session). Processes started with nohup will not receive the HUP signal. Although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal.

nohup is useful mainly for long running batch processes which, once started, no longer need any attention.

As an alternative to nohup, the Bash built-in command disown can be used to tell bash to not send the program the HUP signal.

The best method is to start the process in a terminal multiplexer. Alternatively you can make the process not receive the HUP signal.


A terminal multiplexer provides "virtual" terminals which run independent from the "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). The virtual terminal will keep running even if your real terminal is closed with your ssh session.

All processes started from the virtual terminal will keep running with that virtual terminal. When you reconnect to the server you can reconnect to the virtual terminal and everything will be as if nothing happened, other than the time which passed.

Two popular terminal multiplexers are screen and tmux.

Screen has a steep learning curve. Here is a good tutorial with diagrams explaining the concept: http://www.ibm.com/developerworks/aix/library/au-gnu_screen/


The HUP signal (or SIGHUP) is sent by the terminal to all its child processes when the terminal is closed. The common action upon receiving SIGHUP is to terminate. Thus when your ssh session gets disconnected all your processes will terminate. To avoid this you can make your processes not receive SIGHUP.

Two easy methods to do so are nohup and disown.

For more information about how nohup and disown works read this question and answer: http://unix.stackexchange.com/questions/3886/difference-between-nohup-disown-and

Note: although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal. This method is mainly useful for long running batch processes which, once started, no longer need any user input.

The best method is to use screen. Another method is to use nohup.


Screen is a "virtual" terminal which you can run from a "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). Screen will keep running even if your ssh session gets disconnected. Any process which you start in a screen session will keep running with that screen session. When you reconnect to the server you can reconnect to the screen session and everything will be as if nothing happened, other than the time which passed.

Screen has a steep learning curve. "Speaking UNIX: Stayin' alive with Screen" is a nice tutorial with diagrams explaining the concept.

An alternative to screen is tmuxtmux.


nohup ignores the HUP signal. The HUP signal is sent to all child processes when the controlling terminal is closed (for example by a disconnected ssh session). Processes started with nohup will not receive the HUP signal. Although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal.

nohup is useful mainly for long running batch processes which, once started, no longer need any attention.

As an alternative to nohup, the Bash built-in command disown can be used to tell bash to not send the program the HUP signal.

The best method is to use screen. Another method is to use nohup.


Screen is a "virtual" terminal which you can run from a "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). Screen will keep running even if your ssh session gets disconnected. Any process which you start in a screen session will keep running with that screen session. When you reconnect to the server you can reconnect to the screen session and everything will be as if nothing happened, other than the time which passed.

Screen has a steep learning curve. "Speaking UNIX: Stayin' alive with Screen" is a nice tutorial with diagrams explaining the concept.

An alternative to screen is tmux.


nohup ignores the HUP signal. The HUP signal is sent to all child processes when the controlling terminal is closed (for example by a disconnected ssh session). Processes started with nohup will not receive the HUP signal. Although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal.

nohup is useful mainly for long running batch processes which, once started, no longer need any attention.

As an alternative to nohup, the Bash built-in command disown can be used to tell bash to not send the program the HUP signal.

The best method is to use screen. Another method is to use nohup.


Screen is a "virtual" terminal which you can run from a "real" terminal (actually all terminals today are "virtual" but that is another topic for another day). Screen will keep running even if your ssh session gets disconnected. Any process which you start in a screen session will keep running with that screen session. When you reconnect to the server you can reconnect to the screen session and everything will be as if nothing happened, other than the time which passed.

Screen has a steep learning curve. "Speaking UNIX: Stayin' alive with Screen" is a nice tutorial with diagrams explaining the concept.

An alternative to screen is tmux.


nohup ignores the HUP signal. The HUP signal is sent to all child processes when the controlling terminal is closed (for example by a disconnected ssh session). Processes started with nohup will not receive the HUP signal. Although the processes will keep running you can no longer interact with them because they are no longer attached to any terminal.

nohup is useful mainly for long running batch processes which, once started, no longer need any attention.

As an alternative to nohup, the Bash built-in command disown can be used to tell bash to not send the program the HUP signal.

deleted 36 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
added 100 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
added 17 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
deleted 171 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
added 126 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
added 232 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
added 64 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
deleted 1 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
added 906 characters in body
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading
Source Link
Lesmana
  • 2.3k
  • 2
  • 17
  • 12
Loading