Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux 101: Check the IP address assigned to the system
#1
Information 
Display all interfaces which are currently available, even if down.

ip addr

Sample output:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
2: ens32: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
   link/ether 00:50:56:b8:3a:cf brd ff:ff:ff:ff:ff:ff
   inet 10.180.47.92/28 brd 10.180.47.95 scope global ens32
      valid_lft forever preferred_lft forever


Alternative (deprecated):

ifconfig -a

Sample output:

ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 10.180.47.92  netmask 255.255.255.240  broadcast 10.180.47.95
       ether 00:50:56:b8:3a:cf  txqueuelen 1000  (Ethernet)
       RX packets 6047938  bytes 1214662748 (1.2 GB)
       RX errors 0  dropped 99  overruns 0  frame 0
       TX packets 177379  bytes 12673123 (12.6 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
       loop  txqueuelen 1000  (Local Loopback)
       RX packets 227  bytes 18019 (18.0 KB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 227  bytes 18019 (18.0 KB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)