← Back to Notes
AITerminalEducationOpenClaw

Terminal Primer for Dummies

A guide for people who have never typed a command in their life. Learn the 10 commands you actually need to talk to any server.

Ja'dan Johnson8 min read
Terminal window with code on a dark background

What is a terminal?

A terminal is a way to talk to a computer by typing instead of clicking. That's it.

On your laptop, you click on folders, drag files, and tap buttons. The terminal does the same things — open folders, read files, move things around — but with words instead of clicks.

Why use it? Because servers (like your DigitalOcean droplet) don't have a screen. There's no desktop, no mouse, no icons. The terminal is the ONLY way to talk to them.

Think of it this way:

  • Your laptop = a house with windows and doors (graphical interface)
  • A server = a house with only a mailbox slot (terminal)

You slide commands through the mailbox. The server slides answers back.

Opening the terminal

On a Mac:

  1. Press Cmd + Space (opens Spotlight)
  2. Type Terminal
  3. Press Enter

On Windows:

  1. Press the Windows key
  2. Type PowerShell
  3. Press Enter

On a server (via SSH):

ssh root@YOUR_SERVER_IP

This opens a terminal ON THE SERVER. Everything you type runs there, not on your laptop.

The prompt

When you open a terminal, you see something like:

username@computer-name:~$

This is the prompt. It's the terminal saying "I'm ready. What do you want?"

PartWhat it means
usernameWho you are
computer-nameWhich computer you're on
~Where you are (~ means "home folder")
$"I'm ready for your command"

On a DigitalOcean droplet, it looks like:

root@ubuntu-s-1vcpu-1gb-nyc1-01:~#

The # instead of $ means you're the admin (root).

The 10 commands you actually need

1. pwd — Where am I?

Stands for: Print Working Directory

pwd

Output:

/root

Like looking at the address bar in a file explorer. It tells you which folder you're in right now.

2. ls — What's in this folder?

Stands for: List

ls

Output:

Desktop  Documents  Downloads  .openclaw

Like opening a folder and seeing what's inside.

Useful variations:

ls -la          # Show EVERYTHING, including hidden files and details
ls -la .openclaw  # Show what's inside a specific folder

Files and folders that start with a dot (.openclaw) are hidden. ls alone doesn't show them. ls -la shows everything.

3. cd — Go into a folder

Stands for: Change Directory

cd .openclaw

Like double-clicking a folder to open it.

cd ..           # Go BACK one folder (like the back button)
cd ~            # Go HOME (back to your starting folder)
cd /            # Go to the very top of the file system

The / is important. Folders are separated by / (forward slash). So /root/.openclaw/workspace means:

  • Start at the top (/)
  • Go into root
  • Go into .openclaw
  • Go into workspace

4. cat — Read a file

Stands for: Concatenate (but just think "show me")

cat SOUL.md

Output:

# Identity
You are a capable, resourceful assistant...

Like opening a document in read-only mode. It dumps the entire file to your screen.

5. nano — Edit a file

nano SOUL.md

This opens a super simple text editor inside the terminal. It's like Notepad but uglier.

How to use nano:

  1. Type to edit (arrow keys to move around)
  2. Ctrl+O then Enter = Save (O for "Output")
  3. Ctrl+X = Exit (X for "eXit")

The shortcuts are shown at the bottom of the screen. ^O means Ctrl+O. ^X means Ctrl+X.

6. cp — Copy a file

Stands for: Copy

cp SOUL.md SOUL-backup.md

Makes a copy of SOUL.md called SOUL-backup.md. Like right-click → Copy → Paste → Rename.

cp -r workspace/ workspace-backup/    # Copy an entire folder (-r = recursive)

7. mv — Move or rename a file

Stands for: Move

mv old-name.md new-name.md       # Rename
mv SOUL.md workspace/SOUL.md     # Move to a different folder

Like dragging a file to a new location, or right-click → Rename.

8. rm — Delete a file

Stands for: Remove

rm unwanted-file.md

WARNING: There is NO recycle bin. No undo. When you rm something, it's gone forever.

rm -r old-folder/    # Delete a folder and everything inside it

Double-check before you rm. Always. Ask yourself: "Am I sure?"

9. clear — Clean up the screen

clear

Like clearing a whiteboard. Doesn't delete anything — just makes the screen readable again.

10. Ctrl+C — Stop everything

Not a typed command — a keyboard shortcut.

Press Ctrl and C at the same time.

This cancels whatever is currently running. Use it when:

It's the emergency stop button. Memorize it. Love it.

Understanding file paths

/root/.openclaw/workspace/SOUL.md

Read it like a home address:

PartMeaning
/The very top (root of the filesystem)
root/The root user's home folder
.openclaw/OpenClaw's config folder (hidden, starts with .)
workspace/Where personality/skills live
SOUL.mdThe actual file

Absolute path: Starts with /. Like a full street address. Always works no matter where you are.

cat /root/.openclaw/workspace/SOUL.md

Relative path: Starts from where you ARE right now. Like saying "it's three doors down."

cd .openclaw
cat workspace/SOUL.md

Essential keyboard shortcuts

ShortcutWhat it doesWhen to use it
Ctrl+CCancel/stopSomething is stuck or wrong
Ctrl+DClose sessionDone working, want to disconnect
Ctrl+LClear screenSame as clear but faster
Up ArrowPrevious commandRepeat what you just typed
Down ArrowNext commandGo forward in history
TabAuto-completeStart typing a filename, press Tab to finish it
Ctrl+AJump to start of lineCursor goes to the beginning
Ctrl+EJump to end of lineCursor goes to the end

Tab completion is your best friend. Type the first few letters of a filename, then press Tab. If there's only one match, it auto-completes. If there are multiple matches, press Tab twice to see all options.

Connecting to your server (SSH)

ssh root@174.138.77.26
PartMeaning
sshThe command ("Secure Shell — dial this number")
rootWhich user to log in as (root = admin)
@The "at" separator
174.138.77.26The server's IP address (its phone number)

SSH = making a phone call to your server. Your laptop dials the number (IP address), the server answers, and now you're controlling it remotely. Everything you type happens on the server, not your laptop.

To hang up:

exit

Or press Ctrl+D.

Copying files between laptop and server

# Copy a file FROM your laptop TO the server
scp myfile.txt root@174.138.77.26:/root/myfile.txt

# Copy a file FROM the server TO your laptop
scp root@174.138.77.26:/root/SOUL.md ./SOUL.md

# Copy an entire folder FROM the server TO your laptop
scp -r root@174.138.77.26:/root/.openclaw/workspace/ ./workspace/

scp = "Secure Copy." It copies files through the same secure connection as SSH.

Reading error messages

Error messages look scary but they usually tell you exactly what's wrong:

ErrorWhat it meansWhat to do
command not foundYou typed something the terminal doesn't recognizeCheck spelling. Did you install the program?
No such file or directoryThe file/folder doesn't existCheck the path. Use ls to see what's there
Permission deniedYou don't have accessTry adding sudo before the command
Connection refusedThe server isn't accepting connectionsIs the service running? Check with systemctl status
Connection timed outCan't reach the serverCheck the IP address. Is the server on?

Don't panic. Read the error message. It's trying to help you. 90% of the time, the error message tells you exactly what went wrong.

Cheat sheet (print this out)

WHERE AM I?          pwd
WHAT'S HERE?         ls (or ls -la for hidden files)
GO INTO FOLDER       cd foldername
GO BACK              cd ..
GO HOME              cd ~
READ A FILE          cat filename
EDIT A FILE          nano filename (Ctrl+O save, Ctrl+X exit)
COPY                 cp source destination
MOVE / RENAME        mv source destination
DELETE               rm filename (NO UNDO!)
CLEAR SCREEN         clear (or Ctrl+L)
STOP EVERYTHING      Ctrl+C
DISCONNECT           exit (or Ctrl+D)
CONNECT TO SERVER    ssh root@IP_ADDRESS
COPY TO SERVER       scp file root@IP:/path/
COPY FROM SERVER     scp root@IP:/path/file ./
Ja'dan Johnson

Written by

Ja'dan Johnson

Developer Marketing Manager & Community Architect

Community architect, creative technologist, and ecosystem builder operating at the intersection of technology, culture, and human systems.

Share this note