After 30 days of consistent Bash scripting practice, I wrapped up with a bang: building a fully functional System Admin Dashboard using only Bash. This dashboard brings together common sysadmin tasks into one modular, menu-driven terminal interface. Here's how I planned, built, and refined it step-by-step.
Why I Built This
I wanted a way to:
- Consolidate routine Linux sysadmin tasks.
- Practice everything I'd learned over the past month.
- Build something real, modular, and extendable.
Plus, I wanted a project I could confidently show in interviews or demos—something that wasn't just a collection of scripts, but an actual tool.
Project Structure
I created a clean and modular folder structure:
admin_dashboard/
├── main.sh
├── logs/
│ └── actions.log
├── functions/
├── sys_info.sh
├── user_mgmt.sh
├── network.sh
├── processes.sh
├── services.sh
├── logs.sh
├── backup_restore.sh
├── updates.sh
├── cron.sh
└── intrusion.sh
Each .sh
file in functions/
handles a specific task, keeping the code clean and DRY.
The Main Menu
The main.sh
script provides a simple menu-based interface using a case
statement:
case $choice in
1) system_info ;;
2) user_management ;;
...
0) echo "Exiting..."; exit 0 ;;
*) echo "Invalid choice!" ;;
esac
It also logs each action to logs/actions.log
like this:
echo "$(date): Viewed system info" >> "$LOG_FILE"
Key Functions
Here are some highlights:
sys_info.sh
Displays:
- Uptime
- OS version
- CPU info
user_mgmt.sh
Allows:
- Listing users
- Adding/deleting users
- Changing passwords
services.sh
Manage services using systemctl
:
- Start/stop/restart
- List services
logs.sh
View latest logs or search by keyword. Logged with:
echo "$(date): Searched logs for keyword '$keyword'" >> "$LOG_FILE"
intrusion.sh
Runs chkrootkit
to check for rootkits. Installs it if missing.
Logging Actions
Every major action logs to logs/actions.log
. This makes it easier to track usage and debug issues.
Example:
echo "$(date): Backup created for $dir as $name.tar.gz" >> "$LOG_FILE"
Lessons Learned
- Functions make Bash maintainable. Keeping scripts modular saved me from spaghetti code.
- Logging matters. It's not just for syslogs. Tracking user actions is essential.
- Git + GitHub saves the day. Versioning this project helped me learn Git in context.
What’s Next?
I'll be upgrading this dashboard to Version 2, adding:
- Color-coded UI with
tput
- User authentication
- Real-time monitoring with
htop
or similar tools - Web-based interface (maybe with Python Flask or Node.js)
Final Thoughts
This dashboard was the perfect final project to consolidate everything from my Bash journey. Whether you're learning Linux or want a real project to showcase, I recommend building your own version.
Feel free to fork mine:
[https://github.com/TechKrypt/System-Admin-Dashboard]