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.
I was wondering if there is a method such that some user can legitimately take over the session of another user or at least can take over a process from another terminal or user???!?!
Say, like I was connected to a Linux box from a terminal and I was in a session downloading or performing some action which would be killed if I logged out or disconnected, but, say, for some reason I have to leave that very terminal and move on to another... so can I transfer/move/shift the process(es)/session I was running over to the other terminal I am moving to, say, I have super user privilege too, then??
The "screen" utility is designed to do exactly this.
Essentially you open the terminal session, invoke screen, then start your job. If that session closes (depending on HOW you close it) you can later open it in another session (actually you can do it without closing the other one if you wanted to see it on two different sessions at the same time).
Notes I wrote myself about screen a long time ago:
screen -list - Shows screen session names
screen -S <name> - Starts screen session and gives it <name> as name.
screen -x <pid> - Attaches to existing screen session with PID of <pid>.(12-Sep)
screen -x <name> - Attaches to existing screen session named <name>.(NO! 12-Sep)
Ctrl-A - Main command to use within screen. Selected options:
Ctrl-A ? - Gives a list of all options
Ctrl-A 0 - Goes to first window within a screen session.
Ctrl-A 1 - Goes to second window within a screen session.
Ctrl-A <n> - Goes to nth window within a screen session.
Doing exit from within a screen session will fall back to previous window.
Doing exit from all windows in screen session will terminate screen.
Closing window that has a screen session will leave it running and detached.
Thanks pal, I had seen that screen command elsewhere but ignored it then. Didnt know actually such a transfer of processes could be done. I was just preparing to invent some way to do that hahaha
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.