]>
Commit | Line | Data |
---|---|---|
792fd7dc | 1 | .TH CONSOLETYPE 1 "Red Hat, Inc" "RH" \" -*- nroff -*- |
458f14b7 | 2 | .SH NAME |
792fd7dc | 3 | \fBconsoletype |
458f14b7 AM |
4 | \- print type of the console connected to standard input |
5 | .SH SYNOPSIS | |
792fd7dc | 6 | \fBconsoletype [\fIfg\fR] |
458f14b7 | 7 | .SH DESCRIPTION |
792fd7dc AM |
8 | \fBconsoletype |
9 | prints the type of console connected to standard input, and checks | |
10 | whether the console connected to standard input is the current | |
11 | foreground virtual console. With no arguments, it prints | |
12 | \fIvt\fR | |
458f14b7 AM |
13 | if console is a virtual terminal (/dev/tty* or /dev/console device if not on |
14 | a serial console), | |
792fd7dc | 15 | \fIserial\fR |
458f14b7 | 16 | if standard input is a serial console (/dev/console or /dev/ttyS*) and |
792fd7dc | 17 | \fIpty\fR |
458f14b7 AM |
18 | if standard input is a pseudo terminal. |
19 | .SH RETURN VALUE | |
792fd7dc AM |
20 | \fBconsoletype |
21 | when passed no arguments returns | |
458f14b7 | 22 | .TP |
792fd7dc | 23 | \fI0 |
458f14b7 AM |
24 | if on virtual terminal |
25 | .TP | |
792fd7dc | 26 | \fI1 |
458f14b7 AM |
27 | if on serial console |
28 | .TP | |
792fd7dc | 29 | \fI2 |
458f14b7 | 30 | if on a pseudo terminal. |
792fd7dc AM |
31 | .TP |
32 | When passed the \fIfg\fR argument, \fBconsoletype\fR returns | |
33 | .TP | |
34 | \fI0 | |
35 | if the console connected to standard input is the current virtual | |
36 | terminal | |
37 | .TP | |
38 | \fI1 | |
39 | otherwise. |