Re: halt for users -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
standardblue wrote:
> On Wed, 23 Jun 2004 07:56:22 -0400, Lew Pitcher wrote:
> <snip>
>
>>a) From any (character) console: <ctl><alt><del> will shutdown/reboot
>> (see the "ca" line in /etc/inittab)
>> (FWIW, <ctl><alt><Fx> will move you from a GUI to a console, where
>> you can then <ctl><alt><del> to shutdown)
>
> <snip>
>
> ...and for any other newbie stupid enough to try <ctrl><alt><Fx> to see
> what it does... (ahem)...
Well, it (and <alt><Fx>) move you from virtual console to virtual
terminal. When your virtual terminal is running X, you have to add the
<ctl>, otherwise X will intercept the keystroke and you won't move.
Now, how do you know which terminals to move to? Well, your /etc/inittab
and your /etc/rc.d/rc.5 tell you. In /etc/inittab, you'll see a number
of lines that look like this...
# These are the standard console login getties in multiuser mode:
c1:1235:respawn:/sbin/agetty 38400 tty1 linux
c2:1235:respawn:/sbin/agetty 38400 tty2 linux
c3:1235:respawn:/sbin/agetty 38400 tty3 linux
c4:1235:respawn:/sbin/agetty 38400 tty4 linux
c5:1235:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
Each one of those 'respawn' lines starts up a virtual terminal
F1 corresponds to the c1 line that starts tty1,
F2 corresponds to the c2 line that starts tty2,
and so on.
The numbers after the first colon tell you which runlevel(s) the line
applies to. So, if you boot into runlevel 4, only the c6 line that
starts tty6 will be active (it's the only one that starts in runlevel
4). So, [<ctl>]<alt><F6> will take you to the getty login on the tty6
virtual terminal.
Now, where is your X session? If you don't tell X otherwise, it starts
the X session on the first free console after the last used one. In
other words, without any overriding instructions, in this case X will
start the session on tty7, and you'd get to tty7 through [<ctl>]<alt><F7>.
So, what was that you saw on tty1 (F1)? Well, Linux also allocates a
special device called the "console" (/dev/console) and places it on tty1
unless otherwise instructed. When you [<ctl>]<alt><F1>, you ended up
looking at /dev/console. /dev/console is special; that's where the
startup messages are sent, so that's what you saw when you got there.
Assuming that none of the other consoles were started, you got only
blank screens when you [<ctl>]<alt><Fx>'ed to them.
And, that's that ;-)
> my subsequent trial-and-error revealed that <alt><F7> brought me back into
> x-windows!
>
> oopsie...
>
> sb
- --
Lew Pitcher, IT Consultant, Enterprise Application Architecture
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFA2c1sagVFX4UWr64RAs3OAJ9PU7++h6cDrdv4kpq+xe 7ukLlq7ACgz59c
h32G91w5u3qfIj2YNxQlWr0=
=1hZa
-----END PGP SIGNATURE----- |