Output the connected terminal type
The consoletype command is used to print the type of the connected terminal to standard output. It can also check whether the connected terminal is the current console or a virtual terminal.
consoletype
[root@localhost ~]# consoletype
pty