I know the answer to this question may be screens, but it doesn't seem to be working for me. I've tried creating a new screen session and running it there, then switching back to my main one. However, when I close that terminal completely, all the screens disappear, yet the server is still running. I can no longer get to the jar file while it's running, forcing me to restart the server in order to kill the jar. I've tried kill and pkill after finding the PID of the jar using the top command, but that doesn't work. Am I doing something wrong with screens or is there something else I'm missing? Thanks for any responses.

TL;DR I need a way to run a jar so I can access it later on another termainal session

  • 1
    The screen-sessions shouldn't dispear when you close the terminal. screen -ls should list the open sessions. You should then be able to reattach to the session with this: unix.stackexchange.com/a/197805/49165 – MadMike May 30 '16 at 16:00

I figured out the problem. The screen sessions aren't "disappearing", they're just detaching. The way I fixed this was by using "screen -ls", finding the PID of the screen I wanted, then using "screen -r " to reattach the screen and allow access to it. Thank you to MadMike for the link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.