Changing the IP on a network card on a Linux distribution

For Red Hat distributions, you will edit:
/etc/sysconfig/network-scripts/ifcfg-eth#

For Debian distributions, you will edit:
/etc/network/interfaces

If you are running DHCP, or Static and want to swap between the settings, here are two examples for your use:

DHCP will look something like this:
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:D0:B7:08:09:BB
ONBOOT=yes

STATIC will look something like this:

# # File: ifcfg-eth0
# DEVICE=eth0
IPADDR=192.168.1.100
NETMASK=255.255.255.0
BOOTPROTO=static
ONBOOT=yes
# # The following settings are optional #
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
Continue Reading