首页 > 系统服务 > 详细

Ubuntu18.04查看ip地址

时间:2020-03-05 14:59:43      阅读:184      评论:0      收藏:0      [点我收藏+]

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地址:

技术分享图片

技术分享图片

Ubuntu18.04查看ip地址

原文:https://www.cnblogs.com/focksor/p/show_ip_on_ubuntu.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!