SSH & Command Line Basics

Connect to your Pi remotely and learn the essential commands for managing FD Commander.

How-To Guides › SSH & CLI Basics

What Is SSH?

SSH (Secure Shell) lets you control your Pi from another computer over the network. Instead of plugging a monitor and keyboard into the Pi, you open a terminal on your laptop, type a command, and you're in. Everything you type runs on the Pi. This is how you'll install FD Commander, check on the server, and fix things if something goes wrong during the event.

Connecting from Your Computer

Windows

Windows 10 and 11 have SSH built in. Open PowerShell or Command Prompt (search for either in the Start menu) and type:

ssh your-username@fd-commander.local

Replace your-username with the account you created in Raspberry Pi Imager, and fd-commander with your Pi's hostname.

If you prefer a graphical tool, PuTTY is a free SSH client. Enter your Pi's hostname or IP address, make sure the port is 22 and the connection type is SSH, then click Open.

Mac and Linux

Open Terminal (on Mac it's in Applications > Utilities, or search for it with Spotlight). The command is the same:

ssh your-username@fd-commander.local

First Connection

The first time you connect, you'll see a message about the host's authenticity:

The authenticity of host 'fd-commander.local' can't be established. ED25519 key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxx. Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type yes and press Enter. This is normal. Your computer is recording the Pi's identity so it can verify it next time. You won't see this again unless you reinstall the Pi.

Then enter your password. The cursor won't move while you type it. That's a security feature, not a bug. Press Enter when done.

Using an IP address instead

If .local doesn't resolve, use the Pi's IP address directly: ssh your-username@192.168.1.42. You can find the IP on your router's admin page under connected devices.

Finding Your Way Around

Once you're connected, you're sitting in your home directory on the Pi. Here's what you need to know.

Where Am I?

$ pwd /home/your-username

pwd prints the current directory. Think of directories like folders on your computer. The / separates levels, like C:\Users\You on Windows but with forward slashes.

What's Here?

$ ls fd-commander $ ls -la total 12 drwxr-xr-x 3 pi pi 4096 Jun 25 09:00 . drwxr-xr-x 3 root root 4096 Jun 25 08:45 .. drwxr-xr-x 15 pi pi 4096 Jun 25 09:02 fd-commander

ls lists files and folders. Add -la to see hidden files (ones starting with a dot) and details like permissions and dates.

Moving Around

$ cd fd-commander # go into a folder $ cd .. # go up one level $ cd ~ # go back to your home directory $ cd /var/log # go to an absolute path

Essential Commands

You don't need to memorize a lot. These are the commands you'll actually use with FD Commander.

CommandWhat It Does
lsList files in the current directory
cd folderChange into a directory
pwdPrint the current directory path
cat file.txtDisplay the contents of a file
nano file.txtOpen a file in a simple text editor (Ctrl+O to save, Ctrl+X to exit)
cp file.txt backup.txtCopy a file
mv old.txt new.txtRename or move a file
rm file.txtDelete a file (no undo, be careful)
sudo commandRun a command as administrator
clearClear the screen
exitDisconnect from SSH
About sudo

Some commands need administrator access, like installing software or restarting services. Put sudo in front of the command and enter your password when prompted. Don't use sudo for everything. Only use it when a command tells you "permission denied" or the instructions specifically say to.

Checking on FD Commander

Once FD Commander is deployed, here are the commands you'll reach for most often.

Is the server running?

$ sudo systemctl status fd-commander ● fd-commander.service - FD Commander Web Server Active: active (running) since Sat 2025-06-28 17:55:00 EDT

If it says active (running), you're good. If it says inactive or failed, restart it:

$ sudo systemctl restart fd-commander

Check disk space

$ df -h / Filesystem Size Used Avail Use% Mounted on /dev/mmcblk0p2 29G 4.2G 24G 15% /

This shows how much space is left on the SD card. If you're uploading a lot of photos during the event, keep an eye on this.

Check memory usage

$ free -h total used free Mem: 1.8Gi 512Mi 1.1Gi Swap: 99Mi 0B 99Mi

View recent logs

$ sudo journalctl -u fd-commander --since "1 hour ago" --no-pager

This shows the last hour of FD Commander logs. Useful if something isn't working and you want to see error messages.

Copying Files To and From the Pi

Sometimes you need to pull a file off the Pi (like a log file or database backup) or push one to it. Use scp from your local computer, not from the SSH session.

Download a file from the Pi

# Run this on your computer, not on the Pi $ scp your-username@fd-commander.local:/path/to/file.log .

The . at the end means "put it in my current directory."

Upload a file to the Pi

# Run this on your computer, not on the Pi $ scp myfile.txt your-username@fd-commander.local:~/

The ~/ means "put it in my home directory on the Pi."

Windows users

scp works in PowerShell and Command Prompt on Windows 10+. If you're using PuTTY, the equivalent tool is called WinSCP, which gives you a drag-and-drop file browser.

Staying Connected

Keep your session alive

If your SSH connection drops after sitting idle, your terminal or SSH client may be timing out. On Mac/Linux, add this to ~/.ssh/config on your local machine:

Host * ServerAliveInterval 60

This sends a keepalive signal every 60 seconds. In PuTTY, go to Connection and set "Seconds between keepalives" to 60.

Run something that survives disconnection

If you need to run a long command (like a system update) and don't want it to die if your SSH connection drops, use tmux:

$ tmux # start a new session # run your long command here # press Ctrl+B, then D to detach $ tmux attach # reconnect to the session later

The command keeps running even if you close your laptop. When you SSH back in, tmux attach picks up right where you left off.

That's the essentials

You don't need to be a Linux expert to run FD Commander. These commands cover connecting, checking status, and basic troubleshooting. If something comes up that isn't covered here, the full documentation has more detail.