vim编辑/etc/resolv.conf,提示W10: Warning: Changing a readonly file错误(Centos7)

  小问题,记录下,备用。

  vim编辑/etc/resolv.conf,提示

  W10: Warning: Changing a readonly file  错误(Centos7)

  使用 lsattr 命令来显示文件属性:

  # lsattr /etc/resolv.conf

  ----i-------- /etc/resolv.conf

  解决方法:

  # chattr -i /etc/resolv.conf

    参考链接:http://www.runoob.com/linux/linux-comm-lsattr.html

猜你喜欢

转载自www.cnblogs.com/hiroliu/p/8983624.html
今日推荐