chattr is a Linuxcommand that allows a user to set certain attributes on a file. Mostly chattr is used to make files immutable so that password files and certain system files cannot be erased during software upgrades.[1] It is analogous to the attrib command on DOS, OS/2 and Microsoft Windowsoperating systems, and chflags on modern BSD systems (including Mac OS X). Other Unix systems have no analogous commands; Solaris supports extended file attributes, but there are no user level commands for setting or changing them, and the chatr command in HP-UX, and chattr in AIX have unrelated functions.