Linux OS

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:

  • VirtualBox Installed: Download and install VirtualBox on your host machine.
  • Artix Linux ISO: Obtain the latest Artix Linux ISO from the official website.
  • Basic Familiarity with Linux Commands: While this guide is comprehensive, familiarity with basic Linux commands will be beneficial.

Recommended Online Training: Learn Bash Shell in Linux for Beginners


Setting Up VirtualBox

  1. Create a New Virtual Machine:
  • Open VirtualBox and click on “New”.
  • Name your VM (e.g., “Artix Linux”) and select “Linux” as the type and “Other Linux (64-bit)” as the version.
  • Allocate memory (e.g., 4 GB) based on your system’s capacity.
  • Create a virtual hard disk (e.g., 8 GB) using the default VDI format.

Configure the Virtual Machine:

  • Storage: Attach the Artix Linux ISO to the virtual CD/DVD drive.
  • Network: Ensure the network adapter is set to “Bridged Adapter” or “NAT” for internet access during installation.
  • System Settings: Enable EFI (special OSes only) if you plan to use UEFI.

Start the Virtual Machine:

  • Boot up the VM, and the Artix Linux installer should launch.

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:

  • Create Root Partition: Allocate 6 GB for the root filesystem (/).
  • Create Swap Partition: Allocate 2 GB for swap space.

Detailed Steps Inside fdisk:

  • Press n to create a new partition.
  • Choose p for primary.
  • Assign partition number 1 for root.
  • Set the first sector (default) and +6G for size.
  • Repeat for the swap partition with +2G.
  • Press w to write the changes.

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:

  • base: Core system utilities.
  • base-devel: Development tools necessary for compiling software.
  • openrc: The init system for managing services.
  • elogind-openrc: Provides logind support without using systemd.

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:

  • useradd -m alaric: Creates a new user named alaric and automatically creates a home directory.
  • passwd alaric: Sets a password for the new user.

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:

  • Maps localhost to both IPv4 and IPv6 addresses.
  • Associates the hostname artix-01.centlinux.com and a shorthand artix-01 with the local IP 127.0.1.1.

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:

  • connman-openrc: Integrates ConnMan with OpenRC for managing network connections.
  • connman-gtk: Provides a graphical interface for ConnMan, useful if you plan to use a GUI later.

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:

  • Creates a symbolic link for the eth0 network interface.
  • Adds the net.eth0 service to the default runlevel, enabling network management on boot.

Finalizing the Installation

With system configurations in place, complete the installation process.

25. Exit Chroot and Unmount Filesystems

exit
umount -R /mnt

Explanation:

  • exit: Leaves the chroot environment, returning to the original installation shell.
  • umount -R /mnt: Recursively unmounts all filesystems mounted under /mnt.

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:

  • plasma: Installs the KDE Plasma desktop environment, known for its flexibility and rich features.
  • kde-applications: Installs a suite of KDE applications, enhancing the desktop experience with tools like Dolphin (file manager), Konsole (terminal), and more.

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

  • System Updates: Regularly update your system using pacman -Syu to ensure you have the latest security patches and software updates.
  • Software Installation: Explore the Artix Linux Wiki for guidance on installing additional software and configuring services.
  • Customization: Tailor your KDE Plasma environment to suit your workflow, utilizing themes, widgets, and extensions.

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

Alaric Bird

Recent Posts

How to Install AWS CLI on Linux System

Learn how to install AWS CLI on Linux system with this step-by-step guide. Simplify your…

3 weeks ago

Puppy Linux: Fast and Simple OS

Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…

4 weeks ago

Change Apache Document Root in Linux

Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…

1 month ago

How to Change Apache Port in Linux

Discover how to change Apache port in Linux easily. Follow our simple guide to modify…

1 month ago

How to Create Virtual Host in Apache Server

Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…

2 months ago

10 Practical Tasks for RHCSA Exam with Solutions

Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…

2 months ago

This website uses cookies.