zoukankan      html  css  js  c++  java
  • Ubuntu18.04查看ip地址

    Ubuntu安装时默认没有安装net-tools,也就是说,你没办法直接通过ifconfig查看ip地址,使用如下命令以安装net-tools并查看虚拟机ip地址:

    sudo apt-get install net-tools
    ifconfig
    

    输出将类似如下:

    hadoop@ubuntu:/usr/local/hadoop$ ifconfig
    ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.232.131 netmask 255.255.255.0 broadcast 192.168.232.255
    inet6 fe80::ea5e:285c:206:9acb prefixlen 64 scopeid 0x20
    ether 00:0c:29:d0:db:3b txqueuelen 1000 (Ethernet)
    RX packets 777911 bytes 1140658779 (1.1 GB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 137255 bytes 8401615 (8.4 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10
    loop txqueuelen 1000 (Local Loopback)
    RX packets 2787 bytes 1816194 (1.8 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 2787 bytes 1816194 (1.8 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    由此你可以获得你的ip,我当前的ip为 192.168.232.131

    如果你安装的Ubuntu带有GUI界面,你也可以在Settings中在以下位置查看ip地址:

  • 相关阅读:
    uva 10192 Vacation(最长公共子)
    SolrCloud应用简介
    2015第43周一solr相关概念
    2015第42周日
    2015第42周六Pgsql全文索引
    Java注解
    2015第42周四
    2015第42周三
    JS原型函数相关基础知识
    2015第42周一爬虫与反爬虫
  • 原文地址:https://www.cnblogs.com/focksor/p/show_ip_on_ubuntu.html
Copyright © 2011-2022 走看看