This Bash script provides a colorful and informative display of system services on a Linux system, particularly focused on systems using systemd. Compatible with Raspberry PI (Raspbian), Debian and most flavors of linux.
- List active, inactive, or all system services
- Display service status, runtime, and description
- Color-coded output for better readability
- Command-line arguments for flexible usage
sudo ./list_services.sh [OPTION]Options:
--all: Show all services (both active and inactive)--active: Show only active services (default)--inactive: Show only inactive services--help: Display help message and exit
- Bash shell
- systemd-based Linux distribution
- Root privileges (sudo)
- Clone this repository:
git clone https://github.com/yourusername/service-listing-script.git - Navigate to the project directory:
cd service-listing-script - Make the script executable:
chmod +x list_services.sh
To list all active services:
sudo ./list_services.sh --activeBelow is a sample of what the output might look like. Note that actual colors will be displayed in the terminal.
In the actual terminal output:
- The table borders will be in blue
- Service names, runtimes, and descriptions will be in white
- The "Enabled" status will be in green for "enabled" and yellow for other statuses
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
