IT Course Directory: VMware, Linux, Networking, and Raspberry Pi
Raspberry Pi Beginner Course: Setup, Raspberry Pi OS, Linux Commands, Multimedia, and Remote Access
Learn Raspberry Pi setup from scratch: install Raspberry Pi OS, configure networking, use Linux commands and APT, work with cameras and multimedia, and connect remotely with SSH and SFTP.
Course overview
This beginner course takes you from an unused Raspberry Pi to a working Linux computer. You will prepare boot storage, install Raspberry Pi OS, configure the system, connect it to a network, use the terminal, install software, work with multimedia and cameras, and administer the Pi remotely.
No Linux or programming experience is required. You need basic computer skills, a Raspberry Pi, a compatible power supply, boot storage, and an internet connection.
1. What is a Raspberry Pi?
A Raspberry Pi is a compact single-board computer: the processor, memory, connectors, and supporting electronics are mounted on one circuit board. It can run an operating system, applications, servers, scripts, and hardware projects much like a desktop computer, but in a small and energy-efficient format.
Common uses include learning Linux and programming, teaching computer science, playing local media, building camera projects, controlling electronics through GPIO pins, automating tasks, hosting small services, and experimenting with sensors and networks.
Main board elements
- Processor: executes operating-system and application instructions.
- Memory: working space used by running programs. It is different from storage.
- GPIO header: general-purpose input/output pins used with LEDs, buttons, sensors, and other electronics.
- USB ports: connect keyboards, mice, storage devices, cameras, controllers, and other peripherals.
- Video output: connects to a monitor or television. The connector and supported resolutions depend on the model.
- Audio output: may be provided through a combined audio/video connector, HDMI, USB, Bluetooth, or another model-specific method.
- Storage interface: commonly a microSD slot; some models also support alternative boot devices.
- Ethernet and wireless networking: provide wired or Wi-Fi connectivity when available.
- Camera and display connectors: ribbon-cable interfaces for compatible modules. Their connector type and support vary by generation.
- Power input: supplies regulated power through the connector specified for the model.
Do not assume that a guide for one board applies exactly to another. Port layout, memory size, boot firmware, wireless features, camera support, configuration menus, and power requirements vary by generation.
Setup checklist
| Item | Purpose | Compatibility considerations | Beginner recommendation |
|---|---|---|---|
| Power supply | Provides stable power | Must match the model and connector | Use a reputable, model-compatible supply |
| microSD card | Stores the operating system and data | Capacity, speed, and reliability matter | Use a quality card with enough space for your projects |
| Display or headless method | Provides first access | Display connectors and cables vary | Use a monitor, or preconfigure SSH for headless setup |
| Keyboard and mouse | Supports local desktop or console use | USB and Bluetooth support vary | Use simple USB devices for initial setup |
| Network connection | Provides updates and remote access | Ethernet and Wi-Fi features vary | Use Ethernet during troubleshooting when possible |
| Case and cooling | Protects the board and manages heat | Must fit the exact model | Use a ventilated case appropriate to the workload |
| Camera module | Captures images and video | Connector, adapter, and software support vary | Check model and operating-system compatibility first |
Never remove power while the Pi is writing to storage. Use the desktop shutdown control or run sudo shutdown -h now. Abrupt power loss can corrupt the filesystem and damage files. Wait until shutdown has completed before disconnecting power.
2. Prepare and install Raspberry Pi OS
The operating system is normally stored on a microSD card. A disk image is a prepared copy of an operating system and its partitions that an imaging program writes to bootable storage. Back up any files on the card before imaging: writing an image normally erases existing contents.
Choose an operating system
| Option | Best for | Desktop included | Architecture considerations | Notes |
|---|---|---|---|---|
| Raspberry Pi OS Desktop | Beginners, graphical applications, multimedia | Yes | Choose 32-bit or 64-bit according to model and software needs | Best starting point for this course |
| Raspberry Pi OS Lite | Servers, scripting, headless systems | No | Uses fewer resources; confirm application support | Administration is primarily through SSH and the shell |
| 32-bit Raspberry Pi OS | Broad compatibility with older software | May be included in desktop or Lite editions | Can address less memory per process in some situations | Useful when a package or application requires 32-bit support |
| 64-bit Raspberry Pi OS | Modern models and 64-bit applications | May be included in desktop or Lite editions | Requires a compatible processor and software | Can improve compatibility with some modern workloads |
| Specialized distribution | Media centers, security tools, or dedicated appliances | Depends on distribution | Hardware and package support differ | Use when its focused purpose outweighs general flexibility |
Raspberry Pi OS is the current name of the Raspberry Pi-focused Linux distribution formerly called Raspbian. Older tutorials may use the old name or mention packages and commands from an earlier release. Check commands against the release installed on your Pi rather than assuming historical instructions are still valid.
| Older term | Current term or context | What learners should do |
|---|---|---|
| Raspbian | Raspberry Pi OS | Interpret it as the older operating-system name when reading older documentation |
| raspistill and raspivid | libcamera and rpicam tools | Use the camera tools supplied by the installed release |
| Legacy camera enable menu | Modern camera stack detection | Do not expect a legacy camera switch on every current system |
Write the image
- Back up the microSD card if it contains anything important.
- Install and open Raspberry Pi Imager or an equivalent imaging utility on another computer.
- Select the desired Raspberry Pi OS edition.
- Select the correct removable storage device. Verify its identity and capacity carefully.
- When supported, open the customization settings before writing. Set a unique username, strong password, hostname, locale, time zone, keyboard layout, Wi-Fi country, Wi-Fi credentials, and SSH enablement.
- Start the write operation and allow the tool to create the required partitions.
- Let the tool validate the write. Do not remove the card until validation and writing have finished.
- Insert the card into the powered-off Pi, connect the display and input devices if using them, and apply power.
Imaging tools generally format or erase the selected card and create the partitions needed by the operating system. You usually do not need to manually create Linux partitions first. If you manually erase a card, use the operating system's disk utility carefully and select the removable device, not your computer's internal drive.
First boot and verification
The first boot may resize storage, generate system files, and apply regional or network settings. A desktop edition presents a graphical login or desktop; Lite normally presents a console login. Confirm the keyboard layout, hostname, date and time, network connection, storage capacity, and attached USB or display hardware.
After connecting to the internet, update the system:
sudo apt update
sudo apt full-upgradeapt update downloads current package metadata. It does not upgrade installed programs. apt full-upgrade installs available upgrades and may handle dependency changes. Use a stable power supply, close unnecessary applications, and allow the process to finish.
3. Raspberry Pi OS desktop, networking, and software
The desktop typically includes an application menu, taskbar, network indicator, file manager, terminal, and shutdown controls. Use the graphical interface for visual file management and applications. Use the command line for repeatable administration, remote work, diagnostics, and automation.
Connect to the network
For Ethernet, connect the cable before or during boot. For Wi-Fi, choose the network from the network menu, enter its credentials, and ensure the correct Wi-Fi country is configured. A local IP address identifies the Pi inside your home or office network. A public IP address identifies a connection on the wider internet; it is not normally the address you should expose for beginner remote administration.
ip addr
hostname -I
ip route
ping -c 4 example.localip addr shows interfaces and assigned addresses. hostname -I gives the Pi's local addresses. ip route shows routes and the default gateway. ping tests reachability, although some networks block it. DHCP commonly assigns local addresses automatically, so an address can change after reconnecting or rebooting. Use the hostname, a router client list, or a reserved DHCP lease when a stable local identity is useful.
Install software safely
A repository is a configured source of packages. Package metadata describes available versions. APT resolves dependencies, which are other libraries or programs required by a package.
| Goal | APT command | Graphical alternative | Expected result |
|---|---|---|---|
| Refresh package lists | sudo apt update | Package manager refresh | Available-package metadata is current |
| Upgrade installed software | sudo apt full-upgrade | Mark upgrades and apply | Installed packages are upgraded |
| Search | apt search keyword | Search software tool | Matching packages are listed |
| Inspect | apt show package | Package properties | Description, version, and dependencies are shown |
| Install | sudo apt install package | Mark for installation | Package and required dependencies are installed |
| Remove | sudo apt remove package | Mark for removal | Package is removed while some configuration may remain |
| Remove unused dependencies | sudo apt autoremove | Remove automatically installed items | Unneeded dependencies are removed |
Graphical software stores differ between Raspberry Pi OS releases and editions, so they are not the only installation method. A tool such as Synaptic, where available, lets you search, inspect, mark packages for installation or removal, and apply changes. Manually installed software may use a downloaded package, source code, or its own installer; understand its origin, update process, and compatibility before using it. Avoid adding unrelated third-party repositories casually.
4. System configuration with raspi-config
raspi-config is a terminal-based configuration utility. Its menu names and available options depend on the operating-system release and Raspberry Pi model. Launch it with administrator privileges:
sudo raspi-configUse the arrow keys and prompts, record each change, and reboot when requested. Change one setting at a time when troubleshooting so you know which change affected the result.
| Setting area | Purpose | When to change it | Reboot required | Version or model caveat |
|---|---|---|---|---|
| Password and system options | Change credentials and basic system behavior | Immediately after installation or when access changes | Usually not for a password change | Account and menu names vary |
| Boot behavior | Select console or desktop and automatic login behavior | When switching between headless and graphical use | Often | Choices depend on installed edition |
| Localization | Set locale, time zone, keyboard, and Wi-Fi country | When regional settings are incorrect | Sometimes | Wi-Fi country affects regulatory operation |
| Hostname | Gives the device a network-readable name | Before using several Pis or remote access | Often | Name resolution depends on the local network |
| Interfaces | Enable SSH and applicable hardware interfaces | Before headless administration or camera work | Often | Modern cameras may not use a legacy enable item |
| Filesystem expansion | Uses remaining storage capacity | When df -h shows less space than expected | Yes | Many current images expand automatically |
| Memory or performance | Adjust applicable GPU memory or performance settings | Only for a specific workload | Usually | Options differ by model and modern memory design |
Use strong, unique passwords and avoid relying on an assumed default account. A hostname helps local discovery but is not a security control. If storage is smaller than expected, check df -h, use the applicable filesystem-expansion option, reboot, and check again.
GPU memory split means reserving part of system memory for graphics-related work on applicable systems. It may matter for a graphical or camera workload, but modern models and software can manage memory differently. Do not change it without a reason.
Overclocking runs hardware above standard clock settings. Treat it as optional advanced work: use model-specific support, adequate cooling and power, test stability, monitor temperatures, back up data, and understand the possibility of crashes, corruption, and support or warranty implications. Reverse the setting if the Pi becomes unreliable.
5. Optional discovery and registration services
Some community services have allowed users to register devices or projects on a public map. This is optional and is not part of installing or operating Raspberry Pi OS.
Before sharing, consider whether the device name, approximate location, IP-related information, project description, or photographs could identify your home, school, workplace, or network. Share only non-sensitive information, use a project label rather than a personal address, and skip registration if the privacy benefit is unclear.
6. Multimedia projects
Audio and video
Audio can come from local files through HDMI, a combined audio/video connector where available, USB, or Bluetooth. Select the intended output device in the desktop sound controls or the relevant player settings. Check volume, mute state, file permissions, supported formats, and whether the chosen player has the required codec support.
Video performance depends on the Pi model, codec, resolution, frame rate, display connection, storage speed, and player configuration. If playback is choppy, reduce resolution or bitrate, use a suitable codec, check storage capacity, and inspect heat or CPU load.
Games and emulation are graphical workloads. They require compatible software, controller configuration, adequate storage, and realistic expectations about the model's performance. Acquire games and ROMs responsibly and use software you are legally permitted to use.
Camera capture
A compatible camera module connects through a camera ribbon connector, while a USB camera uses a USB port. Power down before inserting or reseating a ribbon cable. Check cable orientation, connector seating, focus, lighting, permissions, and available storage.
Current Raspberry Pi OS releases commonly use the libcamera stack and rpicam command names. Older systems may use raspistill and raspivid. These are legacy commands, not interchangeable assumptions.
| Task | Current tool family | Legacy tool family | Compatibility note |
|---|---|---|---|
| Test camera | rpicam-hello | Older preview tools | Use the command supplied by the installed release |
| Still image | rpicam-still | raspistill | Options and availability differ |
| Video | rpicam-vid | raspivid | Use current documentation for current camera stacks |
rpicam-hello
rpicam-still -o image.jpg
rpicam-vid -o video.h264 -t 10000Timestamped image script
Create a file named capture-photo.sh with a text editor:
#!/bin/bash
mkdir -p "$HOME/photos"
rpicam-still -o "$HOME/photos/photo-$(date +%Y%m%d-%H%M%S).jpg"Make it executable and run it:
chmod +x capture-photo.sh
./capture-photo.shThe command substitution inserts the current date and time into the filename. If capture fails, check the camera connection, tool family, permissions, lighting, and whether another process is using the camera.
Slow motion
Slow motion is created by capturing more frames per second than the playback frame rate. For example, recording at 90 frames per second and presenting those frames at 30 frames per second makes ten seconds of real action occupy approximately thirty seconds of playback, assuming the player handles the timing correctly.
rpicam-vid --framerate 90 -o highfps.h264 -t 10000High frame rates can require lower resolution, faster storage, more light, and more processing. Playback software may need explicit frame-rate handling.
Motion detection
Motion detection compares successive camera frames and triggers an action when visual change exceeds a threshold. A basic workflow needs a camera, detection software or script logic, an output directory, and controlled tests.
- Place the camera so the intended test area is visible and well lit.
- Capture a baseline frame or allow the detection program to establish one.
- Compare new frames with the baseline or previous frame.
- Trigger an image or video when the difference exceeds the chosen threshold.
- Store timestamped output and review false positives.
- Test changes in lighting, shadows, moving plants, and camera vibration.
Obtain consent before recording people, avoid private spaces, protect captured files, and delete footage that is no longer needed.
7. Terminal fundamentals
The terminal is an application for entering text commands. A shell interprets those commands. A typical command has a program name, options, and arguments. A path may be absolute, beginning at the filesystem root such as /home/user/project, or relative, interpreted from the current working directory.
pwdprints the current directory.ls -lalists files, including hidden files, with details.cd directorychanges directory;cd ..moves to the parent.mkdir directorycreates a directory;mkdir -p path/to/directorycreates missing parents.touch filecreates an empty file or updates its timestamp.cat fileprints a small file;less fileviews a larger file page by page.nano fileopens a simple text editor.cp source destinationcopies;mv source destinationmoves or renames.rm filedeletes a file.rm -r directoryrecursively deletes a directory and needs careful path verification.
Spaces separate arguments, so quote filenames containing spaces: cat "my notes.txt". Wildcards such as *.log match multiple names before the command runs. Pipes send one command's output to another, while redirection writes output to a file:
grep -Rin 'error' "$HOME/project" | less
sort -n scores.txt > sorted-scores.txtUse the up-arrow for command history. Use man command for built-in manuals and command --help for a concise option summary:
man find
find --helpsudo runs a command with administrator privileges. Use it only when required. It does not make a dangerous command safe; it increases the damage a mistake can cause.
Text processing and file discovery
sort names.txt
sort -n numbers.txt
sort -r names.txt
sort -u names.txt
grep 'pattern' file.txt
grep -Rin 'pattern' project/
find "$HOME" -name '*.jpg'
find /var/log -type f
tail logfile
tail -f logfilesort orders lines alphabetically by default; -n uses numeric comparison, -r reverses the order, and -u removes duplicate output lines. grep searches text; -R searches recursively, -i ignores case, and -n shows line numbers. find can filter by name, type, path, and modification attributes. locate, where installed, is faster for name searches but depends on a database that may not include newly created files. tail -f follows a file as new lines are added, which is useful for logs.
Processes, archives, and storage
A process is a running instance of a program. Common fields include PID, user, CPU percentage, memory percentage, and command.
ps aux
top
htopps aux provides a snapshot. top provides an interactive view; htop is a more visual alternative that may need installation.
A tar archive bundles files. Compression reduces its size but is separate from bundling:
tar -czf project.tar.gz project/
tar -tf project.tar.gz
tar -xzf project.tar.gzThe first command creates a gzip-compressed archive, the second lists its contents without extracting, and the third extracts it. Inspect an archive before extracting it into an important directory.
df -h
du -sh "$HOME/project"
du -ah "$HOME/project" | sort -hdf -h reports filesystem capacity and free space. du reports space used by directories and files. A disk can have free bytes but run out of inodes, which limit the number of filesystem objects; investigate inode usage if many tiny files cause unexpected “no space” errors.
8. SSH and SFTP remote access
Headless operation means using the Pi without a permanently attached monitor, keyboard, or mouse. It is useful for servers, cameras, and installations in inconvenient locations.
SSH is an encrypted protocol for remote command-line access. Enable it during imaging, through the operating-system settings, or with raspi-config. On a running system, the service can be enabled and checked with:
sudo systemctl enable --now ssh
sudo systemctl status ssh
ssh username@hostname-or-ipFind the Pi using its configured hostname, your router's connected-client list, or local network discovery. From Linux, macOS, and modern Windows systems, the ssh command is commonly available. Windows can also use a graphical SSH client.
On first connection, SSH displays a host-key fingerprint. Verify that you are connecting to the intended device before accepting it. Password authentication is convenient for initial access, but use a unique username and strong password, then prefer SSH keys for regular administration. If a host-key warning appears after re-imaging, do not blindly bypass it: confirm that the device was intentionally re-imaged before removing or replacing the old key.
SFTP is secure file transfer over SSH. It is not the same as FTP: SFTP uses the SSH service and encrypted connection, while traditional FTP is a separate protocol with different security properties.
sftp username@hostname-or-ip
put localfile
get remotefile
scp localfile username@hostname-or-ip:/home/username/In an SFTP session, select the correct local and remote paths, upload to the user's home directory first, and then move files locally if administrative ownership is required. A successful login does not grant permission to write protected directories. Check ownership, permissions, and free space; SFTP itself does not elevate with sudo.
Keep SSH on the local network when possible. Exposing SSH directly to the public internet is unsafe without strong controls. Prefer local access or a VPN-based connection; if public remote administration is unavoidable, use key authentication, updates, firewall and access controls, rate limiting, monitoring, and a carefully reviewed configuration.
9. Troubleshooting guide
| Symptom | Likely causes | Diagnostic steps | Resolution |
|---|---|---|---|
| Pi does not boot | Bad image, failing card, insufficient power, display issue | Check indicators and supply; re-image and validate; check display input and cable | Use compatible power and quality storage; verify model-specific display requirements |
| No Wi-Fi | Wrong credentials or country, weak signal, unsupported band, captive portal | Check regional setting and ip addr; test Ethernet | Correct credentials, move closer, use a supported band or Ethernet |
| APT errors | No internet, stale metadata, interrupted update, wrong package, low space | Run sudo apt update; check df -h; read the exact error | Restore connectivity, free space, and avoid unrelated repositories |
| Filesystem too small | Image did not expand | Check df -h | Use applicable expansion setting in raspi-config, reboot, and verify |
| SSH fails | Disabled service, wrong name or IP, different network, wrong account, changed key | Check service, router client list, local IP, username, and host-key warning | Enable SSH, use the configured account, and investigate key changes safely |
| SFTP upload fails | Protected path, wrong path, full disk, permission mismatch | Try the home directory; check space and permissions | Upload to an owned directory and correct local ownership when necessary |
| Camera fails | Loose cable, incompatible camera, stack mismatch, busy device, legacy command | Power down and reseat; use current detection tools; check processes | Match camera, connector, OS release, and tool family |
| Video is choppy | Excessive resolution or codec load, slow storage, high frame rate, heat | Reduce settings; check storage, temperature, and CPU load | Use suitable resolution, cooling, storage, and playback frame rate |
| Freeze or reboot under load | Weak power, overheating, overclocking, failing storage | Return clocks to default; check cooling, logs, and storage | Use proper power and cooling; back up and test another card |
| Wrong files changed | Incorrect path, wildcard expansion, unquoted spaces, unnecessary sudo | Run pwd and ls before destructive commands | Use explicit quoted paths, backups, and supported dry-run options |
10. Capstone practice
- Identify your exact Raspberry Pi model and choose a compatible power supply, microSD card, and network method.
- Use Raspberry Pi Imager to select Raspberry Pi OS, select the correct storage device, configure a unique username, hostname, locale, Wi-Fi settings, and SSH, then write and validate the image.
- Boot the Pi and verify the desktop or console, storage size, date, network connection, and hardware.
- Run
sudo apt updateandsudo apt full-upgrade. Install a small utility, verify it runs, and remove it if it is no longer needed. - Use
raspi-configto review localization, hostname, boot behavior, and SSH. Reboot when requested. - Discover the Pi through its hostname or local IP address. Connect with
ssh username@hostname-or-ip. - On the Pi, create a project directory and a text or image file. If a camera is attached, use the timestamped script to capture an image.
- Use SFTP to retrieve the file to the client computer.
- Document the model, OS version, hostname and IP-discovery method, configuration changes, commands used, and any troubleshooting steps.
Knowledge check
- What is the difference between a Raspberry Pi OS disk image and a normal file copied onto a card?
- Why should existing microSD data be backed up before imaging?
- What is the difference between
apt updateandapt full-upgrade? - Why might a hostname work on one local network but not another?
- When should
sudobe used, and why is it risky? - What is the difference between an absolute and relative path?
- What do pipes and output redirection do in the shell?
- How would you find large files and check overall filesystem capacity?
- Why are current
rpicamcommands not always interchangeable with older camera commands? - Why does capturing at a high frame rate produce slow motion when played at a lower frame rate?
- How does SFTP differ from FTP?
- What should you verify before accepting an SSH host key or responding to a changed-key warning?
- Why is direct public exposure of SSH discouraged?
- What privacy questions should you ask before registering a Pi or camera project on a public service?
Continue learning
After completing this course, consider studying Linux fundamentals, the Raspberry Pi course activity, Python programming, GPIO electronics, camera projects, backups, scheduled tasks, and SSH key management.