Site icon CentLinux

How to install Artix Linux in VirtualBox

Share on Social Media

Learn how to install Artix Linux in VirtualBox with this step-by-step guide, covering disk partitioning, system configuration, and setting up KDE Plasma for a complete installation. #centlinux #linux #artixlinux

Introduction

Artix Linux is a versatile and user-friendly Linux distribution that emphasizes simplicity and efficiency. Unlike its counterparts, Artix uses OpenRC, runit, or s6 as its init systems instead of systemd, providing users with more control over their system’s initialization processes. This guide will walk you through the step-by-step process of installing Artix Linux in VirtualBox, complete with detailed explanations for each command and configuration step.

How to install Artix Linux in VirtualBox

Prerequisites

Before you begin, ensure you have the following:

Recommended Online Training: Learn Bash Shell in Linux for Beginners


Setting Up VirtualBox

  1. Create a New Virtual Machine:

Configure the Virtual Machine:

Start the Virtual Machine:


Starting the Installation

Once the VM boots into the Artix Linux environment, you can begin the installation process after login with default credentials as artix user and artix password.

1. Gain Root Access

su

The su command switches the current user to the superuser (root), providing the necessary permissions to perform system-wide changes.

2. Set the Keyboard Layout

loadkeys en

This command sets the keyboard layout to English. Adjust accordingly if you’re using a different layout.

3. Partition the Disk

fdisk /dev/sda

fdisk is a disk partitioning utility. Here, /dev/sda represents the primary virtual hard disk. Within fdisk, you’ll perform the following steps:

Detailed Steps Inside fdisk:

4. Format the Partitions

mkfs.ext4 -L ROOT /dev/sda1

Formats the first partition (/dev/sda1) with the ext4 filesystem and labels it as ROOT.

mkswap -L SWAP /dev/sda2

Initializes the second partition (/dev/sda2) as swap space and labels it as SWAP.

5. Mount the Filesystems

mount /dev/disk/by-label/ROOT /mnt

Mounts the root partition to the /mnt directory, preparing it for the installation of the base system.

swapon /dev/disk/by-label/SWAP

Activates the swap space, allowing the system to use it for memory management.

6. Verify Network Connectivity

ping artixlinux.org

Checks if the system can reach the Artix Linux website, ensuring that internet connectivity is active. Press Ctrl+C to stop the ping.

7. Start the NTP Service

rc-service ntpd start

Starts the Network Time Protocol daemon to synchronize the system clock with internet time servers.


Configuring the System

With the basic system mounted and network active, proceed to install the base system packages.

8. Install Base Packages

basestrap /mnt base base-devel openrc elogind-openrc

basestrap installs the essential base packages into the mounted filesystem (/mnt). The packages include:

9. Install the Linux Kernel and Firmware

basestrap /mnt linux linux-firmware

Installs the Linux kernel and firmware necessary for hardware compatibility.

10. Generate the Filesystem Table

fstabgen -U /mnt >> /mnt/etc/fstab

Generates an /etc/fstab file based on the current mount points, ensuring that filesystems are mounted correctly on boot.

11. Chroot into the New System

artix-chroot /mnt

Changes the root directory to /mnt, effectively entering the newly installed system environment for further configuration.


Configuring the System

Within the chroot environment, perform system configurations such as timezone, localization, and bootloader setup.

12. Set the Timezone

ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Creates a symbolic link to the desired timezone file (America/Chicago). Adjust the timezone as per your geographic location.

13. Synchronize Hardware Clock

hwclock --systohc

Synchronizes the hardware clock with the system clock, ensuring accurate timekeeping.

14. Install and Configure GRUB Bootloader

pacman -S grub os-prober efibootmgr

Installs the GRUB bootloader, os-prober for detecting other operating systems, and efibootmgr for managing EFI boot entries.

grub-install --recheck /dev/sda

Installs GRUB to the primary disk (/dev/sda) and rechecks for existing configurations.

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

Generates the GRUB configuration file based on the current system setup.

15. Install a Text Editor

pacman -S nano

Installs nano, a user-friendly text editor, for editing configuration files.

16. Set Root Password

passwd

Prompts you to set a password for the root user, enhancing system security.

17. Create a New User

useradd -m alaric
passwd alaric

Explanation:

18. Configure Hostname

vi /etc/hostname

Opens the /etc/hostname file in the vi editor to set the system’s hostname.

Add the Following Line:

artix-01.centlinux.com

Sets the hostname to artix-01.centlinux.com. You can choose a name that suits your preferences.

19. Configure Hosts File

vi /etc/hosts

Opens the /etc/hosts file for editing.

Add the Following Lines:

127.0.0.1        localhost
::1                   localhost
127.0.1.1        artix-01.centlinux.com artix-01

Explanation:

20. Update Hostname Configuration

vi /etc/conf.d/hostname

Opens the hostname configuration file for OpenRC.

Add the Following Line:

hostname='artix-01.centlinux.com'

Above directive, explicitly sets the system’s hostname within the OpenRC configuration.


Configuring Network Services

To ensure network connectivity after boot, install and configure network management services.

21. Install DHCP Client

pacman -S dhcpcd 

Above command installs dhcpcd, a DHCP client daemon that automatically obtains IP addresses and network configurations.

22. Install ConnMan for Network Management

pacman -S connman-openrc connman-gtk

Explanation:

23. Enable ConnMan Service

rc-update add connmand

Adds the connmand service to the default runlevel, ensuring it starts on boot.

24. Configure Network Interface

ln -s /etc/init.d/net.lo /etc/init.d/net.eth0
rc-update add net.eth0 default

Explanation:


Finalizing the Installation

With system configurations in place, complete the installation process.

25. Exit Chroot and Unmount Filesystems

exit
umount -R /mnt

Explanation:

26. Reboot the System

reboot

Restarts the virtual machine, booting into the newly installed Artix Linux system.


Post-Installation Setup

After rebooting, log in with the newly created user credentials (alaric) and proceed with further system setup.

27. Install the X.Org Server

pacman -S xorg

Installs the X.Org server, which provides the foundational graphical system for Linux desktops.

28. Install KDE Plasma and Applications

pacman -S plasma kde-applications

Explanation:

Optional: Depending on your preferences, you can install additional packages or customize the desktop environment further.

If you are new to Linux and facing difficulty in working at Linux Bash prompt. We recommend that, you should read The Linux Command Line, 2nd Edition: A Complete Introduction by William Shotts.


Video Tutorial: Artix Linux OpenRC Installation


Conclusion

Congratulations! You have successfully installed Artix Linux in VirtualBox. This installation process provided a hands-on approach to setting up a Linux system from the ground up, offering valuable insights into system configuration and package management. Artix Linux, with its OpenRC init system and robust package repositories, offers a stable and efficient environment for both beginners and experienced users.

If you are Looking for a reliable Linux system admin? I offer expert management, optimization, and support for all your Linux server needs, ensuring smooth and secure operations. Have a look at my Fiverr Profile.

Next Steps

Feel free to explore the rich ecosystem that Artix Linux offers, and enjoy your journey into a customizable and efficient Linux environment!

Exit mobile version