注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Package:Screen

From Funtoo
Revision as of 16:55, October 27, 2020 by Drobbins (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Screen is a useful terminal multiplexer. This means that when installed, you can start screen and create virtual terminals, and switch between them using a special command sequence.

root # emerge app-misc/screen

Basics

To start a new screen session and make it active:

root # screen
in-screen #

You are now "inside" a screen session. You can now create new virtual terminals by pressing Ctrl-A C, and use Ctrl-A N to cycle between them. Press Ctrl-A D to "detach" from your session. Your virtual terminals will keep running in the background, even if you log out.

To re-attach to your session, which can be done even after logging in on a different terminal or ssh session, but as the same user, type:

root # screen -r -d
in-screen #

Advanced Usage

Start a named detached session:

root # screen -d -m -S funtoo

Attach to a named session, multiple clients may connect at the same time:

root # screen -x funtoo

kill all screens and dump back into good old bash:

root # ctrl +a :quit