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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM