🖥️ Console Command Library

The terminal reference you can actually talk to

💡 Quick Tips

Tab completion: Start typing and hit Tab to auto-complete file/folder names • Command history: Use Up/Down arrows to cycle through previous commands • Drag & drop: Drag files from file manager into terminal to paste their full path • Chaining: Use && to run multiple commands in sequence

⌨️ Keyboard Shortcuts

/ or Ctrl+K Focus search
Ctrl+/ Focus AI input
Esc Clear search
Ctrl+Enter Send AI message
Ctrl+L Clear AI input
Click Copy any command

📁File Operations

touch filename.txt
echo. > filename.txt Windows
Create a new empty file
cp file1.txt file2.txt
copy file1.txt file2.txt Windows
Copy a file
mv oldname.txt newname.txt
ren oldname.txt newname.txt Windows
Rename or move a file
rm filename.txt
del filename.txt Windows
Delete a file
rm -rf foldername
rmdir /s foldername Windows
Delete a folder and all its contents
echo "text content" > filename.txt
Write text to a file (overwrites existing content)
echo "more text" >> filename.txt
Append text to end of file
cat file1.txt file2.txt > combined.txt
type file1.txt file2.txt > combined.txt Windows
Combine multiple files into one
cp /full/path/file.txt .
Copy file from anywhere to current directory
ln -s /path/to/file linkname
Create symbolic link to file (Mac/Linux)

👀Viewing File Contents

cat filename.txt
type filename.txt Windows
Display entire file contents
head filename.txt
Show first 10 lines of file
tail filename.txt
Show last 10 lines of file
less filename.txt
more filename.txt Windows
View file page by page (press q to quit)
grep "search term" filename.txt
findstr "search term" filename.txt Windows
Search for text within a file

🔍Finding & Searching

find . -name "*.txt"
dir /s *.txt Windows
Find all .txt files in current directory and subdirectories
find . -name "filename"
Search for specific filename
ls *.py
List all Python files (using wildcard *)
grep -r "search text" .
findstr /s "search text" *
Search for text in all files recursively
wc -l filename.txt
Count lines in a file
wc -w filename.txt
Count words in a file

Running Code

python filename.py
python3 filename.py
Run a Python script
node filename.js
Run a JavaScript file with Node.js
javac filename.java
java filename
Compile and run Java (first compile, then run)
./script.sh
script.bat Windows
Run a shell script
open filename.html
start filename.html Windows
Open HTML file in default browser

⌨️Keyboard Shortcuts & Tips

Tab
Auto-complete file/folder names (start typing, then Tab)
Up/Down Arrows
Cycle through previous commands
Ctrl+A
Move cursor to beginning of line
Ctrl+E
Move cursor to end of line
Ctrl+L
Clear screen (alternative to 'clear')
Ctrl+R
Search through command history

🔗Command Chaining

command1 && command2
Run command2 only if command1 succeeds
command1 ; command2
Run command2 regardless of command1's result
cd project && npm start
Example: go to folder and start project
mkdir newproject && cd newproject
Example: create folder and enter it

Pipes & Redirection

command1 | command2
Send output of command1 as input to command2
ls | grep ".txt"
List files and filter for .txt files only
cat file.txt | wc -l
Count lines in a file
command > output.txt
Save command output to file (overwrites)
command >> output.txt
Append command output to file

🐳Docker & Containers

docker --version
Check Docker version and installation
docker images
List all Docker images on your system
docker ps
List running containers
docker ps -a
List all containers (running and stopped)
docker run -it image-name
Run container interactively with terminal
docker run -d -p 8080:80 image-name
Run container in background with port mapping
docker build -t my-app .
Build image from Dockerfile in current directory
docker pull image-name
Download image from Docker Hub
docker stop container-id
Stop a running container
docker rm container-id
Remove a stopped container
docker rmi image-id
Remove a Docker image
docker exec -it container-id bash
Execute commands inside running container
docker logs container-id
View container logs
docker-compose up
Start multi-container application
docker-compose down
Stop and remove multi-container application
docker system prune
Remove unused containers, images, and networks

🔧Git & Version Control

git status
Check status of your repository
git add .
git add filename.txt
Stage changes (all files or specific file)
git commit -m "Your message"
Commit staged changes with a message
git commit -am "Your message"
Stage and commit all tracked changes in one step
git push
Upload commits to remote repository
git pull
Download latest changes from remote
git clone repo-url
Download a repository from GitHub
git log
View commit history
git log --oneline
View commit history in compact format
git branch
List all branches
git branch branch-name
Create new branch
git checkout branch-name
Switch to existing branch
git checkout -b new-branch
Create and switch to new branch
git merge branch-name
Merge another branch into current branch
git rebase main
Rebase current branch onto main branch
git diff
Show changes in files
git diff --staged
Show changes in staged files
git stash
Temporarily save uncommitted changes
git stash pop
Apply and remove most recent stash
git stash list
List all stashes
git remote -v
Show remote repositories
git remote add origin repo-url
Add remote repository
git fetch
Download changes without merging
git reset HEAD~1
Undo last commit (keep changes)
git reset --hard HEAD~1
Undo last commit (discard changes)
git branch -d branch-name
Delete local branch
git push origin --delete branch-name
Delete remote branch
git checkout -- filename.txt
Discard changes in specific file
git config --global user.name "Name"
Set global Git username
git config --global user.email "email"
Set global Git email

