🗂️ Basic Shell Commands (Linux/macOS/WSL/Ubuntu)
Command Description
ls List directory contents
ls -a List all (including hidden) files
cd folderName Change to a directory
cd .. Go back one directory
pwd Print working directory
mkdir folderName Create a new folder
touch fileName Create a new file
rm fileName Delete a file
rm -r folderName Delete a folder recursively
cp file1 file2 Copy a file
mv file1 newLocation/ Move or rename file
cat fileName View file contents
clear Clear terminal screen
code . Open current folder in VS Code (requires code CLI installed)
exit Close terminal session
🔧 Git/GitHub Commands
Command Description
git init Initialize a Git repository
git clone <url> Clone a repository
git status Check file changes
git add . Stage all changes
git commit -m "message" Commit changes with a message
git push Push to remote repo
git pull Pull latest changes
git branch List branches
git checkout -b branchName Create and switch to a new branch
git merge branchName Merge a branch into current branch
git remote -v View remote URLs
git log Show commit history
git config --global user.name "Your Name" Set Git username
git config --global user.email "you@example.com" Set Git email
git stash Temporarily save uncommitted changes
git reset --hard HEAD Undo all uncommitted changes
📦 npm/yarn (Project Dependency Management)
Command Description
npm init -y Initialize a Node.js project
npm install / yarn Install all dependencies
npm install packageName Install a specific package
npm uninstall packageName Remove a package
npm run start / yarn start Run project in development mode
npm run build / yarn build Build the project for production
npx create-react-app my-app Create a React app
npm i -g vercel Install global CLI (e.g., Vercel)
npx Run a package without installing globally
🌐 Network & Hosting (Basics)
Command Description
vercel Deploy to Vercel
firebase login Login to Firebase
firebase init Initialize Firebase project
firebase deploy Deploy to Firebase
📁 File and Process Utilities
Command Description
nano fileName Edit file in terminal
chmod +x file.sh Make a shell script executable
ps / ps aux Show running processes
kill PID Kill a process by PID
top Real-time system processes
curl / wget Fetch content from URLs (e.g., APIs)