Skip to content

Instantly share code, notes, and snippets.

@abatkin
Last active September 2, 2019 02:50
Show Gist options
  • Save abatkin/6aacfd31ad04f6647c596d93fbfc13d3 to your computer and use it in GitHub Desktop.
Save abatkin/6aacfd31ad04f6647c596d93fbfc13d3 to your computer and use it in GitHub Desktop.
Raspberry Pi Setup

Basic Setup

  • Download Raspbian (I used the "Lite" variant)
  • Copy to SD Card
% dmesg # to figure out which device is being used
...
% dd bs=4M if=2019-07-10-raspbian-buster-lite.img of=/dev/sdc conv=fsync status=progress
  • Mount boot partition and create file ssh
  • If you want a serial console, also edit config.txt and add enable_uart=1 to the main section (more details)
    • If you have lines that can provide voltage, don't connect these (unless you want to power the rPI from there, but usually there isn't enough power for that)
    • Remember, the Rx cable needs to be connected to the Tx pin (and vice versa with Tx/Rx)
    • Pinout - you should only need to connect pins 6, 8 and 10 (pins 1/2 are the pair closest to the screw hole in the CORNER of the device, not near the USB/Ethernt ports)
  • Boot!
  • Log in (username pi, password raspberry)
  • Change password. Now.
  • Update software: apt-get update followed by apt-get upgrade then reboot (shutdown -r now)
  • Create your own user (i.e. sudo useradd -G sudo -m username and then don't forget to set up an ssh key and/or passwd username to give it a password)
    • From workstation: ssh-copy-id rpi-hostname
  • Run raspi-config
    • Set locale (I use en_US.UTF-8 UTF-8 and unselect the default en_GB one)
    • Set timezone
    • Set hostname
    • Expand filesystem
    • Reboot
  • Add a fan and heatsinks:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment