|

How to Install All Kali Linux Tools with One Command: Interactive Script Guide

Kali Linux, the premier distribution for penetration testing and security auditing, comes with a vast range of pre-installed tools. But manually installing each tool can be tedious, especially when you’re setting up a fresh Kali system or need to quickly install a collection of tools.

In this article, I’ll show you how to automate the process by creating an interactive script that installs all Kali tools or allows you to select specific tool categories. This will make setting up your Kali environment much faster and more efficient.

Why Use a Script to Install Kali Linux Tools?

Kali Linux offers a number of tool “metapackages” that group tools by category (e.g., wireless tools, exploitation tools, forensics tools, etc.). These categories allow users to quickly install all the tools they need for a particular task. However, running commands manually for each package can take up valuable time.

With a simple Bash script, you can automate the installation of all Kali Linux tools or select categories based on your needs.

Step-by-Step Guide to Creating an Interactive Script

The following script will give you the ability to choose between:

  1. Installing all Kali tools with a single command.
  2. Installing specific categories of tools interactively by pressing the respective number.

Let’s get started!

Step 1: Create the Script

First, you’ll need to create the script file. Open your terminal and create a new file called kali-interactive-tools.sh.

nano kali-interactive-tools.sh

Step 2: Paste the Script

Copy and paste the following code into your script file:

#!/bin/bash

# Interactive Kali Linux Tools Installer
# Run as root or with sudo

# Function to install tools based on the user’s choice
install_tools() {
    echo "Installing selected Kali tool categories..."

    # Install based on user input
    case $1 in
        1)
            echo "Installing the Top 10 Kali Tools..."
            sudo apt install -y kali-tools-top10
            ;;
        2)
            echo "Installing Web Application Tools..."
            sudo apt install -y kali-tools-web
            ;;
        3)
            echo "Installing Wireless Tools..."
            sudo apt install -y kali-tools-wireless
            ;;
        4)
            echo "Installing Password Cracking Tools..."
            sudo apt install -y kali-tools-passwords
            ;;
        5)
            echo "Installing Forensics Tools..."
            sudo apt install -y kali-tools-forensics
            ;;
        6)
            echo "Installing Reverse Engineering Tools..."
            sudo apt install -y kali-tools-reverse-engineering
            ;;
        7)
            echo "Installing Exploitation Tools..."
            sudo apt install -y kali-tools-exploitation
            ;;
        8)
            echo "Installing Sniffing & Spoofing Tools..."
            sudo apt install -y kali-tools-sniffing-spoofing
            ;;
        9)
            echo "Installing Post Exploitation Tools..."
            sudo apt install -y kali-tools-post-exploitation
            ;;
        10)
            echo "Installing Reporting Tools..."
            sudo apt install -y kali-tools-reporting
            ;;
        11)
            echo "Installing Vulnerability Tools..."
            sudo apt install -y kali-tools-vulnerability
            ;;
        *)
            echo "Invalid selection! Exiting..."
            exit 1
            ;;
    esac
}

# Main script

echo "Updating system..."
sudo apt update -y && sudo apt upgrade -y

# Choose mode (0 = All Tools, 1 = Select Categories)
echo "Choose installation mode:"
echo "0) Install all tools"
echo "1) Install selected categories"

read -p "Enter your choice (0/1): " mode_choice

if [ "$mode_choice" == "0" ]; then
    echo "Installing all categories..."
    sudo apt install -y \
    kali-linux-default \
    kali-tools-top10 \
    kali-tools-web \
    kali-tools-wireless \
    kali-tools-passwords \
    kali-tools-forensics \
    kali-tools-reverse-engineering \
    kali-tools-exploitation \
    kali-tools-sniffing-spoofing \
    kali-tools-post-exploitation \
    kali-tools-reporting \
    kali-tools-vulnerability
    echo "All Kali tool categories installed successfully!"
elif [ "$mode_choice" == "1" ]; then
    echo "You chose to install selected categories. Let's go!"

    # Loop through available categories for selection
    echo "Available categories:"
    echo "1) Top 10 Tools"
    echo "2) Web Application Tools"
    echo "3) Wireless Tools"
    echo "4) Password Cracking Tools"
    echo "5) Forensics Tools"
    echo "6) Reverse Engineering Tools"
    echo "7) Exploitation Tools"
    echo "8) Sniffing & Spoofing Tools"
    echo "9) Post Exploitation Tools"
    echo "10) Reporting Tools"
    echo "11) Vulnerability Tools"
    echo "Enter the numbers of categories you want to install, separated by spaces (e.g., 1 3 5):"

    read -p "Enter your choice(s): " category_choices

    for category in $category_choices; do
        install_tools $category
    done

    echo "Selected categories installed successfully!"
else
    echo "Invalid selection. Exiting..."
    exit 1
fi

# Clean up
echo "Cleaning up..."
sudo apt autoremove -y
sudo apt clean

echo "Installation complete!"

Step 3: Make the Script Executable

After saving the file, make it executable by running:

chmod +x kali-interactive-tools.sh

Step 4: Run the Script

To run the script, use:

sudo ./kali-interactive-tools.sh

Step 5: Follow the Interactive Prompts

When you run the script, you’ll be prompted to choose between:

  • 0: Install all Kali Linux tools
  • 1: Install specific categories of tools (e.g., wireless, forensics, exploitation)

For the category-based installation, you can enter the numbers of the categories you want to install, separated by spaces. For example, if you want to install Top 10 Tools, Wireless Tools, and Exploit Tools, just type:

1 3 7 

The script will install only the selected categories.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *