Ubuntu系统下查看IP地址

可以通过 ifconfig 命令来查看本地IP地址,正常的结果如下:

复制代码
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.89.129  netmask 255.255.255.0  broadcast 192.168.89.255
        inet6 fe80::45fb:9d4a:7d48:3797  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:e1:c5:f3  txqueuelen 1000  (以太网)
        RX packets 300224  bytes 387989103 (387.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 115129  bytes 7165354 (7.1 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<host>
        loop  txqueuelen 1000  (本地环回)
        RX packets 3422  bytes 316027 (316.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3422  bytes 316027 (316.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
复制代码

 

如果提示命令没找到,通过下面的命令先安装:

sudo apt install net-tools

 

posted @   wzwyc  阅读(4549)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
点击右上角即可分享
微信分享提示