Can I take a screenshot of a virtual console?

To take a screenshot of the first virtual console (AKA screendump) and save it to a file called "screenshot":

sudo cat /dev/vcs1 > screenshot

Using this method, the screenshots are saved in plain text format, not an image (check this with file or mimetype command). It simply outputs a screen dump and then EOF. Note that the output does not contain newline characters, so some processing may be required:

sudo cat /dev/vcs1 | fold  > screenshot

fold wrap each input line to fit in specified width (80 by default).

You cannot take the screenshot of a virtual console when graphics is enabled.

Reference

  • VCS: vcs, vcsa - virtual console memory

There's an application called fbgrab provided by the fbcat package that (as the name might suggest) grabs a shot of the current framebuffer. This might not work on newer KMS setups.

sudo apt-get install fbcat
fbgrab screenshot.png

If that fails, you could always use a VM in VirtualBox.


If you want to take a picture of another TTY, fbgrab takes a -c N argument (where N is replaced with the /dev/ttyN you're using).

So if you wanted tty1:

sudo fbgrab -c 1 Desktop/tty-screenshot.png