Logo

dev-resources.site

for different kinds of informations.

Mastering Arch Linux: A Guide to Installation, Commands, and Mastery(Part-1)[Must Read]

Published at
12/4/2024
Categories
archlinux
linux
cli
beginners
Author
trixsec
Categories
4 categories in total
archlinux
open
linux
open
cli
open
beginners
open
Author
7 person written this
trixsec
open
Mastering Arch Linux: A Guide to Installation, Commands, and Mastery(Part-1)[Must Read]

Author: Trix Cyrus

Waymap Pentesting tool: Click Here
TrixSec Github: Click Here
TrixSec Telegram: Click Here


Arch Linux is renowned for its simplicity, flexibility, and power, making it a favorite among advanced Linux users. Whether you’re looking to customize every detail of your operating system or delve into the depths of Linux, Arch is the perfect playground. In this article, we’ll explore how to get started with Arch Linux and master its essential commands.


Why Choose Arch Linux?

Arch Linux stands out for several reasons:

  • Rolling Release Model: Always have the latest software.
  • Minimalist Installation: You install only what you need.
  • AUR (Arch User Repository): Access to a vast library of community-contributed packages.
  • Active Community: A rich ecosystem of guides and forums.

If you're ready to take control of your Linux experience, Arch Linux is the way to go.


1. Installing Arch Linux

Prerequisites

  1. Download the ISO: Head to Arch Linux's official website and grab the latest ISO.
  2. Create a Bootable USB: Use tools like Rufus or dd to create a bootable USB.
  3. Internet Access: Ensure you have a stable connection.

Installation Steps

  1. Boot into the ISO:
    • Select your bootable USB from the boot menu.
  2. Partition the Disk: Use fdisk or cfdisk:
   fdisk /dev/sda
Enter fullscreen mode Exit fullscreen mode

Create partitions for the root, swap, and optionally home.

  1. Format the Partitions:
   mkfs.ext4 /dev/sda1  # For root
   mkswap /dev/sda2     # For swap
   swapon /dev/sda2
Enter fullscreen mode Exit fullscreen mode
  1. Mount the Partitions:
   mount /dev/sda1 /mnt
Enter fullscreen mode Exit fullscreen mode
  1. Install the Base System:
   pacstrap /mnt base linux linux-firmware
Enter fullscreen mode Exit fullscreen mode
  1. Generate the Filesystem Table (FSTAB):
   genfstab -U /mnt >> /mnt/etc/fstab
Enter fullscreen mode Exit fullscreen mode
  1. Chroot into the System:
   arch-chroot /mnt
Enter fullscreen mode Exit fullscreen mode
  1. Set the Timezone and Locale:
   ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
   hwclock --systohc
Enter fullscreen mode Exit fullscreen mode
  1. Set the Root Password:
   passwd
Enter fullscreen mode Exit fullscreen mode
  1. Install a Bootloader (e.g., GRUB):

    pacman -S grub
    grub-install /dev/sda
    grub-mkconfig -o /boot/grub/grub.cfg
    
  2. Reboot:

    exit
    umount -R /mnt
    reboot
    

2. Essential Arch Linux Commands

Once you’ve installed Arch Linux, mastering these commands will help you navigate and customize your system.

Package Management with Pacman

Pacman is Arch’s package manager. Here are some essential commands:

  • Update the system:
  sudo pacman -Syu
Enter fullscreen mode Exit fullscreen mode
  • Install a package:
  sudo pacman -S package_name
Enter fullscreen mode Exit fullscreen mode
  • Remove a package:
  sudo pacman -R package_name
Enter fullscreen mode Exit fullscreen mode
  • Search for a package:
  pacman -Ss keyword
Enter fullscreen mode Exit fullscreen mode
  • Clean the package cache:
  sudo pacman -Sc
Enter fullscreen mode Exit fullscreen mode

Working with AUR (Arch User Repository)

AUR allows you to access community-built packages.

  1. Install an AUR helper like yay:
   sudo pacman -S yay
Enter fullscreen mode Exit fullscreen mode
  1. Install an AUR package:
   yay -S package_name
Enter fullscreen mode Exit fullscreen mode

System Management

  • View running processes:
  top
Enter fullscreen mode Exit fullscreen mode
  • Check disk usage:
  df -h
Enter fullscreen mode Exit fullscreen mode
  • Monitor memory usage:
  free -h
Enter fullscreen mode Exit fullscreen mode
  • List hardware details:
  lscpu
  lspci
  lsblk
Enter fullscreen mode Exit fullscreen mode

3. Customizing Arch Linux

Window Managers

Arch Linux doesn’t come with a graphical interface by default, so you’ll need to install one. Popular options include:

  • Desktop Environments:
    • GNOME: sudo pacman -S gnome
    • KDE Plasma: sudo pacman -S plasma
  • Window Managers:
    • i3: sudo pacman -S i3
    • Openbox: sudo pacman -S openbox

Themes and Appearance

  • Install a GTK Theme:
  sudo pacman -S arc-gtk-theme
Enter fullscreen mode Exit fullscreen mode
  • Set up Fonts:
  sudo pacman -S ttf-dejavu ttf-liberation
Enter fullscreen mode Exit fullscreen mode

Configure Dotfiles

Dotfiles allow you to personalize your shell, editor, and more. Examples:

  • .bashrc or .zshrc for shell customization.
  • .vimrc for Vim editor settings.

4. Troubleshooting Tips

  • Pacman Database Issues:
  sudo rm -rf /var/lib/pacman/db.lck
Enter fullscreen mode Exit fullscreen mode
  • Boot Issues: Reboot into a live USB and chroot into your system to fix configurations.
  • AUR Build Errors: Ensure all dependencies are installed using makepkg.

5. Resources for Arch Linux Users


Conclusion

Mastering Arch Linux takes patience and practice, but the reward is a system tailored precisely to your needs. By learning its installation process, essential commands, and customization options, you’ll not only gain a deeper understanding of Linux but also appreciate the power of open-source technology.

Have questions or tips about Arch Linux? Share them in the comments below!


~Trixsec

archlinux Article's
30 articles in total
Favicon
GNOME vs KDE Plasma: Which One Is for You?
Favicon
Día 1/365. Instalar Rust en ArchLinux
Favicon
Git Auto Push
Favicon
Endpoint Security Bypass EXPOSED! Hackers Don't Want You to Know This!
Favicon
Creating a bootable USB flash drive in a GUI application
Favicon
Install and use VirtualBox on Arch Linux & Snigdha OS
Favicon
As a beginner I use Arch, Neovim and code in assembly btw
Favicon
Publishing My First AUR Package: CPIG
Favicon
Como habilitar el "Natural scrolling" en el touchpad en Arch Linux
Favicon
Essential Linux Text Manipulation Tools: cut, sort, uniq, tr 🛠️
Favicon
Resolving Audio Issues on Arch Linux with Hyprland: A Step-by-Step Guide
Favicon
Shell Scripting for Beginners: Automating Common Coding Tasks
Favicon
Essential Arch Linux Commands: Advanced Mastery(Part-2)[Must Read]
Favicon
Create Your Custom WSL from Any Linux Distribution (Part - 2)
Favicon
How to use Pacman on Arch Linux 🚀
Favicon
How to Install BlackArch on Top of Arch Linux 🖤🐧
Favicon
Automate Repetitive Tasks: Creating Bash Scripts for Everyday Use 🚀
Favicon
Bash Basics: A Beginner’s Guide to Shell Scripting
Favicon
Mastering Arch Linux: A Guide to Installation, Commands, and Mastery(Part-1)[Must Read]
Favicon
Arch Linux Pacman: A Detailed Guide with Commands and Examples 🎩🐧
Favicon
Introducing Snigdha OS: A Fresh Take on Open-Source Operating Systems
Favicon
🚀 Arch Linux Cheat Sheet: Essential Commands for new Users
Favicon
.py extension convention
Favicon
Repurposing Your Old Laptop: A Linux-Powered Home Server
Favicon
Step-by-Step Guide to Installing PostgreSQL on Arch Linux
Favicon
Is Linux an Operating System or a Kernel?
Favicon
Installing Arch Linux in UEFI systems(windows)
Favicon
New Rotating Shapes Animation
Favicon
What to do if you accidentally remove the `amd-ucode` package on Arch Linux
Favicon
Holy Trinity?

Featured ones: