DEVELOPER SANDBOX Academy of Mastery
Full-Stack Developer Terminal Commands

A practical developer reference for commonly used Terminal, shell, version-control, JavaScript tooling, framework, database, container, cloud, and troubleshooting commands.

Return to sdelgado
REFERENCE GUIDE

Full-Stack Developer Terminal Commands

A practical developer reference for commonly used Terminal, shell, version-control, JavaScript tooling, framework, database, container, cloud, and troubleshooting commands.

Shell, filesystem, filtering, permissions, package managers, PowerShell, and Command Prompt essentials.

2026 Edition

01 — Shell Essentials

Shell Essentials

Where Am I? / Help

pwd
Print current directory.
whoami
Show current user.
echo $SHELL
Show active Unix shell.
command -v node
Find an executable in PATH.
man ls
Open Unix manual page.
cmd --help
Most CLIs: show built-in help.
history
Recent shell commands.
clear
Clear terminal screen.
Shell Essentials

Files & Folders

ls -la
List all files with details.
cd path
Change directory.
cd ..
Move up one directory.
mkdir -p a/b
Create nested directories.
touch file.txt
Create empty file / update time.
cp file copy
Copy file.
cp -R src dst
Copy directory recursively.
mv old new
Move or rename.
rm file
Delete file.
rm -rf folder
DOUBLE-CHECK path. Force-delete directory tree.
Shell Essentials

Read & Inspect

cat file
Print entire small file.
less file
Scrollable file viewer.
head -n 20 file
First 20 lines.
tail -n 20 file
Last 20 lines.
tail -f app.log
Follow a growing log.
wc -l file
Count lines.
du -sh folder
Human-readable folder size.
df -h
Disk free space.
Shell Essentials

Search & Filter

grep -n "text" file
Find text + line numbers.
grep -Rni "text" .
Recursive, case-insensitive search.
find . -name "*.js"
Find files by name pattern.
find . -type f -mtime -1
Files modified in last day.
sort file
Sort lines.
uniq -c
Count adjacent duplicate lines.
cut -d, -f1 file.csv
Select delimited field.
xargs command
Build command args from stdin.
Shell Essentials

Pipes & Operators

a | b
Pipe stdout of a into b.
a > file
Overwrite file with stdout.
a >> file
Append stdout to file.
a 2> err.log
Redirect stderr.
a 2>&1
Send stderr to stdout.
a && b
Run b only if a succeeds.
a || b
Run b only if a fails.
a ; b
Run sequentially regardless.
$(command)
Substitute command output.
VAR=value cmd
Set env var for one command.
Shell Essentials

Permissions & Processes

ls -la
View permissions/owners.
chmod +x script.sh
Make script executable.
chmod 755 file
Owner rwx; others r-x.
sudo command
Run command elevated.
ps aux
List processes.
lsof -i :3000
Find process using port 3000.
kill PID
Ask process to stop.
kill -9 PID
Force kill; last resort.
jobs / fg / bg
Manage shell jobs.
Ctrl+C / Ctrl+Z
Interrupt / suspend process.
Shell Essentials

PowerShell Essentials

Get-Location
Current directory (pwd alias).
Get-ChildItem
List items (ls alias).
Set-Location path
Change directory (cd alias).
New-Item -ItemType Directory x
Create folder.
Copy-Item a b -Recurse
Copy file/folder.
Move-Item a b
Move / rename.
Remove-Item x -Recurse
Delete tree; inspect path first.
Get-Content file
Print file.
Select-String "text" file
Search text.
Get-Command node
Locate command.
Get-Process
List processes.
Stop-Process -Id 1234
Stop process by PID.
$env:NAME
Read env variable.
$env:NAME="value"
Set env variable for session.
Shell Essentials

OS Package Managers

brew update
macOS: refresh Homebrew metadata.
brew install git
macOS: install package.
brew upgrade
macOS: upgrade installed formulae.
brew list
macOS: list installed packages.
sudo apt update
Debian/Ubuntu: refresh indexes.
sudo apt install git
Debian/Ubuntu: install package.
winget search git
Windows: search packages.
winget install Git.Git
Windows: install package.
Shell Essentials

Command Prompt: Common Basics

dir
List directory.
cd path
Change directory.
mkdir folder
Create folder.
copy a b
Copy file.
move a b
Move/rename.
del file
Delete file.
type file
Print file.
where node
Locate executable.
set NAME=value
Set env var for session.
cls
Clear screen.
NOTE
For development on Windows, PowerShell or WSL usually gives a richer workflow than classic cmd.exe.

Version control, GitHub CLI, SSH, HTTP/network checks, and VS Code terminal commands.

2026 Edition

02 — Git, GitHub & Developer Tools

Git, GitHub & Developer Tools

Git: Start & Config

git --version
Check Git version.
git config --global user.name "Name"
Set commit author name.
git config --global user.email "you@example.com"
Set commit email.
git init
Create repository in current folder.
git clone URL
Clone remote repository.
git status
Show branch + working tree status.
Git, GitHub & Developer Tools

Stage & Commit

git add file
Stage one file.
git add .
Stage changes under current directory.
git diff
Unstaged changes.
git diff --staged
Staged changes.
git commit -m "message"
Create commit.
git commit --amend
Replace most recent commit.
Git, GitHub & Developer Tools

Branches

git branch
List local branches.
git switch branch
Switch branch.
git switch -c feature
Create + switch branch.
git merge feature
Merge feature into current branch.
git branch -d feature
Delete merged local branch.
git branch -D feature
Force-delete local branch.
Git, GitHub & Developer Tools

Inspect History

git log --oneline
Compact history.
git log --graph --decorate --all --oneline
Visual branch graph.
git show COMMIT
Inspect a commit.
git blame file
Show line-by-line authorship.
Git, GitHub & Developer Tools

Remotes & Sync

git remote -v
List remote URLs.
git fetch
Download remote refs; no merge.
git pull
Fetch + integrate current branch.
git push
Push current branch.
git push -u origin feature
Push + set upstream.
git push --tags
Push tags.
git tag -a v1.0.0 -m "release"
Create annotated tag.
Git, GitHub & Developer Tools

Undo Safely

git restore file
Discard unstaged file changes.
git restore --staged file
Unstage; keep file changes.
git revert COMMIT
New commit that reverses a commit.
git reset --soft HEAD~1
Move HEAD back; keep changes staged.
git reset --hard HEAD~1
Destructive: discard commit + local changes.
git stash
Temporarily shelve changes.
git stash list
List stashes.
git stash pop
Reapply + remove latest stash.
Git, GitHub & Developer Tools

GitHub CLI (gh)

gh auth login
Authenticate GitHub CLI.
gh repo clone OWNER/REPO
Clone GitHub repo.
gh repo create
Create repository interactively.
gh pr create
Open pull request.
gh pr checkout 123
Check out PR #123.
gh pr view --web
Open current PR in browser.
gh issue list
List issues.
gh workflow list
List Actions workflows.
NOTE
GitHub CLI is a separate install. Run gh help or gh <command> --help for current options.
Git, GitHub & Developer Tools

SSH & File Transfer

ssh user@host
Open SSH session.
ssh-keygen -t ed25519 -C "email"
Create modern SSH key.
ssh-add ~/.ssh/id_ed25519
Add private key to agent.
scp file user@host:/path
Copy file over SSH.
scp -r dir user@host:/path
Copy directory recursively.
rsync -av src/ host:/dest/
Efficient recursive sync.
ssh -T git@github.com
Test GitHub SSH auth.
Git, GitHub & Developer Tools

HTTP / Network Checks

curl URL
GET a URL.
curl -I URL
Headers only.
curl -L URL
Follow redirects.
curl -X POST URL -H "Content-Type: application/json" -d '{"x":1}'
POST JSON.
ping host
Basic reachability.
dig example.com
DNS lookup (Unix).
nslookup example.com
DNS lookup (cross-platform).
lsof -i :5173
Find Unix process on port.
curl localhost:3000
Quick local-server test.
Git, GitHub & Developer Tools

VS Code Terminal CLI

code .
Open current folder.
code file.js
Open file.
code -n .
Open in new window.
code --version
Show VS Code version.
code --list-extensions
List extensions.
code --install-extension ID
Install extension by ID.
Ctrl+`
Toggle integrated terminal (Win/Linux).
Cmd+`
Toggle integrated terminal (macOS).
Ctrl+Shift+P / Cmd+Shift+P
Command Palette.

Node.js, npm, package managers, TypeScript, linting, testing, semver, and dependency troubleshooting.

2026 Edition

03 — Node.js & JavaScript Tooling

Node.js & JavaScript Tooling

Node & npm Basics

node -v
Node.js version.
npm -v
npm CLI version.
node file.js
Run JavaScript file.
node --watch server.js
Restart on file changes.
node -e "console.log(1+1)"
Run one-line JavaScript.
npm init -y
Create package.json with defaults.
npm install
Install dependencies from package.json.
npm ci
Clean, lockfile-exact install; ideal CI.
npm install package
Add production dependency.
npm install -D package
Add devDependency.
npm uninstall package
Remove dependency.
Node.js & JavaScript Tooling

npm Inspect & Maintain

npm outdated
Show outdated dependencies.
npm update
Update within allowed semver ranges.
npm audit
Report known dependency issues.
npm audit fix
Apply compatible security updates.
npm ls
Show installed dependency tree.
npm explain package
Why a package is installed.
npm view package version
Registry package info.
npm cache verify
Verify/compact npm cache.
Node.js & JavaScript Tooling

npm Scripts

npm run
List available package scripts.
npm run dev
Run dev script.
npm test
Run test script.
npm run build
Run build script.
npm start
Run start script.
npm run name -- --flag
Pass args through to script.
npm exec -- eslint .
Run package binary via npm.
npx package args
Run local/temporary package binary.
Node.js & JavaScript Tooling

NVM: Node Versions

