]>
Commit | Line | Data |
---|---|---|
fea681da MK |
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), | |
8478ee02 | 16 | usually called \fI/dev/tty\fP\fIn\fP with 1 \(<= \fIn\fP \(<= 63. |
fea681da | 17 | The current console is also addressed by |
8478ee02 | 18 | \fI/dev/console\fP or \fI/dev/tty0\fP, the character device with |
fea681da MK |
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 | |
27334eaf | 37 | .BR mingetty (8) |
fea681da MK |
38 | on the console; |
39 | (b) ask | |
40 | .BR openvt (1) | |
41 | to start a process on the console; | |
4d9b6984 | 42 | (c) start X \(em it will find the first unused console, |
fea681da MK |
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 | |
b5cc2ffb MK |
52 | the presently allocated consoles; (c) use the program |
53 | .BR chvt (1). | |
fea681da MK |
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. | |
fea681da MK |
63 | .SH PROPERTIES |
64 | Consoles carry a lot of state. I hope to document that some other time. | |
65 | The most important fact is that the consoles simulate vt100 terminals. | |
66 | In particular, a console is reset to the initial state by printing the two | |
67 | characters ESC c. | |
68 | All escape sequences can be found in | |
69 | .BR console_codes (4). | |
fea681da MK |
70 | .SH FILES |
71 | .I /dev/console | |
72 | .br | |
73 | .I /dev/tty* | |
74 | .SH "SEE ALSO" | |
75 | .BR chvt (1), | |
76 | .BR deallocvt (1), | |
77 | .BR loadkeys (1), | |
78 | .BR mknod (1), | |
79 | .BR openvt (1), | |
80 | .BR console_codes (4), | |
81 | .BR console_ioctl (4), | |
82 | .BR tty (4), | |
f82a9fac | 83 | .BR ttyS (4), |
fea681da | 84 | .BR charsets (7), |
27334eaf | 85 | .BR mingetty (8), |
fea681da MK |
86 | .BR init (8), |
87 | .BR mapscrn (8), | |
88 | .BR resizecons (8), | |
89 | .BR setfont (8) |