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:
- Press
Cmd + Space(opens Spotlight) - Type
Terminal - Press Enter
On Windows:
- Press the Windows key
- Type
PowerShell - 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?"
| Part | What it means |
|---|---|
username | Who you are |
computer-name | Which 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.lsalone doesn't show them.ls -lashows 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/workspacemeans:
- 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:
- Type to edit (arrow keys to move around)
Ctrl+Othen Enter = Save (O for "Output")Ctrl+X= Exit (X for "eXit")
The shortcuts are shown at the bottom of the screen.
^Omeans Ctrl+O.^Xmeans 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
rmsomething, 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
CtrlandCat the same time.
This cancels whatever is currently running. Use it when:
- Something is stuck
- You typed the wrong command
- A program is running and you want it to stop
- The model selection prompt appears on DigitalOcean SSH login
It's the emergency stop button. Memorize it. Love it.
Understanding file paths
/root/.openclaw/workspace/SOUL.md
Read it like a home address:
| Part | Meaning |
|---|---|
/ | 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.md | The 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
| Shortcut | What it does | When to use it |
|---|---|---|
Ctrl+C | Cancel/stop | Something is stuck or wrong |
Ctrl+D | Close session | Done working, want to disconnect |
Ctrl+L | Clear screen | Same as clear but faster |
Up Arrow | Previous command | Repeat what you just typed |
Down Arrow | Next command | Go forward in history |
Tab | Auto-complete | Start typing a filename, press Tab to finish it |
Ctrl+A | Jump to start of line | Cursor goes to the beginning |
Ctrl+E | Jump to end of line | Cursor 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
| Part | Meaning |
|---|---|
ssh | The command ("Secure Shell — dial this number") |
root | Which user to log in as (root = admin) |
@ | The "at" separator |
174.138.77.26 | The 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:
| Error | What it means | What to do |
|---|---|---|
command not found | You typed something the terminal doesn't recognize | Check spelling. Did you install the program? |
No such file or directory | The file/folder doesn't exist | Check the path. Use ls to see what's there |
Permission denied | You don't have access | Try adding sudo before the command |
Connection refused | The server isn't accepting connections | Is the service running? Check with systemctl status |
Connection timed out | Can't reach the server | Check 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 ./
