Minimal Raspbian Installation
Goal: Setup a minimal Raspbian setup without bloat. This was used before by starting with a minibian installation, but has been superseded by the availability of Rasbian lite images.
Raspbian Lite installation
Setting up SD Card
- Download Raspbian Lite image: https://www.raspberrypi.org/downloads/raspbian/
- unzip image:
unzip 2017-11-29-raspbian-stretch-lite.zip
- Put image on SD Card (ADJUST /dev/sdX target to the correct block device!):
- Stick SD Card in (duh)
dd bs=4M if=2017-11-29-raspbian-stretch-lite.img of=/dev/sdX status=progress OR IF YOU HAVE OLD DD dd bs=4M if=2017-11-29-raspbian-stretch-lite.img | pv | dd bs=4M of=/dev/sdX
- Insert SD, Power the RPi, wait for crazy blinking to stop
Connecting to the Pi
By default Raspbian will get an IP on ethernet.
You do not have a screen
TODO enabling ssh Figure out what is your RPi IP address (adjust mask to reflect own network):
nmap -sP 192.168.1.1-255
You have a screen
the IP will is displayed in the console at the end of the boot process. However you need to enable sshd first.
- log into the console with pi:raspberry
- start raspi-config tool
sudo raspi-config
- In interfacing options, enable SSH
- Exit raspi-config
- ssh into RPi
ssh pi@192.168.1.73
- You might want to change your password, pi is a sudoer... :)
Base system
- flavouring
echo "BMO" > /etc/hostname hostname -F /etc/hostname
- don't bloat the system
echo -e 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' > /etc/apt/apt.conf.d/90norecommend
- update system
apt update apt upgrade
- update to latest kernel
apt install rpi-update rpi-update reboot
- what time is it
dpkg-reconfigure tzdata
Comfy environment (optional)
Now you can install all your comfy l33t command line tools and whatnot, fav editors, etc. This is just an example of what I (ugrnm) always put on top of my pi, YMMV:
- comfy tools and stuff
ln -s /usr/bin/vim.tiny /usr/bin/vim apt install tmux tcsh git chsh -s /bin/tcsh root
- create /root/.tcshrc
if ($?prompt) then set prompt = "%N@%m:%~ %# " set promptchars = "%#" set filec set history = 1000 set savehist = (1000 merge) set autolist = ambiguous set autoexpand set autorehash if ( $?tcsh ) then bindkey "^W" backward-delete-word bindkey -k up history-search-backward bindkey -k down history-search-forward endif endif
- logout and log back in
THIS IS IT!
Well done, you now have a minimal RPi installation, the guideline stops here, anything past this point is just a matter of what the RPi will be used for.