My First 5 Minutes on a RaspberryPi

by kacang bawang

Greetings and salutations. It has been a really long time since my last post. IRL job has been sucking the life out of me. Someday I will tell you all about it…

Anyhow, I’ve been carving out some time for playing with a raspberrypi display and wanted to save some notes for posterity. This more a note to self than anything, but if someone ends up here via googling, I hope it will be of help.

Without further ado, here are the first things I do after booting up a new RaspberryPi installation.

1. Connect and change default password

Connect to the Pi via a LAN cable. Easiest way to achieve this is to plug it into your router. Figure out its IP address and SSH in.

Plug in a USB wifi adapter. If you bought a good one, it will just work. Status can be checked by:

1

2

3

4

#look through boot messages

dmesg

#list loaded kernel modules

lsmod

5. (Optional) Disable built-in wireless.

If you are on RaspberryPi3 then you have a built-in wireless adapter. Sound cool, yes? Too bad, it’s not… The built in adapter sucks balls. As in, dropped connections and lagggggggggggg. For this reason I use a wife dongle (see above) and disable the built-in.

1

2

#edit /boot/config.txt to add:

dtoverlay=pi3-disable-wifi

Be warned that this only works with the newer firmware versions (now = May 2017). For this reason we will run a firmware update in the next few steps. Changes will activate on reboot.

NOTE: You should still be on a LAN connection when doing this step! Unless you want to risk getting locked out…

6. Configure wpa_supplicant

To connect the Pi to your wifi network, we need to configure wpa_supplicant. These days it is quite easy.

1

2

3

4

5

6

#edit /etc/wpa_supplicant/wpa_supplicant.conf and add:

network={

ssid="MyWifi"

psk="mypassword"

}

Check wifi connection status via iwconfig.

7. Run apt-get update/upgrade

Now it is finally time to run the first system update.

1

sudo apt-get-yupdate&amp;&amp;sudo apt-get-yupgrade

This may take a little while…

8. Run firmware update.

Let’s run the firmware update to take advantage of the wifi-disabling boot options.

1

2

3

4

5

#we will need this package

sudo apt-get install rpi-update

#now do the update

sudo rpi-update

Now if we reboot, the built-in wireless should be disabled.

9. Install unattended-upgrades

Get the security updates going.

1

sudo apt-get install unattended-upgrades

10. (Optional) Debloat.

If you are running the lite image you’re good to go. If you’re running the full there is debloating to be done. This will be described in the next post.