Shell, filesystem, filtering, permissions, package managers, PowerShell, and Command Prompt essentials.
01 — Shell Essentials
Where Am I? / Help
pwd
whoami
echo $SHELL
command -v node
man ls
cmd --help
history
clear
Files & Folders
ls -la
cd path
cd ..
mkdir -p a/b
touch file.txt
cp file copy
cp -R src dst
mv old new
rm file
rm -rf folder
Read & Inspect
cat file
less file
head -n 20 file
tail -n 20 file
tail -f app.log
wc -l file
du -sh folder
df -h
Search & Filter
grep -n "text" file
grep -Rni "text" .
find . -name "*.js"
find . -type f -mtime -1
sort file
uniq -c
cut -d, -f1 file.csv
xargs command
Pipes & Operators
a | b
a > file
a >> file
a 2> err.log
a 2>&1
a && b
a || b
a ; b
$(command)
VAR=value cmd
PowerShell Essentials
Get-Location
Get-ChildItem
Set-Location path
New-Item -ItemType Directory x
Copy-Item a b -Recurse
Move-Item a b
Remove-Item x -Recurse
Get-Content file
Select-String "text" file
Get-Command node
Get-Process
Stop-Process -Id 1234
$env:NAME
$env:NAME="value"
OS Package Managers
brew update
brew install git
brew upgrade
brew list
sudo apt update
sudo apt install git
winget search git
winget install Git.Git
Command Prompt: Common Basics
dir
cd path
mkdir folder
copy a b
move a b
del file
type file
where node
set NAME=value
cls
NOTE
Version control, GitHub CLI, SSH, HTTP/network checks, and VS Code terminal commands.
02 — Git, GitHub & Developer Tools
Git: Start & Config
git --version
git config --global user.name "Name"
git config --global user.email "you@example.com"
git init
git clone URL
git status
Stage & Commit
git add file
git add .
git diff
git diff --staged
git commit -m "message"
git commit --amend
Branches
git branch
git switch branch
git switch -c feature
git merge feature
git branch -d feature
git branch -D feature
Inspect History
git log --oneline
git log --graph --decorate --all --oneline
git show COMMIT
git blame file
Remotes & Sync
git remote -v
git fetch
git pull
git push
git push -u origin feature
git push --tags
git tag -a v1.0.0 -m "release"
Undo Safely
git restore file
git restore --staged file
git revert COMMIT
git reset --soft HEAD~1
git reset --hard HEAD~1
git stash
git stash list
git stash pop
GitHub CLI (gh)
gh auth login
gh repo clone OWNER/REPO
gh repo create
gh pr create
gh pr checkout 123
gh pr view --web
gh issue list
gh workflow list
NOTE
gh help or gh <command> --help for current options.
SSH & File Transfer
ssh user@host
ssh-keygen -t ed25519 -C "email"
ssh-add ~/.ssh/id_ed25519
scp file user@host:/path
scp -r dir user@host:/path
rsync -av src/ host:/dest/
ssh -T git@github.com
HTTP / Network Checks
curl URL
curl -I URL
curl -L URL
curl -X POST URL -H "Content-Type: application/json" -d '{"x":1}'
ping host
dig example.com
nslookup example.com
lsof -i :5173
curl localhost:3000
VS Code Terminal CLI
code .
code file.js
code -n .
code --version
code --list-extensions
code --install-extension ID
Ctrl+`
Cmd+`
Ctrl+Shift+P / Cmd+Shift+P
Node.js, npm, package managers, TypeScript, linting, testing, semver, and dependency troubleshooting.
03 — Node.js & JavaScript Tooling
Node & npm Basics
node -v
npm -v
node file.js
node --watch server.js
node -e "console.log(1+1)"
npm init -y
npm install
npm ci
npm install package
npm install -D package
npm uninstall package
npm Inspect & Maintain
npm outdated
npm update
npm audit
npm audit fix
npm ls
npm explain package
npm view package version
npm cache verify
npm Scripts
npm run
npm run dev
npm test
npm run build
npm start
npm run name -- --flag
npm exec -- eslint .
npx package args
NVM: Node Versions
nvm install --lts
nvm use --lts
nvm install 22
nvm use 22
nvm ls
nvm alias default lts/*
NOTE
Package Manager Equivalents
TypeScript
npx tsc --init
npx tsc
npx tsc --noEmit
npx tsc -w
npx tsx file.ts
Lint & Format
npx eslint .
npx eslint . --fix
npx prettier . --check
npx prettier . --write
Testing
npx vitest
npx vitest run
npx jest
npx playwright test
npx playwright test --ui
npx playwright show-report
Semver Quick Read
1.2.3
^1.2.3
~1.2.3
1.2.3
latest
When Installs Are Weird
npm ci
npm cache verify
rm -rf node_modules && npm install
npm install package@latest
NOTE
Frontend and full-stack JavaScript framework CLIs, environment variables, project flow, and security habits.
04 — Frontend & Full-Stack Framework CLIs
Frontend Framework Quick Starts
Express / Node API
npm init -y
npm install express
node server.js
node --watch server.js
npx express-generator app
NestJS
npx @nestjs/cli@latest new app
npm run start:dev
npx nest g module users
npx nest g controller users
npx nest g service users
npx nest g resource users
Prisma ORM
npx prisma init
npx prisma migrate dev --name init
npx prisma generate
npx prisma studio
npx prisma db pull
npx prisma db push
npx prisma migrate deploy
NOTE
Environment Variables
export API_URL=http://localhost:3000
API_URL=x npm run dev
$env:API_URL="x"
node --env-file=.env server.js
printenv API_URL
Get-ChildItem Env:
Common JavaScript Project Flow
Use this sequence when opening an existing JavaScript project with a valid lockfile and an environment template.
git clone URL
cd project
npm ci
cp .env.example .env
npm run dev
npm test
npm run build
git status
Security Habits
.env
.gitignore
npm audit
--help
tokens/keys
Database shells and essential commands plus Python, .NET, and Java build/runtime tooling.
05 — Databases, SQL Shells & Other Runtimes
PostgreSQL / psql
psql -U postgres
psql -d appdb
\l
\c appdb
\dt
\d users
\q
createdb appdb
dropdb appdb
pg_dump appdb > backup.sql
MySQL Client
mysql -u root -p
SHOW DATABASES;
USE appdb;
SHOW TABLES;
DESCRIBE users;
exit
mysqldump -u root -p appdb > backup.sql
SQLite
sqlite3 app.db
.tables
.schema users
.headers on
.mode column
.quit
SQL Essentials
SELECT * FROM users;
SELECT ... WHERE ...;
INSERT INTO t (...) VALUES (...);
UPDATE t SET x=... WHERE ...;
DELETE FROM t WHERE ...;
CREATE TABLE ...;
ALTER TABLE ...;
DROP TABLE ...;
BEGIN; / COMMIT;
ROLLBACK;
MongoDB Shell
mongosh
show dbs
use appdb
show collections
db.users.find()
db.users.findOne({email:"a@b.com"})
db.users.countDocuments()
Redis CLI
redis-cli
PING
SET key value
GET key
DEL key
SCAN 0
TTL key
Python Environments & pip
python3 --version
python3 -m venv .venv
source .venv/bin/activate
.venv\Scripts\Activate.ps1
python -m pip install -U pip
python -m pip install package
python -m pip install -r requirements.txt
python -m pip freeze > requirements.txt
deactivate
Python Web Quick Starts
python app.py
flask --app app run --debug
django-admin startproject site
python manage.py runserver
python manage.py makemigrations
python manage.py migrate
pytest
.NET CLI
dotnet --info
dotnet new webapi -n Api
dotnet restore
dotnet build
dotnet run
dotnet watch
dotnet test
dotnet add package NAME
Java / Maven / Gradle
java --version
javac File.java
mvn -v
mvn clean test
mvn spring-boot:run
./gradlew build
./gradlew test
./gradlew bootRun
Docker, Compose, Kubernetes, cloud CLI checks, common ports, troubleshooting, and high-risk commands.
06 — Docker, Cloud & Troubleshooting
Docker Essentials
docker --version
docker info
docker pull image
docker images
docker ps
docker ps -a
docker run --rm -it image sh
docker run -p 3000:3000 image
docker build -t app:dev .
docker exec -it NAME sh
docker logs -f NAME
docker stop NAME
docker rm NAME
Docker Cleanup
docker volume ls
docker network ls
docker system df
docker image prune
docker container prune
docker system prune
Docker Compose
docker compose up
docker compose up -d
docker compose up --build
docker compose ps
docker compose logs -f
docker compose exec api sh
docker compose build
docker compose build --no-cache
docker compose pull
docker compose down
docker compose down -v
Kubernetes Basics
kubectl config current-context
kubectl get pods
kubectl get all
kubectl describe pod NAME
kubectl logs -f POD
kubectl exec -it POD -- sh
kubectl apply -f file.yaml
kubectl delete -f file.yaml
kubectl rollout status deploy/APP
kubectl port-forward svc/app 8080:80
Cloud CLI Identity Checks
aws configure
aws sts get-caller-identity
aws s3 ls
az login
az account show
az group list -o table
gcloud auth login
gcloud config get-value project
gcloud projects list
NOTE
Ports Developers See Often
Fast Troubleshooting Loop
Run these checks in order to confirm location, source state, runtime availability, dependencies, ports, containers, logs, and HTTP response.
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
High-Risk Commands: Slow Down
rm -rf PATH
git reset --hard
git clean -fd
docker compose down -v
DROP DATABASE / DROP TABLE
DELETE / UPDATE without WHERE
sudo
NOTE
pwd, inspect the exact path/resource, make a backup when data matters, and prefer reversible commands when possible.