Skip to content

Instantly share code, notes, and snippets.

@D3Ext
Last active June 24, 2024 10:54
Show Gist options
  • Save D3Ext/f4cedc3d6f28f647e375d5d562ecfba7 to your computer and use it in GitHub Desktop.
Save D3Ext/f4cedc3d6f28f647e375d5d562ecfba7 to your computer and use it in GitHub Desktop.
Arch Linux Installation + Customization

Introduction

This guide aids with the ArchLinux installation using VMWare

This is based on the official Arch Linux installation guide, my own experience and some videos I found on Youtube.

Installation

First of all change the keyboard layout to the desired language with loadkeys, in my case to spanish

loadkeys es

Verify internet connection:

ping -c 1 google.com

Create partitions with cfdisk

cfdisk
  • Select dos
  • Create one partition with 512M
  • Create the second partition with the total amount of space less 4.5G
  • Create last partition for swap with the rest of the free space (Change type to Linux swap)
  • Press "Write" to apply partitions changes and press "Quit"

Format first partition (512M) with mkfs.vfat:

mkfs.vfat -F 32 /dev/sda1

Format second partition (the biggest one):

mkfs.ext4 /dev/sda2

Create swap and apply changes:

mkswap /dev/sda3
swapon

Create and mount partitions:

mount /dev/sda2 /mnt
mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

Now the first and most important part of the installation is done, lets continue by installing some packages:

pacstrap /mnt linux linux-firmware grub networkmanager wpa_supplicant base base-devel

Once it has finished, create the partitions file with genfstab:

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

At this point, we can say that the system is ready to use it... but it's empty! To "jump" into the real system let's use arch-chroot:

arch-chroot /mnt

Let's change root's password:

passwd

Create a new user and change its password:

useradd -m d3ext
passwd d3ext

Before we continue further I recommend you to install some useful packages:

pacman -S sudo nano vim

If you want the user to have high privileges, add it to wheel group:

usermod -aG wheel d3ext

Edit sudoers file and uncomment this line "%wheel ALL=(ALL:ALL) ALL"

nano /etc/sudoers

Change the system hostname:

echo 'archlinux' > /etc/hostname

Edit the /etc/hosts config file:

127.0.0.1 localhost
::1 localhost
127.0.0.1 arch arch.localhost arch

Configure keyboard layout so every time the system boots, it uses correct layout:

Uncomment "en_us" and "es_es" (in my case spanish)

nano /etc/locale.gen
locale-gen

Install the Grub:

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

To verify that the Grub has been installed successfully let's reboot the system:

reboot now

Once the system has booted as expected let's enable some services:

systemctl enable wpa_supplicant
systemctl enable NetworkManager
systemctl start wpa_supplicant
systemctl start NetworkManager

Install aur and more packages to have more "power":

pacman -S git curl wget kitty firefox

Execute as non-privileged user (d3ext)

git clone https://aur.archlinux.org/paru-bin.git
cd paru-bin
makepkg -si

If you want to use ArchLinux for pentesting purposes, install the BlackArch repo:

curl -O https://blackarch.org/strap.sh
chmod +x strap.sh
./strap.sh

Install a basic graphical interface (we will change it later, this operation may take some time):

pacman -S xorg xorg-server gnome gtkmm
systemctl enable gdm
systemctl start gdm

Once you have entered the graphical interface go to "Settings" --> "Keyboard" and add your language and remove english

Now install vmware tools to set the correct screen display and more:

pacman -S open-vm-tools xf86-video-vmware xf86-input-vmmouse
systemctl enable vmtoolsd

Restart system again to verify that the screen size is correct:

reboot now

Install some fonts:

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Hack.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/Iosevka.zip
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.2.2/JetBrainsMono.zip

# Move fonts files

fc-cache -v -f

* Next steps are only to configure the system as I like:

pacman -S bspwm sxhkd polybar dunst rofi alacritty kitty feh zsh fish brightnessctl ranger pulseaudio bat thunar neofetch picom discord neovim i3lock bc flameshot inetutils lsd zsh-autosuggestions zsh-syntax-highlighting

Change default shell

chsh -s /usr/bin/zsh d3ext

Download some showcase scripts:

wget https://raw.githubusercontent.com/stark/Color-Scripts/master/color-scripts/panes
chmod +x panes
mv panes /usr/bin/panes

wget https://raw.githubusercontent.com/dylanaraps/pfetch/master/pfetch
chmod +x pfetch
mv pfetch /usr/bin/pfetch

Common errors

Low performance on Windows 11 with latest processors:

  • Run VMWare as Administrator

VMWare packages

sudo pacman -S open-vm-tools
systemctl enable vmtoolsd

VirtualBox packages

sudo pacman -S virtualbox-guest-utils
paru -S virtualbox-bin virtualbox-ext-oracle

USB errors:

  • Test USB 2.0 and USB 3.1 compatibility

  • Edit VM configuration file and add: usb.generic.keepStreamsEnabled = "TRUE" and usb.restrictions.defaultAllow = "TRUE"

Install drivers:

pacman -S mesa libva-mesa-driver libva-intel-driver libva-utils nvidia-utils intel-media-driver

Disable picom

pacman -R picom

Disable wireplumber and pipewire

systemctl --user disable pipewire
systemctl --global disable wireplumber

Check if hardware acceleration is enabled

glxinfo | grep -i "direct rendering"

Change keyboard speed

kbdrate

Customization Resources

Window Managers

Terminals

Shells

Bars

Lockscreen

Wallpapers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment