Modern digital cameras, smartphones, and mobile operating systems automatically embed extensive hidden metadata into captured image files. This Exchangeable Image File Format (EXIF) data frequently includes sensitive personal information, such as exact GPS latitude and longitude coordinates, camera serial numbers, lens specifications, exposure settings, and exact date and time stamps. When sharing photos online or distributing assets publicly, exposing this telemetry can compromise personal privacy or breach corporate data policies. The exiftool utility is a powerful, platform-independent command-line tool designed for reading, writing, and stripping metadata across hundreds of image and multimedia formats. Learning how to use ExifTool in Linux gives you complete control over your digital asset telemetry.
How to Install ExifTool in Major Linux Distributions
The ExifTool package is widely available in standard package managers under the name libimage-exiftool-perl or exiftool:
- Ubuntu, Debian, and Linux Mint:
sudo apt update && sudo apt install libimage-exiftool-perl - Fedora, RHEL, and Rocky Linux:
sudo dnf install perl-Image-ExifTool - Arch Linux and Manjaro:
sudo pacman -S perl-image-exiftool
How to View All Embedded Metadata in an Image
To inspect all metadata tags contained within an image, pass the file path directly to exiftool:
exiftool photograph.jpg
ExifTool outputs a comprehensive list of tags, including:
- Camera Hardware: Make, model, lens type, and software firmware version.
- Technical Settings: Focal length, aperture (F-number), shutter speed, ISO speed, and metering mode.
- Geolocation Data: GPS coordinates (latitude, longitude, altitude) and directional positioning.
- Embedded Profiles: Colour profiles, embedded thumbnails, and ICC profile descriptors.
To filter for specific data fields (for instance, checking solely for GPS data), pipe or query the specific tag:
exiftool -gps* photograph.jpg
How to Completely Strip All Metadata from an Image
Before uploading pictures to forums, websites, or public repositories, you can sanitize the file by removing all EXIF, XMP, and IPTC records:
exiftool -all= photograph.jpg
By default, ExifTool preserves your original file by renaming it to photograph.jpg_original while saving the scrubbed file with the original filename. If you wish to overwrite the source file directly without generating backup copies, include the -overwrite_original flag:
exiftool -all= -overwrite_original photograph.jpg
How to Batch Scrub Metadata Across an Entire Folder
When preparing an entire photo shoot or directory of screenshots for web distribution, apply the purge command recursively across all supported files:
exiftool -all= -overwrite_original -r ./images/
This command systematically traverses the images directory and all its subdirectories, sanitizing JPEG, PNG, TIFF, and RAW files in a single automated pass.
How to Edit or Add Specific Metadata Tags
In addition to removing data, ExifTool allows you to insert or update copyright notices, artist attributions, and timestamps:
- Assign Copyright:
exiftool -Artist="Jane Doe" -Copyright="2026 Jane Doe. All Rights Reserved." photograph.jpg - Shift or Correct Timestamps:
exiftool -AllDates="2026:11:04 12:00:00" photograph.jpg