Download

Handy reference to quickly access terminal commands that I frequently use.

Table of Contents
📋 Cheat Sheet

◻️ Git

  • Drop all stashed at once

    Terminal window
    git stash clear
  • Show the files in the most recent stash

    Terminal window
    git stash show
  • Drop the most recent stash

    Terminal window
    git stash drop
  • List all stashes

    Terminal window
    git stash list
  • Show the changes of the most recent stash

    Terminal window
    git stash show -p

◻️ Raspberry Pi

  • Show IP address

    Terminal window
    ifconfig wlan0 | grep 'inet ' | awk '{print $2}'
  • Sync system clock

    Terminal window
    sudo timedatectl set-ntp true \&\& date
  • Check voltage

    Terminal window
    vcgencmd get_throttled | grep -q throttled=0x50005 \&\& echo “Low voltage detected! Please use official power supply.” || echo “Power requirement satisfied.”

◻️ SSH

  • Print the public SSH key, which can be used for authentication on remote servers

    Terminal window
    cat ~/.ssh/id_rsa.pub
  • Validate SSH

    Terminal window
    ssh -T git@github.com
  • Generate SSH key

    Terminal window
    ssh-keygen

◻️ Network Manager

  • Connect to a WiFi network

    Terminal window
    nmcli dev wifi connect SSID password PASSWORD
  • Display a list of all saved network connections on the system

    Terminal window
    nmcli con show
  • List all available Wi-Fi networks detected by the system

    Terminal window
    nmcli dev wifi list
  • Show the status of all network interfaces, including their connection states

    Terminal window
    nmcli dev status
Thanks for reading! If you found this page useful, consider buying me a coffee.
© 2025 Hua-Ming Huang · licensed under CC BY 4.0