Why Use System Tools?
System utilities enhance your development workflow by providing:- Performance Monitoring: Track CPU, memory, and disk usage in real-time
- Resource Management: Identify and manage resource-intensive processes
- Productivity: Enhanced terminal capabilities and workflow optimization
- Troubleshooting: Diagnose and resolve system issues quickly
- Disk Management: Monitor and optimize storage usage
Process and Resource Monitoring
Monitor your system’s performance and resource usage with these essential tools.Install htop
Interactive process viewer with real-time CPU, memory, and process monitoring
Check Disk Space
Monitor disk usage and identify storage-consuming directories
Install ncdu
Interactive disk usage analyzer for exploring storage usage
Kill Process on Port
Terminate processes using specific ports for development
Terminal Enhancement Tools
Improve your terminal experience with powerful shells and multiplexers.Install Zsh
Extended shell with improved features, completion, and theming
Install Oh My Zsh
Framework for managing Zsh configuration with themes and plugins
Install tmux
Terminal multiplexer for managing multiple sessions in one window
System Monitoring with htop
htop provides an interactive, real-time view of your system’s processes and resource usage.Key Features
- Real-time Monitoring: Live CPU, memory, and swap usage
- Process Management: Kill, prioritize, and filter processes
- Interactive Interface: Mouse and keyboard support
- Color-coded Display: Easy-to-read visual indicators
- Tree View: See process hierarchies and relationships
Common Use Cases
Disk Management
Checking Disk Space
Monitor available storage to prevent disk full issues:Using ncdu for Disk Analysis
ncdu provides an interactive way to explore disk usage:- Use arrow keys to browse directories
- Press Enter to enter a directory
- Press ‘d’ to delete files/directories
- Press ‘q’ to quit
Terminal Multiplexing with tmux
tmux allows you to run multiple terminal sessions within a single window and keep processes running after disconnecting.Essential tmux Commands
Window and Pane Management
Use Cases
- Run long-running processes that persist after logout
- Organize development environment into multiple panes
- Work on multiple projects simultaneously
- Maintain SSH sessions that survive disconnections
Enhanced Shell with Zsh and Oh My Zsh
Zsh provides an improved shell experience with better completion, history, and customization.Zsh Features
- Smart Auto-completion: Context-aware tab completion
- Spell Correction: Automatic command correction suggestions
- Shared History: Command history across all sessions
- Advanced Globbing: Powerful file pattern matching
- Theming Support: Customizable prompts and colors
Oh My Zsh Benefits
Oh My Zsh extends Zsh with:- 200+ Plugins: Git, Docker, Node.js, and more
- 140+ Themes: Customize your prompt appearance
- Auto-update: Keep your configuration current
- Community: Large ecosystem of extensions
Popular Oh My Zsh Plugins
Enable plugins in~/.zshrc:
Process Management
Finding and Killing Processes
Manage processes occupying specific ports:Common Port Conflicts
- 3000: React development server
- 8080: Common web server
- 5000: Flask development server
- 8000: Django development server
- 5432: PostgreSQL database
- 3306: MySQL database
- 27017: MongoDB database
System Maintenance
Regular Maintenance Tasks
Automated Cleanup
Performance Optimization Tips
Memory Management
- Monitor memory usage with htop
- Identify memory-intensive processes
- Close unnecessary applications
- Use swap space judiciously
Disk Optimization
- Regularly check disk usage with ncdu
- Remove old log files and caches
- Use compression for large files
- Archive or delete unused projects
Process Optimization
- Kill zombie processes
- Limit background processes
- Use nice/renice for process priorities
- Monitor CPU usage patterns
Troubleshooting Common Issues
High CPU Usage
- Launch htop to identify the process
- Press F6 and sort by CPU%
- Investigate or kill resource-intensive processes
- Check for runaway processes
Disk Full Error
- Check disk usage with
df -h - Use ncdu to find large directories
- Clean package cache:
sudo apt clean - Remove old logs:
sudo journalctl --vacuum-time=7d - Delete unnecessary files
Port Already in Use
- Find process:
sudo lsof -i:PORT - Kill process:
sudo kill -9 PID - Or use:
sudo fuser -k PORT/tcp - Verify port is free:
sudo lsof -i:PORT
Terminal Performance Issues
- Check Oh My Zsh plugin count (too many can slow startup)
- Disable unnecessary plugins
- Use lighter terminal theme
- Clear shell history if too large
Best Practices
Daily Workflow
- Use tmux for organizing development sessions
- Monitor resources with htop when system feels slow
- Check disk space weekly with ncdu
- Keep terminal organized with Zsh aliases
Maintenance Schedule
- Daily: Monitor system resources during development
- Weekly: Check disk usage and clean up if needed
- Monthly: Update system packages and remove old files
- Quarterly: Review installed tools and remove unused ones
Configuration Management
- Back up your
.zshrcand.tmux.conffiles - Version control your dotfiles with Git
- Document custom configurations
- Test changes before committing
Next Steps
Once you have your system tools set up, explore:- Custom Zsh themes and plugins
- Advanced tmux configurations
- Shell scripting for automation
- System monitoring with htop scripts
- Automated maintenance tasks
Related Resources
Git Guide
Version control your configuration files and dotfiles
Docker Guide
Monitor Docker containers with system tools
Node.js Guide
Manage Node.js processes and development environments