GithubHelp home page GithubHelp logo

geeknozy / arch-linux-installation-guide Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 169 KB

This is a user friendly guide to install Arch Linux on UEFI enabled systems.

Home Page: https://geeknozy.github.io

License: GNU General Public License v3.0

linux arch arch-linux installation linux-desktop linux-distribution linux-installation linux-installations

arch-linux-installation-guide's Introduction

Arch-Linux-Installation-Guide

The Arch Way - without any automated installation script

userfriendly guide to install arch linux - by geeknozy

Note : This guide is for x86-64 architecture with UEFI enabled systems only.

This guide is made in such a way that users may find it helpfull / userfriendly and can follow along with the installation steps and can install Arch-Linux on thier systems.

Warning : Any data-loss or system brick by using this guide I / geeknozy will / should not be held responsible. This guide will only provide confusion free steps to install Arch-Linux and might differ what is shown in other tutorials, so as to say : Read the official Arch wiki, it is one of the greatest documentation ever.


Step 1: Go to https://archlinux.org


Step 2: On the right top corner click on download button which will redirect you to the download page.


Step 3: Select the mirror closer to your country or the global mirror to download the ISO package.


Step 4: Note the md5/sha256sum (checksum) provided


Step 5: check the integrity of the downloaded ISO file with md5/sha256sum.


Step 6: Use CLI-DD(in Linux) / RUFUS-DD or Balena-Etcher to write the ISO to the USB-Stick (note the data in USB will be lost)


  • NOTE: you might have to disable secure boot inorder to boot into arch-live USB

Step 7: Goto your system BIOS select te boot from USB (arch-installation-media).


Step 8: Select installation media.


Step 9: You will be prompted with CLI as root@archiso



Step 11: Once done with partition scheme now mount the partitions

mounting root partition to /mnt of the iso (all packages will be downloaded here).
here in below mount command the X in sdX is the letter of your partition depending on your h/w eg : sda or sdb or sdc

mount /dev/sdX2 /mnt

creating seperate efi directory to mount efi partition

mkdir -p /mnt/boot/efi

mounting efi partition

mount /dev/sdX1 /mnt/boot/efi

Step 12: type lsblk -> you should see your mount points.


Step 13: Now downloading the base packages for the system.

pacstrap /mnt base base-devel linux linux-headers linux-firmware nano intel-ucode
alternative option if you like LTS kernel
pacstrap /mnt base base-devel linux-lts linux-lts-headers linux-firmware nano intel-ucode
alternative option for power user / high performance tuned kernel
pacstrap /mnt base base-devel linux-zen linux-zen-headers linux-firmware nano intel-ucode
NOTE: nano is my preferred editor you can also use other command line based like VIM editor.
NOTE: intel-ucode if you have intel processors or else if you have amd processor use amd-ucode.

This will take some time to download and install base, kernel and included packages based on mirrors / server speed and your internet speed.


Step 14: Now after getting command prompt. you have to generate fstab file.

genfstab -U /mnt >> /mnt/etc/fstab
NOTE: -U is uuid for devices (will be different for every hardware/disk).

type below command to check the generated fstab

cat /mnt/etc/fstab

Step 15: Enter the chroot environment.

now you have to see that your command prompt change.

arch-chroot /mnt

Step 16: Set Time

get your timezone if you are not aware how, using below command

timedatectl list-timezones | grep your-country-name or timezone name

Step 17: Set timezone.

using below command get your time zone here the YourRegionName might be your country name or region depending on where you are zonename will be your City or your locality

ln -sf /usr/share/zoneinfo/YourRegionName/zonename /etc/localtime

for example below:

ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

Step 18: sync you hardware clock and system clock.

hwclock --systohc

Step 19: Generating your Locales (Languages and keyboards).

nano /etc/locale.gen
  • find for line with #en_US.UTF-8 UTF-8 (this is for english) or your locale format

  • uncomment that line by removing # at the begening of the line.

  • save the file (ctrl+o) and exit nano editor (ctrl+x)

  • type below command to generate your locale

locale-gen

once executed type below command to add genrated locale to your conf file.

nano /etc/locale.conf

add your locale formate to the config file

LANG=en_US.UTF-8

save and exit the file


Step 20: Configuring host system.

type below command to set host name

nano /etc/hostname

add your desired name for the system and save and exit file.

next to configure localhost and internet.

nano /etc/hosts
  • add these lines after first two heading lines
127.0.0.1     localhost
::1           localhost
127.0.1.1     hostname.localdomain     hostname
NOTE: the hostname is the one you set with above hostname file.

Optional Step

  • mkinitcpio is a Bash script used to create an initial ramdisk environment
mkinitcpio -P

wait for mkinitcpio execution to complete


Step 21: Give password for root user.

  • this is to set root user password so create strong password and confirm.
passwd

Step 22: Downlaod grub boot loader.

pacman -S grub efibootmgr networkmanager network-manager-applet git pulseaudio alsa-utils

alternative if you prefer pipewire which is more mature than pulseaudio

pacman -S grub efibootmgr networkmanager network-manager-applet git pipewire pipewire-pulse pipewire-alsa alsa-utils

Note: use wireplumber for media session service instead pipewire-media-session (personal preference)
for other packages accept defaults and download - install packages.


Step 23: Installing grub.

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch

once the grub is installed you should check that no erros are reported which will be shown after execution once done then generate config for grub by sending output of grub-mkconfig to the grub.cfg file using below command

grub-mkconfig -o /boot/grub/grub.cfg

Step 24: Now Enable the services that are needed for the system.

systemctl enable NetworkManager.service

Step 25: Add different user (not root) NOTE: This is wheel group user to get sudo privileges.

useradd -mG wheel username

NOTE: here username can be your choice

  • after the above command type below command to set password to created user
passwd username

NOTE: here username is the user name which you have given above while creating user


Step 26: Add User for sudoers file.

EDITOR=nano visudo
  • Find the line named under wheel group.
#wheel ALL=(ALL) ALL

uncommment that line (remove # symbol) - save and exit.


Step 27: Done with the base install now type

exit
  • after exit command type below command to unmount mounted partitions for safer reboot.
umount -R /mnt

Reboot your computer

reboot
  • if you get greeted by grub then you successfully installed base Arch Linux.

We are done with the base install of Arch Linux without graphical user interface. Happy saying 'BTW I use ARCH'.

create a pull request if you have any issues

arch-linux-installation-guide's People

Contributors

geeknozy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

deekshithkatta

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.