With remote connections (when people remotely login, then start a process and want it to keep running after they close the remote connection) a commonly used method is to run the desired program with 'screen' ('screen programname'). We will see in this article how to send commands in the background, In this article we will talk about background process is Linux. Another option is the excellent screen utility, which can be used to run many processes at the same time, without having to keep a terminal open. So that I can still work on shell and that process also gets Keep Linux Processes Running After Exiting Terminal We will use disown command, it is used after the a process has been launched and put in the background, it’s work is to remove a shell job from the shell’s active list jobs, therefore you will not use fg, bg commands on that particular job anymore. Just press F6 (detach) to leave byobu and keep it running your process in background. For example, take this command that simply adds numbers to a text file. 1) Screen It means that while it does it’s work, you can go about your regular business and issue other commands in parallel. [detached (from session 1)] After login to remote system, just type byobu to re-attach your session back. In this article, I will explain how to keep the process running even after SSH is disconnected from a Linux terminal (Ubuntu 18.04 and CentOS 7). So how can we keep are the process running even after SSH Logout? I have a command that uploads files using git to a remote server from the Linux shell and it will take many hours to finish. Linux lets you start a task in the background and keep on doing other things from the command prompt. Hence it is essential to know how to show all running processes in Linux. Keep A Command Running After You Log Out Of The SSH Session In Linux There could be many ways to do this. You can now safely log off from the remote machine, your process will keep running inside tmux. Typically when you run a command in To make the kate process detached from konsole when you terminate konsole, use nohup with the command, like this: nohup kate & After closing konsole, pstree will look like this: init-+ |-kate---2*[{kate}] and kate will survive. Since Linux is a multiprocessing operating system, one can run multiple tasks in the background. Linux screen Command: Keep Your Processes Running Despite A Dropped Connection I guess you all know this: you are connected to your server with SSH an... Log in or Sign up Tutorials We will show you how to start a command in the background and how to keep the process running after the shell session is closed. It also allows for much easier interactivity than bg and fg. To stop this, add > /dev/null 2>&1 before the & to redirect both the outputs to /dev/null - adding disown also makes sure the process is not killed after you close the terminal: If you want to have multiple sessions running side-by-side, you should name each session using Ctrl+b and $.