A couple of days ago I had the idea of a home server. The main reason is to install Home Assistant and try to make my home smarter (at least in some ways).
For this I decided to use an old laptop and install Debian 12 on it. To take advantage of all the hardware I installed it with no GUI (no desktop, no window manager). Just like a real server :D
After the installation and when I logged on to it, I noticed that I have no internet connection. Well, I need to connect my laptop server to my Wi-Fi network.
Here are the steps:
- First, you need to know the interface name. Do
ip a
:
1 | 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 |
Is wls1
in my case.
- Scan for available wireless networks:
sudo iwlist wls1 scan | grep ESSID
.
1 | ESSID:"NoMeRobesElWiFi" |
Looking for your WiFi ESSID.
- Next, use wpasupplicant to save the profile. Do:
1 | wpa_passphrase NoMeRobesElWiFi uff#Altaclaveclave! | sudo tee /etc/wpa_supplicant.conf |
and then
1 | sudo wpa_supplicant -c /etc/wpa_supplicant.conf -i wls1 |
to connect. Check with sudo iwconfig
.
You should then be connected to the WiFi router, but you may not have an IP assigned to you. So you need to do the following
1 | sudo dhclient wls1 |
Check it with ip a
to see the details.
Happy hacking!