top of page
Search

Arch Linux post-installation operations

  • Writer: Chris
    Chris
  • Mar 6
  • 4 min read


Arch Linux Official Logo
Arch Linux Official Logo

In my previous post here, I explained how to install Arch Linux on an UEFI system creating an encrypted partition and using a btrfs filesystem with subvolumes.


This guide will explain what to do next in order to have a fully operational system including:

user creation, firewall installation, desktop environment installation.



Step 1: Creating a New User account


Step 1.1: Creating a user account


To create a new user on your Linux system, boot your Arch Linux system installed previously here, log in with the root account (the only one available after installation) and type:


useradd -mG wheel -s /bin/bash username

Replace `username` is your chosen username.


The useradd flags used here are:


-m: create the user's home directory

-G: to add the user to a newly created group(s)

-s: set the path to the user login shell



Step 1.2: Creating the user password


In order to access your user account you need to create a password for your user account.


This is done by typing:


passwd username

Replace `username` with your chosen username.


You will be requested to:

  • type a password

  • confirm the password.



Step 1.3: Enabling the user to use 'sudo'


To allow the new user to execute critical commands as a superuser, you must modify the `sudoers` file using the `visudo` command.


This approach helps prevent errors that could lock you out from `sudo` privileges.


Type:


EDITOR=nano visudo

The sudoers file will open in the nano editor.


Find the line starting with "# Uncomment to allow members of groups wheel to execute any command"


Remove the # at the beginning of the line below so that it will become like this:


%wheel  ALL=(ALL:ALL) ALL

Save the file by pressing CTRL+X and confirm with Y to save the file.



Step 1.4: Login with your new user account


Quit out of the root account by typing:

exit

When prompted, enter your username and password to login



Step 2: Installing and Enabling UFW Firewall


Implementing a firewall is a vital step for securing your Linux system. UFW (Uncomplicated Firewall) offers an intuitive way to handle firewall rules effectively.


To install UFW, run:


sudo pacman -S ufw

Once it's installed, you can enable it with:


sudo ufw enable

Then enable the corresponding systemd service so that it will be started at every system boot


sudo systemctl enable --now ufw

Upon activation, your firewall begins protecting your system immediately.


To verify if the firewall is running, use:


ufw status


Step 3: Installing Desktop Environments (DE)


Desktop environments are graphical environments and programs that are used to make the Linux experience similar to the mainstream operating systems like macOS and Windows, and they offer user interfaces to execute the most common tasks.


There are plenty of DE's to choose from in the Archlinux repositories.


The most popular ones being Gnome and KDE


Step 3.1: Installing the GNOME desktop environment


To install the GNOME desktop environment type:


sudo pacman -S gnome gnome-extra gdm

This command will install the base gnome packages, the extras and the login manager (gdm)


After the installation, it is recommended to enable the login manager (aka dekstop manager), i .e. the graphical program that will allow you to login with your user name and password.


Type:

sudo systemctl enable gdm

And reboot the system with:


reboot

When rebooted the login manager (gdm) window will appear requesting to confirm your username and to enter your password.


Type them and press enter.


For further information about this DE, go to the gnome.org website.



Step 3.2: Installing the PLASMA/KDE desktop environment


Plasma/KDE is very customizeble and its look and feel is mostly inspired by Windows.

You can use it out-of-the-box as-is but you can also customize every aspect of the desktop.


To install the Plasma/KDE desktop type


sudo pacman -S plasma kde-system-meta kde-graphics-meta sddm

This will install the DE, the login manager (sddm) and some basic applications like the terminal emulator and other software.


After the installation, it is recommended to enable the login manager (aka dekstop manager),

i .e. the graphical program that will allow you to login with your user name and password.


Type:

sudo systemctl enable sddm

And reboot the system with:


reboot

When rebooted the login manager (sddm) window will appear requesting to confirm your username and to enter your password.


Type them and press enter.


For further information about this DE, go to the Plasma-desktop website.



Wrapping Up


In this guide, I covered the essential steps to create a new user, grant them `sudo` access, enable the UFW firewall, and install popular desktop environments like GNOME and KDE, along with their login managers.


Some additional steps may required to fine-tune your newly installed system like the installation of the graphic card driver (especially if you have an NVIDIA card) or the Pipewire sound server to enable the sound and multimedia stack.


In this case I will recommand to check the official ArchWiki website.

Everything you may require is listed in there and carefully explained.

 
 
 

Comentários


bottom of page