How to open image files from Terminal in Ubuntu

This is a quick way of opening a image file from the Terminal window in Ubuntu. Unlike the executable files you cannot open the image file just by typing the file name on the Terminal window, instead you have to initiate the appropriate program to open the image file.The default image viewer application in Ubuntu is the Gnome Image viewer also known as Eye of Gnome of eog.

Open the Terminal window in Ubuntu (Alt + Cntrl + T) and type eog to open the image viewer program.

To open the image use the image name followed  by the eog command.

eog <name of the image file> // You can use tab to auto-complete the filename.

The Terminal will hold the access as long as the application is open and you would not be able to do much on the terminal. Thus you can have the control of the terminal you can run the application in the background using ” & ” at the end of the command i.e

eog test123.jpg & // This will open the test123 image file while you still have control of the Terminal.

Hope this quick tip was helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *