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

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

lsattr

List file attributes on a Linux file system.

Maintainer: Theodore Y. Ts'o



Section: admin

Install lsattr

  • 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

List file attributes on a Linux file system.

How to use lsattr?

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

Display the attributes of the files in the current directory:
lsattrClick to copy
List the attributes of files in a particular path:
lsattr pathClick to copy
List file attributes recursively in the current and subsequent directories:
lsattr -RClick to copy
Show attributes of all the files in the current directory, including hidden ones:
lsattr -aClick to copy
Display attributes of directories in the current directory:
lsattr -dClick to copy
To install the latest version of lsattr in your favorite operating system just copy the lsattr installation command from above and paste it into terminal. It will download and install the latest version of lsattr 2026 package in your OS.