Howto: Wireless Cheat Sheet – Cli Commands

Linux Wireless Help

Here is a list of Cli commands which provide valuable information when trying to configure your wireless connection

sudo iwlist scanning – shows wireless networks that are available in the area with basic encryption information

sudo lshw -C network – Shows Details of Interface card and drivers of each networking device

sudo lspci -nn – Shows PCI vendor and device codes as both numbers and names of hardware connected to the pci bus

lsusb – Shows USB connected hardware

lshw -C usb – Additional info on USB related hardware (good for USB dongles)

route -n – Lists kernel IP routing table — Good for troubleshooting problems with the gateway

sudo route add default gw 192.168.1.1 – Example of how to set the default gateway to 192.168.1.1

sudo route del default gw 192.168.1.1 – Example of how to delete the default gateway setting

sudo modprobe ***** – Loads the kernel module **** . (Example usage – sudo modprobe ndiswrapper, sudo modprobe r818x, sudo modprobe ath_pci)

sudo modprobe -r **** – Unloads the kernel module ****. (Example usage – sudo modprobe -r ath_pci)

sudo ifconfig – lists IP address

sudo ifup/ifdown – Brings up/down the interface and clears the routing table for the specified interface

sudo ifconfig wlan0 up/down – Brings up/down the interface for the specified interface

sudo dhclient – Request IP address from DNS server for specified interface

sudo dhclient -r – Release IP address associated with specified interface

sudo iptables -L – Lists firewall rules

sudo iptables -F – Flush all firewall rules

dmesg | more – Lists boot log — good for troubleshooting problems with modules/drivers not being loaded

uname -r – Displays kernel version

/etc/udev/rules.d/70-persistent-net.rules – File which assigns logical names (eth0, wlan0, etc) to MAC addresses

cat /etc/resolv.conf – Lists DNS servers associated with network connections (Network Manager)

/etc/dhcp3/dhclient.conf – File which sets or modifies dns (domain name servers) settings

Easy Printer Setup on Linux

Setting up a printer is a doddle
People seem to have major issues with printer installation and setup. I don’t know why because it’s easy when you avoid all the guis and go for the cups web interface.

I have a HP Deskjet 845C, it works on every linux distro using the cups browser method.

On most Linux distros, cups is available in the repository. So just do a search for cups or printer and install Cups.

Then get your HP drivers
I always install Foomatic Hpijs.

Next start the cups server
Debian based boxes: sudo /etc/init.d/cups restart
Archlinux and others: sudo /etc/rc.d/cups start

Configure your printer from your web browser
Next, open your web browser and type the address http://localhost:631 which is your print server port. You will be greeted with the cups html printer setup page.

Cups-Printer-Config

Now you just hit "Add Printer" and go through the motions of selecting your printer and driver etc.

Just click all the links and check out what’s on offer, you can add users to the printer and change the default settings, all much easier than some desktop printer config utilities.

When you are done, print a test page.

richs-lxh