2 min read

Essential Ubuntu Terminal Cheat Sheet (2026 Edition)

In Ubuntu, the terminal isn't just a fallback; it’s the fastest way to manage your system. Here are the most essential commands you’ll use, categorized by what they help you achieve.


1. The "Power User" Basics

Most administrative actions require Super User privileges. You gain these by putting sudo before a command.

  • sudo [command]: Run a command with administrative privileges.
  • clear: Wipes the terminal screen so you can start fresh.
  • exit: Closes the terminal session.
  • man [command]: Short for "manual." Type this to see the official documentation for any command (e.g., man ls).

2. Navigating the Filesystem

Think of these as your "File Explorer" in text form.

  • pwd: Print Working Directory. Tells you exactly where you are.

  • ls: Lists all files and folders in your current location.

  • Pro Tip: Use ls -la to see hidden files and detailed info (size, dates).

  • cd [folder]: Change Directory.

  • cd .. goes up one level.

  • cd ~ takes you straight home.

  • mkdir [name]: Creates a new folder.


3. Managing Files

  • touch [filename]: Creates a new, empty file.
  • cp [source] [dest]: Copies a file. (Use cp -r for folders).
  • mv [source] [dest]: Moves a file. This is also how you rename files.
  • rm [filename]: Deletes a file. Be careful: There is no "Recycle Bin" here.
  • cat [filename]: Dumps the entire contents of a file onto your screen.
  • nano [filename]: Opens a simple, beginner-friendly text editor right in the terminal.

4. Software & System Updates

Ubuntu uses the apt package manager. You should run the first two commands regularly to keep your system secure.

  • sudo apt update: Refreshes the list of available software and updates.
  • sudo apt upgrade: Actually installs the available updates.
  • sudo apt install [package]: Downloads and installs a new program.
  • sudo apt remove [package]: Uninstalls a program.

5. System Health & Monitoring

  • top: Displays a real-time list of running processes (like Task Manager). Press q to exit.
  • df -h: Shows how much disk space you have left in a "human-readable" format.
  • free -h: Shows how much RAM (memory) is currently being used.
  • ip a: Shows your network IP addresses and connection status.

6. The "Search" Magic

  • grep "[text]" [file]: Searches for a specific word or phrase inside a file.
  • history: Shows a list of every command you’ve typed recently. (Great for when you forget that one complex command you used yesterday).

Useful Shortcuts

  • Tab Key: Start typing a filename and hit Tabβ€”Ubuntu will auto-complete it for you.
  • Up/Down Arrows: Cycle through your previous commands.
  • Ctrl + C: Stops a command that is currently running (the "Emergency Stop" button).