linux 文件属性 lsattr 用于查看文件属性 chattr命令用于修改文件属性,chattr命令需要root权限。 #chattr -i /etc/resolv.conf #chattr +i /etc/resolv.conf (添加了写保护)