Can I take a screenshot of a virtual console?

Exists a means for me to take a screenshot in a virtual console?

2019-12-02 03:13:24
Source Share
Answers: 2

There is an application called fbgrab that (as the name could recommend) orders a shot of the existing framebuffer. This could not work with more recent KMS arrangements.

sudo apt-get install fbgrab
fbgrab screenshot.png

If that falls short, you can constantly make use of a VM in VirtualBox.

If you intend to take an image of an additional TTY, fbgrab takes a -c N argument (where N is changed with the /dev/ttyN you are making use of).

So if you desired tty1 :

sudo fbgrab -c 1 Desktop/tty-screenshot.png
2019-12-03 05:09:37

To take a screenshot of the first virtual console (AKA screendump ) and also wait to a documents called "screenshot" :

sudo cat /dev/vcs1 > screenshot

Using this method, the screenshots are conserved in simple message layout, not a photo (check this with file or mimetype command). It merely outputs a screen dump and afterwards EOF. Keep in mind that the result does not have newline personalities, so some handling might be called for :

sudo cat /dev/vcs1 | fold  > screenshot

fold cover each input line to suit defined size (80 by default).

You can not take the screenshot of a virtual console when graphics is made it possible for.


2019-12-03 05:09:30