Run the command in the background by combining nohup
with &
.
$nohup python sample.py&
In such cases, it is convenient to use the screen command to operate on a virtual terminal.
If you know the following commands, you can move them.
screen
Create Virtual Terminal
Ctrl+ad
Detach the screen from the current terminal.
screen-r
Resume the detached screen session.
Also, if done, stop with Ctrl+z
and use disown
as stated in the comment.
© 2024 OneMinuteCode. All rights reserved.