how can I make a screenshot of the linux console output?
For example I run the command ls -l
and want to make a screenshot of the whole output.
What kind of "screenshot" of what kind of console output?
I assume you meant to take a screengrab of the text consoles (the ones spawned by getty
) rather than an emulated terminal, since the latter runs in a graphic environment where screen-grabbing would be mostly trivial.
If by screenshot you mean a text recording of some shell session, you can use the script
program (see man 1 script
). The output (often containing control characters) can be then cat
ted to the terminal for viewing.
If instead you mean an image file of the visible screen, you can try the various programs such as fbdump
or snapscreenshot
. Here is an explanatory post about the latter.
Simplest Ways
You can try the following commands:
gnome-screenshot
gnome-screenshot -w -B
You can simply redirect your output into a file, like so:
linux command > output.txt
Further references:
http://www.thegeekstuff.com/2012/08/screenshot-ubuntu/
https://stackoverflow.com/questions/6674327/redirect-all-output-to-file
https://stackoverflow.com/questions/13591374/command-output-redirect-to-file-and-terminal