Installation Guide

System Requirements

Debian Doctor is designed specifically for Debian Linux and all Debian-based distributions. Before installation, ensure your system meets these requirements:

Operating System

  • Debian 10 (Buster) or later
  • Ubuntu 20.04 LTS or later
  • Linux Mint 20 or later
  • Pop!_OS 20.04 or later
  • Any other Debian-based distribution

Dependencies

  • Required Bash 4.0 or later
  • Required Core system utilities (df, free, systemctl, ip)
  • Optional sudo privileges for full system diagnostics
  • Optional git for easy installation and updates

Installation Methods

Method 1: Install from Snap Store (Recommended)

The easiest way to install Debian Doctor is through the Snap Store. Snaps work on all major Linux distributions.

Get it from the Snap Store

Or install via command line:

# Install from Snap Store
sudo snap install debian-doctor

# Grant necessary permissions
sudo snap connect debian-doctor:system-observe
sudo snap connect debian-doctor:hardware-observe

# Run the tool
debian-doctor

Method 2: Using Git

This method allows for easy updates and version management.

# Clone the repository
git clone https://github.com/sonyccd/debian-doctor.git

# Navigate to the directory
cd debian-doctor

# Make the script executable
chmod +x debian_doctor.sh

# Optionally, make the test script executable
chmod +x debian_doctor_tests.sh

Method 3: Direct Download

Download the script directly without git.

# Download the latest release
wget https://github.com/sonyccd/debian-doctor/archive/refs/heads/main.zip

# Extract the archive
unzip main.zip

# Navigate to the directory
cd debian-doctor-main

# Make the script executable
chmod +x debian_doctor.sh

Method 4: cURL Installation

Quick one-liner installation using cURL.

# Download and extract in one command
curl -L https://github.com/sonyccd/debian-doctor/archive/refs/heads/main.tar.gz | tar xz

# Navigate to the directory
cd debian-doctor-main

# Make executable
chmod +x debian_doctor.sh

System-wide Installation (Optional)

To make Debian Doctor available system-wide:

# Copy to system bin directory
sudo cp debian_doctor.sh /usr/local/bin/debian-doctor

# Ensure it's executable
sudo chmod +x /usr/local/bin/debian-doctor

# Now you can run it from anywhere
debian-doctor

Verification

After installation, verify that Debian Doctor is working correctly:

Check Script Syntax

# Verify script syntax without execution
bash -n debian_doctor.sh

# If no output, syntax is valid

Run Test Suite

# Execute the test suite
./debian_doctor_tests.sh

# All tests should pass

Perform a Test Run

# Run without sudo for basic checks
./debian_doctor.sh

# Or with sudo for full system access
sudo ./debian_doctor.sh
Note: Running without sudo will limit some diagnostic capabilities. For full system analysis, sudo privileges are recommended.

Updating

If Installed via Git

# Navigate to the installation directory
cd debian-doctor

# Pull the latest changes
git pull origin main

# Verify the update
./debian_doctor.sh --version

Manual Update

Download the latest version and replace the existing files:

# Backup current version
cp debian_doctor.sh debian_doctor.sh.backup

# Download new version
wget -O debian_doctor.sh https://raw.githubusercontent.com/sonyccd/debian-doctor/main/debian_doctor.sh

# Make executable
chmod +x debian_doctor.sh

Uninstallation

Remove Local Installation

# Simply remove the directory
rm -rf debian-doctor

Remove System-wide Installation

# Remove from system bin
sudo rm /usr/local/bin/debian-doctor

Clean Up Logs

# Remove any log files created by Debian Doctor
rm /tmp/debian_doctor_*.log

Troubleshooting

Permission Denied Error

If you get a "Permission denied" error:

# Ensure the script is executable
chmod +x debian_doctor.sh

# Or run with bash directly
bash debian_doctor.sh

Command Not Found

If system utilities are missing:

# Install essential packages
sudo apt-get update
sudo apt-get install coreutils procps systemd iproute2

Syntax Errors

If you encounter syntax errors:

# Check your bash version
bash --version

# Debian Doctor requires Bash 4.0+
# Update if necessary
sudo apt-get install --only-upgrade bash
Warning: Always review scripts before running them with sudo privileges. You can examine the source code at the GitHub repository.

Getting Help

If you continue to experience issues: