- Related tutorial: http://raspberrypiguide.de/
- Command Line Cheatsheet: https://gist.github.com/hofmannsven/8392477
- List disks
diskutil list
- Erase SD card
sudo diskutil eraseDisk FAT32 NAME MBRFormat /dev/DISK_ID
(replace NAME and DISK_ID) - Unmount SD card
diskutil unmount /dev/DISK_ID
(replace DISK_ID) - Load image
sudo dd if=PATH_TO_IMAGE of=/dev/DISK_ID
(replace PATH_TO_IMAGE and DISK_ID)
Find all available devices arp -a
Locate Raspberry (b8:27:eb) in Network: Pi Finder
- Connect to device via SSH + Name:
ssh pi@rasperrypi
- Connect to device via SSH + IP:
ssh pi@192.168.64.xxx
Add new user with home dir: sudo useradd -m sven -G sudo
(see /etc/passwd
)
Set password for user: sudo passwd sven
(see /etc/shadow
)
- Plug SD card into a computer
- Add
init=/bin/sh
to the end of thecmdline.txt
. (This will cause the machine to boot to single user mode.) - Put the SD card back in the Pi and boot.
- When the prompt comes up, type
su
to log in as root (no password needed). - Type
passwd pi
and then enter the new password (twice). - Shut the machine down, and put the SD card back into a computer.
- Remove the
init=/bin/sh
fromcmdline.txt
.
Get system info (e.g. IP): ifconfig
Get network info: iwconfig
Get hostname: hostname
Get hostname IP: hostname -I
Get CPU info: uname -a
or cat /proc/cpuinfo
Check for all connected USB devices: lsusb
Switch to config: sudo raspi-config
Switch to GUI: startx
Reboot system: reboot
/ sudo reboot
Shutdown: sudo shutdown -h now
Start SSH while booting: sudo update-rc.d ssh defaults
Related tutorial: http://cd64.de/apache
Update system: sudo apt-get update
& sudo apt-get upgrade
Install Web Server: sudo apt-get install apache2 php5
Laravel will also need mcrypt
and GD
extension.
Install MySQL: sudo apt-get install mysql-server mysql-client php5-mysql
Restart: sudo service apache2 restart
Install Avahi for .local
domain: sudo apt-get install avahi-daemon
(see tutorial)
Note: Also update vhosts to AllowOverride All
!
Play: omxplayer audio.mp3
Volume: +
& -
https://www.raspberrypi.org/documentation/configuration/audio-config.md
System menu: ctrl + esc
Open programm menu: alt + space
Switch programms: alt + tab
Access dropdown: alt + [letter-with-underline]
e.g. alt + f
Close window: ctrl + q
Back to CLI: ctrl + alt + backspace
Install XRDP: apt-get install xrdp
Connect via Remote Desktop app
-
Install VNC:
sudo apt-get install tightvncserver
-
Start VNC:
tightvncserver
-
Ethernet Port:
5900
-
WLAN Port:
5901
Related tutorial: http://cd64.de/filesharing
Install file sharing: sudo apt-get install netatalk
Connect to Server (via ⌘K): afp://192.168.64.xxx
-
Check the power management flag using:
cat /sys/module/8192cu/parameters/rtw_power_mgnt
(this will report a value of 1) -
To set it to zero you can use:
sudo touch /etc/modprobe.d/8192cu.conf
-
Add this line to the created file:
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0
-
Reboot:
sudo reboot
Install: sudo apt-get install mc
Start: sudo mc
http://unix.stackexchange.com/questions/47695/how-to-write-startup-script-for-systemd http://pi.bek.no/autostartProgramOnBoot/
https://www.freedesktop.org/software/systemd/man/systemd.service.html
Can be installed from official NodeJS ARM packages.
Note: use 'tar -xf' for '.tar.xz' files.
ARMv6 http://stackoverflow.com/questions/32563173/installing-node-js-on-raspberry-pi-2
ARMv7 https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions