Skip to content

Instantly share code, notes, and snippets.

@moppymopperson
Last active September 16, 2017 21:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moppymopperson/adc1f9bea950f1aed3e95f32d099a75c to your computer and use it in GitHub Desktop.
Save moppymopperson/adc1f9bea950f1aed3e95f32d099a75c to your computer and use it in GitHub Desktop.
RaspberryPi Helpful Software Installations

Upgrading to the latest OS

  1. sudo apt-get update
  2. sudo apt-get full-upgrade

Setting host name on local network

  1. sudo raspi-config
  2. Choose 2. Hostname and enter new hostname
  3. sudo reboot

Setting up SSH

  1. sudo raspi-config
  2. Choose 5. Interfacing Options
  3. Choose P2 SSH and enable it
  4. sudo reboot

Changing root password

  1. passwd
  2. Type old password, and new password twice

*Alternative * (only works for default user pi)

  1. sudo raspi-config
  2. Choose 1. Change User Password and enter new password

Adding a new user

  1. sudo adduser jimmybombay
  2. *** Optional - Adding passwordless sudo privelages ***
    1. sudo visudo
    2. Update user privelages to

# User privilege specification

root ALL=(ALL:ALL) ALL

jimmybombay ALL = NOPASSWD: ALL

  • note: password can be changed later with passwd

Enabling VNC

The RealVNC software that comes with RaspberryPi does not support OSX's built in vnc viewer, so most people use TightVNC instead. More [detailed tutorial] (https://learn.adafruit.com/adafruit-raspberry-pi-lesson-7-remote-control-with-vnc/installing-vnc) from Adafruit.

  1. sudo apt-get update
  2. sudo apt-get install tightvncserver
  3. Start the server with vncserver :1
  4. Choose a password for remote access
    • must be exactly 8 characters
  5. Choose no when asked about a view only password
  6. Connect from OS X Finder > Go > Connect to server
    • shortcut: Command + K
    • server address is vnc://IP_ADDRESS_HERE:5901
    • You can also use host name on local network vnc://moppi.local:5901
  7. Stop the server with vncserver -kill :1

Note that you can create multiple independent screens by starting up more than one server. Server number two would be designated with :2. This allows multiple people to access the same VNC server at once without interfering with each other.

Enabling Bonjour (Zero-Config file sharing)

The latest version of Raspian comes with zero-config preinstalled, but your raspberry pi still won't show up in your mac's Finder sidebar. Installing Netatalk will allow you to move files between your pi and a mac via Finder.

  1. sudo apt-get install netatalk
  2. sudo reboot

Your pi now shows up in Finder on macs on the same local network.

Installing Node.js and NPM

  1. Check the architecture of your device
    • uname -a
    • Linux moppi 4.9.24+ #993 Wed Apr 26 17:56:54 BST 2017 armv6l GNU/Linux
  2. Select the verions of node you want to install from the official repository.
    • Make sure to choose one with a matching architecture (armv6l for me)
    • Copy the url, for example https://nodejs.org/dist/latest-v7.x/node-v7.10.0-linux-armv6l.tar.gz
  3. The following commands then install nodejs to /opt and simlink it to /usr/bin
wget https://nodejs.org/dist/v4.2.4/node-v4.2.4-linux-armv6l.tar.gz
sudo mv node-v4.2.4-linux-armv6l.tar.gz /opt
cd /opt
sudo tar -xzf node-v4.2.4-linux-armv6l.tar.gz
sudo mv node-v4.2.4-linux-armv6l nodejs
sudo rm node-v4.2.4-linux-armv6l.tar.gz
sudo ln -s /opt/nodejs/bin/node /usr/bin/node
sudo ln -s /opt/nodejs/bin/npm /usr/bin/npm

Install Bluetooth tool chain

Some hardware specific libraries need to be installed before you can perform development with bluetooth.

  1. apt-get install build-essential libbluetooth-dev

Installing Docker

When I installed docker it didn't immediately work, but after a reboot it worked fine. Note also that the default hello-world

  1. Install docker
    • curl -sSL https://get.docker.com | sh
  2. Make docker start at launch automatically
    • sudo systemctl enable docker
  3. Test docker out with an ARM version of hello-world
    • sudo docker run armhf/hello-world
  4. Give docker sudo permissions so you don't have to type sudo every time
    • sudo addgroup docker add a new group for docker
    • sudo gpasswd -a $USER docker to add the current user to the group
    • newgrp docker (or logout) to apply changes
    • docker run armhf/hello-world to check that you can use docker without sud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment