How to run an application in Linux without quitting from a remote?
October 30, 2007
Sometimes we need to log in to Linux from a remote using putty or SSH Secure Shell because we have an important application to upload to a server and it would be better also to run this application in the server because we want a faster connection and a faster machine.
Say for example, I have a Java application that accesses an Internet connection and I want this application to be uploaded in the Linux server because I want a faster connection compared to my PC. Then we open an ssh to transfer this file (application) to a server. And we want this application remains running when we logout from the server.
So, some of us will think that this code will work,
java -jar InternetScript.jar &
Yes, this perfectly works but it will also quit when you logout from your Linux.
We have a better solution for that problem. We can add nohup to our previous command.
nohup java -jar InternetScript.jar &
Try it. Good luck!