Link Search Menu Expand Document

What’s the Terminal?

A terminal, also known as a command line, console, or shell, is an interactive text-based interface that allows you to type commands to control your computer. Instead of clicking buttons and icons, you type instructions directly. Terminal programs are built into all major operating systems and are essential for software development, system administration, and running command-line tools like Git.

On macOS

macOS includes a built-in terminal application called Terminal.

How to open Terminal on macOS:

  1. Using Spotlight Search (fastest):
    • Press Cmd + Space to open Spotlight
    • Type “Terminal” and press Enter
  2. Using Finder:
    • Open Finder
    • Go to Applications → Utilities → Terminal
  3. Using Launchpad:
    • Open Launchpad
    • Search for “Terminal” in the search bar

Common Terminal commands on macOS:

  • pwd — Print working directory (shows your current location)
  • ls — List files and folders in the current directory
  • cd <folder> — Change directory
  • mkdir <folder> — Create a new folder
  • rm <file> — Remove a file
  • open . — Open the current folder in Finder

On Windows 10 and 11

Windows offers several terminal options:

1. Command Prompt (cmd)

The traditional Windows command-line interface.

How to open Command Prompt:

  • Press Win + R, type cmd, and press Enter
  • Or search for “Command Prompt” in the Start menu

A more powerful shell with advanced scripting capabilities.

How to open PowerShell:

  • Press Win + X and select “Windows PowerShell” or “Terminal”
  • Or search for “PowerShell” in the Start menu

A modern terminal application that can run Command Prompt, PowerShell, and other shells in tabs.

How to get Windows Terminal:

Common commands on Windows:

  • cd — Print current directory
  • dir — List files and folders
  • cd <folder> — Change directory
  • mkdir <folder> — Create a new folder
  • del <file> — Delete a file
  • explorer . — Open the current folder in File Explorer

On Windows (<10)

For older Windows versions (7, 8, 8.1):

Command Prompt

How to open:

  • Press Win + R, type cmd, and press Enter
  • Or search for “cmd” or “Command Prompt” in the Start menu

Note: PowerShell is also available on older Windows versions but may require manual installation or updates. Command Prompt is the most reliable option for these systems.

Tips for using the Terminal

  • Tab completion: Press Tab to auto-complete file and folder names
  • Command history: Use the Up/Down arrow keys to cycle through previously typed commands
  • Copy/Paste:
    • macOS: Cmd + C to copy, Cmd + V to paste
    • Windows (PowerShell/Windows Terminal): Ctrl + C to copy, Ctrl + V to paste
    • Windows (Command Prompt): Right-click to paste
  • Clear the screen: Type clear (macOS/Linux) or cls (Windows)
  • Exit/Close: Type exit or press Ctrl + D (macOS) / close the window

Resources


^
TOP

Copyright @ 2025 CityU STC