Guide

Terminal & CLI Basics for Non-Engineers: Essential Commands 2026

A beginner guide to the terminal and CLI: GUI vs CLI, opening a terminal on Mac and Windows, five essential commands, dangerous commands, safety rules.

AI Agent CampAI Agent Camp Editorial··6 min read

"I started using an AI agent and suddenly this black screen called a terminal appeared." "Everyone says 'just run a command' — but type what, exactly?" This is the first stumbling block for non-engineers entering the world of AI tools.

This guide explains the terminal (CLI) from zero: the five commands you actually need, the dangerous commands you absolutely must know about, and why learning the CLI matters in the age of AI agents. The content is based on the foundation lectures we use in our corporate training and online courses.

For the bigger picture of AI agents, start with The Complete Guide to AI Agents for Business.

What you will learn

  1. What a terminal is — a "text command window" into your computer
  2. GUI vs. CLI — strengths of each and when to use which
  3. How to open a terminal (Mac / Windows / editor-integrated terminal)
  4. The five essential commands: pwd, ls, cd, mv, cp
  5. Four dangerous commands and the safety rules that go with them
  6. Why the CLI is worth learning in the age of AI agents

What is a terminal? A text command window into your computer

A terminal is a tool for operating your computer by typing text. Normally you click icons with a mouse to open folders or move files; in a terminal, you do the same operations with text (commands).

Commands typed into the terminal go straight to the operating system (macOS or Windows). Creating, moving, and deleting files, running programs — almost everything inside your computer can be controlled from here.

Crucially, AI agents such as Claude Code and Codex run inside the terminal. Knowing the basics lets you understand what your agent is doing behind the scenes — and give it sharper instructions.

Illustration of a development environment setup including the terminal

GUI vs. CLI

AspectGUI (graphical user interface)CLI (command-line interface)
OperationMouse and touch, visually orientedTyped text, efficiency oriented
SpeedOne click at a timeOne command line executes instantly
Learning curveLow (you can see it)Somewhat higher (memorize commands)
AutomationHardEasy with scripts
AI compatibilityLimited tool supportExcellent — it is all text

The GUI's strength is intuitiveness; the CLI's strengths are speed on repetitive work and easy automation and scripting. To reach a folder four levels deep, the GUI takes four double-clicks; the CLI arrives with a single line.

The decisive factor is AI compatibility. AI agents work by reading and writing text — they cannot click GUI buttons. Knowing CLI basics is what lets you direct an agent precisely.

How to open a terminal

On a Mac

  1. Spotlight search: Cmd + Space → type "Terminal" → Enter
  2. Finder: Applications → Utilities → Terminal.app
  3. Cursor / VS Code integrated terminal: Ctrl + ` (backtick)

On Windows (WSL2)

  1. Open Windows Terminal and select the Ubuntu (WSL) tab
  2. When the bash prompt appears you are ready — the same commands as Mac/Linux work
  3. Cursor / VS Code integrated terminal: Ctrl + ` (backtick)

In practice, the Cursor / VS Code integrated terminal (Ctrl + `) is the most convenient: it appears right at the bottom of your editor, in the same window as your AI agent.

The five essential commands

CommandRoleDescription
pwdShow current locationPrints the path of the folder (directory) you are in
lsList filesLists the contents of the current folder
cdChange folderMoves into the specified folder; cd .. goes one level up
mvMove / renameMoves a file or folder, or renames it
cpCopyDuplicates a file; the -r option copies a whole folder

In action:

pwd                          # check where you are
/Users/you/projects

ls                           # list files
Desktop  Documents  Downloads  projects

cd projects                  # move into a folder
cd ..                        # go one level up
cd ~/Desktop                 # jump straight to Desktop

mv report.txt archive/       # move into the archive folder
mv old-name.txt new-name.txt # rename

cp memo.txt memo-backup.txt  # copy a file
cp -r my-app my-app-backup   # copy a whole folder

Two habits that will save you grief:

  1. Tab completes names — press Tab partway through a file or folder name and it autocompletes. No more typing long names; use it constantly
  2. When in doubt, pwd — working in the wrong folder causes "file not found" errors. Make checking your location with pwd a reflex

Dangerous commands: irreversible if you don't know them

The following commands can destroy data permanently. Always read what you are about to run.

CommandDanger
rm -rfDeletes a folder and all its contents without confirmation. rm -rf / destroys the entire system
sudo + a dangerous commandRuns with administrator rights, so a wrong command can damage system files
chmod 777Grants read/write/execute to all users — a serious security risk
> filenameOverwrites the file with empty content; precious file contents vanish in an instant

Four safety rules

  1. Use rm -i (interactive mode) instead of rm, confirming one item at a time
  2. Run ls to inspect the target before deleting
  3. Understand any command copied from the internet before running it
  4. Keep important files under Git version control or backed up

The same applies when an AI agent proposes a terminal command: read it before executing. Most agents ask for confirmation before dangerous operations, but the final judgment is a human job. For configuring guardrails — telling the agent what it must never do — see Prompt Injection and LLM Security.

When an error appears: how to hand it to your AI agent

If the terminal throws an error and you want to ask an AI agent for help, copy the entire error message. A truncated error makes the cause impossible to pin down. Every line displayed is a clue, not just the first one.

State what you were trying to do, plus what is happening now (the full error text or a screenshot) — that pairing is the fastest way to learn the terminal with an AI agent as your tutor. To get a whole team trained hands-on, see our corporate AI agent training.

Frequently asked questions

Q. Are "terminal" and "CLI" the same thing? A. Strictly speaking, CLI (command-line interface) is the method of operating by typing text, while the terminal is the screen (tool) you use to do it. In everyday conversation they are used interchangeably. The contrasting concept is the GUI (graphical user interface), operated with mouse and touch. Opening a folder is a double-click in the GUI and a cd folder-name command in the CLI.

Q. Do non-engineers really need to learn the terminal? A. If you use AI agents, the basics are worth knowing. Agents like Claude Code and Codex run inside the terminal and work by reading and writing text — they cannot click GUI buttons. Just knowing the five essential commands (pwd, ls, cd, mv, cp) and the dangerous ones lets you understand what your agent is doing and sanity-check the commands it proposes.

Q. Which commands should I memorize first? A. Five: pwd (show current location), ls (list files), cd (change folder), mv (move/rename), and cp (copy). Together they cover basic file management end to end. Add two habits — Tab autocompletes file names, and pwd confirms where you are whenever in doubt — and most beginner stumbles disappear.

Q. Why is rm -rf so dangerous? A. Because it deletes a folder and everything inside it instantly, without confirmation, and irreversibly. Unlike the GUI trash can, there is no undo. rm -rf / destroys the entire system. Protect yourself by using rm -i (interactive mode) to confirm one item at a time, inspecting targets with ls before deleting, keeping important files in Git or backups, and always reading any rm command an AI agent proposes before executing it.

Q. Can I use the same commands on Windows as on a Mac? A. Yes, via WSL2 (Windows Subsystem for Linux). Open the Ubuntu (WSL) tab in Windows Terminal, and once the bash prompt appears, the same commands as Mac/Linux (pwd, ls, cd, and so on) work as-is. The Cursor / VS Code integrated terminal (Ctrl + `) also feels identical on every OS, so when working with AI agents, the integrated terminal is the easiest place to start.

Related articles

Ready to put AI agents to work?

Turn what you just read into real workflows. AI Agent Camp helps non-technical professionals go from using to building — hands-on.

Last reviewed: 2026-06-10

Terminal & CLI Basics for Non-Engineers: Essential Commands 2026