These notes apply to the Ubuntu and Raspbian distros.
Update Raspbian to the latest and greatest bits with:
1 2 3 4 5 6
Remove unnecessary bits with:
1 2 3 4 5 6
Multiple Raspis on your network cannot share the same hostname. Change your hostname with:
Detailed instructions are here
Alternative directions are here.
Discover what SIDs are available with:
sudo iwlist wlan0 scan
Add this to /etc/network/interfaces:
1 2 3 4
Add a network entry to /etc/wpa_supplicant/wpa_supplicant.conf for each SID with which the Raspi will need to connect:
The network entries should look like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Stop wlan0 with:
sudo ifdown wlan0
Start wlan0 with:
sudo ifup wlan0
Restart networking with:
sudo /etc/init.d/networking restart
Look at the log with:
systemctl status networking.service
Determine your IP address with:
Get wlan0 status with:
Determine wlan0 channels with:
iwlist wlan0 channel
Installing MDNS and Chrome¶
Install MDNS (enabling hostname.local usage) with:
Install Chrome with:
If chromium-browser is not found, add the universe repository with:
Set up ssh to not ask for a password¶
ssh-keygen on the Mac, and hit return when asked for file in which to save the key and the passphrase.
This will generate a public and private keys stored in ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.
Add the contents of ~/.ssh/id_rsa.pub on the Mac (using copy and paste) into ~/.ssh/authorized_keys on the Raspi.
Set the proper permissions for ~/.ssh/authorized_keys with:
chmod 600 ~/.ssh/authorized_keys
You should now be able to ssh to the Raspi without a password.
Simplify ssh logins¶
To log into a Raspi with
ssh raspi instead of
ssh email@example.com, add this to your ~/.ssh/config file:
1 2 3 4 5
Ensure that ~/.ssh/config is visible only to you by setting the permissions with:
The StrictHostKeyChecking no option will prevent authenticity prompts from appearing during ssh logins
and when doing git pushes with
git push raspi master.
You will no longer see prompts like this:
1 2 3
The UserKnownHostsFile /dev/null option will prevent ssh from writing to .ssh/known_hosts and then later failing when host keys change. In general, this is not a good security practice, but it is acceptable when working with local Raspis since you are on a private LAN and not likely dealing with malicious hosts.
Install File sharing¶
Details are here.
Enable file sharing with:
sudo apt-get install netatalk
Enable VNC with
raspi-config. Choose the
Interfacing Options and then
VNC option. Tab to
Start the VNC server with:
-geometry 2048x1456 for a larger display.
Download a VNCViewer app from here.
Start the VNCViewer app on the Mac and connect to the Raspi at
Install Python 2 with:
sudo apt-get install python python-pip python-dev
Install Python 3 with:
sudo apt-get install python3 python3-pip python3-dev
Install vim with:
sudo apt-get install vim
Create a .vimrc file containing this:
1 2 3 4
To view data on a Raspi connected to an Arduin via serial use:
Misc useful commands¶
Downgrade from rpi-update with:
Install ncdu with: