Skip to content

shim1998/arch-linux-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

arch-linux-setup

My setup of Arch Linux 2021 with KDE-Plasma as Desktop Environment. Mostly refered Arch Wiki.

  • Download Arch Linux from https://archlinux.org/download/
  • Use Belena Archer to create image and flash it into a pendrive
  • Boot the PC with the pendrive loaded with the image

Setup Internet Connection

  • If you are using Wired LAN then skip

  • use iwctl to connect wirelessly to Wifi and look for network drivers in your PC

# iwctl
[iwd]# device list
  • this will show you a list of network drives on your PC
  • Choose wireless one (for me it was wlan0)
  • Now we search for wireless networks
[iwd]# station <device name> scan
[iwd]# station <device name> get-networks
  • Now we get a list of networks to connect to.
[iwd]# station device connect SSID
[iwd]# exit
  • After all of this ensure that net connection is working.
# ping google.com

Disk Partitioning and mounting

Partitioning

  • Use lsblk or fdisk l to view your disk partitions
  • To modify your partition disk do fdisk /dev/disk_to_partition
  • If you are dual booting you don't need to create EFI Partition considering you already have a EFI.
  • Create a ext4 format drive for root folder
  • Create a swap space (optional but preferred)
Mount point 	Partition 	Partition type 	Suggested size
/mnt/boot or /mnt/efi1 	/dev/efi_system_partition 	EFI system partition 	At least 260 MiB
[SWAP] 	/dev/swap_partition 	Linux swap 	More than 512 MiB
/mnt 	/dev/root_partition 	Linux x86-64 root (/) 	Remainder of the device 

Formatting

  • Format the partitions you want to mount
# mkfs.ext4 /dev/root_partition
# mkswap /dev/swap_partition

Mounting

  • Mount the partitions into mnt
# mount /dev/root_partition /mnt
# mount /dev/efi_partition /mnt/boot
# swapon /dev/swap_partition

Install Arch in /mnt

  • Use pacstrap to mount linux onto /mnt.
# pacstrap /mnt base linux linux-firmware
  • Generate fstab
# genfstab -U /mnt >> /mnt/etc/fstab

Arch Chroot and setting up of new OS

  • Change root into arch-chroot
# arch-chroot /mnt
  • Set the time zone and set system clock to it
# ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
# hwclock --systohc
  • Edit /etc/locale.gen and uncomment en_US.UTF-8 UTF-8. Then generate locale
# locale-gen
  • Create /etc/locale.conf file and set LANG variable.
LANG=en_US.UTF-8
  • Create a hostname for your PC.
# cat >/etc/hostname
shimthearch-desktop
  • Generate matching entries for hosts.
#cat >/etc/hosts
127.0.0.1	localhost
::1		localhost
127.0.1.1	shimthearch-desktop.localdomain	shimthearch-desktop
  • Install neccessary packages that are needed
# pacman -S base-devel networkmanager vim git sddm xorg plasma wayland-session os-prober grub wpa_supplicant wireless_tools network-manager-applet gnome-keyring
  • Setup internet so that no restart is needed
# systemctl enable NetworkManager.service
# systemctl start NetworkManager.service
  • Setup user.
# pacman -S sudo
# useradd <username>
# passwd <username>
  • Add user to group
# sudo usermod -a -G wheel audio video storage network
  • Edit configuration of sudoers list
# EDITOR=<nano/vim> visudo
  • Uncomment the wheel group line.
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

GRUB Setup

  • Use OS-Prober to find your second OS. (if you are dual booting)
# os-prober
/dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
  • Install Grub in EFI partition.
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch-linux
  • Make config file for grub to remember
# grub-mkconfig -o /boot/grub/grub.cfg

OS is ready now, unmount and restart.

  • Exit out of chroot by typing exit
# exit
  • Unmount
# umount /mnt
  • Reboot
# reboot

About

My setup of Arch Linux 2021 with KDE-Plasma as Desktop Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published