CentOS/Fedora/RHEL
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO=static
ONBOOT=yes
TYPE="Ethernet"
IPADDR=192.168.0.102
NAME="System eth0"
HWADDR=AB:CD:EF:12:34:56
GATEWAY=192.168.0.1
Debian/Ubuntu
vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.0.102
netmask 255.255.255.0
gateway 192.168.0.1
show ip address
ip addr show
temporary set ip address
ip addr add 192.168.0.102/24 dev eth0
remove ip address
ip addr del 192.168.0.102/24 dev eth0
link up/down
ip link set eth0 up/down
route table show/set/remove/default gw
route
ip route show
route add default gw 192.168.0.1
ip route add 201.123.211.0/24 via 192.168.90.3 dev eth0
ip route del 201.123.211.0/24
ip route add default via 192.168.90.1