Facebook Twitter Instagram
    WiredRevolution.com
    • Home
    • About
    • Contact Us
    • Essential Linux Commands
    • Sitemap
    Facebook Twitter Instagram
    WiredRevolution.com
    commands

    How to take a screenshot in Linux using import

    RyanBy RyanSeptember 28, 2008Updated:March 18, 20091 Comment2 Mins Read
    Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email

    There are many ways to take screenshot in Linux. If you have Gnome or KDE you can simply press your ‘print screen’ button and you are done.

    If you don’t run either one of these desktops you can always use the screenshot functionality built into GNU Image Manipulation Program aka GIMP. Open up GIMP and navigate to File -> Create -> Screenshot.

    The third method and my favorite is to do it from the command line.

    To do this you need to use the import command which is part of ImageMagik package. You will need to make sure that this is installed before you continue.

    The import command saves any visible window on an X server and outputs it as an image file. You can capture a single window, the entire screen, or any rectangular portion of the screen.

    The format for import looks like this.

    import [options] input-file
    

    To create a screenshot of the entire root window and output in PNG format run this command.

    $ import -window root screenimage.png
    

    You can change the format of the image by simply changing the file extension. For example this command outputs the same root window but in JPEG format.

    $ import -window root screenimage.jpg
    

    Another great feature is that you can get a screenshot of a single window. Run this command.

    $ import screenimage.jpg
    

    After you enter this command your mouse curser will turn from a pointer into a crosshair. Now go and click on any window on your desktop and the screenshot that is created will be of only that window.

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
    Previous ArticleSecurely copy remote files with scp
    Next Article Find the MAC address on a Windows machine

    Related Posts

    Add new fonts to your Ubuntu system

    Download digital camera photos with gphoto2

    List all open files with lsof

    Most Commented
    March 12, 2009

    Fix blue tinted video in Ubuntu

    September 10, 2010

    Setup SSH access between VirtualBox Host and Guest VMs

    March 8, 2011

    Install GNOME Shell in Ubuntu 10.10 Maverick

    April 4, 2009

    Setup the PS3 Bluetooth Controller on Ubuntu

    October 22, 2008

    How to correctly use LD_LIBRARY_PATH

    Recent Comments
    • Execute command on linux virtual machine (or server) from windows commandline on Setup SSH access between VirtualBox Host and Guest VMs
    • Solved: How to SSH to a VirtualBox guest externally through a host? - Daily Developer Blog on Setup SSH access between VirtualBox Host and Guest VMs
    • How to SSH to a VirtualBox guest externally through a host? [closed] – Code D3 on Setup SSH access between VirtualBox Host and Guest VMs
    • How to copy and paste from VirtualBox? [duplicate] on Setup SSH access between VirtualBox Host and Guest VMs
    • Jackie Laguna on Fix OpenGL: ChoosePixelFormat SketchUp error in WINE
    © 2026 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.