December 3, 2008

Linux

Configuring a static IP address

Open configuration file
$ sudo vi /etc/network/interfaces

Find and remove
iface eth0 inet dhcp

Append new configuration
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.254


Save and close file. Restart the network
$ sudo /etc/init.d/networking restart

Shutdown immediately:
shutdown -h now

Reboot immediately:
shutdown -r now

Shutdown at 8 pm:
shutdown -h 20:00

Shutdown in 10 minutes:
shutdown -h +10

Determine internal devices
$ lspci -v | less

Information concerning network devices
$ lshw -C network
Manual configuring a WEP connection
$ sudo ifconfig [interface] down
$ sudo dhclient -r [interface]
$ sudo ifconfig [interface] up
$ sudo iwconfig [interface] essid “ESSID_IN_QUOTES”
$ sudo iwconfig [interface] key HEX_KEY <<<-------- If using ASCII Equivalent, this is s:ASCII_KEY (please make note of the prefix s:)
****Additional Comand that may be needed -- sudo iwconfig [interface] key open <<<----See note below
$ sudo iwconfig [interface] mode Managed
$ sudo dhclient [interface]