Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The terminal is very fast and convenient way to quickly access directories and files (faster than find and click on the directory).

One thing that it cannot show in text-mode is "pictures".

What is a best way to view pictures (like you see images thumbnail in Nautilus) when you are working in the terminal (e.g. command nautilus or any program - but should be fast and convenient)?

share|improve this question
I just run a terminal emulator under my desktop enviroment. So you have the advantages of both at hand. – vonbrand Mar 23 '14 at 16:05
Gotta object to the close votes here as there is a substantial difference between the need to view images files from a (presumably GUI) terminal (this question) and the need to view them on the console (the other question). – goldilocks Mar 23 '14 at 19:50
I provide a list of pretty much all your options here in this Q&A: How to get JPEG thumbnails quickly – slm Mar 24 '14 at 2:17

The way to "double-click" on a file from the command line is xdg-open.

If you're on Gnome (probably, if you're using Nautilus), you can use eog directly, or any other image program (feh is quite good).

share|improve this answer
feh is amazing! – Searene Dec 11 '15 at 6:26

If you happen to have installed imagemagick, you can use its very handy display command-line tool.

display path/to/picture.png
share|improve this answer
I personally prefer feh, but display is usually installed on web servers, where feh or other image browsers aren't installed. – pevik Dec 7 '14 at 19:34

I guess feh would be the one you are looking for.

Although popping out a terminal-like window for picture display as mplayer does for video playing, Feh is still considered as a terminal-based picture viewer due to its command-intensive control style.

share|improve this answer

I usually run python -m SimpleHTTPServer 8080 from a folder containing the image and view it at localhost:8080/path/to/image.jpg. Works great because the same method works over ssh to your server, and you can look at different image and text files in that same directory.

Edit: This method also works for remote boxes. Just run the python server as above, and if the ports are open you can connect to myserver.com:8080/path/to/image.jpg. If the server does not expose ports, you can set up an ssh tunnel with ssh me@myserver.com -N -L localhost:8080:localhost:8080 and then view the images from your local browser at localhost:8080/path/to/image.jpg. Note this http interface is much faster than ssh -X.

share|improve this answer
Clever! Works like a charm and there's no need to type /path/to/image.jpg. Just open localhost:8080 and click on the filenames. – Roger Dahl Mar 5 '15 at 4:49
Regarding the last paragraph, you can also add tunnels easily using PuTTY configuration! Then you can access it through a browser. Awesome! – ADTC Oct 30 '15 at 8:45

If you're in pure terminal with framebuffer activated, I'd recommend fbi. It's always in my after-install to do list.

Otherwise, eog is the default picture opener in Gnome, as Kevin mentioned. Also, Shotwell seems to open pretty fast for me... I'm pretty sure there are hundreds. :-)

share|improve this answer
Thanks for this one - it's news to me. As an aside, googling lands me at fim's (self-styled framebuffer image viewer improved ) manpage only a few search results in. Dont know yet the difference. – mikeserv Mar 23 '14 at 6:42

w3m's imgdisplay library is able to display images directly. It only works on some terminal emulators such as Xterm and URxvt.

ranger is a file browser that makes use of the library to display previews. Add this to ranger's configuration file to enable the feature:

set preview_images true
share|improve this answer

Another great terminal-based picture viewer is fim, which is a improved fbi with a vim-like control system.

share|improve this answer

If you're on OS X, iTerm 2 supports displaying inline images:

iTerm2 inline image

As you can imagine, this can be highly useful when you just want to display an image without going in and opening up Preview.app or having to open the Finder to the image and hitting spacebar on the image.

The feature is documented at iTerm2's feature page

share|improve this answer

In linux you can install gnome-open.

# In Debian flavors

sudo apt-get install gnome-open

Then create an alias:

alias open='gnome-open'

Then you can:

open file.pdf
open file.jpg
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.