How to setup a static IP address and configure network devices on Linux

How to setup a static IP address and configure network devices on Linux:

Open the file: /etc/network/interfaces

auto lo eth0
iface lo inet loopback
iface eth0 inet static
address xxx.xxx.xxx.xxx (Host IP Address)
netmask xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx (Gateway IP Address)
dns-nameservers xxx.xxx.xxx.xxx (IP Address of Name Server)
broadcast xxx.xxx.xxx.xxx