OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / 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
17 .I "virtual consoles"
18 (character devices with major number 4 and minor number 1 to 63),
19 usually called
20 .I /dev/ttyn
21 with 1 \(<=
22 .I n
23 \(<= 63.
24 The current console is also addressed by
25 .I /dev/console
26 or
27 .IR /dev/tty0 ,
28 the character device with
29 major number 4 and minor number 0.
30 The device files
31 .I /dev/*
32 are usually created using the script MAKEDEV,
33 or using
34 .BR mknod (1),
35 usually with mode 0622 and owner
36 .IR root.tty .
37 .LP
38 Before kernel version 1.1.54 the number of virtual consoles was
39 compiled into the kernel (in
40 .IR tty.h :
41 #define NR_CONSOLES 8)
42 and could be changed by editing and recompiling.
43 Since version 1.1.54 virtual consoles are created on the fly,
44 as soon as they are needed.
45 .LP
46 Common ways to start a process on a console are:
47 (a) tell
48 .BR init (1)
49 (in
50 .BR inittab (5))
51 to start a
52 .BR mingetty (8)
53 (or
54 .BR agetty (8))
55 on the console;
56 (b) ask
57 .BR openvt (1)
58 to start a process on the console;
59 (c) start X\(emit will find the first unused console,
60 and display its output there.
61 (There is also the ancient
62 .BR doshell (8).)
63 .LP
64 Common ways to switch consoles are: (a) use Alt+F\fIn\fP or
65 Ctrl+Alt+F\fIn\fP to switch to console
66 .IR n ;
67 AltGr+F\fIn\fP
68 might bring you to console \fIn\fP+12 [here Alt and AltGr refer
69 to the left and right Alt keys, respectively];
70 (b) use Alt+RightArrow or Alt+LeftArrow to cycle through
71 the presently allocated consoles; (c) use the program
72 .BR chvt (1).
73 (The key mapping is user settable, see
74 .BR loadkeys (1);
75 the above mentioned key combinations are according to the default settings.)
76 .LP
77 The command
78 .BR deallocvt (1)
79 (formerly
80 .BR disalloc )
81 will free the memory taken by the screen buffers for consoles
82 that no longer have any associated process.
83 .SS Properties
84 Consoles carry a lot of state.
85 I hope to document that some other time.
86 The most important fact is that the consoles simulate vt100 terminals.
87 In particular, a console is reset to the initial state by printing the two
88 characters ESC c.
89 All escape sequences can be found in
90 .BR console_codes (4).
91 .SH FILES
92 .I /dev/console
93 .br
94 .I /dev/tty*
95 .SH SEE ALSO
96 .BR chvt (1),
97 .BR deallocvt (1),
98 .BR init (1),
99 .BR loadkeys (1),
100 .BR mknod (1),
101 .BR openvt (1),
102 .BR console_codes (4),
103 .BR console_ioctl (4),
104 .BR tty (4),
105 .BR ttyS (4),
106 .BR charsets (7),
107 .BR agetty (8),
108 .BR mapscrn (8),
109 .BR mingetty (8),
110 .BR resizecons (8),
111 .BR setfont (8)
112 .SH COLOPHON
113 This page is part of release 3.79 of the Linux
114 .I man-pages
115 project.
116 A description of the project,
117 information about reporting bugs,
118 and the latest version of this page,
119 can be found at
120 \%http://www.kernel.org/doc/man\-pages/.