Linux - ifconfig (Interface Configuration)

About

ifconfig is the equivalent of ipconfig in DOS where you can configure network interface.

Without parameters, it gives you the list of interface with their corresponding IP.

Management

Installation

apt-get install -y net-tools

Example

Below you can see two interfaces :

  • eth0 : an ethernet interface with the IP 192.168.96.232
  • lo : the loopback interface with the IP 127.0.0.1
[root@oel11g ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:79:3E:8C  
          inet addr:192.168.96.232  Bcast:192.168.97.255  Mask:255.255.254.0
          inet6 addr: fe80::20c:29ff:fe79:3e8c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:71800 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9218 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:16185577 (15.4 MiB)  TX bytes:1167946 (1.1 MiB)
          Interrupt:59 Base address:0x2000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4770 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4770 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:6175911 (5.8 MiB)  TX bytes:6175911 (5.8 MiB)

Documentation / Reference





Discover More
Linux Remote Desktop Preference
Linux - Enable Remote Desktop on Oracle Enterprise Linux / Red Hat with Gnome

The Remote Desktop application on Red Hat is Vnc but an other standard way to reach your linux operating system is to use the system X. You must allow the remote connection on the desktop by modifying...
Samba Rpm Files
Linux - How to transfer/copy files via a network connection using Samba between Linux and Windows

Samba allows Linux computers to share files and printers across a network connection. By using its SMB protocol, your Linux box can appear in Windows Network Neighbourhood or My Network Places just like...
Linux - Network

Network management on Linux See Setting the hostname DNS See Enter this parameter: See also Dhcp Check: see Set up the ethernet network adapter interface (local connection) The...
Bash Liste Des Attaques Ovh
What is a Command in Bash?

This page is command in bash. Command are in bash the expression unit A command (or an expression) is a sequence of words separated by blanks, terminated by a control operator. Each command execution...
Windows Network Connections
What is a Network Interface?

A network interface is a: software and/or hardware (ie NIC, network interface adapter)) interface between: two pieces of equipment or protocol layers (see socket) in a computer network....



Share this page:
Follow us:
Task Runner