Getting Started
This web page is to help you get started using the Raspberry Pi.
Picking the Right Raspberry Pi
There are many different Raspberry Pi's to choose from and many sites that already do a great job comparing them. Most activities today work with the RPi 3B and 3B+ boards as well as the newer RPi 4. Raspberry Pi is a ARMv7 32-bit system. However, the newest version does support 64-bit operating systems and larger SD Cards, and can be booted or started from a USB drive. Key differences between the boards is RAM (memory that you use to run the operating system and programs), ports and peripherals (such as ethernet, wireless, USB and bluetooth) and power. The new USB has a USB-C connector and requires more power. Both versions 3 and 4 support using a USB power source such as a power hub. RPi 3 only supports USB version 2, while RPi version 4 supports the faster USB version 3. You can tell the USB versions apart by looking at the larger end which should be blue if the cord supports version 3. However, be careful with RPi 4 as the power needs can be significant depending on what you are doing. If you are going to work with programming, most of the RPi boards work fine. However, with networking, the demands can sometimes be greater.
Price might be a factor. Some stores give school discounts. Make sure to provide your tax letters so you don't have to pay state tax. Some stores will limit you to the number of RPis, especially when new versions come out. So plan ahead. The price can vary between $5 for an entry-level pi and $80 for a RPi 4 with 8GB RAM. Sometimes you can only get the high-end RPIs when they are sold in kits.
Stores:
Setting up the Raspberry Pi
Step 1. Installing the operating system
1. Go to the RaspberryPi.org web site and download the disk image which contains the operating system.
- Raspberry Pi OS (32-bit) Lite. This downloads the zip file.
- While you could complete this using the GUI, it's not needed if the Pi is used only for NAS, network attached service.
2. Verify the checksum
A MD5 checksum is just "a digit representing the sum of the correct digits in a piece of stored or transmitted digital data, against which later comparisons can be made to detect errors in the data." It's to make sure that no one altered the file. So it protects 'integrity' one of the CIA key points (Confidentiality, Integrity and Availability). This will verify integrity that the file has not been changed. SHA-256:f5786604be4b41e292c5b3c711e2efa64b25a5b51869ea8313d58da0b46afc64 is the checksum for the Buster Lite version of the Raspberry Pi OS that you downloaded. The file name you downloaded was 2019-09-26-raspbian-buster-full.zip.
On the Mac or Linux machine
- Open the Terminal (GNU/Linux & macOS) and enter this code. (You may need to use the IMG file which is 2020-05-27-raspios-buster-lite-armhf.img). The sha value is returned. Compare the two numbers. If you have a package (pkg file), the package if you have access to the certificate you can find it there on the SSL certificate. Look for a 'fingerprint'. Make sure to use your user name and find the right path to your file!
shasum -a 256 /users/[username]/Downloads/2020-05-27-raspios-buster-lite-armhf.zip
Windows
- Option one. On Windows you can run checksum utilities or run a command (Click Start >> Run, and typing in CMD.exe and hitting Enter.). Navigate to the path of the sha256sum.exe application. Enter sha256sum.exe and enter the filename of the file you are checking. Hit enter, a string of 64 characters will be displayed.
- Option two. The CertUtil command is a Windows built-in command line prompt installed as part of certificate services, and offers "a switch -hashfile that allows you to generate the hash string using a specified algorithm". Identify the name of the file you are going to run. You can specify MD5 or SHA512 depending on what your are given from the developer or company. You want your number to match their number. Make sure to use your user name and find the right path to your file!
certutil -hashfile c:\users\[username]\downloads\2020-05-27-raspios-buster-lite-armhf.zip SHA512
3. Download Balena Etcher. (Rufus is an alternative program if Etcher doesn't work for you.) Etcher is available for PCs and Macs.
4. Flash the operating system onto the SD Card. Make sure you select the target as your SD card.
Step 2. Log into the Pi
There are several ways to do this.
1. The easist way is to just connect your Pi to a mouse, keyboard, and monitor (even a small LCD TV will do). You will need a micro-HDMI cable or a micro-adapter. Once you have setup the pi, you will be accessing it remotely on your own computer. You'll see a rainbow picture when your RPi starts.
2. Login with pi as the user and raspberry as the password. You know you are logged in when it ways pi@raspberrypi:. This is your prompt that will appear on the screen.
3. If you are using a Pi 3B/B+ or 4, you can use the built-in WiFi or ethernet connection. However, by default the WiFi is blocked by rfkill.
4. To find out what rfkill does and the options type one of these commands at the command line:
Man rfkill
rfkill help
5. Read the description and the - - output-all option. Press q when you are finished reading about. As you learned, rfkill will list, enable or disable wireless devices. The option --output prints the devices in columns to your monitor.
6. Type rfkill - - output-all which shows what devices are connected. In this case I have 0 WLAN (wireless LAN) and 1 for Bluetooth. However the wifi is blocked. The wifi has a 'soft' block which we can modify. Type sudo rfkill unblock 0. Notice that they are all unblocked.
7. Verify your IP address on the WiFi. Type ifconfig.The ether represents the MAC address for the network adapter card (NIC). However we are not using it, so it has no IP address in the eth0 section. So, look for the WiFi address in the wlan0 section. You can see the adapters MAC address but no IP address. That's because you have to get authenticated first.
Configure the basic RPi user, network and regional settings
Use the arrow keys and tab keys. Press the Enter (Return on some keyboards) key when you are on the selection to choose it. The escape key takes you back to the previous menu. Hit tab key to move to the next item, and click enter key anytime you want to click ok.
Step 2. Configure the Settings with Raspi-Config
1. Type sudo raspi-config and press the Enter key.
2. You are on Change User Password by default. Hit Enter two times.
3. Type a new password raspberry. Write down what you entered. ____ferris_______ (You can choose your own password) Hit enter twice.
4. You should now be on Network Options to configure your network settings. Hit enter.
- You are now on Hostname. Hit enter to change the name of the pi on the network. Hit enter again.
- Delete raspberrypi, which is your default user name, with the backspace and type pi4-2.
- On your pi you can choose your own name. Only letters, digits and hypen only. Hit enter.
5. Go back to the Wireless Lan options in the Network Options area.
- Press the U key. Then continue to use the arrow keys to move to US United States. Hit enter twice.
- Enter the name of your network SSID (Write your ID down here) __________________________.
- Enter your WiFi passcode phrase. (Write your ID down here) ___________________
6. Go to the Localization Option to setup the language and regional settings to match your location.
- Select Change Locale and click enter. Use the arrow keys to select the default language for the entire system.
- Scroll down using your arrow key until you get to en_GB.UTF-8 which is selected by default as indicated by the asterisk [*]. Hit the spacebar to remove the [*].
- Scroll down to the [ ] for en_US.UTF-8. Press spacebar to put the asterisk in the option [*] and click the Enter key twice.
7. Go to the Localization Option and click Enter to setup the time zone.
- Select Change Time Zone. Choose US and hit Enter.
- Choose Michigan and hit Enter. Michigan is in EST.
8. Go to the Localization Option and hit Enter.
- Go to Change WLAN Country to indicate which country the Pi is to be used and hit Enter.
- You do not need to setup the Keyboard Layout because it’s already set to Generic 105-key PC. You can setup other keyboards here.
- Click the U key to move down the list and select to US United States. Hit enter twice.
- Select Finish. Hit Enter to exit.
- Click Yes to reboot your computer.
9. Log back in using your user pi name and password.
10. Run ifconfig. Write down your IP address. 192.168.1.163. Your IP may vary!
11. Go to sudo raspi-config and hit Enter. You still need to configure SSH.
- Choose Choose 5 Interfacing Options to configure connections to peripherals and hit Enter.
- Choose SSH and hit enter. This allows a remote command line access to the Pi using SSH.
- Hit enter and then Finish. Yes. Hit enter again. Note. you can choose to use VNC with real VNC clients and the Raspberry pi.
Security TIP: This is where I teach students about IP addressing and domain names and Trace IP/tracert/route trace tools
On their computers go do https://whatsmyip.com/. You will be told your information that is passed in the TCP/IP headers. This is useful to share with students so they can understand some of the privacy and security issues.
- Longitude and Latitude: 46.3937 / -85.1729
City and State: Hulbert MI Seney 49748
IP Address: http://74.221.50.227/
IP: 74.221.50.227
Device: MAC
LAN ID" 9615ae63-0d12-41ab-b0af-a066ff1d786f.local - Screen resolutions: 1280x800
- Browser: Chrome 83.0.4103.116
Step 3. Update and Upgrade the Raspberry Pi
1. Always update any packages or releases. (Like Windows Update) Type the following commands:
Sudo apt update
2. To view the list of firmware and application packages to be upgraded type:
apt list—upgradable
3. To upgrade these packages type:
sudo apt upgrade
4. Click y for yes when you are asked to confirm the upgrade.
5. Verify the update by typing:
apt list—upgradable
Networking TIP: Info shutdown tells you the flags for the command. If at any time you need to reboot:
- info shutdown
- sudo shutdown -r
- sudo shutdown -h
Troubleshooting Security Tip:
On a Mac, if you use the RPi, you need to clear the SSH key and generate a new one. Type this first line (but put in your IP address as shown) and press Enter.
- ssh-keygen -R {RPi-IP-Address}
- ssh-keygen -R 192.168.1.163
Resources
Getting Started:
- Paul Stamatiou @Stammy. (). Getting started with Raspberry Pi.
- Getting Started with Minecraft PI
- Raspberry Pi Imager - https://www.raspberrypi.org/downloads/
Installation with Etcher
- Etcher.io
- How To Install Raspbian On Any Raspberry Pi, thehardwareguy, Apr 13, 2019
- Raspberry Pi 3 Model B+ - Top 3 Methods - How To Write A Raspbian Image Onto An SD Card - 2019, Op7ion, Apr 29, 2019
- 3 Ways to Boot Multiple OSes on a Raspberry Pi, Christian Cawley February 17, 2013
- Easily Clone Your SD Card For Trouble-free Raspberry Pi Computing, Christian Cawley June 18, 2014 3 minutes
- Etcher Test Easily Burn Raspberry Pi images To Sd Or Usb Windows Mac Or linux, ETAPrime, Nov 14, 2016, Video
- Etcher - Burn images to SD cards & USB drives, safely and easily, Chris Were Digital, Jan 8, 2018
- Updated * How to write an image to an SD Card - Raspberry Pi - Raspberry Pi Beginners Guide, TechRelay, Jan 14, 2018
- sudo apt-get update
- sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer