Basic commands
This guide covers essential Linux commands that every user should know.
π File and Directory Navigation
Directory Navigation
pwd # Print working directory
cd /path/to/directory # Change directory
cd .. # Go up one directory
cd ~ # Go to home directory
cd - # Go to previous directoryListing Files and Directories
ls # List files and directories
ls -l # Long format listing
ls -a # Show hidden files
ls -lh # Human-readable file sizes
ls -R # Recursive listing
ls -lt # Sort by modification timeFile Operations
π File Viewing and Editing
View File Contents
Text Processing
π» System Information
System Status
User Information
π Process Management
Process Control
π Network Commands
Network Information
π‘ Tips and Tricks
Command History
Keyboard Shortcuts
Ctrl + C: Interrupt current processCtrl + Z: Suspend current processCtrl + D: Exit current shellCtrl + L: Clear screenCtrl + A: Go to beginning of lineCtrl + E: Go to end of line
Command Help
π― Best Practices
Safety First
Use
-iflag withrmfor interactive deletionMake backups before major operations
Test commands with sample data first
Efficiency
Use tab completion
Learn keyboard shortcuts
Create aliases for common commands
Organization
Keep home directory organized
Use meaningful file names
Document complex commands
π« Common Mistakes to Avoid
Running commands without understanding them
Using
rm -rfwithout careful considerationRunning commands as root unnecessarily
Forgetting to backup important data
Not using command history effectively
Last updated
Was this helpful?