Get Active Linux Virtual Console: Difference between revisions
From Leo's Notes
This page was last edited on 10 November 2015, at 09:57.
No edit summary |
m Leo moved page Active Terminal to Get Active Linux Virtual Console: renaming to something more meaningful |
(No difference)
| |
Revision as of 09:57, 10 November 2015
To get the active virtual terminal/console in use under Linux, use the fgconsole command, or run
cat /sys/class/tty/tty0/active
fgconsole requires root
The fgconsole requires root access or the ability to read /dev/tty0 as the person running the program.