2018-05-29 02:52:08 +00:00
# NETWORKING
## WiFi
2018-03-01 02:58:41 +00:00
2018-06-13 21:58:03 +00:00
Use WiFi without a separate network manager with this simple guide. Needs "_dhcpcd_" or "_dhcpclient_", "_net-tools_" or "_iproute2_", "_wpa\_supplicant_", and the WiFi drivers for your wireless card (like "_iwlwifi_" and its "_ucode_"), which in part can be installed from a package usually named "_linux-firmware_", but they may not be complete (this provides "_ucode_" but not "_iwlwifi_").
2018-07-11 10:49:24 +00:00
__NOTE__: The "_< DEVICE_NAME > _" can be either "_wlp3s0_" or "_wlan0_". Change accordingly the following commands to suit your needs.
2018-03-01 02:58:41 +00:00
2018-03-01 03:13:42 +00:00
* Create the configuration file (as "_root_", not "_sudo_"):
2018-03-01 03:09:49 +00:00
`wpa_passphrase <NETWORK_NAME> <PASSWORD> > /etc/wpa_supplicant.conf`
2018-03-12 22:19:34 +00:00
* Delete non hashed password from "_/etc/wpa_supplicant.conf_", but not the hashed one.
2018-03-01 02:58:41 +00:00
2018-03-12 22:17:37 +00:00
Each time you need to connect type the following command (as "_root_" or with "_sudo_"):
* __EXAMPLE 1__: With "_net-tools_" and "_dhcpcd_":
2018-07-11 10:49:24 +00:00
```
ifconfig < DEVICE_NAME > down
ifconfig < DEVICE_NAME > up
wpa_supplicant -B -i< DEVICE_NAME > -c /etc/wpa_supplicant.conf -Dwext
dhcpcd < DEVICE_NAME >
```
2018-03-01 02:58:41 +00:00
2018-03-12 22:17:37 +00:00
* __EXAMPLE 2__: With "_iproute2_" and "_dhclient_":
2018-07-11 10:49:24 +00:00
```
ip link set < DEVICE_NAME > down
ip link set < DEVICE_NAME > up
wpa_supplicant -B -i< DEVICE_NAME > -c /etc/wpa_supplicant.conf -Dwext
dhclient < DEVICE_NAME >
```
2018-03-01 02:58:41 +00:00
2018-03-12 22:19:34 +00:00
You can save either example in a script to activate the Wi-Fi whenever you want.
2018-03-01 03:13:42 +00:00
2018-03-12 22:17:37 +00:00
* Note: As an educational tip, the name of a network is also called "_SSID_" in other places.