A collection of Bash scripts to automate common system and cloud tasks.
update-system.sh– Detects Linux distribution and updates packages using the appropriate package manager.system-cleanup.sh– Cleans up system by removing unused packages and caches (distro-aware).system-info.sh– Shows system details: hostname, OS, kernel, uptime, users, memory, CPU, network, and disk.sys-health-check.sh– Displays memory/disk usage, system load, and launcheshtopfor real-time monitoring.
backup.sh– Creates timestamped compressed backups of a directory to~/backups, with logs.- Example backup path:
~/backups/backup_YYYY-MM-DD_HH-MM-SS.tar.gz - Log location:
~/backups/backup.log
- Example backup path:
azure_resource_list.sh– Lists Azure resources by type using Azure CLI.
Supported services:vm,storage,db,cosmos,function,disk,lb,cdn,monitor,event,queue,dns,network,ad,rg.
⚠️ Requires Azure CLI and active login (az login). Ensure your account has sufficient permissions to list the resources.
-
Clone the repository:
git clone https://github.com/ariefshaik7/bash-scripts.git cd bash-scripts -
Make a script executable:
chmod +x scriptname.sh
-
Run the script:
./scriptname.sh
- Bash shell
- Linux-based system
- Azure CLI (for Azure-related scripts)
Feel free to fork this repo, open issues, and submit pull requests to improve and expand the setup!
This project is licensed under the MIT License.