Command Reference

A categorized collection of essential commands and shortcuts for developers. Your quick reference for tools, environments, and workflows.

Bash

CommandDescription
lsList directory contents
cdChange directory
pwdPrint working directory
mkdirCreate a new directory
rm -rfRemove files or directories recursively
touchCreate an empty file
cpCopy files or directories
mvMove or rename files or directories
grepSearch for patterns within files
chmodChange file permissions
chownChange file owner and group
tail -fFollow logs in real-time

Git

CommandDescription
git cloneClone a repository
git statusCheck the status of the repository
git commit -mCommit changes with a message
git pullFetch and merge changes from remote
git pushPush changes to the remote repository
git checkout -bCreate a new branch and switch to it
git rebaseReapply commits on top of another base tip
git mergeMerge a branch into the current branch
git logView commit history
git diffShow changes between commits, commit and working tree, etc.

Docker

CommandDescription
docker psList running containers
docker stopStop a running container
docker startStart a stopped container
docker exec -it <container_id> bashOpen an interactive terminal inside a container
docker build -t <tag> .Build a Docker image from the current directory
docker-compose upStart services defined in a docker-compose.yml file

VS Code

CommandDescription
Cmd + Shift + POpen command palette
Cmd + BToggle sidebar visibility
Cmd + PQuick file navigation
Cmd + /Comment/uncomment selected line(s)
Cmd + Shift + FFind in all files
Cmd + `Open integrated terminal

NPM

CommandDescription
npm installInstall dependencies
npm run <script>Run a script defined in package.json
npm startStart the project (usually for dev server)
npm auditCheck for vulnerabilities in the installed dependencies
npm outdatedCheck for outdated dependencies

Node.js

CommandDescription
node <file.js>Run a JavaScript file with Node.js
npm run devStart the development server
node --inspectStart Node.js in debugging mode

Shell

CommandDescription
historyView the command history
aliasCreate a shortcut for a command
clearClear the terminal screen

PostgreSQL

CommandDescription
psql -U <user> -d <database>Connect to a PostgreSQL database
SELECT * FROM <table>;Query all rows from a table
dtList all tables in the current database
pg_dump <db_name> > backup.sqlBackup a PostgreSQL database

Kubernetes

CommandDescription
kubectl get podsList all pods in the current namespace
kubectl describe pod <pod_name>Describe a specific pod
kubectl logs <pod_name>View logs of a pod
kubectl apply -f <file.yaml>Apply configuration from a YAML file

Linux

CommandDescription
topView system processes
htopInteractive process viewer (better than top)
df -hCheck disk space usage
free -hCheck system memory usage
uptimeDisplay system uptime

Regex

CommandDescription
/^\d+$/Matches a string that contains only digits
/^\w+$/Matches a string that contains only alphanumeric characters
/\b(?:foo|bar)\b/Matches the words 'foo' or 'bar'

Systemd

CommandDescription
systemctl status <service>Check the status of a service
systemctl restart <service>Restart a system service
systemctl enable <service>Enable a service to start on boot

General

CommandDescription
curl -O <url>Download a file from a URL
wget <url>Download files from the web
tar -xvf <file.tar>Extract a tarball
zip -r <file.zip> <dir>Zip a directory

AWS

CommandDescription
aws s3 lsList S3 buckets
aws s3 cp <file> s3://<bucket>Copy file to S3 bucket
aws ec2 describe-instancesList EC2 instances
aws logs tail <log-group>Tail CloudWatch logs

Python

CommandDescription
pip install <package>Install a Python package
python -m venv <env_name>Create virtual environment
source <env>/bin/activateActivate virtual environment
python -m pytestRun tests with pytest
python -m http.serverStart simple HTTP server

React

CommandDescription
npx create-react-app <name>Create new React app
npx create-next-app <name>Create new Next.js app
npm run buildBuild production bundle
npm run testRun test suite

Database

CommandDescription
mongoshConnect to MongoDB shell
redis-cliConnect to Redis CLI
mysql -u <user> -pConnect to MySQL

Network

CommandDescription
ping <host>Test network connectivity
netstat -tulpnShow listening ports
ss -tulpnModern alternative to netstat
nslookup <domain>DNS lookup
curl -I <url>Get HTTP headers only