Skip to content

Instantly share code, notes, and snippets.

@debxp
Last active September 4, 2024 13:25
Show Gist options
  • Save debxp/8cc47eb53c31485e66eb22e8934e2d26 to your computer and use it in GitHub Desktop.
Save debxp/8cc47eb53c31485e66eb22e8934e2d26 to your computer and use it in GitHub Desktop.
Wifi connection from command line after a Debian minimal install
Create the file 'wpa_supplicant.conf'...
$ sudo nano /etc/wpa_supplicant.conf
Put the following in ti:
network={
ssid="your_wifi_name"
psk="your_wifi_password"
}
Save, exit 'nano' and run 'ip a' to get your wlan interface name. In my case, is 'wlp2s0'. So, you can run...
$ sudo ip link set wlp2s0 down
$ sudo ip link set wlp2s0 up
$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant.conf -Dnl80211,wext
$ sudo dhclient wlp2s0
Should work... maybe... :)
After a reboot, just run:
$ sudo wpa_supplicant -B -i wlp2s0 -c /etc/wpa_supplicant.conf -Dnl80211,wext
$ sudo dhclient wlp2s0
@brammittendorff
Copy link

You do not have sudo on a minimal installation.

@debxp
Copy link
Author

debxp commented Mar 1, 2021

You do not have sudo on a minimal installation.

With root password left blank, you'll have sudo installed.

@jaderebrasil
Copy link

I just installed the minimal debian and has no wpa_supplicant or dhclient. Did I do something wrong?

@pelatge
Copy link

pelatge commented Sep 22, 2022

@jaderebrasil
i assume you using android tethering usb to connect linux
you only login to terminal
type
$ ip link show

$ ip link set usb0 up

$ dhclient usb0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment