Yes, commands you have started will be stopped if you log out.
But you can start them using the screen
command:
$ screen command
From this virtual screen you can exit afterwards (Ctrl+A, D
), while letting the command proceed running.
You can start a command and instantly send it into a virtual detached screen as well:
$ screen -fa -d -m command
To get an overview of your screen sessions, use the following command:
$ screen -list
There are screens on:
2457.pts-2.myserver (22.10.2018 20:04:35) (Detached)
12596.pts-3.myserver (28.08.2018 22:10:00) (Detached)
4632..myserver (15.07.2018 20:56:55) (Detached)
3 Sockets in /run/screen/S-me.
$
Bring a session back in foreground, using the -r
switch, while giving the session id:
$ screen -r 2457.pts-2.myserver