Setting Interface Address

Display Interface

ifconfig -a
ip link

display all interfaces on the device

Set IP and Netmask

ifconfig eth0 192.168.25.1 netmask 255.255.255.0
ip link add 192.168.25.1/24 dev eth0

set the IP and netmask of an interface

Enable Interface

ifconfig eth0 up
ip link set eth0 up

enable interface

Set media type to auto-sense

ifconfig eth0 media auto

Interface may connect with connection of 10Mbps, 100Mbps, 1Gbps. We choose to let the interface automatically detect connection type and speed