In some cases...
In some cases, such as when the system will be acting as a server, you want to configure your network interface with a fixed IP address. To do so, edit /etc/network/interfaces and replace the iface eth0 inet dhcp line. Use the following block as a template, replacing the parameters with the correct settings for your network:
iface eth0 inet static
address 192.168.1.220
netmask 255.255.255.0
gateway 192.168.1.1
NOTE
You can obtain IP network settings from your ISP or network administrator.
Wireless interfaces can also be configured using the interfaces file but require that the wireless- tools package be installed. Use dpkg or apt-get to install the wireless-tools package. Then add the necessary parameters to the entry for your wireless network interface. This example shows the settings for a wireless network with an access point (managed mode) set to the ESSID Home, and operating on channel 11:
iface eth0 inet dhcp
wireless_essid Home
wireless_mode Managed
wireless_channel 11
NOTE
If your wireless network is using encryption, you will need to specify a wireless_key
parameter. You can find a complete list of wireless options in the iwconfig man page
and /usr/share/doc/wireless-tools/README·debian.