To view JPG files directly from the terminal in Linux, there are several tools available. Here are some popular viewers and how to use them:

1. FIM (Framebuffer Image Viewer)

  • FIM is a command-line image viewer that utilizes the framebuffer to display images directly in the terminal.
  • Installation:
    sudo apt install fim
  • Usage:
    fim image.jpg
  • Example: Run fim /path/to/image.jpg to open an image in the terminal. FIM allows navigation through multiple images in a folder with arrow keys.

2. VIU

  • Viu is another lightweight image viewer for the terminal, compatible with color images in most terminals.
  • Installation (requires cargo from Rust):
    cargo install viu
  • Usage:
    viu image.jpg
  • Example: Run viu /path/to/image.jpg for a quick view. Viu is great for 24-bit color terminals.

3. Catimg

  • Catimg converts images into ASCII format to display in the terminal.
  • Installation:
    sudo apt install catimg
  • Usage:
    catimg image.jpg
  • Example: Run catimg /path/to/image.jpg to view an ASCII representation of the image.