setfattr command not found

In this troubleshooting guide we learn how to fix setfattr command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

setfattr: command not found

or when using sudo you get the following error message

sudo: setfattr: command not found

Solutions to setfattr: command not found

How To Fix setfattr: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu setfattr is provided by attr package.

attr is:

A set of tools for manipulating extended attributes on filesystem objects, in particular getfattr(1) and setfattr(1). An attr(1) command is also provided which is largely compatible with the SGI IRIX tool of the same name.

To fix this problem, we can install more using the command below.

sudo apt-get -y install attr

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install attr.

sudo apt -y install attr

Or if you have aptitude installed you can use the following command.

sudo aptitude install attr

Summary

In this tutorial we learn how to fix setfattr command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.