Keeping processes running after ending SSH session

There are several ways to keep a process or program running at the server end even after ending or closing the SSH session.

Using screen

  1. Establish the SSH connection.
  2. To start a screen session, simply type screen in your console. This will open a screen session, create a new window, and start a shell in that window.
  3. Now start your desired process or program from the shell or terminal.
  4. You can detach from the screen session at any time by typing crtl + a and crtl + d. This will detach your screen session but leave your processes running. You can now close the SSH session.
  5. To resume your screen session, establish the SSH connection and type screen -r. This will resume your screen session, and you can see the output of your process.

I'm a Computer Science and Engineering student who loves to learn and spreading what is learnt. Besides I like cooking and photography!

Let me know your thoughts

Scroll to top
Share via
Copy link