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