Welcome! This repository is proudly maintained by Ch4120N and is dedicated to providing very helpful guides for the cybersecurity and Linux community.
π¨βπ» Owner: Ch4120N
π Content: Very helpful, step-by-step, and fully explained guides.
If you find this guide useful, please consider dropping a β on the GitHub repository to support the project!
Click to expand the Table of Contents
- π― Introduction: Why Arch β BlackArch?
β οΈ IMPORTANT NOTE β Read This First!- π€ What Is a Virtual Machine?
- π οΈ Step 0: Setting Up a Virtual Machine
- π₯ Step 1: Boot from the Arch Linux ISO
- π Step 2: Connect to the Internet
- β° Step 3: Update the System Clock
- πΎ Step 4: Partition the Disk
- π§Ή Step 5: Format the Partitions
- π Step 6: Mount the File Systems
- π¦ Step 7: Install the Base System
- π§ Step 8: Generate the Filesystem Table (fstab)
- π Step 9: Chroot into the New System
- π Step 10: Set the Time Zone
- πΊοΈ Step 11: Set the Locale
- β¨οΈ Step 12: Set the Keyboard Layout
- π·οΈ Step 13: Set the Hostname
- π Step 14: Set Root Password
- π‘ Step 15: Network Configuration
- π οΈ Step 16: Initramfs
- π Step 17: Install a Bootloader
- β Step 18: Exit, Unmount, and Reboot
- π Step 19: First Boot β Login
- π§βπ» Step 20: PostβInstallation (User & Sudo)
- π¨ Step 21: Install a Desktop Environment
- π€ Step 22: Convert to BlackArch (THE MAIN GOAL)
- π§ Important Notes & Final Tips
BlackArch Linux is an elite penetration testing distribution built on top of Arch Linux, offering over 2,800 security tools. Instead of downloading the BlackArch ISO (which can be buggy or overwhelming), the recommended way by the BlackArch team is to install a minimal, stable Arch system and then convert it.
Benefits of this approach:
- π‘οΈ Rock-solid base: You build a stable Arch system yourself.
- ποΈ Full control: You choose exactly which tools to install.
- πͺΆ Lean system: No bloatware, only what you need.
- π Rolling release: Always get the latest tools via Arch's repositories.
Warning
I strongly recommend you install Arch Linux inside a Virtual Machine first.
This way, you won't accidentally erase your personal files or mess up your main operating system. When you've successfully installed Arch and converted it to BlackArch in the VM at least twice, then you can confidently do it on a real computer.
A Virtual Machine (VM) is like a "computer inside your computer". It uses software (like VirtualBox or QEMU) to create a fake PC where you can install and run operating systems without affecting your real machine. Think of it as a safe sandbox for learning and experimenting.
If you're installing on real hardware, skip this step. Otherwise, follow these instructions:
- VirtualBox (free, easy) β Download
- QEMU/KVM (faster, more advanced) β usually preinstalled on Linux.
- Name: Arch Linux (we'll convert to BlackArch later)
- Type: Linux
- Version: Arch Linux (or Other Linux 64βbit)
- Memory (RAM): At least 4 GB (8 GB recommended for heavy tools)
- Hard disk: Create a virtual disk β size 40 GB or more (dynamic allocation is fine) because BlackArch tools can take a lot of space.
- Network: Enable NAT or Bridged (NAT works outβofβtheβbox)
Tip
In VirtualBox, go to Settings β Storage and attach the Arch ISO file to the optical drive. Then boot the VM.
- Download the latest Arch ISO from archlinux.org.
- Burn it to a USB (or attach to VM) and boot from it.
- You'll see a menu β select "Arch Linux install medium (x86_64, UEFI)" (or BIOS).
- Once booted, you'll be at a root shell prompt (
root@archiso ~ #).
Note
Pro tip: Change the keyboard layout if needed with loadkeys <layout> (e.g., loadkeys fr for French). The default is US.
You must have an internet connection to download packages.
Usually works automatically. Test with:
ping -c 3 archlinux.orgUse the interactive iwctl tool:
iwctl
# Inside the iwctl prompt:
device list # see your wireless device (e.g., wlan0)
station wlan0 scan
station wlan0 get-networks # list available networks
station wlan0 connect "SSID" # replace SSID with your network name
# enter password if prompted
exitEnsure your system clock is accurate to prevent package signature errors:
timedatectl set-ntp true
timedatectl status # verify it's enabled and sync'edWe need to prepare the storage. First, identify your disk:
lsblk # shows all disks and partitionsYour main disk might be /dev/sda (SATA/BIOS) or /dev/nvme0n1 (NVMe SSD). We'll refer to it as /dev/sdX β replace with your actual device.
Important
Check if you're booted in UEFI:
Run ls /sys/firmware/efi/efivars. If the directory exists and is not empty, you're in UEFI mode (Use GPT). If it doesn't exist, you're in BIOS/Legacy mode (Use MBR).
We use cfdisk instead of fdisk because it provides a visual, menu-driven interface that is much safer and easier for beginners. You can see your partition layout clearly and navigate with arrow keys.
Run cfdisk /dev/sda. If prompted for a label type, select gpt.
- Create EFI System Partition (ESP):
- Select [ New ] β Enter size:
512Mβ Select [ Primary ] - Select [ Type ] β Choose
EFI System
- Select [ New ] β Enter size:
- Create Swap:
- Select [ New ] β Enter size:
4Gβ Select [ Primary ] - Select [ Type ] β Choose
Linux swap
- Select [ New ] β Enter size:
- Create Root (
/):- Select [ New ] β Press Enter (uses all remaining space) β Select [ Primary ]
- Type is already
Linux filesystem
- Write Changes:
- Select [ Write ] β Type
yesto confirm (β οΈ This will erase data!) - Select [ Quit ]
- Select [ Write ] β Type
Run cfdisk /dev/sda. If prompted for a label type, select dos.
- Create Boot Partition:
- Select [ New ] β Enter size:
512Mβ Select [ Primary ] - Select [ Bootable ] (to set the boot flag)
- Select [ New ] β Enter size:
- Create Swap:
- Select [ New ] β Enter size:
4Gβ Select [ Primary ] - Select [ Type ] β Choose
Linux swap
- Select [ New ] β Enter size:
- Create Root (
/):- Select [ New ] β Press Enter (uses all remaining space) β Select [ Primary ]
- Write Changes:
- Select [ Write ] β Type
yesto confirm (β οΈ This will erase data!) - Select [ Quit ]
- Select [ Write ] β Type
Now we format the partitions with the appropriate file systems.
# 1. EFI partition (must be FAT32)
mkfs.fat -F32 /dev/sda1
# 2. Swap partition
mkswap /dev/sda2 && swapon /dev/sda2
# 3. Root partition
mkfs.ext4 /dev/sda3# 1. Boot partition (ext4)
mkfs.ext4 /dev/sda1
# 2. Swap partition
mkswap /dev/sda2 && swapon /dev/sda2
# 3. Root partition
mkfs.ext4 /dev/sda3For both UEFI and MBR, we mount the root partition to /mnt and the boot partition to /mnt/boot:
# Mount root partition
mount /dev/sda3 /mnt
# Create and mount boot directory
mkdir -p /mnt/boot
mount /dev/sda1 /mnt/bootUse pacstrap to install the base packages, kernel, and firmware:
pacstrap -K /mnt base linux linux-firmware base-devel vim nano networkmanagerNote
What are these packages?
base: The minimal Arch system (shell, core utilities).linux&linux-firmware: The kernel and hardware drivers.base-devel: Essential for compiling packages (highly recommended for BlackArch).vim&nano: Text editors.networkmanager: To manage network connections post-install.
The system needs to know which partitions to mount at boot.
genfstab -U /mnt >> /mnt/etc/fstabVerify it: cat /mnt/etc/fstab. It should list your partitions with their UUIDs.
We now "change root" into the new installation to configure it from the inside.
arch-chroot /mntYour prompt will change to root@archiso / # β you are now inside your new Arch system!
List available zones and set yours:
# Example for America/New_York:
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
# Synchronize the hardware clock
hwclock --systohcEdit /etc/locale.gen to uncomment your preferred locale (e.g., en_US.UTF-8 UTF-8):
nano /etc/locale.gen # Remove the '#' in front of your languageGenerate the locales:
locale-genCreate /etc/locale.conf to set the system language:
echo "LANG=en_US.UTF-8" > /etc/locale.confIf you need a nonβUS layout, create /etc/vconsole.conf:
echo "KEYMAP=us" > /etc/vconsole.conf # replace 'us' with your layout (e.g., fr, de)Choose a cool name for your computer (e.g., blackarch-box):
echo "blackarch-box" > /etc/hostnameEdit /etc/hosts to map the hostname:
nano /etc/hostsAdd these lines:
127.0.0.1 localhost
::1 localhost
127.0.1.1 blackarch-box.localdomain blackarch-box
passwdEnter a strong password. Note: You won't see characters as you type!
Enable the NetworkManager service so it starts automatically after boot:
systemctl enable NetworkManagerFor a standard installation, the default initramfs is fine. Just rebuild it to be safe:
mkinitcpio -PThis is critical to boot your new system. We'll cover GRUB for UEFI and BIOS.
# 1. Install GRUB and EFI boot manager
pacman -S grub os-prober efibootmgr
# 2. Install GRUB to the EFI directory
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
# 3. Generate the GRUB configuration file
grub-mkconfig -o /boot/grub/grub.cfg# 1. Install GRUB
pacman -S grub os-prober
# 2. Install GRUB to the Master Boot Record (replace /dev/sda with your disk)
grub-install --target=i386-pc /dev/sda
# 3. Generate config
grub-mkconfig -o /boot/grub/grub.cfg# Exit the chroot environment
exit
# Unmount all partitions
umount -R /mnt
# Reboot the system
rebootTip
Remove the installation media (ISO/USB) when the machine restarts, or change the boot order in your BIOS/VM settings to boot from the hard disk.
After reboot, you'll see the GRUB menu. Select Arch Linux and boot. You'll be greeted with a login prompt:
blackarch-box login:
Login as root with the password you set in Step 14.
For security, you should not use root daily. Create a regular user:
# Create user and add to 'wheel' group
useradd -m -G wheel -s /bin/bash your_username
# Set password for the new user
passwd your_usernameGive sudo privileges:
pacman -S sudo
EDITOR=nano visudoFind the line %wheel ALL=(ALL:ALL) ALL and uncomment it (remove the #). Save and exit.
Now log out (exit) and log in as your new user.
Now you have a working Arch system, but it's commandβline only. To install a graphical interface (highly recommended for BlackArch tools), pick one:
| Desktop Environment | Command to Install | Display Manager |
|---|---|---|
| KDE Plasma | sudo pacman -S plasma-meta kde-applications-meta |
sddm |
| GNOME | sudo pacman -S gnome gnome-extra |
gdm |
| XFCE (Lightweight) | sudo pacman -S xfce4 xfce4-goodies |
lightdm |
Enable the display manager (example for SDDM):
sudo systemctl enable sddmThen reboot. You'll get a beautiful graphical login!
Now that you have a fully functional Arch Linux system, it's time to transform it into BlackArch.
| Aspect | Converting Arch β BlackArch | Installing BlackArch ISO |
|---|---|---|
| Stability | π’ You get a stable Arch base you built yourself | π΄ ISOs can sometimes suffer from bugs |
| Control | π’ You control every package and config | π΄ Pre-configured with tools you may never use |
| Flexibility | π’ Install only the tools you need | π΄ Full ISO (~22 GB) installs everything |
| Learning | π’ You understand exactly what's on your system | π΄ You inherit someone else's choices |
Warning
Make sure you have sufficient disk space (at least 20 GB free) and a stable internet connection.
# Download the strap script
curl -O https://blackarch.org/strap.sh
# Verify the SHA1 sum (Optional but recommended for security)
echo "5ea40d49ecd00f61b0de78d19a6372d754a371c0 strap.sh" | sha1sum -c
# Make it executable
chmod +x strap.sh
# Run it with sudo
sudo ./strap.shsudo pacman -Syyu# List all available BlackArch packages
pacman -Sl blackarch | head -20
# List all BlackArch tool categories
pacman -Sg | grep blackarchsudo pacman -S blackarchThis will install over 2,800 tools, consume ~22 GB, and make updates a nightmare.
BlackArch tools are organized into categories. Install only what you need:
# List all categories
pacman -Sg | grep blackarch
# Install a specific category (e.g., web exploitation tools)
sudo pacman -S blackarch-webapp
# Install wireless tools
sudo pacman -S blackarch-wirelessCommon Categories:
blackarch-webappβ Web application penetration testingblackarch-wirelessβ Wireless network auditingblackarch-exploitationβ Exploitation frameworks (Metasploit, etc.)blackarch-forensicβ Forensics and data recoveryblackarch-reversingβ Reverse engineering (radare2, Ghidra)blackarch-cryptoβ Cryptography tools
# Search for a tool
pacman -Ss burpsuite
# Install a specific tool
sudo pacman -S burpsuite- πΎ Always backup important data before partitioning.
- π Arch Wiki & BlackArch Wiki are your best friends if you get stuck.
- π Update often:
sudo pacman -Syukeeps your system and tools fresh. - π« Don't use
archinstallβ this guide teaches you the manual way so you understand every piece of your system. - βοΈ Ethical Use: Remember that these tools are for legitimate security testing and educational purposes only. Always obtain proper authorization before testing any network or system.
You've done it! π
You've not only installed Arch Linux from scratch but also transformed it into a fully functional BlackArch penetration testing environment. Pat yourself on the back β this is a huge achievement.
Happy Hacking (Ethically)! π§π»π
Maintained with β€οΈ by Ch4120N on GitHub
If this guide helped you, please β the repository!