OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man4 / console.4
1 .\" Copyright (c) 1994 Andries Brouwer (aeb@cwi.nl), Mon Oct 31 21:03:19 MET 1994
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" Modified, Sun Feb 26 14:58:45 1995, faith@cs.unc.edu
9 .\" "
10 .TH CONSOLE 4 1994-10-31 "Linux" "Linux Programmer's Manual"
11 .SH NAME
12 console \- console terminal and virtual consoles
13 .SH DESCRIPTION
14 A Linux system has up to 63 \fIvirtual consoles\fP
15 (character devices with major number 4 and minor number 1 to 63),
16 usually called \fI/dev/tty\fP\fIn\fP with 1 \(<= \fIn\fP \(<= 63.
17 The current console is also addressed by
18 \fI/dev/console\fP or \fI/dev/tty0\fP, the character device with
19 major number 4 and minor number 0.
20 The device files /dev/* are usually created using the script MAKEDEV,
21 or using
22 .BR mknod (1),
23 usually with mode 0622 and owner root.tty.
24 .LP
25 Before kernel version 1.1.54 the number of virtual consoles was
26 compiled into the kernel (in tty.h: #define NR_CONSOLES 8)
27 and could be changed by editing and recompiling.
28 Since version 1.1.54 virtual consoles are created on the fly,
29 as soon as they are needed.
30 .LP
31 Common ways to start a process on a console are:
32 (a) tell
33 .BR init (8)
34 (in
35 .BR inittab (5))
36 to start a
37 .BR mingetty (8)
38 (or
39 .BR agetty (8))
40 on the console;
41 (b) ask
42 .BR openvt (1)
43 to start a process on the console;
44 (c) start X \(em it will find the first unused console,
45 and display its output there.
46 (There is also the ancient
47 .BR doshell (8).)
48 .LP
49 Common ways to switch consoles are: (a) use Alt+F\fIn\fP or
50 Ctrl+Alt+F\fIn\fP to switch to console \fIn\fP; AltGr+F\fIn\fP
51 might bring you to console \fIn\fP+12 [here Alt and AltGr refer
52 to the left and right Alt keys, respectively];
53 (b) use Alt+RightArrow or Alt+LeftArrow to cycle through
54 the presently allocated consoles; (c) use the program
55 .BR chvt (1).
56 (The key mapping is user settable, see
57 .BR loadkeys (1);
58 the above mentioned key combinations are according to the default settings.)
59 .LP
60 The command
61 .BR deallocvt (1)
62 (formerly \fBdisalloc\fP)
63 will free the memory taken by the screen buffers for consoles
64 that no longer have any associated process.
65 .SS Properties
66 Consoles carry a lot of state.
67 I hope to document that some other time.
68 The most important fact is that the consoles simulate vt100 terminals.
69 In particular, a console is reset to the initial state by printing the two
70 characters ESC c.
71 All escape sequences can be found in
72 .BR console_codes (4).
73 .SH FILES
74 .I /dev/console
75 .br
76 .I /dev/tty*
77 .SH "SEE ALSO"
78 .BR chvt (1),
79 .BR deallocvt (1),
80 .BR loadkeys (1),
81 .BR mknod (1),
82 .BR openvt (1),
83 .BR console_codes (4),
84 .BR console_ioctl (4),
85 .BR tty (4),
86 .BR ttyS (4),
87 .BR charsets (7),
88 .BR agetty (8),
89 .BR init (8),
90 .BR mapscrn (8),
91 .BR mingetty (8),
92 .BR resizecons (8),
93 .BR setfont (8)