Skip to main content

Bash Cheatsheet

File operationsโ€‹

ls -la # List all
cp -r src dst # Copy recursive
mv src dst # Move / rename
rm -rf dir # Delete recursive
find . -name "*.py" # Find files
grep -r "pattern" . # Search content

Permissionsโ€‹

chmod +x script.sh
chown user:group file

Processโ€‹

ps aux # List processes
kill -9 <pid> # Force kill
top / htop # Monitor

Networkโ€‹

curl -X GET http://...
netstat -tulpn
ping host

Aliasesโ€‹

alias ll='ls -la'
alias gs='git status'