How to Install ExifTool on Ubuntu 22.04 LTS

ExifTool is a free program for reading, modifying, and manipulating your computer’s images and audio or video file formats. It has been developed by millions of users worldwide to make their lives easier by providing support across different platforms such as Windows, macOS, and Unix systems like Linux, etc.

The software also offers robust features that allow you to view and edit metadata, including date taken/original resolution info about videography footage; examine photo album shots quickly without having to scroll through each slide.

The following tutorial will teach you how to install ExifTool on Ubuntu 22.04 LTS Jammy Jellyfish. The tutorial will use the command line terminal with complete steps and the most commonly used commands with ExifTool using CLI.

Update Ubuntu

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

sudo apt update && sudo apt upgrade

Install ExifTool

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

In your terminal, execute the following command.

sudo apt install exiftool -y

How to Use ExifTool

Now that you have the software installed, some basic commands are as follows.

Extract information from a file

exiftool a.jpg

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

Basic write example

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“).

Write multiple files

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

Writes Artist tag to three image files.

Write to all files in a directory

exiftool -artist=me /images

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

Write multiple tags

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

Writes two tags to a.jpg.

Extracting duplicate tags

exiftool -a -u -g1 a.jpg

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

Print common meta information

exiftool -common dir

Print standard meta-information for all images in dir.

List meta information

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.”

Print ImageSize and ExposureTime

exiftool -s -ImageSize -ExposureTime b.jpg

Print ImageSize and ExposureTime tag names and values.

Print Canon information

exiftool -l -canon c.jpg d.jpg

Print standard Canon information from two image files.

Recursively extract standard meta-information

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.

Move Thumbnail Image

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

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

Recursively extract JPG image from CRW

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.

See also
How to Install Okular on Fedora Linux

Print formatted date/time for 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.

Extract image resolution

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

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

Extract all tags with names with “example word”

exiftool "-*resolution*" image.jpg

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

Extract all author-related XMP

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

Extract all author-related XMP information from an image.

Extract complete XMP data

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)

Print output date time original

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.

Extract all GPS positions from AVCHD

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

Extract all GPS positions from an AVCHD video.

Save ICC_Profile

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>.

Generate HTML pages from HEX Dump

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.”

How to Update ExifTool

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

How to Remove (Uninstall) ExifTool

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

sudo apt autoremove exiftool --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 getting too bloated.

Comments and Conclusion

If you’re looking for a powerful, open-source metadata tool that can work on Windows, macOS, and Unix systems, ExifTool is worth checking out. With its ability to read, modify, and manipulate the image, video, audio, and PDF metadata, ExifTool is an invaluable asset for any digital media workflow.

Leave a Comment

Share to...