Javatpoint Logo
Javatpoint Logo

Linux ifconfig

The command ifconfig stands for interface configurator. This command enables us to initialize an interface, assign IP address, enable or disable an interface. It display route and network interface.

You can view IP address, MAC address and MTU (Maximum Transmission Unit) with ifconfig command.

A newer version of ifconfig is ip command. ifconfig command works for all the versions.

Syntax:

Linux Networking ifconfig1

Look at the above snapshot, it shows the IP address of all three that is eth, lo and wlan.


Get details of specific interface

To find IP address of all three differently, use command

Linux Networking ifconfig2

Assigning IP address and Gateway

You can assign IP address and Gateway to an interface but these settings will be disabled after system reboot.

Syntax:


Enable or Disable specific interface

To enable specific interface,

To disable specific interface,


Setting MTU size

By default MTU (Maximum Transmission Unit) size is 1500, you can change size as per your wish.

Next TopicLinux ip





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA