Here's a Linux cheat sheet with frequently used commands, organized by category:
Navigation and File Management:
ls: List files and directories
pwd: Print working directory
cd: Change directory
mkdir: Create directory
rmdir: Remove empty directory
touch: Create empty file
cp: Copy files or directories
mv: Move or rename files or directories
rm: Remove files or directories
cat: Display file contents
more: View file contents one page at a time
less: View file contents with navigation
head: View the first few lines of a file
tail: View the last few lines of a file.
Permissions:
chmod: Change file permissions
chown: Change file owner and group
Searching:
grep: Search for text patterns in files
find: Find files and directories based on criteria.
System Information:
uname: Display system information
date: Display or set the system date and time.
cal: Display a calendar
who: List logged-in users
free: Display memory usage
df: Display disk usage
du: Display disk usage for files and directories
ps: Display running processes
top: Display real-time system resource usage
Process Management:
kill: Terminate a process
pkill: Terminate processes by name
jobs: List background jobs
fg: Bring a background job to the foreground.
bg: Send a job to the background.
File Compression and Archiving:
tar: Create and extract archives.
gzip: Compress files
gunzip: Uncompress files
zip: Create and extract ZIP archives.
unzip: Extract ZIP archives
Text Editing:
nano: Simple text editor
vim: Powerful text editor (steeper learning curve)
Network:
ping: Test network connectivity
ifconfig: View network interface configuration
netstat: Display network connections
ssh: Secure remote access
scp: Secure file transfer
Package Management:
apt: Package manager for Debian-based systems (e.g., Ubuntu)
yum: Package manager for Red Hat-based systems (e.g., Fedora, CentOS)
Additional Tips:
Use man command_name to access detailed manual pages for each command.
Use the tab key for autocomplete and -h or --help flags for command-specific help.
Explore online resources and tutorials for deeper learning.
Practice regularly to solidify your understanding!