zoukankan      html  css  js  c++  java
  • VM ubuntu ping unknow host 解决方法

    例如网关地址为:192.168.1.1

    route add default gw 192.168.1.1
    sudo vim /etc/resolv.conf

    /etc/resolv.conf 中加入

    # Generated by NetworkManager
    nameserver 192.168.1.1
    修改后可正常ping通,但系统重启后再ping会显示unknow host,因此需要锁定 /etc/resolv.conf 文件,不允许系统启动时重写。

    sudo chattr +i /etc/resolv.conf



  • 相关阅读:
    POJ 1673
    POJ 1375
    POJ 1654
    POJ 1039
    POJ 1066
    UVA 10159
    POJ 1410
    POJ 2653
    POJ 2398
    POJ 1556
  • 原文地址:https://www.cnblogs.com/fdipzone/p/3715059.html
Copyright © 2011-2022 走看看