Images from the terminal, some tools to show them

about display images from terminal

In the next article we will take a look at some tools with which to display images from the terminal. Most Gnu / Linux users are huge fans of the Terminal, using it on a daily basis for most of their jobs. Although one of its shortcomings is that in principle, the Terminal cannot display graphic images as we would with GUI applications. That is why in the following lines we are going to see some tools that make it possible to show images from it.

These ways of displaying images from the terminal can be useful for users looking for CLI alternatives to GUI applications, and they live most of the time in the terminal.

Some methods to display images from terminal

Using Feh

This is a small tool that can be installed on our system to display images from the Terminal. Which we can install via the official Ubuntu repositories.

Feh supports various image display modes, file lists, keyboard shortcuts, image captions, terminal input, and much more. Some of the display modes are slide show, montage, multi view, and index.

Before we see how to use this tool, we will need to install the package. For it we must add the multiverse repository, so if you don't have it available on your computer yet, you will first need to open a Terminal (Ctrl + Alt + T) and run the following command:

add multiverse repository

sudo apt-add-repository multiverse

Once the repository has been added and activated, you can proceed with its installation writing this other command:

install feh

sudo apt install feh

Once the installation of this image viewer is finished, we will see how we can use it in a very simple and basic way. First we must be clear that we will have to move to the directory in which we have saved the image that we are interested in showing, or failing that we can also indicate the path where the image is located. If we move to the directory where the image is located, the command to execute will be something like the following:

show picture feh

feh imagen-ejemplo.jpg

Once the image is shown, we just have to press the key "q”To close the viewer.

This program can be used to perform many tasks since has different display modes. For more information, users can consult the full documentation of this tool. You can also run the following command to get help on its use:

man feh

man feh

Using xdg-open

With this tool built into Ubuntu, we can do something like double clicking on an image file from the Terminal. In order to use it, we are going to move to the current directory in which we have saved the file that we want to visualize, or we can also pass the path in which we have saved the file to visualize to the command. Then we will only need run a command like the following:

xdg-open show file

xdg-open Imágenes/imagen-ejemplo.jpeg

As can be seen in the previous screenshot, we can achieve the same results as with the other two tools that we are going to see in this example using this command. To use this program, no need to install any software. We will simply have to execute a single command, and we will be able to display any image from the Terminal.

For get more information about this tool, we will have the possibility to consult its man pages with the command:

xdg-open man

man xdg-open

Using FIM

FIM, is an abbreviation for FrameBuffer Improved. This is a highly configurable command line utility. It will allow users to display almost any graphical content from the command line.

FIM has many cool features, some of which are user-customizable keybindings, command aliases, EXIF ​​tag display, internal variables, EXIF ​​orientation, and many more. This utility is very keyboard oriented. There are no buttons or menus to use, and it is the user's responsibility to set custom key combinations for different purposes.

For install this tool, we will only need to open a terminal (Ctrl + Alt + T) and execute the command in it:

install fim

sudo apt install fim

Once the installation is finished, we can execute the following command to see how you can use FIM:

end help

fim --help

For show a picture all you have to do is run a command like the following:

fim see image

fim Imágenes/imagen-ejemplo.jpeg

As with the other tools, we can move to the directory where the image we want to view is located, or we can indicate the path of the image when executing the command.

If you are interested learn more about the features of this utility, in the terminal it is only necessary to execute the command:

man finished

man fim

It also can consult the documentation about FIM.

As you can see, for the three examples shown here I have used the same image, with the same result. These are not the only tools for displaying images from the terminal. Others can be consulted at Article what we write in this blog some time ago.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   juice said

    this is possible with xterm….

    1.    Damien A. said

      Hello. Thanks for the note. Salu2.