• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

e2image: command not found

by Deepika

The e2image command in Linux is used to create an image of an ext2, ext3, or ext4 file system. This image can be used for backup or recovery purposes. The command creates a file that contains a copy of the file system’s data, which can be restored to a disk or partition using the e2image command.

If you encounter the below error while running the command e2image:

e2image: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install e2fsprogs
Ubuntu apt-get install e2fsprogs
Alpine apk add e2fsprogs
Arch Linux pacman -S e2fsprogs
Kali Linux apt-get install e2fsprogs
CentOS yum install e2fsprogs
Fedora dnf install e2fsprogs
OS X brew install e2fsprogs
Raspbian apt-get install e2fsprogs

e2image Command Examples

1. Write metadata located on device to a specific file:

# e2image /dev/sdXN path/to/image_file

2. Print metadata located on device to stdout:

# e2image /dev/sdXN -

3. Restore the filesystem metadata back to the device:

# e2image -I /dev/sdXN path/to/image_file

4. Create a large raw sparse file with metadata at proper offsets:

# e2image -r /dev/sdXN path/to/image_file

5. Create a QCOW2 image file instead of a normal or raw image file:

# e2image -Q /dev/sdXN path/to/image_file

Filed Under: Linux

Some more articles you might also be interested in …

  1. xz: command not found
  2. “git add” Command Examples
  3. install Command Examples
  4. dget Command Examples in Linux
  5. pkcon: command not found
  6. qm wait Command Examples in Linux
  7. mke2fs: command not found
  8. eget: Easily install prebuilt binaries from GitHub
  9. CentOS / RHEL : How to view the commands executed in yum history command output
  10. dict: Command line dictionary using the DICT protocol

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright