This tutorial explains Linux “fgconsole” command, options and its usage with examples.
fgconsole – print the number of the active VT.
If the active Virtual Terminal is /dev/ttyN, then prints N on standard output.
If the who command shows that
# who abc tty7 2013-12-23 02:02 (:0) abc pts/1 2013-12-24 11:04 (:0)
Then the fgconsole will output 7 as active terminal is tty7
Check this: Information Technology Books | Linux Books
# fgconsole 7
Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.
If you wish to look at all Linux commands and their usage examples, go to Linux Commands Tutorial.
- Apply for Linux Internship
- Buy Information Technology Books
- Apply for Programming Internship
- Practice Programming MCQs
- Buy Linux Books