Como configurar IP en Linux

En Ubuntu Linux
Usa el comando debajo:

ifconfig

Si quieres ver si tu IP es static o dynamic tienes que ver este file:

cat /etc/network/interfaces

Un IP static seria asi:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 10.1.1.20
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.1

Un IP dynamic(usando DHCP) se ve asi:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

En CentOS

Todo igual, pero tienes que ir a este path:

/etc/sysconfig/network-scripts/ifcfg-eth0