summaryrefslogtreecommitdiff
blob: 60e5e9188325965a2d1d8d1d1c2cd9bd58d8503a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.TH CONSOLETYPE 1 "Red Hat, Inc" "RH" \" -*- nroff -*-
.SH NAME
.B consoletype
\- print type of the console connected to standard input
.SH SYNOPSIS
.B consoletype [\fIstdout\fR]
.SH DESCRIPTION
.B consoletype
prints the type of console connected to standard input. It prints
.I vt
if console is a virtual terminal (/dev/tty* or /dev/console device if not on
a serial console),
.I serial
if standard input is a serial console (/dev/console or /dev/ttyS*) and
.I pty
if standard input is a pseudo terminal.
.SH RETURN VALUE
.B consoletype
When passed no arguments returns
.TP
.I 0
if on virtual terminal
.TP
.I 1
if on serial console
.TP
.I 2
if on a pseudo terminal.
.TP
When passed the \fIstdout\fR argument, returns
.TP
.I 0
in all cases.