Viewing Linux console screens

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

If you want to see what's displayed on a certain Linux console screen remotely (i.e., you've left some programs running, or want to see the output of some program you started before etc.), log in to the machine you want and do:

cat /dev/vcs1 | less

To see the first console (ctrl+atl+F1). Replace "1" with the number of any other console you want to view.

However, this will be rather unformatted.

If you want to see the console as it is, do:

# setterm -dump 1
# cat screen.dump | less

Example output:

Ubuntu 16.04 LTS lxadm01 tty1

lxadm01 login: