$ diskutil list
/dev/disk3 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.9 GB disk3
1: Windows_FAT_32 NO NAME 254.8 MB disk3s1
2: Linux 15.7 GB disk3s2
$ diskutil unmountDisk /dev/disk3
$ sudo dd bs=1m if=./path/to/raspbian.img of=/dev/rdisk3 conv=sync
After writing image to disk:
$ touch /Volumes/boot/ssh
$ sudo unmount /Volumes/boot
On local machine clear known hosts:
$ ssh-keygen -R raspberrypi.local
connect to remote pi
$ ssh pi@raspberrypi.local
pi@raspberrypi.locals passwd: raspberry
Change password and add public keys
$ passwd
Changing password for pi.
Current password:
New password:
Retype new password:
passwd: password updated successfully
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/pi/.ssh/id_rsa):
Created directory '/home/pi/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/pi/.ssh/id_rsa.
Your public key has been saved in /home/pi/.ssh/id_rsa.pub.
The key fingerprint is:
xxx
copy local ~/.ssh/id_rsa.pub into remote ~/.ssh/authorized_keys
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install vim tmux
$ sudo apt-get install python3-pip
$ sudo pip3 install dotfiles
$ sudo apt-get install git
$ git clone git@github.com:txoof/dotfiles.git
# sync the dotfiles directory
$ dotfiles -R ~/dotfiles -s -f
# exit and sign in again to take effect
$ exit
Static IP edit /etc/dhcpcd.conf to match:
interface eth0
static ip_address=192.168.178.13/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.178.1
static domain_name_servers=84.116.46.21 84.116.46.20
Various network settings:
$ sudo raspi-config
Network Options > Hostname
Network Options > WiFi
Remove old known-hosts as needed on local machine:
$ ssh-keygen -R <hostname>
get develtools
$ mkdir ~/bin/
$ cd ~/bin
$ git clone git@github.com:txoof/develtools.git
install pipenv
$ sudo pip3 install pipenv
install jupyter
$ sudo pip3 install jupuyter
install samba
$ sudo apt-get install samba
Enable home folder sharing: edit the smb.conf file to match the following
create an image of the filesystem for restoring:
$ sudo dd bs=4m if=/dev/disk3 of=<name>.img