Two ways to view native IP under Linux __linux

Source: Internet
Author: User

1) ifconfig command

The output is as follows:

[root@topgun/home/cly]
# ifconfig
Eth0:flags=4163<up,broadcast,running,multicast> MTU 1500
inet 192.168.128.132 netmask 255.255.255.0 broadcast 192.168.128.255
Inet6 fe80::20c:29ff:fe45:63ba Prefixlen ScopeID 0x20<link>
Ether 00:0c:29:45:63:ba Txqueuelen 1000 (Ethernet)
RX Packets 1936 Bytes 2440516 (2.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets 1207 Bytes 94802 (92.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Device Interrupt Base 0x2024


Lo:flags=73<up,loopback,running> MTU 16436
inet 127.0.0.1 netmask 255.0.0.0
Inet6:: 1 prefixlen 128 ScopeID 0x10Loop Txqueuelen 0 (local loopback)
RX Packets Bytes 744 (744.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX Packets Bytes 744 (744.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

This command belongs to the package:

[root@topgun/home/cly]
# Pacman-qo Ifconfig
/sbin/ifconfig belongs to Net-tools 1.60.20120804git-2


2 IP Address command

The output is as follows:

[root@topgun/home/cly]
# IP Address
1:lo: <LOOPBACK,UP,LOWER_UP> MTU 16436 qdisc noqueue State UNKNOWN
Link/loopback 00:00:00:00:00:00 BRD 00:00:00:00:00:00
inet 127.0.0.1/8 Scope host Lo
INET6:: 1/128 Scope Host
Valid_lft Forever Preferred_lft Forever
2:eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> MTU 1500 Qdisc pfifo_fast State up Qlen 1000
Link/ether 00:0c:29:45:63:ba BRD FF:FF:FF:FF:FF:FF
inet 192.168.128.132/24 BRD 192.168.128.255 Scope Global eth0
Inet6 FE80::20C:29FF:FE45:63BA/64 Scope link
Valid_lft Forever Preferred_lft Forever


This command belongs to the package:

[root@topgun/home/cly]
# PACMAN-QO IP
/USR/SBIN/IP belongs to Iproute2 3.5.1-1

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.