Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi there,
i'm trying to get one of my own processes to stay running in the background and only stop if i "kill" it. I run the process remotely via "ssh user@serverIP nohup /TARGET > /dev/null &" this works fine when i'm on the other server logging in and out, but when i shutdown the server i sent to command from, it also kills the running process on the remote server and i want it to stay running. Anyideas?? i can't think of anything
thanks for your reply and no i've not used screen, but i think i know where the problem may lie with nohup as when ssh-ing commands to remote computer the commands outputs still to the computer your on, so i say shutdown that stops the nohup from being able to get to the /dev/null on the server i used to ssh in with, so it closes is my guess. I'm interested in screen and also however is it possible to get during a remote ssh command to output to the same server i'd be connected to and not get the outputs back at my server that could solve the problem?
Yes, you can use redirection with your output using screen. You can leave it outputting to stdout and when you reconnect to your screen session you can see the output, or you can output to a file and check the file afterwards.
also, i'll be executing things all from bash scripts, so if i have to type stuff with this screen program then thats not what i'm after and the reason i'm trying to use the ssh command to remotly run the target file without having to login as such using an ssh terminal
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.