1

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.

1
  • 1
    Output redirection sounds like what you want.
    – Daniel B
    Jan 8, 2015 at 6:47

2 Answers 2

1

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 catted 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.

0

Simplest Ways

  1. You can try the following commands:

    gnome-screenshot
    gnome-screenshot -w -B

  2. 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .