metalx1000

Linux Manual WiFi WPA connect

Jul 19th, 2020
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.57 KB | None | 0 0
  1. #WPA WIFI Networking for Linux from the shell
  2. #Manually
  3. sudo ip link set wlan0 up
  4.  
  5. #check if it's up
  6. ip link show wlan0
  7.  
  8. #check if connected
  9. iw wlan0 link
  10.  
  11. #scan networks
  12. sudo /sbin/iw wlan0 scan
  13. sudo /sbin/iw wlan0 scan|grep ESSID
  14.  
  15. #create key and config
  16. wpa_passphrase <ESSID> >> /etc/wpa_supplicant.conf
  17. cat /etc/wpa_supplicant.conf
  18.  
  19. #connect
  20. sudo wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
  21.  
  22. #check connection
  23. iw wlan0 link
  24.  
  25. #get ip settings
  26. sudo dhclient wlan0
  27.  
  28. #check if connected
  29. ip addr show wlan0
  30. ping 8.8.8.8
  31. ping google.com
Add Comment
Please, Sign In to add comment