This bash script automates the installation of Realtek wireless drivers for the AWUS036ACH on Linux systems. It performs the following tasks:
- Checks for the Linux distribution.
- Installs
git
if not present. - Updates the system.
- Installs kernel headers necessary for building the driver.
- Installs Realtek drivers.
- Clones the
rtl8812au
repository from Aircrack-ng. - Compiles the drivers.
- Prompts for a reboot to apply changes.
- Optionally removes any existing driver installations.
- The script must be run as root. Use
sudo
or log in as the root user. - Supported Linux distributions:
- Debian-based (e.g., Debian, Ubuntu)
- Fedora-based (e.g., Fedora, RHEL)
- Download the script or copy its content into a file.
- Clone the repository:
git clone https://github.com/Khatcode/AWUS036ACH-Automated-Driver-Install cd AWUS036ACH-Automated-Driver-Install
- Make the script executable:
chmod +x Alfasetup.sh
- Run the script as root:
or combine the commands:
sudo ./Alfasetup.sh
git clone https://github.com/Khatcode/AWUS036ACH-Automated-Driver-Install && cd AWUS036ACH-Automated-Driver-Install && chmod +x Alfasetup.sh && sudo ./Alfasetup.sh
-
Root Check:
- Verifies if the script is run with root privileges.
-
Distribution Detection:
- Identifies the Linux distribution to use the appropriate package manager (
apt-get
ordnf
).
- Identifies the Linux distribution to use the appropriate package manager (
-
Git Installation:
- Checks for the presence of
git
and installs it if necessary.
- Checks for the presence of
-
System Updates:
- Updates the system, upgrades packages, and performs a distribution upgrade.
- Automatically restarts services during package upgrades without user interaction.
-
Kernel Headers Installation:
- Installs the necessary kernel headers required for building the driver.
-
Realtek Drivers Installation:
- Installs Realtek wireless drivers using the detected package manager.
-
Existing Driver Removal:
- Checks if a version of the driver is already installed.
- Prompts the user to remove the existing installation if found, which helps avoid conflicts.
-
Additional Drivers Installation:
- Clones the
rtl8812au
repository from Aircrack-ng and compiles the drivers.
- Clones the
-
Executable Building:
- Compiles the necessary
rtl8812
executable files into binary applications.
- Compiles the necessary
-
Installation:
- Installs the compiled binaries into the appropriate locations on the file system.
-
Reboot Prompt:
- Notifies the user that a system reboot is necessary to apply changes and initiates a countdown.
- The script will prompt for a system reboot after completing the installation.
- It is recommended to remove any existing driver installations before proceeding with the new installation to ensure compatibility and avoid potential issues.