Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐧 The Ultimate Arch Linux to BlackArch Guide

πŸš€ From Noob to Pro: A Comprehensive Journey


Owner Guides

Transform your fresh Arch system into a powerful penetration testing powerhouse.


🌟 About This Repository

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!


πŸ“š Table of Contents

Click to expand the Table of Contents
  1. 🎯 Introduction: Why Arch β†’ BlackArch?
  2. ⚠️ IMPORTANT NOTE – Read This First!
  3. πŸ€” What Is a Virtual Machine?
  4. πŸ› οΈ Step 0: Setting Up a Virtual Machine
  5. πŸ”₯ Step 1: Boot from the Arch Linux ISO
  6. 🌐 Step 2: Connect to the Internet
  7. ⏰ Step 3: Update the System Clock
  8. πŸ’Ύ Step 4: Partition the Disk
  9. 🧹 Step 5: Format the Partitions
  10. πŸ“‚ Step 6: Mount the File Systems
  11. πŸ“¦ Step 7: Install the Base System
  12. πŸ”§ Step 8: Generate the Filesystem Table (fstab)
  13. 🏠 Step 9: Chroot into the New System
  14. 🌐 Step 10: Set the Time Zone
  15. πŸ—ΊοΈ Step 11: Set the Locale
  16. ⌨️ Step 12: Set the Keyboard Layout
  17. 🏷️ Step 13: Set the Hostname
  18. πŸ”‘ Step 14: Set Root Password
  19. πŸ“‘ Step 15: Network Configuration
  20. πŸ› οΈ Step 16: Initramfs
  21. πŸ” Step 17: Install a Bootloader
  22. βœ… Step 18: Exit, Unmount, and Reboot
  23. πŸŽ‰ Step 19: First Boot – Login
  24. πŸ§‘β€πŸ’» Step 20: Post‑Installation (User & Sudo)
  25. 🎨 Step 21: Install a Desktop Environment
  26. πŸ–€ Step 22: Convert to BlackArch (THE MAIN GOAL)
  27. 🧠 Important Notes & Final Tips

🎯 Introduction: Why Arch β†’ BlackArch?

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.

⚠️ IMPORTANT NOTE – Read This First!

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.


πŸ€” What Is a Virtual Machine?

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.


πŸ› οΈ Step 0: Setting Up a Virtual Machine

If you're installing on real hardware, skip this step. Otherwise, follow these instructions:

1. Choose Your VM Software

  • VirtualBox (free, easy) – Download
  • QEMU/KVM (faster, more advanced) – usually preinstalled on Linux.

2. Create a New VM

  • 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.


πŸ”₯ Step 1: Boot from the Arch Linux ISO

  1. Download the latest Arch ISO from archlinux.org.
  2. Burn it to a USB (or attach to VM) and boot from it.
  3. You'll see a menu – select "Arch Linux install medium (x86_64, UEFI)" (or BIOS).
  4. 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.


🌐 Step 2: Connect to the Internet

You must have an internet connection to download packages.

🌍 Wired Ethernet

Usually works automatically. Test with:

ping -c 3 archlinux.org

πŸ“Ά WiFi

Use 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
exit

⏰ Step 3: Update the System Clock

Ensure your system clock is accurate to prevent package signature errors:

timedatectl set-ntp true
timedatectl status   # verify it's enabled and sync'ed

πŸ’Ύ Step 4: Partition the Disk

We need to prepare the storage. First, identify your disk:

lsblk   # shows all disks and partitions

Your 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).

Why cfdisk?

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.

Option 1: UEFI Systems (GPT Partition Table)

Run cfdisk /dev/sda. If prompted for a label type, select gpt.

  1. Create EFI System Partition (ESP):
    • Select [ New ] β†’ Enter size: 512M β†’ Select [ Primary ]
    • Select [ Type ] β†’ Choose EFI System
  2. Create Swap:
    • Select [ New ] β†’ Enter size: 4G β†’ Select [ Primary ]
    • Select [ Type ] β†’ Choose Linux swap
  3. Create Root (/):
    • Select [ New ] β†’ Press Enter (uses all remaining space) β†’ Select [ Primary ]
    • Type is already Linux filesystem
  4. Write Changes:
    • Select [ Write ] β†’ Type yes to confirm (⚠️ This will erase data!)
    • Select [ Quit ]

Option 2: BIOS/Legacy Systems (MBR Partition Table)

Run cfdisk /dev/sda. If prompted for a label type, select dos.

  1. Create Boot Partition:
    • Select [ New ] β†’ Enter size: 512M β†’ Select [ Primary ]
    • Select [ Bootable ] (to set the boot flag)
  2. Create Swap:
    • Select [ New ] β†’ Enter size: 4G β†’ Select [ Primary ]
    • Select [ Type ] β†’ Choose Linux swap
  3. Create Root (/):
    • Select [ New ] β†’ Press Enter (uses all remaining space) β†’ Select [ Primary ]
  4. Write Changes:
    • Select [ Write ] β†’ Type yes to confirm (⚠️ This will erase data!)
    • Select [ Quit ]

