How To Install Chattr On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

How To Install Chattr On Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS?

chattr

Change attributes of files or folders.

Maintainer: Theodore Y. Ts'o



Section: admin

Install chattr

  • Debian apt-get install e2fsprogs Click to copy
  • Ubuntu apt-get install e2fsprogs Click to copy
  • Alpine OS apk add e2fsprogs Click to copy
  • Arch Linux pacman -S e2fsprogs Click to copy
  • Kali Linux apt-get install e2fsprogs Click to copy
  • CentOS yum install e2fsprogs Click to copy
  • Fedora dnf install e2fsprogs Click to copy
  • Raspbian apt-get install e2fsprogs Click to copy
  • macOS brew install e2fsprogs Click to copy

Change attributes of files or folders.

How to use chattr?

Below are few example commands for chattr that you can use in the terminal.

Make a file or folder immutable to changes and deletion, even by superuser:
chattr +i pathClick to copy
Make a file or folder mutable:
chattr -i pathClick to copy
Recursively make an entire folder and contents immutable:
chattr -R +i folderClick to copy
To install the latest version of chattr in your favorite operating system just copy the chattr installation command from above and paste it into terminal. It will download and install the latest version of chattr 2026 package in your OS.