Which command configures or displays network interface information?

Subh Singh
Invent the Future

In Linux, the ifconfig command is used to show or change network settings.

Command:

ifconfig

Example:

If you want to see network information in Linux, you can use the following command.

ifconfig

Output:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>
        inet 192.168.1.10
        netmask 255.255.255.0

lo: flags=73<UP,LOOPBACK,RUNNING>
        inet 127.0.0.1

Here:

  • eth0 shows the network interface name.
  • inet shows the IP address.
  • netmask shows the network mask.
  • lo is the loopback network interface.

How to use:

  • Open the Linux terminal.
  • Type the command.
  • Press Enter to see network information.