zoukankan      html  css  js  c++  java
  • linux查看本机IP、gateway、dns

    IP: 
        ifconfig
     
    gateway:
    [root@localhost ~]# netstat -rn
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags   MSS Window irtt Iface
    172.16.44.0     0.0.0.0          255.255.255.0    U         0      0          0 vmnet8
    172.16.10.0     0.0.0.0          255.255.255.0        U         0      0          0 vmnet1
    172.16.0.0       0.0.0.0          255.255.252.0        U         0      0          0 eth0
    169.254.0.0     0.0.0.0          255.255.0.0           U         0      0          0 eth0
    0.0.0.0         172.16.0.254    0.0.0.0           UG        0      0          0 eth0
     
    (以0.0.0.0开始的行的gateway是默认网关)
     
     
    DNS:
    [root@localhost ~]# cat /etc/resolv.conf
    search               localdomain
    nameserver 172.16.0.250
  • 相关阅读:
    FILE
    基础知识const/typedef/函数指针/回调函数
    strchr
    ftell
    rewind
    fread
    poj 2309BST解题报告
    hdoj 4004The Frog's Games解题报告
    哈理工oj 1353LCM与数对解题报告
    poj 2453An Easy Problem解题报告
  • 原文地址:https://www.cnblogs.com/huapox/p/3299895.html
Copyright © 2011-2022 走看看