Command cheat sheet
Every command in the simulator, with examples. Search by name or description.
Unix ↔ Windows (cmd) equivalents
| Unix | Windows (cmd) | What it does |
|---|---|---|
ls | dir | list files and folders |
mkdir | md | create a folder |
cat | type | print a file's contents |
cp | copy | copy |
mv | move | move / rename |
rm | del | delete |
grep | findstr | find lines matching a pattern |
find | dir /s /b | find files |
head | more | first lines of a file |
tail | more | last lines of a file |
env | set | print environment variables |
export | set | set an environment variable |
less | more | page through a file |
more | more | page through a file |
clear | cls | clear the screen |
man | help | full manual for a command |
pwdprint the current folder
pwd
cdchange folder
cd projects
touchcreate an empty file
touch notes.txt
echoprint text
echo hello > file.txt
mvmove / rename
mv old.txt new.txt
rmdelete
rm notes.txt (a folder: rm -r myfolder)
-r— recursively (for folders)-f— don't complain if it isn't there
grepfind lines matching a pattern
grep error log.txt
-i— ignore case-v— lines that don't match-n— with line numbers
findfind files
find . -name "*.txt"
treefolder and file tree
tree
uniqdrop repeated neighboring lines
sort names.txt | uniq
dusize of files and folders
du .
dffree disk space (simulated)
df -h
datecurrent date and time
date
basenamefile name from a path
basename /home/user/file.txt
dirnamefolder from a path
dirname /home/user/file.txt
chmodfile permissions (simulated)
chmod +x script.sh
whoamiprint your username
whoami
envprint environment variables
env
exportset an environment variable
export NAME=value · echo $NAME
aliascreate a command shortcut
alias gs='git status'
unaliasremove a shortcut
unalias gs
lesspage through a file
less log.txt
morepage through a file
more log.txt
clearclear the screen
clear
helplist of commands
help ls
manfull manual for a command
man ls
historycommands you have typed
history
gitversion control (simulated)
git init · git add . · git commit -m "…"
noderun Node.js (simulated)
node -v · node app.js
npmpackage manager (simulated)
npm install · npm run build
clauderun Claude Code (simulated)
claude
curlHTTP request (Claude API simulation)
curl https://api.anthropic.com/v1/messages -H "x-api-key: $KEY" -d '{…}'