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.
is it possible to switch between pids between terminals in a shell. not jobs.
basically what I want to be able to do is this. start a shell script on the console. and log in remotely (same account) and be able to view the output while it's running. Is there a way to do this?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Have you looked at screen?
It allows you to start a session then "hang up" and pick up again later, and also to access the same terminal from more than one machine.
You may also try tmux - it is a cleaner implementation of the same idea (terminal multiplexing), just as stable and has saner default keybindings (the main keyboard shortcut for screen is ctrl-a, which conflicts with emacs/bash ctrl-a (goto start of line), the main shorcut for tmux is ctrl-b, which is not used by emacs/bash by default).
Example:
1) run 'tmux'
2) launch your long running processing, etc.
3) press <ctrl-b-d> ### this detaches you from the tmux session (you can also just close the terminal window)
4) login again
5) in order to attach to the previous tmux session (with the long running process in it), run 'tmux att'
btw, you can attach from several *different* logins to the same session, which is usefull for sharing a session between several users (education, remote help, etc.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.