How to Install ExifTool on Linux Mint 21/20

ExifTool is a free, open-source software program for reading, writing, and manipulating metadata found in images, audio, and video files. The following tutorial will demonstrate how to install ExifTool on Linux Mint 21 or Linux Mint 20 releases using the default repository or manually downloading the latest archive and making and installing the application with cli commands and some additional common usage examples with ExifTool.

ExifTool is a platform-independent Perl library and command-line tool used to manipulate EXIF and IPTC metadata embedded in the image, audio, and video files. This powerful application reads, writes, and edits metadata information in various file formats, allowing photographers to store, view accurately, or edit metadata in images.

The following tutorial was done with a Linux Mint 21, which many users know is based on the Ubuntu 22.04 Jammy Jellyfish LTS release., and example images were taken. Still, it was tested on the older Linux Mint 20 release that is still supported and based on Ubuntu 20.04 LTS Focal Fosa. In the future, if Ubuntu makes any changes to break the tutorial for one of the distribution versions, please place a comment for me to investigate so I can update the tutorial.

Before proceeding with the tutorial, ensuring your system is up-to-date with all existing packages is good.

sudo apt update

Optionally, you can list the updates for users who require review or are curious.

sudo apt --list upgradable

Proceed to upgrade any outdated packages using the following command.

sudo apt upgrade

ExifTool is available to install from the Linux Mint default repository, making the installation quick and straightforward without importing third-party repositories.

In your terminal, execute the following command.

sudo apt install libimage-exiftool-perl -y

Confirm it was installed by running the following command.

apt-cache policy libimage-exiftool-perl

Example output:

check exiftool version on linux mint 21 or 20 using apt cache policy command

The second method may suit users more confident in using the command line terminal or prefer the latest build without relying on adding or finding a third-party repository.

First, visit the official website and download the latest version.

Example only:

wget https://exiftool.org/Image-ExifTool-version.tar.gz

Next, extract the downloaded archive and navigate to it.

gzip -dc Image-ExifTool-*.tar.gz | tar -xf -

cd Image-ExifTool-version

Before running the installation command, run the following command to verify and generate the make file.

perl Makefile.PL

Example output:

joshua@linux-mint:~/Image-ExifTool-12.52$ perl Makefile.PL

Checking if your kit is complete...

Looks good

Generating a Unix-style Makefile

Writing Makefile for Image::ExifTool

Writing MYMETA.yml and MYMETA.json

Lastly, run the install command.

sudo make install

Example output:

Appending installation info to /usr/local/lib/x86_64-linux-gnu/perl/5.34.0/perllocal.pod

Now that you have the software installed, some basic commands are as follows. For more information, I would check the official website for the long term, as ExifTool can achieve many operations that are too extensive to list.

exiftool a.jpg

A basic command to extract all metadata from a file named a.jpg.

exiftool -artist=me a.jpg

Writes the Artist tag to a.jpg. Since no group is specified, EXIF: Artist will be registered, and all other existing Artist tags will be updated with the new value (“me”).

exiftool -artist=me a.jpg b.jpg c.jpg

Writes Artist tag to three image files.

exiftool -artist=me /images

Writes Artist tag to all files in a directory /images.

exiftool -artist="Phil Harvey" -copyright="2011 Phil Harvey" a.jpg

Writes two tags to a.jpg.

exiftool -a -u -g1 a.jpg

Print all meta information in an image, including duplicate and unknown tags, sorted by group (for family 1).

exiftool -common dir

Print standard meta-information for all images in dir.

exiftool -T -createdate -aperture -shutterspeed -iso DIR > out.txt

List meta information in tab-delimited column form for all images in the directory DIR to an output text file named “out.txt.”

exiftool -s -ImageSize -ExposureTime b.jpg

Print ImageSize and ExposureTime tag names and values.

exiftool -l -canon c.jpg d.jpg

Print standard Canon information from two image files.

exiftool -r -w .txt -common pictures

Recursively extract standard meta information from files in an example directory, writing text output into files with the same names but with aC<.txt> extension.

exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg

Save the thumbnail image from one image file to another image file.

exiftool -b -JpgFromRaw -w _JFR.JPG -ext CRW -r .

Recursively extract JPG images from all Canon CRW files in the current directory, adding C<_JFR.JPG> for the name of the output JPG files.

exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s *.jpg

Print formatted date/time for all JPG files in the current directory.

exiftool -IFD1:XResolution -IFD1:YResolution image.jpg

Extract image resolution from EXIF IFD1 information (thumbnail image IFD).

exiftool "-*resolution*" image.jpg

Extract all tags containing the word “Resolution” from an image.

exiftool -xmp:author:all -a image.jpg

Extract all author-related XMP information from an image.

exiftool -xmp -b a.jpg > out.xmp

Extract the entire XMP data record intact from a.jpg and write it to out.xmp use the unique XMP tag (see the Extra Tags)

exiftool -p "$filename has date $dateTimeOriginal" -q -f dir

Print one line of output containing the file name and DateTimeOriginal for each image in the directory dir.

exiftool -ee -p "$gpslatitude, $gpslongitude, $gpstimestamp" a.m2ts

Extract all GPS positions from an AVCHD video.

exiftool -icc_profile -b -w icc image.jpg

Save the complete ICC_Profile from an image to an output file with the same name and an extension of filename<.icc>.

exiftool -htmldump -w tmp/%f_%e.html t/images

Generate HTML pages from a hex dump of EXIF information in all images from the C directory. The output HTML files are written to the C directory (created if it didn’t exist), with names of the form “FILENAME_EXT.html.”

Depending on the method of installation used, the following commands can be used to update the software and any system package. Ideally, the terminal update command should be used even with auto-updates in your desktop GUI to ensure everything is updating correctly.

sudo apt upgrade && sudo apt upgrade

Use the following command for users who no longer require ExifTool on their system and wish to remove it.

sudo apt autoremove libimage-exiftool-perl --purge -y

The above command will automatically remove any unused dependencies installed from ExifTool and other leftovers from previous removals. This command should be run often to keep your system from bloating.

Lastly, for users that manually installed ExifTool, remove all associated ExifTool directories.

The tutorial demonstrated how to install ExifTool on Linux Mint using several methods and some of the most common commands. ExifTool can be used to achieve much more than what was listed. I would suggest visiting the official website and learning more about what you can edit and achieve if you are looking to edit EXIF data.

--

--

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.