Command-Line Based Image Viewer for Ubuntu Linux – Feh


If you want to view a large collection of images directly from the command-line (Update: Actually, this will only work in a Terminal-emulator, not in a pure command-line environment in which the ‘X Server’ is not present’. A thanks goes to ‘William’ for pointing that out) then you can try ‘Feh’. It comes with a unique thumbnail feature that’s a bit rare to command-line based tools.

It even adds itself to Nautilus context menu so you can open images directly from the file manager as well. But this is no way a replacement for your current image managers such as F-Shot, Shotwell etc, so o please keep that in mind.

But as said earlier “feh” has the ability to load a folder filled with images and create click-able thumbnails that you can use to open the images (directly from the command-line window).

A cool way to look at your pictures ;-)

Other features …

*. It even supports viewing images as slide-shows (its default mode). So if you open a folder containing images, then “feh” will play them one by one automatically.

*. It has few built in modes:

1. Collage mode -- Which create image thumbnails randomly, images can even overlap and looks pretty good too :). But these thumbnails aren’t click-able but they’re still useful while having a glance over an image collection.

2. Montage mode -- This is very similar to the “collage mode”, except the images are not chosen randomly plus they don’t overlap. Basically it creates a clean looking thumbnail window of your images, again you cannot click and open images in a new window though.

You can also save these outputs into a single image too …

3. Thumbnail mode -- This create a thumbnails of your images (obviously) but unlike with above “modes”, now you can click on your Thumbnails and open images in a separate window.

4. List mode -- This won’t create any thumbnails but would only give a output in a list style but it is faster than the other modes.

*. Shows basic image info such as: Name, Size, Type and dimension.

You can also change the thumbnail size (Height/Width) manually, add “next”/”previous” shortcuts, create thumbnails temporarily or permanently (so the next time you re-open a folder the thumbnails would be displayed almost immediately), change default zoom levels, display image name at top left corner, add few image enhancements etc by using command-line parameters (some of these feature are accessible through the right-click menu).

If interested, you can install “feh” in Ubuntu 12.04 Precise Pangolin, 11.10 Oneiric Ocelot, 11.04 Natty Narwhal, 10.10 and 10.04 by simply typing the below command in your Terminal window.

sudo apt-get install feh

You however will have to read its manual to learn its commands and other parameters, for that please use the below command.

man feh

For instance, let’s say that I wanted a thumbnail window with click-able images, then I’d use the below command.

feh -t /yourfolderpath

Just replace “yourfolderpath” with your actual image location. If you prefer “college” or “montage” modes, then use the below commands.

feh -c /yourfolderpath

feh -m /yourfolderpath

It’s easy remember because the first letter of the “mode” is used as the parameter.

Being a command-line based application, “feh” also uses little of your system resources most of the time too. If you think the image thumbnail creation time is a bit slowish, then you can do few tweaks to speed things up a bit (it’s in the manual).

Anyhow remember, if you’re a newbie or someone who’s quite fond of GUI tools and doesn’t really stick with command-line that much, then with all due respect ;-) I don’t think you’re gonna love “feh”. But for those who are stuck (not always by choice though :P) with command-line and looking for an image viewer that has very little dependencies with excellent features, then I think “feh” can come quite handy in times nonetheless :).

2 thoughts on “Command-Line Based Image Viewer for Ubuntu Linux – Feh

  1. William

    Feh does not show images on the command line, it needs a graphical interface. With Shellpic you can display in ASCII art :) (it’s in python I think, needs to be installed with pip)

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>