Command Reference
A categorized collection of essential commands and shortcuts for developers. Your quick reference for tools, environments, and workflows.
Bash
Command | Description |
---|
ls | List directory contents |
cd | Change directory |
pwd | Print working directory |
mkdir | Create a new directory |
rm -rf | Remove files or directories recursively |
touch | Create an empty file |
cp | Copy files or directories |
mv | Move or rename files or directories |
grep | Search for patterns within files |
chmod | Change file permissions |
chown | Change file owner and group |
tail -f | Follow logs in real-time |
Git
Command | Description |
---|
git clone | Clone a repository |
git status | Check the status of the repository |
git commit -m | Commit changes with a message |
git pull | Fetch and merge changes from remote |
git push | Push changes to the remote repository |
git checkout -b | Create a new branch and switch to it |
git rebase | Reapply commits on top of another base tip |
git merge | Merge a branch into the current branch |
git log | View commit history |
git diff | Show changes between commits, commit and working tree, etc. |
Docker
Command | Description |
---|
docker ps | List running containers |
docker stop | Stop a running container |
docker start | Start a stopped container |
docker exec -it <container_id> bash | Open an interactive terminal inside a container |
docker build -t <tag> . | Build a Docker image from the current directory |
docker-compose up | Start services defined in a docker-compose.yml file |
VS Code
Command | Description |
---|
Cmd + Shift + P | Open command palette |
Cmd + B | Toggle sidebar visibility |
Cmd + P | Quick file navigation |
Cmd + / | Comment/uncomment selected line(s) |
Cmd + Shift + F | Find in all files |
Cmd + ` | Open integrated terminal |
NPM
Command | Description |
---|
npm install | Install dependencies |
npm run <script> | Run a script defined in package.json |
npm start | Start the project (usually for dev server) |
npm audit | Check for vulnerabilities in the installed dependencies |
npm outdated | Check for outdated dependencies |
Node.js
Command | Description |
---|
node <file.js> | Run a JavaScript file with Node.js |
npm run dev | Start the development server |
node --inspect | Start Node.js in debugging mode |
Shell
Command | Description |
---|
history | View the command history |
alias | Create a shortcut for a command |
clear | Clear the terminal screen |
PostgreSQL
Command | Description |
---|
psql -U <user> -d <database> | Connect to a PostgreSQL database |
SELECT * FROM <table>; | Query all rows from a table |
dt | List all tables in the current database |
pg_dump <db_name> > backup.sql | Backup a PostgreSQL database |
Kubernetes
Command | Description |
---|
kubectl get pods | List 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
Command | Description |
---|
top | View system processes |
htop | Interactive process viewer (better than top) |
df -h | Check disk space usage |
free -h | Check system memory usage |
uptime | Display system uptime |
Regex
Command | Description |
---|
/^\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
Command | Description |
---|
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
Command | Description |
---|
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
Command | Description |
---|
aws s3 ls | List S3 buckets |
aws s3 cp <file> s3://<bucket> | Copy file to S3 bucket |
aws ec2 describe-instances | List EC2 instances |
aws logs tail <log-group> | Tail CloudWatch logs |
Python
Command | Description |
---|
pip install <package> | Install a Python package |
python -m venv <env_name> | Create virtual environment |
source <env>/bin/activate | Activate virtual environment |
python -m pytest | Run tests with pytest |
python -m http.server | Start simple HTTP server |
React
Command | Description |
---|
npx create-react-app <name> | Create new React app |
npx create-next-app <name> | Create new Next.js app |
npm run build | Build production bundle |
npm run test | Run test suite |
Database
Command | Description |
---|
mongosh | Connect to MongoDB shell |
redis-cli | Connect to Redis CLI |
mysql -u <user> -p | Connect to MySQL |
Network
Command | Description |
---|
ping <host> | Test network connectivity |
netstat -tulpn | Show listening ports |
ss -tulpn | Modern alternative to netstat |
nslookup <domain> | DNS lookup |
curl -I <url> | Get HTTP headers only |