🌐Network & Downloads

curl -O https://example.com/file.zip
Download a file from URL
wget https://example.com/file.zip
Download file (Linux/Mac with wget installed)
ping google.com
Test internet connection to a website
curl https://api.example.com
Make HTTP requests to APIs

📦Package Managers

npm init
Initialize a new Node.js project (creates package.json)
npm install package-name
Install JavaScript package locally (in current project)
npm install -g package-name
Install JavaScript package globally (system-wide)
npm install --save-dev package-name
Install package as development dependency
npm uninstall package-name
Remove a package from project
npm list
List installed packages in current project
npm list -g
List globally installed packages
npm start
Run the start script defined in package.json
npm run script-name
Run custom script defined in package.json
npm update
Update all packages to latest versions
npm outdated
Check which packages have newer versions available
npm audit
Run security audit on installed packages
npm audit fix
Automatically fix security vulnerabilities
npm ci
Clean install (faster, for production/CI environments)
npm search package-name
Search npm registry for packages
npm version patch
Bump version number (patch/minor/major)
npm publish
Publish package to npm registry
npm cache clean --force
Clear npm cache (useful for fixing issues)
pip install package-name
Install Python package
pip install --user package-name
Install Python package for current user only
pip list
List installed Python packages
pip freeze > requirements.txt
Save Python dependencies to file
pip install -r requirements.txt
Install Python packages from requirements file
brew install package-name
Install package with Homebrew (Mac)
brew update
Update Homebrew package list (Mac)
brew upgrade
Upgrade all installed Homebrew packages (Mac)

☁️AWS CLI

aws --version
Check AWS CLI version and installation
aws configure
Set up AWS credentials and default region
aws configure list
View current AWS configuration
aws sts get-caller-identity
Check which AWS account/user you're authenticated as
aws s3 ls
List all S3 buckets
aws s3 ls s3://bucket-name
List contents of specific S3 bucket
aws s3 cp file.txt s3://bucket-name/
Upload file to S3 bucket
aws s3 sync ./folder s3://bucket-name/
Sync local folder with S3 bucket
aws ec2 describe-instances
List all EC2 instances
aws ec2 start-instances --instance-ids i-12345
Start specific EC2 instance
aws ec2 stop-instances --instance-ids i-12345
Stop specific EC2 instance
aws logs describe-log-groups
List CloudWatch log groups
aws iam list-users
List IAM users in account
aws lambda list-functions
List all Lambda functions
aws cloudformation list-stacks
List CloudFormation stacks
aws --profile production s3 ls
Use specific AWS profile for command

🗜️File Compression

zip -r archive.zip foldername
Create a zip archive of a folder
unzip archive.zip
Extract a zip file
tar -czf archive.tar.gz foldername
Create compressed tar archive (Linux/Mac)
tar -xzf archive.tar.gz
Extract tar archive (Linux/Mac)

🔒Permissions & Info

ls -la
dir /Q Windows
List files with detailed permissions and info
chmod 755 filename
Change file permissions (read/write/execute)
chmod +x script.sh
Make file executable
chown user:group filename
Change file ownership (Linux/Mac)
whoami
Show current username
du -h
dir /-c Windows
Show disk usage of current directory

⚙️System & Utilities

clear
cls Windows
Clear the console screen
history
Show recent command history
which commandname
where commandname Windows
Find location of a command
ps
tasklist Windows
List running processes
sudo command
Run command with admin privileges (Mac/Linux)
exit
Close the terminal
man commandname
commandname /? Windows
Show manual/help for a command
Ctrl+Shift+V
Ctrl+V Windows
Cmd+V Mac
Paste text into terminal
Ctrl+C
Cancel/interrupt current command
nano filename.txt
notepad filename.txt Windows
Edit file in simple text editor
ps aux
tasklist /v Windows
List all running processes with details
kill 1234
taskkill /PID 1234 Windows
Stop a process by its ID number
command &
Run command in background (Linux/Mac)
date
Show current date and time
uptime
Show how long system has been running
df -h
Show disk space usage for all drives
top
taskmgr Windows
Show live system resource usage

🔍 Need More Help?

Can't find what you're looking for? Ask the Terminal Assistant about specific use cases, error messages, or advanced command combinations!

Terminal Assistant
Your console command companion
Speech On
0 / 2500 characters