nvm install --lts
Install latest LTS Node.
nvm use --lts
Use LTS Node in shell.
nvm install 22
Install a major version.
nvm use 22
Switch active Node version.
nvm ls
List installed Node versions.
nvm alias default lts/*
Default future shells to LTS.
NOTE
nvm commands require nvm (or nvm-windows on Windows). The two projects differ slightly.
Node.js & JavaScript Tooling

Package Manager Equivalents

npm
  • npm installInstall project dependencies.
  • npm install packageAdd dependency.
  • npm install -D packageAdd devDependency.
  • npm uninstall packageRemove dependency.
  • npm updateUpdate packages.
pnpm
  • pnpm installInstall project dependencies.
  • pnpm add packageAdd dependency.
  • pnpm add -D packageAdd devDependency.
  • pnpm remove packageRemove dependency.
  • pnpm updateUpdate packages.
  • pnpm outdatedShow outdated packages.
  • pnpm run devRun package script.
  • pnpm exec eslint .Run local binary.
  • pnpm dlx create-viteRun one-off package.
  • pnpm store pruneRemove unreferenced store packages.
Yarn
  • yarn installInstall dependencies.
  • yarn add packageAdd dependency.
  • yarn add -D packageAdd devDependency.
  • yarn remove packageRemove dependency.
  • yarn up packageUpgrade dependency.
  • yarn run devRun script.
  • yarn dlx packageRun one-off package.
  • yarn why packageWhy package is present.
Node.js & JavaScript Tooling

TypeScript

npx tsc --init
Create tsconfig.json.
npx tsc
Compile project.
npx tsc --noEmit
Type-check without output.
npx tsc -w
Watch + recompile.
npx tsx file.ts
Run TS directly when tsx is installed.
Node.js & JavaScript Tooling

Lint & Format

npx eslint .
Lint project.
npx eslint . --fix
Auto-fix safe lint issues.
npx prettier . --check
Check formatting.
npx prettier . --write
Rewrite files to formatter rules.
Node.js & JavaScript Tooling

Testing

npx vitest
Run Vitest in watch mode.
npx vitest run
Single Vitest run.
npx jest
Run Jest.
npx playwright test
Run Playwright tests.
npx playwright test --ui
Open Playwright UI mode.
npx playwright show-report
Open HTML report.
Node.js & JavaScript Tooling

Semver Quick Read

1.2.3
major.minor.patch.
^1.2.3
Allow compatible minor/patch updates.
~1.2.3
Allow patch updates within 1.2.x.
1.2.3
Exact version when no range operator.
latest
Registry distribution tag; not a range.
Node.js & JavaScript Tooling

When Installs Are Weird

npm ci
First choice when lockfile is valid.
npm cache verify
Check cache before deleting things.
rm -rf node_modules && npm install
Rebuild local dependency tree.
npm install package@latest
Explicitly request current latest tag.
NOTE
Avoid casually deleting lockfiles: they preserve reproducible dependency versions and often belong in source control.

Frontend and full-stack JavaScript framework CLIs, environment variables, project flow, and security habits.

2026 Edition

04 — Frontend & Full-Stack Framework CLIs

Frontend & Full-Stack Framework CLIs

Frontend Framework Quick Starts

Vite
  • npm create vite@latestInteractive scaffold.
  • npm create vite@latest app -- --template react-tsReact + TypeScript scaffold.
  • cd app && npm installInstall after scaffold if needed.
  • npm run devStart Vite dev server.
  • npm run buildProduction build.
  • npm run previewPreview production build locally.
Next.js
  • npx create-next-app@latestScaffold a Next.js application.
  • npm run devDevelopment server.
  • npm run buildProduction build.
  • npm startRun built production server.
  • npx next infoPrint environment info for debugging.
Vue
  • npm create vue@latestOfficial Vue project scaffold.
  • npm installInstall dependencies.
  • npm run devDevelopment server.
  • npm run buildProduction build.
Angular
  • npx @angular/cli@latest new appCreate Angular workspace/app.
  • cd app && npm startStart configured dev script.
  • npx ng serveRun Angular dev server.
  • npx ng generate component nameGenerate component.
  • npx ng buildProduction build.
  • npx ng testRun configured tests.
Frontend & Full-Stack Framework CLIs

Express / Node API

npm init -y
Start package.json.
npm install express
Install Express.
node server.js
Run server entry file.
node --watch server.js
Built-in file watch restart.
npx express-generator app
Optional Express generator scaffold.
Frontend & Full-Stack Framework CLIs

NestJS

npx @nestjs/cli@latest new app
Scaffold Nest application.
npm run start:dev
Watch-mode dev server.
npx nest g module users
Generate module.
npx nest g controller users
Generate controller.
npx nest g service users
Generate service.
npx nest g resource users
Generate CRUD resource workflow.
Frontend & Full-Stack Framework CLIs

Prisma ORM

npx prisma init
Initialize Prisma project.
npx prisma migrate dev --name init
Create + apply dev migration.
npx prisma generate
Generate Prisma Client.
npx prisma studio
Open database GUI.
npx prisma db pull
Introspect existing database.
npx prisma db push
Push schema without migration history.
npx prisma migrate deploy
Apply pending migrations in deploy.
NOTE
Prisma v7 no longer guarantees that migrate dev will also run prisma generate; run generate explicitly when needed.
Frontend & Full-Stack Framework CLIs

Environment Variables

export API_URL=http://localhost:3000
Set Unix env var for shell.
API_URL=x npm run dev
Set Unix env var for one command.
$env:API_URL="x"
PowerShell: set for session.
node --env-file=.env server.js
Node: load env file at runtime.
printenv API_URL
Unix: print one env var.
Get-ChildItem Env:
PowerShell: list env vars.
Frontend & Full-Stack Framework CLIs

Common JavaScript Project Flow

Typical project start-up flow

Use this sequence when opening an existing JavaScript project with a valid lockfile and an environment template.

Example
git clone URL
cd project
npm ci
cp .env.example .env
npm run dev
npm test
npm run build
git status
Frontend & Full-Stack Framework CLIs

Security Habits

.env
Keep secrets out of committed source.
.gitignore
Ignore local secrets/build artifacts.
npm audit
Review dependency advisories.
--help
Read current CLI options before destructive operations.
tokens/keys
Use secret managers or environment variables; never paste into public repos.

Database shells and essential commands plus Python, .NET, and Java build/runtime tooling.

2026 Edition

05 — Databases, SQL Shells & Other Runtimes

Databases, SQL Shells & Other Runtimes

PostgreSQL / psql

psql -U postgres
Connect as user postgres.
psql -d appdb
Connect to database.
\l
List databases.
\c appdb
Connect/switch database.
\dt
List tables.
\d users
Describe table.
\q
Quit psql.
createdb appdb
Create database from OS shell.
dropdb appdb
DESTRUCTIVE. Drop database.
pg_dump appdb > backup.sql
Plain SQL backup.
Databases, SQL Shells & Other Runtimes

MySQL Client

mysql -u root -p
Connect and prompt for password.
SHOW DATABASES;
List databases.
USE appdb;
Select database.
SHOW TABLES;
List tables.
DESCRIBE users;
Describe table.
exit
Quit client.
mysqldump -u root -p appdb > backup.sql
SQL backup.
Databases, SQL Shells & Other Runtimes

SQLite

sqlite3 app.db
Open/create database file.
.tables
List tables.
.schema users
Show table schema.
.headers on
Show column headings.
.mode column
Readable column output.
.quit
Exit sqlite3.
Databases, SQL Shells & Other Runtimes

SQL Essentials

SELECT * FROM users;
Read rows.
SELECT ... WHERE ...;
Filter rows.
INSERT INTO t (...) VALUES (...);
Create row.
UPDATE t SET x=... WHERE ...;
Change rows; WHERE matters.
DELETE FROM t WHERE ...;
Delete rows; WHERE matters.
CREATE TABLE ...;
Create table.
ALTER TABLE ...;
Change table structure.
DROP TABLE ...;
DESTRUCTIVE. Delete table.
BEGIN; / COMMIT;
Start / save transaction.
ROLLBACK;
Undo uncommitted transaction.
Databases, SQL Shells & Other Runtimes

MongoDB Shell

mongosh
Open MongoDB shell.
show dbs
List databases.
use appdb
Switch/create-on-use database.
show collections
List collections.
db.users.find()
Query users collection.
db.users.findOne({email:"a@b.com"})
Find one matching document.
db.users.countDocuments()
Count documents.
Databases, SQL Shells & Other Runtimes

Redis CLI

redis-cli
Open Redis CLI.
PING
Server health check.
SET key value
Store string.
GET key
Read string.
DEL key
Delete key.
SCAN 0
Iterate keys safely.
TTL key
Seconds until expiration.
Databases, SQL Shells & Other Runtimes

Python Environments & pip

python3 --version
Check Python version.
python3 -m venv .venv
Create virtual environment.
source .venv/bin/activate
Activate on macOS/Linux.
.venv\Scripts\Activate.ps1
Activate in PowerShell.
python -m pip install -U pip
Upgrade pip in active Python.
python -m pip install package
Install package.
python -m pip install -r requirements.txt
Install pinned requirements.
python -m pip freeze > requirements.txt
Record environment packages.
deactivate
Leave virtual environment.
Databases, SQL Shells & Other Runtimes

Python Web Quick Starts

python app.py
Run a Python entry file.
flask --app app run --debug
Flask dev server.
django-admin startproject site
Create Django project.
python manage.py runserver
Django dev server.
python manage.py makemigrations
Create Django migrations.
python manage.py migrate
Apply Django migrations.
pytest
Run pytest suite.
Databases, SQL Shells & Other Runtimes

.NET CLI

dotnet --info
SDK/runtime information.
dotnet new webapi -n Api
Create Web API project.
dotnet restore
Restore NuGet packages.
dotnet build
Compile project.
dotnet run
Run application.
dotnet watch
Watch + rerun.
dotnet test
Run tests.
dotnet add package NAME
Add NuGet package.
Databases, SQL Shells & Other Runtimes

Java / Maven / Gradle

java --version
Java runtime version.
javac File.java
Compile Java source.
mvn -v
Maven version.
mvn clean test
Clean + run tests.
mvn spring-boot:run
Run Spring Boot via Maven.
./gradlew build
Gradle wrapper build.
./gradlew test
Gradle wrapper tests.
./gradlew bootRun
Run Spring Boot via Gradle.

Docker, Compose, Kubernetes, cloud CLI checks, common ports, troubleshooting, and high-risk commands.

2026 Edition

06 — Docker, Cloud & Troubleshooting

Docker, Cloud & Troubleshooting

Docker Essentials

docker --version
Docker CLI version.
docker info
Engine/system information.
docker pull image
Download image.
docker images
List local images.
docker ps
Running containers.
docker ps -a
All containers.
docker run --rm -it image sh
Temporary interactive container.
docker run -p 3000:3000 image
Map host:container port.
docker build -t app:dev .
Build image from Dockerfile.
docker exec -it NAME sh
Shell inside running container.
docker logs -f NAME
Follow container logs.
docker stop NAME
Stop container.
docker rm NAME
Remove stopped container.
Docker, Cloud & Troubleshooting

Docker Cleanup

docker volume ls
List volumes.
docker network ls
List networks.
docker system df
Disk used by Docker.
docker image prune
Remove dangling images.
docker container prune
Remove stopped containers.
docker system prune
Broad cleanup; review prompt carefully.
Docker, Cloud & Troubleshooting

Docker Compose

docker compose up
Create/start + attach.
docker compose up -d
Start in background.
docker compose up --build
Build then start.
docker compose ps
List project containers.
docker compose logs -f
Follow service logs.
docker compose exec api sh
Shell in service container.
docker compose build
Build/rebuild services.
docker compose build --no-cache
Rebuild without cache.
docker compose pull
Pull service images.
docker compose down
Stop/remove project containers/network.
docker compose down -v
High risk: also remove named volumes/data.
Docker, Cloud & Troubleshooting

Kubernetes Basics

kubectl config current-context
Show active cluster context.
kubectl get pods
List pods.
kubectl get all
Common workload/service objects.
kubectl describe pod NAME
Detailed pod diagnostics.
kubectl logs -f POD
Follow pod logs.
kubectl exec -it POD -- sh
Shell inside pod.
kubectl apply -f file.yaml
Create/update resources.
kubectl delete -f file.yaml
Delete resources from manifest.
kubectl rollout status deploy/APP
Watch deployment rollout.
kubectl port-forward svc/app 8080:80
Forward local port to service.
Docker, Cloud & Troubleshooting

Cloud CLI Identity Checks

aws configure
Configure AWS CLI credentials/defaults.
aws sts get-caller-identity
Confirm current AWS identity.
aws s3 ls
List accessible S3 buckets.
az login
Sign in to Azure CLI.
az account show
Current Azure subscription/account.
az group list -o table
List resource groups.
gcloud auth login
Sign in to Google Cloud CLI.
gcloud config get-value project
Show active GCP project.
gcloud projects list
List accessible projects.
NOTE
Cloud commands require the vendor CLI plus appropriate account permissions. Prefer SSO/short-lived credentials where your organization supports them.
Docker, Cloud & Troubleshooting

Ports Developers See Often

3000
  • Node / NextCommon Node/Next dev server.
5173
  • ViteCommon Vite dev server.
8000
  • Python / dev HTTPCommon Python/dev HTTP port.
8080
  • Alternate HTTPCommon alternate HTTP/app port.
5432
  • PostgreSQLPostgreSQL default port.
3306
  • MySQLMySQL default port.
6379
  • RedisRedis default port.
27017
  • MongoDBMongoDB default port.
Docker, Cloud & Troubleshooting

Fast Troubleshooting Loop

Fast troubleshooting sequence

Run these checks in order to confirm location, source state, runtime availability, dependencies, ports, containers, logs, and HTTP response.

Example
pwd && ls -la
git status
node -v
python --version
npm -v
docker --version
npm ci
printenv | sort
lsof -i :PORT
docker compose ps
docker compose logs -f
curl -I localhost:PORT
Docker, Cloud & Troubleshooting

High-Risk Commands: Slow Down

rm -rf PATH
Permanently removes files.
git reset --hard
Discards uncommitted changes.
git clean -fd
Deletes untracked files/directories.
docker compose down -v
Can erase local database volumes.
DROP DATABASE / DROP TABLE
Deletes database structures/data.
DELETE / UPDATE without WHERE
Can affect every row.
sudo
Runs with elevated privileges.
NOTE
Before destructive commands: verify pwd, inspect the exact path/resource, make a backup when data matters, and prefer reversible commands when possible.