Gentoo Linux - Wifi connect for install

Jan 17, 24

You need to use wpa supplicant to connect to a wpa or wpa2 secured network to proceed with a network install, but this isn’t spelled out in the Gentoo handbook, which is kind of odd since how else would most people be connecting to the Internet over wifi?

First, get the name of the wireless interface:

ip add

The output looks like this:

linux

The wireless interface begins with a W, in this case it is: wlp4s0

Next, create a configuration file.

touch /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

Open the configuration file using vi:

vi /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

Enter the following into the configuration file and save it:

ctrl_interface=/run/wpa_supplicant
update_config=1

Back at the command line, enter:

wpa_passphrase your_ssid ssid_password >> /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

Of course, enter the actual SSID and the actual password to the wifi connection.

Check the output:

vi /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

You should see the file has changed to include the psk of the wifi connection.

Now, initialize the connection.

wpa_supplicant -B -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant-wlp4s0.conf

If successful, it outputs that the connections is intitialized. You should be connected to the Internet, which you can test with a ping.