en
  English
Phone :  +370 (5) 204-1903
Email: sales@1gbits.com

Ifconfig command in Linux

In Unix and Linux operating systems, device setup (ifconfig) is a command-line utility tool for configuring network interfaces. If you try to access your network settings with the "ifconfig" command on most newly installed Linux systems, you will get an error message (Here's how to fix it). So in this article, we will explain the complete information about using an ifconig command in all Linux distros. 

Linux Tutorial Jun 22, 21 by Nisal N 3 min Read
Ifconfig command in Linux

In Unix and Linux operating systems, device setup (ifconfig) is a command-line utility tool for configuring network interfaces. If you try to access your network settings with the "ifconfig" command on most newly installed Linux systems, you will get an error message (Here's how to fix it). So in this article, we will explain the complete information about using an ifconig command in all Linux distros. 

ifconfig Command

Install the net-tools kit on your device to correct the ifconfig command not found error. Open a terminal window and type net-tools.

$ sudo apt-get install net-tools

Suppose you didn't want to use the "ifconfig" command to look at the network settings. The "ip" command is another choice for inspecting network settings on your Ubuntu system.

ifconfig Command for All Linux Distros

To view a network configuration using the IP command, run the following commands:

# ip address

The ip order above can be shortened to:

# ip a

The command for ifconfig command:

ifconfig [OPTIONS] [INTERFACE]

Different Commands in ifconfig

-a: This choice is used to display all available interfaces, even though they are inactive.

ifconfig -a

-s: Instead of information, display a shortlist.

ifconfig -s

-v: In verbose mode, the command will be run.

ifconfig -v

Up: The driver for the selected interface is turned on with this option.

ifconfig interface up

down: This choice disables the driver for the specified interface.

ifconfig interface down

Add addr/prefixlen: This choice is used to give an interface an IPv6 address.

ifconfig interface add addr/prefixlen

del addr/prefixlen: An IPv6 address may be removed from an interface using this option.

ifconfig interface del addr/prefixlen

[-]arp: This choice enables or disables the use of the ARP protocol on a given interface.

ifconfig interface [-]arp

[-]promisc: This option is used to allow or disable promiscuous mode on an interface. If this option is chosen, the device will receive all packets on the network.

ifconfig interface [-]promisc

[-]allmulti: This feature enables or disables all-multicast mode for a given interface. If this option is chosen, the device will receive all multicast packets.

ifconfig interface [-]allmulti

mtu N: The consumer uses this parameter to set the Maximum Transfer Unit (MTU).

ifconfig interface [-]allmulti

–help: Show support for the ifconfig command.

ifconfig --help

Conclusion

You can configure ifconfig as part of the net-tools kit if you still want to use it as part of your regular system admin routine. Otherwise, you can look at the network setup with the IP button. We have also seen the options used with the ifconfig command to carry out various ifconfig functionalities.

author img

Nisal N

Computers has always fascinated me since I was a kid and here we are. I love travelling for 2 reasons: the first one to see a new part of the world and second (the most important one) to experience the rich culture hidden among the country and people. I'm pretty good at cooking but very poor when it comes to baking.

Leave A Comment