This script checks and displays various system information on a Debian-based system including:
- ExpressVPN Status: Checks if ExpressVPN is connected.
- Network Port Scan: Performs a basic nmap scan of localhost (or a specified target).
- Battery Health: Checks the battery level and charging status.
- System Updates: Prompts the user to perform system updates using 'apt'.
- Python 3.x: Make sure you have Python 3 installed on your system.
- Required Packages:
psutil
(install withpip install psutil
) - ExpressVPN (Optional): If you want to use the ExpressVPN status check, make sure ExpressVPN is installed.
- nmap (Optional): Install nmap (
sudo apt install nmap
) for the port scanning functionality.
- Clone the repository:
git clone <repository_url>
- Install required packages:
pip install psutil
- Make the script executable:
chmod +x system_status.py
- Run the script:
./system_status.py
You can create and alias in the ~/.bashrc:
sudo nano ~/.bashrc
And add a line at the bottom of the page:
alias sys_stat=python3 <path/to/script>
The script will display the gathered system information and prompt you to confirm if you want to proceed with system updates. If you choose to proceed with updates, you'll be prompted for your sudo password by the system.
- Use this script at your own risk.
- This script is provided as-is and should be used responsibly. Make sure you understand the implications of running commands like
nmap
andsudo apt update/upgrade
on your system. - Ensure you have proper backups before running system updates.
- This script is intended for Debian-based systems. It may not work on other Linux distributions.