🧹 Step 5: Format the Partitions

Now we format the partitions with the appropriate file systems.

For UEFI (GPT):

# 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

For BIOS (MBR):

# 1. Boot partition (ext4)
mkfs.ext4 /dev/sda1

# 2. Swap partition
mkswap /dev/sda2 && swapon /dev/sda2

# 3. Root partition
mkfs.ext4 /dev/sda3

πŸ“‚ Step 6: Mount the File Systems

For 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/boot

πŸ“¦ Step 7: Install the Base System

Use pacstrap to install the base packages, kernel, and firmware:

pacstrap -K /mnt base linux linux-firmware base-devel vim nano networkmanager

Note

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.

πŸ”§ Step 8: Generate the Filesystem Table (fstab)

The system needs to know which partitions to mount at boot.

genfstab -U /mnt >> /mnt/etc/fstab

Verify it: cat /mnt/etc/fstab. It should list your partitions with their UUIDs.


🏠 Step 9: Chroot into the New System

We now "change root" into the new installation to configure it from the inside.

arch-chroot /mnt

Your prompt will change to root@archiso / # – you are now inside your new Arch system!


🌐 Step 10: Set the Time Zone

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 --systohc

πŸ—ΊοΈ Step 11: Set the Locale

Edit /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 language

Generate the locales:

locale-gen

Create /etc/locale.conf to set the system language:

echo "LANG=en_US.UTF-8" > /etc/locale.conf

⌨️ Step 12: Set the Keyboard Layout (Optional)

If 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)

🏷️ Step 13: Set the Hostname

Choose a cool name for your computer (e.g., blackarch-box):

echo "blackarch-box" > /etc/hostname

Edit /etc/hosts to map the hostname:

nano /etc/hosts

Add these lines:

127.0.0.1   localhost
::1         localhost
127.0.1.1   blackarch-box.localdomain   blackarch-box

πŸ”‘ Step 14: Set Root Password

passwd

Enter a strong password. Note: You won't see characters as you type!


πŸ“‘ Step 15: Network Configuration

Enable the NetworkManager service so it starts automatically after boot:

systemctl enable NetworkManager

πŸ› οΈ Step 16: Initramfs

For a standard installation, the default initramfs is fine. Just rebuild it to be safe:

mkinitcpio -P

πŸ” Step 17: Install a Bootloader

This is critical to boot your new system. We'll cover GRUB for UEFI and BIOS.

🟒 For UEFI Systems

# 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

πŸ”΅ For BIOS/Legacy Systems

# 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

βœ… Step 18: Exit, Unmount, and Reboot

# Exit the chroot environment
exit

# Unmount all partitions
umount -R /mnt

# Reboot the system
reboot

Tip

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.


πŸŽ‰ Step 19: First Boot – Login

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.


πŸ§‘β€πŸ’» Step 20: Post‑Installation (User & Sudo)

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_username

Give sudo privileges:

pacman -S sudo
EDITOR=nano visudo

Find 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.


🎨 Step 21: Install a Desktop Environment (Optional)

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 sddm

Then reboot. You'll get a beautiful graphical login!


πŸ–€ Step 22: Convert to BlackArch (THE MAIN GOAL)

Now that you have a fully functional Arch Linux system, it's time to transform it into BlackArch.

πŸ€” Why Convert Instead of Installing BlackArch ISO?

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

πŸš€ Step‑by‑Step Conversion

Warning

Make sure you have sufficient disk space (at least 20 GB free) and a stable internet connection.

1. Download and Run the BlackArch Strap Script

# 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.sh

2. Update Your System

sudo pacman -Syyu

3. Verify the Repository

# List all available BlackArch packages
pacman -Sl blackarch | head -20

# List all BlackArch tool categories
pacman -Sg | grep blackarch

πŸ› οΈ Installing BlackArch Tools (The Right Way)

❌ Option 1: Install ALL Tools (NOT Recommended)

sudo pacman -S blackarch

This will install over 2,800 tools, consume ~22 GB, and make updates a nightmare.

βœ… Option 2: Install by Category (⭐ Highly Recommended)

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-wireless

Common Categories:

  • blackarch-webapp – Web application penetration testing
  • blackarch-wireless – Wireless network auditing
  • blackarch-exploitation – Exploitation frameworks (Metasploit, etc.)
  • blackarch-forensic – Forensics and data recovery
  • blackarch-reversing – Reverse engineering (radare2, Ghidra)
  • blackarch-crypto – Cryptography tools

🎯 Option 3: Install Individual Tools

# Search for a tool
pacman -Ss burpsuite

# Install a specific tool
sudo pacman -S burpsuite

🧠 Important Notes & Final Tips

  • πŸ’Ύ Always backup important data before partitioning.
  • πŸ“– Arch Wiki & BlackArch Wiki are your best friends if you get stuck.
  • πŸ”„ Update often: sudo pacman -Syu keeps 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.

πŸ”š Conclusion

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!

About

🐧 The Ultimate Guide: Transform a minimal Arch Linux install into a BlackArch penetration testing powerhouse. From Noob to Pro!

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages