How to install and use Exiftool on Ubuntu 22.04 or 20.04 LTS

ExifTool is a nifty tool for those who deal in media files because using it a user can easily manipulate or add the metadata. It is an open-source application developed by Phil Harvey that can be used to read, write, and edit metadata in various file formats, including image, audio, and video files for various purposes.

The best thing is, Exiftool is available for all popular operating systems including Linux therefore, we can easily install it on Ubuntu and other Debian-based systems.

Well, ExifTool is a command-line tool that can extract, edit, and write metadata from various file formats, for example, EXIF, IPTC, XMP, GPS, PEG, TIFF, PNG, HEIC, MP3, WAV, MP4, and more… This gives flexibility to users because using one tool they can manage the metadata of various types of media files.

Steps for installing and using Exiftool on Ubuntu, Debian & Linux Mint.

1. Open the Command Terminal

Go to the Application area or simply click on the Activities taskbar link to search for the terminal app. Ubuntu users can also use the keyboard shortcut which is Ctrl+Alt+T.

2. Update APT package List

Let’s start with the system update because apart from updating system-installed packages, it also rebuilds the APT package indexed cache so that it can recognize the latest available package updates.

sudo apt update

3. Installing ExifTool on Ubuntu 22.04 or 20.04

ExifTool is available through the system repository of Ubuntu and other its based Linux distros including Debian and Linux Mint. Therefore, in your command terminal, you just need to run the given command. It will download and install all the required packages.

sudo apt install exiftool

4. Run ExifTool commands

As you have completed the installation, you can edit the metadata right from your Ubuntu Terminal. Here are some examples of ExifTool commands to follow:

Note: Change the Image.jpg with your Image or media file name.

View Metadata

To view metadata from an image file, type:

exiftool image.jpg
View Metadata by installing and using ExifTool on Ubuntu

Exiftool command to edit metadata

To edit metadata in an image file, type:

exiftool -Artist="LinuxH2s" image.jpg

This Exiftool command will set the artist metadata to “LinuxH2s” in the image file.

Exiftool command to edit metadata

Remove Metadata

The given command will remove all the Metadata information except the protected ones.

exiftool -all= image.jpg

In the screenshot, you will see it has removed the Artist name and other metadata. Even, you can specify individual tags to remove by replacing -all= with the tag name, for example: -artist= -copyright=.

Remove Metadata

Copying metadata from one file to another

This command will copy all the metadata from source.jpg to target.jpg. You can specify multiple source files separated by spaces.

exiftool -TagsFromFile source.jpg target.jpg

Extracting specific metadata from a file:

If you want to see some specific metadata then you can do that as well. You just have to specify multiple tags separated by spaces. For example:

exiftool -Filesize -MIMEType -BitDepth image.jpg
Extract MetaData

Geotagging images:

This command will geotag image.jpg using GPS data from track.log. The track.log file must be in GPX format.

exiftool -tagsfromfile track.log -geotag image.jpg

Batch processing files:

This command will remove all metadata from all files in the directory and its subdirectories. The -r option makes ExifTool process files recursively, and the -overwrite_original option makes ExifTool overwrite the original files with the modified files.

exiftool -r -overwrite_original -all= directory/

Adding keywords to images:

If you want to add a keyword to an image then that is possible as well. For example, you want to add two keywords landscape and nature to an image.jpg. Then the command will be like something below.

exiftool -keywords+=landscape -keywords+=nature image.jpg

You can add multiple keywords by specifying the -keywords+= option multiple times.

We have just given a few basic examples, for more options or parameters to use with ExifTool, you can see the official website of this tool.

Update and Uninstallation

In the future to update the tool, users have to simply run the system update command and if a new version is available through the system repository of Ubuntu, it will be installed.

sudo apt update && sudo apt upgrade

Whereas, those who want to uninstall ExifTool from their Ubuntu system need to follow the given command:

sudo apt autoremove libimage-exiftool-perl


What is ExifTool used for?

ExifTool is used to read, write and edit metadata of media files such as Images, audio, and videos using the command terminal.

Is GUI present for ExifTool?

Yes, a graphical user interface is available on the official website for ExifTool to install on Windows systems.

Is there any GUI present for ExitTool to install on Linux?

Yes, jExifToolGUI is the open-source tool available on GitHub to provide GUI for ExifTool on Linux, Windows, and MacOS platforms.

Other Articles:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.