]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man4/console.4
Formatting fixes
[thirdparty/man-pages.git] / 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 getty (8)
38 on the console;
39 (b) ask
40 .BR openvt (1)
41 to start a process on the console;
42 (c) start X \(em it will find the first unused console,
43 and display its output there.
44 (There is also the ancient
45 .BR doshell (8).)
46 .LP
47 Common ways to switch consoles are: (a) use Alt+F\fIn\fP or
48 Ctrl+Alt+F\fIn\fP to switch to console \fIn\fP; AltGr+F\fIn\fP
49 might bring you to console \fIn\fP+12 [here Alt and AltGr refer
50 to the left and right Alt keys, respectively];
51 (b) use Alt+RightArrow or Alt+LeftArrow to cycle through
52 the presently allocated consoles; (c) use the program
53 .BR chvt (1).
54 (The key mapping is user settable, see
55 .BR loadkeys (1);
56 the above mentioned key combinations are according to the default settings.)
57 .LP
58 The command
59 .BR deallocvt (1)
60 (formerly \fBdisalloc\fP)
61 will free the memory taken by the screen buffers for consoles
62 that no longer have any associated process.
63
64 .SH PROPERTIES
65 Consoles carry a lot of state. I hope to document that some other time.
66 The most important fact is that the consoles simulate vt100 terminals.
67 In particular, a console is reset to the initial state by printing the two
68 characters ESC c.
69 All escape sequences can be found in
70 .BR console_codes (4).
71
72 .LP
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 getty (8),
89 .BR init (8),
90 .BR mapscrn (8),
91 .BR resizecons (8),
92 .BR setfont (8)