connecting to wireless network
Joel Roth
joelz at pobox.com
Wed May 4 01:22:35 UTC 2016
Kristoffer Gustafsson wrote:
> Oh, dear. I'll never sucseed with this.
> I've read a guide page, and there was a lot files to edit. I read the
> page and almost got a headache.
> is there any easier way?
There are some high-level programs, like wicd-curses.
Otherwise, I can tell you that it's a problem you'll solve
once and not have to worry about ever again.
Here's a good tutorial, 8 steps, but if the gumball comes
out you can be happy! I list the steps below.
http://www.blackmoreops.com/2014/09/18/connect-to-wifi-network-from-command-line-in-linux/
The page explains more, but this summary comes at the end.
You should probably become root for this, e.g. sudo su.
1. See what your wireless device is:
root at kali:~# iw dev
2. Assuming it is wlan0, bring up that interface:
root at kali:~# ip link set wlan0 up
3. Look for wireless access point:
root at kali:~# iw wlan0 scan
4. Put the access point and passphrase into the config file:
root at kali:~# wpa_passphrase blackMOREOps >> /etc/wpa_supplicant.conf
5. Connect to the access point:
root at kali:~# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf
6. Check that you are connected:
root at kali:~# iw wlan0 link
7. Ask for an IP address (I added the first command, to kill
existing dhclient processes).
root at kali:~# dhclient -x
root at kali:~# dhclient wlan0
8. Check your internet connectivity:
root at kali:~# ping 8.8.8.8
9. That is usually enough, but the article provides a
command to set a default route.
root at kali:~# ip route add default via 10.0.0.138 dev wlan0
I usually just make sure that ethernet interface is turned off:
root at kali:~# ifconfig eth0 down
Cheers, hope this helps.
--
Joel Roth
More information about the Blinux-list
mailing list