Archive for the tag 'Interacting'

SBDavid

Interacting with Screen

Interacting with Screen

Screen is a terminal multiplexer that allows you to manage many processes through one physical terminal. Each process gets its own virtual window, and you can bounce between virtual windows interacting with each process. The processes managed by screen continue to run when their window is not active.

Before actually running screen, it’s important to understand how to interact with it. Screen sends all entered text to the current window, with the exception of the command character. The default command character is Ctrl-A (press the Ctrl and the A key at the same time).

With screen, a simple Ctrl-A C will create a new screen window with a new shell process.
An example of this is Ctrl-A C and Ctrl-A Ctrl-C to create a window.

You can delete a window manually with the kill command (default Ctrl-A K). When you exit all of the screen windows, screen exits. You also can tell screen to exit and kill all of your windows by issuing the quit command (Ctrl-A \).

You can re-attach to the session in a few ways. You can give a session name explicitly with screen -r sessionname.

You can detach from your session using Ctrl-A D.
You can enter copy mode with Ctrl-A [
If you are using copy mode for scrollback only, it can be exited at any time with the Esc key.

To copy text, maneuver the cursor to the beginning of the desired text, and press the spacebar to mark it. Then position the cursor over the end of the text you'd like and press the spacebar again to mark it. When you mark the end, the text is copied into screen's internal copy buffer, and copy mode is exited. You can paste the text in your copy buffer into the active window with Ctrl-A ].