Lot many people end up in a situation where they want to use internet while in console mode. It’s not that difficult task to connect to the Wi-Fi from the terminal.
There are some simple steps that you need to follow.
- Open the terminal.
- Type
ifconfig wlan0
and press Enter. You will not see any output in the terminal, as this command just turns your wireless card on. Most wireless cards are designatedwlan0
. If yours has a different designation, use that instead. - Type
iwconfig wlan0 essid name key password
and press Enter. Replacename
with the actual network name, and replacepassword
with the actual security key for the network. If your wireless network does not require a security key, do not enterkey password
.
Note: If you want to type the ASCII password, you would useiwconfig wlan0 essid name key s:password
. - Type
dhclient wlan0
and press Enter to obtain an IP address and connect to the WiFi network.
Enjoy!
here’s my output,
something is worng,
what to do?
taro@taro-HP-Mini-110-3000:~$ iconfig wlan0
ipmiutil ver 2.97
iconfig ver 2.97
Cannot map memory.
Cannot open an IPMI driver: /dev/imb, /dev/ipmi0, /dev/ipmi/0,
or direct driverless.
ipmiutil config, cannot open IPMI driver
taro@taro-HP-Mini-110-3000:~$ iwconfig wlan0 essid Free Westfield WiFi
Error for wireless request “Set ESSID” (8B1A) :
SET failed on device wlan0 ; Operation not permitted.
taro@taro-HP-Mini-110-3000:~$ dhclient wlan0
Cannot find device “wlan0”
taro@taro-HP-Mini-110-3000:~$
enter sudo before it
You want wlan0 (the number zero), not wlano (the letter o)
Nevermind, it’s this silly font.
I think that you have issues with your wifi card…
Thanks! That’s awesome!
This won’t work for WPA wifi networks (ref. https://askubuntu.com/questions/138472/how-do-i-connect-to-a-wpa-wifi-network-using-the-command-line)
My wireless card name isn’t wlan0 and when I put iwconfig into the command line the only thing which shows up is:
lo no wireless connections
How do I find and turn on and find my wireless card. I checked rfkill list, and nothing is blocked, but the only thing that shows up is:
0: hci0: Bluetooth
mine says device not found .
`iwconfig wlan0 essid NetworkName key s:asciipassword` says “Error for wireless request “Set Encode” (8B2A) : SET failed on device wlan0 ; Invalid argument.”
When I was almost done typing the iwconfig command to connect, my computer connected to the wifi network on its own somehow
Thanks!