In the previous tutorial, Raspberry Pi Server How-To – Part 1 – Installing The OS, I forgot the configuration part, so this tutorial covers configuring Raspbian. Since we’re using Raspbian Lite, which has no GUI, all of the configuration will be done via the command line (CLI).
The things covered in this tutorial are:
- 00:59 – How to run Raspbian Config from the command line (raspi-config).
- 01:18 – How to change the default password for user pi.
- 02:00 – How to set the locale settings to your location.
- 03:34 – How to turn overscan off to remove the black border on your screen (if applicable).
- 04:15 – How to change the hostname for your Raspberry Pi.
- 05:18 – How to configure and connect to a wifi network via the command line on a Raspberry Pi 3.
- 08:44 – How to update your Raspberry Pi via command line (CLI).
How to connect to Wifi via command line on Raspberry Pi 3
I wanted to make a few notes regarding this part. I found two tutorials that explain how to do this, SETTING WIFI UP VIA THE COMMAND LINE and Setting up Wifi with the Command Line Adafruit’s Raspberry Pi Lesson 3. The first one was the closest to being correct, but without the key_mgmt option being set, I couldn’t get it to connect to my wifi. The Adafruit tutorial didn’t work at all and I have no idea why.
As far as the key_mgmt option, here’s some more values for it according to the WPA Supplicant information. These values were copied from the sample config file that explains ALL of the options available.
# key_mgmt: list of accepted authenticated key management protocols
# WPA-PSK = WPA pre-shared key (this requires 'psk' field)
# WPA-EAP = WPA using EAP authentication
# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically
# generated WEP keys
# NONE = WPA is not used; plaintext or static WEP could be used
# WPA-NONE = WPA-None for IBSS (deprecated; use proto=RSN key_mgmt=WPA-PSK
# FT-PSK = Fast BSS Transition (IEEE 802.11r) with pre-shared key
# FT-EAP = Fast BSS Transition (IEEE 802.11r) with EAP authentication
# WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms
# WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms
# SAE = Simultaneous authentication of equals; pre-shared key/password -based
# authentication with stronger security than WPA-PSK especially when using
# not that strong password
# FT-SAE = SAE with FT
# WPA-EAP-SUITE-B = Suite B 128-bit level
# WPA-EAP-SUITE-B-192 = Suite B 192-bit level
# OSEN = Hotspot 2.0 Rel 2 online signup connection
# FILS-SHA256 = Fast Initial Link Setup with SHA256
# FILS-SHA384 = Fast Initial Link Setup with SHA384
# FT-FILS-SHA256 = FT and Fast Initial Link Setup with SHA256
# FT-FILS-SHA384 = FT and Fast Initial Link Setup with SHA384
# If not set, this defaults to: WPA-PSK WPA-EAP