A Bash script for collecting network and system information from a Linux system and generating a text report.
This script collects useful information about the system's network configuration, hardware, routing, DNS, firewall, kernel modules, and network settings.
The collected information is saved in a timestamped .txt file.
The script is mainly intended for:
- Linux network diagnostics
- System administration
- Network troubleshooting
- Bash scripting practice
- Collecting system information for technical support
The script is designed for modern Linux distributions such as Pop!_OS and Ubuntu.
The script uses common Linux commands:
ip- Network interfaces and routingss- Network connections and statisticsnft- Firewall ruleslspci- PCI hardware informationlsb_release- Linux distribution informationhostname- System hostnameuname- Kernel informationcat- Read configuration filesdate- Generate the report date
Root privileges are required because some network and firewall information can only be accessed by the root user.
Give the script execution permission:
chmod +x network_info.sh