Using the command Line to Configure Wireless Network in Ubuntu

Start a Terminal and type


This will list all your network interfaces. The wired network interface is usually labeled as eth0. Stop this network by typing
sudo ifdown eth0

Do the same for all other networks except for 'lo'. Then start your wireless network by typing
sudo ifup wlan0

Check this has worked by typing ifconfig and if all is well try browsing the Web/ping. If it is not try the following

iwconfig wlan0 mode managed
iwconfig wlan0 channel 11
iwconfig wlan0 essid networkname

mode managed is what you want if you are connecting to a wireless router. The channel and esidd will have to be set the same as your router. You have your network working but it is an open/unsecure network. Refer to your Router documentation to find out how to set up a secure network. Each Network card (either wired or wireless) has a unique number called a Mac Address. Most wireless routers allow you to restrict the Mac Addresses that can connect to them. To find out your Mac Address type
ifconfig wlan0
sudo ifconfig wlan0 up
sudo iwconfig wlan0 essid "youressidehere"
sudo dhcpcd
sudo ping -c 3 



PISIKA Copyright © 2009