How to take a screenshot in console (without X)?

The format of the raw file you capture is going to depend on the bit depth and resolution.

There are a number of tools out there to do this. Debian has the fbcat package. You may need to sudo apt-get install fbcat to install it.

fbcat will grab the frame buffer in ppm format, so you can then use ppmtojpeg or similar to convert it to the format you want.

There's also a fbgrab wrapper which will save in PNG format.


You can use the sudo setterm --dump command to print the content of the current tty into a text file, the default output is screen.dump file. The --file option can be used to get a custom output file name: sudo setterm --dump --file screen0.dump.

man setterm :

--dump [console_number]

Writes a snapshot of the virtual console with the given number to the file specified with the --file option, overwriting its contents; the default is screen.dump. Without an argument, it dumps the current virtual console. This overrides --append.

Tags:

Screenshot

Tty