imported>(logged).94.145.24.forward.012.net.il (/usr/bin/screen is your freind) |
imported>mutante mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=== About screen === |
|||
= Screen = |
|||
screen is a "window" manager for the terminal. Similar in concept to tabbed browsing in [[Mozilla]], but without the [[GUI]]. It allows you to have multiple terminal sessions open while only taking up one on your desktop (aka console). |
|||
When <i>screen</i> is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole <i>screen</i> session is detached from the user's terminal. When a program terminates, <i>screen</i> (per default) kills the window that contained it. If this window was in the foreground, the display switches to the previous window; if none are left, <i>screen</i> exits. |
When <i>screen</i> is called, it creates a single window with a [[shell]] in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole <i>screen</i> session is detached from the user's terminal. When a program terminates, <i>screen</i> (per default) kills the window that contained it. If this window was in the foreground, the display switches to the previous window; if none are left, <i>screen</i> exits. |
||
=== invoking screen === |
|||
⚫ | |||
⚫ | |||
screen <command> <argument/s> |
screen <command> <argument/s> |
||
example: |
example: |
||
screen irssi -c irc.rt.ru |
screen irssi -c irc.rt.ru |
||
=== attaching to a screen === |
|||
screen -x |
|||
screen -r |
|||
=== detaching from screen === |
|||
Ctrl+a+d |
|||
=== switching to next screen window === |
|||
Ctrl+a+n |
|||
=== screen keyboard shortcuts === |
|||
Line 25: | Line 44: | ||
Some customizations explained [http://www.mkaz.com/reference/unix_screen.html here] |
Some customizations explained [http://www.mkaz.com/reference/unix_screen.html here] |
||
=== Multiple screens === |
|||
If you have multiple screens running, use |
If you have multiple screens running, use |
||
screen -x |
screen -x or screen -l |
||
to list them with their [pid.]tty.host and type either |
to list them with their [pid.]tty.host and type either |
||
screen -x [pid.]tty.host |
screen -x [pid.]tty.host |
||
screen -r [pid.]tty.host (thanks to whoever mentioned this) |
screen -r [pid.]tty.host (thanks to whoever mentioned this) |
||
[[Category:Computer]] |
|||
[[Category:Unix]] |
|||
[[Category:Linux]] |
Latest revision as of 20:19, 29 October 2005
About screen[edit]
screen is a "window" manager for the terminal. Similar in concept to tabbed browsing in Mozilla, but without the GUI. It allows you to have multiple terminal sessions open while only taking up one on your desktop (aka console).
When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the user's terminal. When a program terminates, screen (per default) kills the window that contained it. If this window was in the foreground, the display switches to the previous window; if none are left, screen exits.
invoking screen[edit]
Invoke screen like so:
screen <command> <argument/s> example: screen irssi -c irc.rt.ru
attaching to a screen[edit]
screen -x screen -r
detaching from screen[edit]
Ctrl+a+d
switching to next screen window[edit]
Ctrl+a+n
screen keyboard shortcuts[edit]
By default, once you have invoked screen as mentioned above, each command begins with a control-a (abbreviated C-a from now on), and is followed by one other keystroke. The command character and all the key bindings can be fully customized to be anything you like, though they are always two characters in length.
"C-a c" - The standard way to create a new window "C-a n" - Toggle to next window "C-a p" - Toggle to previous window "C-a 0-9" - Switch to window # "C-a d" - Detach from current screen back to shell (screen runs in background)
If you have detached from ScreeN and would like to resume/reattach try this:
screen -r
screen Manpage
Some customizations explained here
Multiple screens[edit]
If you have multiple screens running, use
screen -x or screen -l
to list them with their [pid.]tty.host and type either
screen -x [pid.]tty.host screen -r [pid.]tty.host (thanks to whoever mentioned this)