From 75a4a592e5ccda30715f93563d741b83e0dcf39e Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 25 Apr 2011 13:37:00 +0000 Subject: Slackware 13.37 Mon Apr 25 13:37:00 UTC 2011 Slackware 13.37 x86_64 stable is released! Thanks to everyone who pitched in on this release: the Slackware team, the folks producing upstream code, and linuxquestions.org for providing a great forum for collaboration and testing. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. As always, thanks to the Slackware community for testing, suggestions, and feedback. :-) Have fun! --- slackbook/html/shell-vt.html | 137 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 slackbook/html/shell-vt.html (limited to 'slackbook/html/shell-vt.html') diff --git a/slackbook/html/shell-vt.html b/slackbook/html/shell-vt.html new file mode 100644 index 000000000..2d28160c5 --- /dev/null +++ b/slackbook/html/shell-vt.html @@ -0,0 +1,137 @@ + + + + +Virtual Terminals + + + + + + + + + + + +
+

8.4 Virtual Terminals

+ +

So you're in the middle of working on something and you decide you need to do +something else. You could just drop what you're doing and switch tasks, but this is a +multi-user system, right? And you can log in as many times simultaneously as you want, +right? So why should you have to do one thing at a time?

+ +

You don't. We can't all have multiple keyboards, mice, and monitors for one machine; +chances are most of us don't want them. Clearly, hardware isn't the solution. That leaves +software, and Linux steps up on this one, providing “virtual terminals”, or +“VTs”.

+ +

By pressing Alt and a function key, you can switch +between virtual terminals; each function key corresponds to one. Slackware has logins on +6 VTs by default. Alt+F2 will take you to the +second one, Alt+F3 to the third, etc.

+ +

The rest of the function keys are reserved for X sessions. Each X session uses its own +VT, beginning with the seventh (Alt+F7) and +going up. When in X, the Alt+Function key +combination is replaced with Ctrl+Alt+Function; so if you are in X and want to get back to a text login +(without exiting your X session), Ctrl+Alt+F3 will take you to the third. (Alt+F7 will take you back, assuming you're using the first X session.)

+ +
+

8.4.1 Screen

+ +

But what about situations where there are no virtual terminals? What then? +Fortunately, slackware includes a beautiful screen manager aptly named screen. screen is a terminal emulator that +has virtual terminal like capabilities. Executing screen flashes +a brief introduction, then dumps to a terminal. Unlike the standard virtual terminals, +screen has its own commands. All screen +commands are prefixed with a Crtl+A +keystroke. For example, Ctrl+A+C will create a new terminal session. Ctrl+A+N will switch to the next terminal. Ctrl+A+P switches to the +previous terminal.

+ +

screen also supports detaching and re-attaching to screen sessions which is particularly useful for remote sessions via +ssh and telnet, (more on those later). +Ctrl+A+D will detach +from the currently running screen. Executing screen -r will list +all currently running screen sessions you may reattach to.

+ + + + + +
+
+% screen -r
+There are several suitable screens on:
+     1212.pts-1.redtail      (Detached)
+     1195.pts-1.redtail      (Detached)
+     1225.pts-1.redtail      (Detached)
+     17146.pts-1.sanctuary   (Dead ???)
+Remove dead screens with 'screen -wipe'.
+Type "screen [-d] -r [pid.]tty.host" to resume one of them. 
+
+
+ +

Running screen -r 1212 would reattach to the first screen +listed. I mentioned earlier how useful this was for remote sessions. If I were to login +to a remote slackware server via ssh, and my connection was +severed by some chance occurrence such as a local power failure, whatever I was doing at +that moment would instantly perish, which can be a horrible thing for your server. Using +screen prevents this by detaching my session if my connection is +dropped. Once my connection is restored, I can reattach to my screen session and resume +right where I left off.

+
+
+ + + + + -- cgit v1.2.3