Skip to content

Terminal Basics

Opening the Terminal

  • macOS: Press ⌘ + Space, type Terminal, hit Enter.
  • Windows: Press Win + R, type Terminal (or search for PowerShell/Command Prompt), hit Enter.

(Tip: On Windows, we recommend the Windows Terminal app for a better experience.)


Think of the terminal as a file explorer without the mouse.

  • Where am I?

    pwd      # print working directory
    

    Terminal Output

  • List files/folders

    ls       # macOS/Linux/Sometimes Windows
    dir      # Windows
    

    Terminal Output

  • Move into a folder

    pwd     # Output present working directory
    cd docs # Change working directory
    pwd     # Output present working directory
    

    Terminal Output

  • Go up/back one folder

    cd ..
    

    Terminal Output


Creating/Deleting/Modifying Files

  • Make a new file

    touch example.md   # macOS/Linux
    type nul > example.md  # Windows (cmd)
    New-Item example.md    # Windows (PowerShell)
    

    Terminal Output

  • Open a file in VS Code

    code example.md
    

    Terminal Output

  • Make a new folder

    mkdir projects
    

    Terminal Output

  • Delete a file

    rm file.txt      # macOS/Linux/Sometimes Windows
    del file.txt     # Windows
    

    Terminal Output

  • Delete a folder

    rm -rf folder/   # macOS/Linux
    rmdir /S folder  # Windows
    

    Terminal Output


Git Basics in Terminal

You’ll use Git inside your repos (Avionics, Airbrakes, etc.).

Repo link can be found on the repo page using the top right <> Code green button and navigating to the SSH link

  • Clone a repo
    git clone git@github.com:RaiderAerospaceSociety25-26/srad-flight-computer.git    # SFC Repo
    git clone git@github.com:RaiderAerospaceSociety25-26/tracking-groundstation.git  # TGS Repo
    
  • Check current branch
    git status # Displays modified local files
    
  • Create a new branch
    git switch -c feat/my-task # Switches to & Creates a branch <feat/my-task>
    
  • Stage and commit changes
    git add .                              # Stages all current modified files
    git commit -m "feat: add servo driver" # Commits staged changes to local history (tree)
    
  • Push to GitHub
    git push -u origin HEAD # Initial push to publish a new branch
    git push                # Subsequent pushes
    

Running Project Commands

Run Python Tools

Inside the firmware/tools/ sfc folder there are helper Python scripts (for testing, telemetry parsing, logging, etc.).

  1. First, install Python dependencies (one-time):

    cd firmware
    pip install -r requirements.txt
    
  2. Run a tool:

    # Example: run the sensor test tool
    python3 tools/sensor_test.py
    
    # Example: parse log files
    python3 tools/log_parser.py logs/latest.log
    

(On Windows, use python instead of python3 if python3 is not recognized.)


Tips & Shortcuts

  • Tab completion: type part of a file name and press Tab to auto-complete.
  • Arrow keys: scroll through your previous commands.
  • Ctrl + C: cancel a running command.
  • Clear screen
    clear   # macOS/Linux
    cls     # Windows
    
  • List files cleanly:
ls -la    # list files vertically with extra info
  • Display File Structure:
tree -L <depth> # depth of 2-3 is recommended to keep output readable

Checklist ✅

  • Can open terminal on your system
  • Can navigate to your Documents folder
  • Can create and delete a test folder
  • Successfully cloned the Avionics or Airbrakes repo
  • Ran make build without errors

FAQ

Q: I get command not found.
→ Means the program isn’t installed (e.g., Git). Go back to the Git Setup page.

Q: My terminal looks different from screenshots.
→ That’s okay—macOS/Linux use bash/zsh, Windows uses cmd or PowerShell. Commands here cover both.