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:
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
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.