I need to run a java program on my university servers. I'm remotely logging in through their servers via ssh
So I used nohup like so:
nohup java -jar project.jar &
However when I logout and close the terminal then log back into the server my process is missing/got killed off.
Best Answer
nohup
only make program immune toSIGHUP
andSIGQUIT
signal. Modern shell maybe send other signals when you logout from your session, so there is no guarantee that your program is not killed, even running undernohup
.The better solution is using
tmux
orscreen
, or if you usebash
, you can try: