I've seen people saying use screen.But when I typed screen in the terminal, I got: Please set a terminal type.Any idea how I can fix this?
How to ssh into a remote box, run a command and keep it running after I disconnect
shell script;gnu screen
To answer your initial question, the most basic way to keep a command running after logging out is to run it with the nohup command.For example, if I wanted to run a script, and drop it into the background while keeping it running after logging out I would type:nohup ./myscript &More information can be found here: https://en.wikipedia.org/wiki/NohupOtherwise, as you stated, screen is a good option.