Essential Linux Tools
Essential Linux Tools

Text Editors
nano - Beginner-Friendly Editor
nano filename.txt
Basic controls:
Ctrl + O- Save (Write Out)Ctrl + X- ExitCtrl + K- Cut lineCtrl + U- Uncut (paste)
vim - Powerful Text Editor
vim filename.txt
Basic controls:
i- Insert modeEsc- Command mode:w- Save:q- Quit:wq- Save and quit:q!- Quit without saving
vimtutor to learn vim interactively.File Operations
find - Search for Files
find /home -name "*.txt"
find . -type d -name "projects"
grep - Search Inside Files
grep "search-term" file.txt
grep -r "search-term" folder/
grep -i "search" file.txt # Case insensitive
wc - Word Count
wc -l file.txt # Count lines
wc -w file.txt # Count words
wc -c file.txt # Count characters
System Information
uname - System Information
uname -a # All information
uname -r # Kernel version
uname -m # Machine hardware
df - Disk Space
df -h # Human-readable sizes
df -h /mnt/c # Specific drive
du - Directory Size
du -sh folder/ # Total size
du -h --max-depth=1 # Size of subdirectories
free - Memory Usage
free -h # Human-readable
top/htop - Process Monitor
htop # Interactive process viewer
top # Built-in process viewer
Networking
ping - Test Connection
ping google.com
ping -c 4 google.com # Stop after 4 pings
ip - Network Configuration
ip addr # Show IP addresses
ip link # Show network interfaces
curl and wget - Download Files
curl -O file.url
wget file.url
Compression
zip and unzip
zip -r archive.zip folder/
unzip archive.zip
tar - Archive Files
tar -cvf archive.tar folder/
tar -xvf archive.tar
tar -czvf archive.tar.gz folder/ # Compressed
Redirection and Piping
Output Redirection
command > file.txt # Overwrite
command >> file.txt # Append
command 2> error.txt # Errors only
Pipes
ls -la | grep "txt" # Filter output
cat file | wc -l # Count lines in file
Useful Shortcuts
Terminal Shortcuts:
| Shortcut | Action |
|---|---|
Ctrl + C | Cancel current command |
Ctrl + Z | Suspend current command |
Ctrl + L | Clear screen |
Ctrl + A | Move to beginning of line |
Ctrl + E | Move to end of line |
Ctrl + U | Clear line before cursor |
Ctrl + K | Clear line after cursor |
Tab | Auto-complete |
Tab + Tab | Show all completions |
Practice Exercise
Try these commands:
# Check system info
uname -aSee disk usage
df -hFind all .txt files
find ~ -name "*.txt"Count lines in a file
wc -l /etc/passwdSearch in a file
grep "root" /etc/passwd
Summary
These essential tools will make you productive in Linux:
- nano/vim - Text editing
- find/grep - File searching
- df/du/free - System monitoring
- curl/wget - Downloading
- tar/zip - Compression
Next Lesson
In the final lesson, you'll complete a practical project and review what you've learned.
Quiz - Quiz - Essential Linux Tools
1. Which command searches for text inside files?
2. Which command shows disk space usage?
3. What does the '|' symbol do in terminal?
4. Which keyboard shortcut clears the terminal screen?