The chattr command in Linux is a utility that allows users to change file attributes on a filesystem. This command provides enhanced control over files by setting attributes that can modify file behaviors in ways not achievable through regular permissions. For instance, using chattr, one can make a file immutable with the “+i” attribute, preventing it from being modified, deleted, or renamed, even by the root user.