commands
Common command line commands, ready to copy and run
Navigation
pwdPrint Working Directory
Show the full path of the directory you're currently in.
lsList Files
List files and folders in the current directory.
ls -laList All Files with Details
Show all files including hidden ones, with permissions, size, and dates.
ls -ltList Files by Date
List files sorted by most recently modified first.
ls -lhSList Files by Size
List files sorted by size, largest first, with human-readable sizes.
cd ..Go Up One Directory
Move to the parent directory.
cd ~Go to Home Directory
Jump back to your home directory from anywhere.
cd -Go to Previous Directory
Switch back to the last directory you were in.
treeShow Directory Tree
Display the folder structure two levels deep.
tree cleanDirectory Tree (skip node_modules)
Show folder structure three levels deep, ignoring node_modules.
du -sh .Size of Current Directory
Show the total size of the current directory.
du sortedSize of Each Subdirectory
List subdirectories sorted by size, largest first.
Git
git statusGit Status
Show which files are modified, staged, or untracked.
git logCompact Commit History
Show the last 20 commits in a compact one-line format.
git graphVisual Branch History
Show a visual graph of all branches and their commits.
git branchList Local Branches
Show all local branches and highlight the current one.
git branch -aList All Branches
Show all branches including remote tracking branches.
git diffShow Unstaged Changes
Display line-by-line changes that haven't been staged yet.
git diff stagedShow Staged Changes
Display changes that are staged and ready to commit.
git diff statChange Summary
Show a summary of which files changed and how many lines were added or removed.
git stash listList Stashes
Show all stashed changes you've saved for later.
git remote -vShow Remote URLs
List all configured remotes with their fetch and push URLs.
git recentCommits This Week
Show all commits made in the last 7 days.
git shortlogContributors by Commit Count
Rank contributors by number of commits.
git fetchFetch All Remotes
Download latest changes from all remotes without merging.
git add .Stage All Changes
Stage every modified and new file for the next commit.
git pushPush to Remote
Upload local commits to the remote repository.
System
df -hDisk Space Overview
Show how much disk space is used and available on each drive.
clearClear Terminal
Clear all output from the terminal screen.
whoamiCurrent Username
Show which user account is currently active.
uname -aSystem Information
Display full system information including OS, kernel, and architecture.
uptimeSystem Uptime
Show how long the system has been running and current load.
dateCurrent Date and Time
Print the current date and time.
hostnameMachine Name
Show the name of the current machine.
echo $SHELLCurrent Shell
Show which shell you're using (bash, zsh, etc.).
echo $PATHShow PATH
Display the directories the system searches for executables.
calCalendar
Show the current month's calendar.
historyCommand History
List previously run commands in this shell session.
aliasList Aliases
Show all command aliases configured in your shell.
python3 -VPython Version
Check which version of Python 3 is installed.
pip listInstalled Python Packages
List all Python packages installed in the current environment.
Processes
Network
Node & npm
node -vNode.js Version
Check which version of Node.js is installed.
npm -vnpm Version
Check which version of npm is installed.
npm lsInstalled Packages
List top-level npm packages installed in the current project.
npm outdatedOutdated Packages
Check which npm packages have newer versions available.
npm auditSecurity Audit
Scan installed packages for known security vulnerabilities.
tsc checkTypeScript Type Check
Run the TypeScript compiler to check for type errors without emitting files.
which nodeWhere Is Node Installed
Show the file path of the Node.js binary being used.
Docker
docker psRunning Containers
List all Docker containers that are currently running.
docker ps -aAll Containers
List all Docker containers including stopped ones.
docker imagesList Docker Images
Show all Docker images downloaded to this machine.
docker upStart Docker Services
Start all services defined in docker-compose.yml in the background.
docker downStop Docker Services
Stop and remove all containers defined in docker-compose.yml.
docker logsFollow Docker Logs
Stream live logs from all Docker Compose services.