Created
October 28, 2016 14:50
-
-
Save n1lux/f37513a5a162589a3b20e0563ce840e5 to your computer and use it in GitHub Desktop.
how to set up wireless linux by commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check that the wireless device is up | |
ip link show wlan0 | |
# wlan0 UP | |
ip link set wlan0 up | |
ip link show wlan0 | |
# Check the connection status | |
iw wlan0 link | |
# Scan wireless network | |
iw wlan0 scan | |
# Connect to WPA/WPA2 network | |
wpa_passphrase network >> /etc/wpa_supplicant.conf <enter> | |
(write network password) | |
# Run wpa_supplicant with new configuration | |
wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf | |
-B run wpa_supplicant means the backgound. | |
-i Wireless interface | |
# Check the connectio again | |
iw wlan0 link | |
# Obtain ip address by DHCP | |
dhclient wlan0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment