Forrest logo
tool overview
On this page you find all important commands for the CLI tool debugfs. If the command you are looking for is missing please ask our AI.


DEBUGFS is a powerful command-line tool used for debugging and analyzing filesystems in various Linux systems. It allows users to examine and interact with the internal details, structures, and metadata of a filesystem.

The tool is a part of the e2fsprogs package, commonly used for Ext2, Ext3, and Ext4 filesystems. It can be installed on most Linux distributions, making it widely accessible.

With DEBUGFS, users can navigate and explore the filesystem interactively, similar to using a shell. It provides a simple prompt-based interface to view and modify the filesystem's attributes, block and inode information, directory entries, and more.

Using various commands and options, users can view details of inodes, directories, symbolic links, and special files within the filesystem. They can also read and modify file content, permission flags, timestamps, and extended attributes.

DEBUGFS also includes features like search capabilities, file recovery, and bad block management. It allows users to recover deleted files by examining the filesystem's deleted entries, assisting in data retrieval.

The tool provides a way to analyze filesystem issues, detect and repair errors, and debug problems related to file system corruption, disk errors, or other filesystem inconsistencies.

It supports scripting options, enabling users to automate tasks and perform batch operations. This can save time and effort when dealing with large filesystems or performing repetitive actions.

Comprehensive documentation is available, providing detailed information about the various commands, options, and their usage. Online forums and communities can further assist users in troubleshooting and understanding advanced usage of DEBUGFS.

Although powerful, users need to exercise caution when using DEBUGFS as it grants low-level access to filesystem internals. Improper usage may lead to unintended data loss or corruption, and it is recommended to have backups before making any modifications.

Overall, DEBUGFS serves as a valuable tool for filesystem analysis, repair, and recovery, offering advanced debugging capabilities for Linux filesystems.

List of commands for debugfs:

  • debugfs:tldr:67996 debugfs: Open the filesystem in read write mode.
    $ debugfs -w ${-dev-sdXN}
    try on your machine
    explain this command
  • debugfs:tldr:86392 debugfs: Read commands from a specified file, execute them and then exit.
    $ debugfs -f ${path-to-cmd_file} ${-dev-sdXN}
    try on your machine
    explain this command
  • debugfs:tldr:ce04f debugfs: Open the filesystem in read only mode.
    $ debugfs ${-dev-sdXN}
    try on your machine
    explain this command
tool overview