# Λrch Linux

Arch Linux is a lightweight and flexible Linux distribution that follows the principles of simplicity, user-centrism, and versatility. It is a rolling release distribution, which means that it receives frequent updates and new packages are added regularly.

## Pros

* Lightweight and fast: Arch Linux is designed to be minimalistic and lightweight, which makes it suitable for older hardware or low-end devices.
* Rolling release model: Arch Linux follows a rolling release model, which means that it receives updates and new packages on a regular basis, making it always up-to-date.
* Customizable and flexible: Arch Linux gives users the freedom to customize their system according to their needs and preferences. Users can easily install and configure the packages they need, and remove those they don't.
* Strong community support: Arch Linux has a strong and active community that provides support and documentation through forums, wikis, and other resources.

## Cons

* Learning curve: Arch Linux has a steep learning curve, especially for new Linux users. It requires a certain level of technical knowledge and experience to install and configure the system properly.
* No graphical installer: Arch Linux does not have a graphical installer, so users have to install it using the command line.
* Lack of commercial support: Arch Linux is a community-driven project, which means that it does not have commercial support. Users have to rely on the community for support and troubleshooting.
* Not suitable for beginners: Arch Linux is not recommended for beginners, as it requires a certain level of technical knowledge and experience.

Overall, Arch Linux is a powerful and flexible Linux distribution that is suitable for experienced users who are looking for a lightweight and customizable system. However, it is not recommended for beginners or users who are not comfortable with the command line.

## Installation

You can download an Arch Linux image [here](https://archlinux.org/download/).

![](/files/YX1JvpflBasZOylhi7vX)

![](/files/vH9BX6gb6MCBxpGqjwSs)

![](/files/y6zhcAggY9ZajcTNCYra)

![](/files/WgsnNo7ZvRMlkpByRiOR)

Here we have two partitions, a `loop` and a `sda`. We have to create two other partitions on the `sda` for the boot in `fat32` and the rest of storage in `ext4` for the system. For that we use command `fdisk /dev/sda`. Tat command allow us to create those partitions.

```bash
fdisk /dev/sda
```

Now we can press `m` key to get some help.

![](/files/TtOxtuGpY9gUtIjDiqAk)

Once that done, you can press `w` to write and exit.

By enter the following command you can see that our partitions has been created successfully.

```bash
fdisk -l
```

![](/files/TtL8DGPrUe7V1AbC6yHb)

### Partition format

The next step is to format our partition, the `sda1` have to been formated in `FAT32` , (it allow us to boot in it) and the `sda2` have to be formated in `ext4` . To make that enter the following commands.

```c
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
```

![](/files/zCwlXTa3n3LSPr6vcfVN)

### Montage

We now have to mount the system partition (`sda2`) to create base tree to boot our Arch Linux.

```bash
mount /dev/sda2 /mnt
pacstrap /mnt base linux linux-firmware nano
```

![](/files/tzeXAn23ObzxBx2lnbYK)

Once package has been installed, we can generate a partition table with `genfstab` command and specify where he have search our partitions. For us, `/mnt` .

```bash
genfstab -U /mnt >> /mnt/etc/fstab
```

![](/files/JB9YlwJAniEFjzUVcYki)

We can now see that we have our base tree on `/mnt` .

### Basic setup

Our system is successfully installed that mean can 'chroot' to the system.

```bash
arch-chroot /mnt
```

![](/files/IJ4V5fAHEqTP8l6Zlqfl)

We have to setup some things on our device like hostname, network...

You can set the hostname by using the following command.

```bash
nano /etc/hostname
```

We can now create our hosts file and edit it.

```bash
touch /etc/hosts
nano /etc/hosts
```

```
127.0.0.1    localhost
::1          localhost
127.0.1.1    Arch-L1nux
```

![](/files/XV805zlB4V1ylASWJLB9) ![](/files/Q0axuzXEW6pt9VLN3KNw)

Let's install the bootloader `grub` by the following command.

```bash
pacman -S grub efibootmgr
```

![](/files/ExOvkk0RSGqp3hy9zQCX)

```bash
mkdir /boot/efi
mount /dev/sda1 /boot/efi
```

![](/files/Pwxk5TPb6m8MWRLjJtmj)

Install grub like this:

```bash
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
```

![](/files/QFSZgp9uieLi5X2tfQ36)

Generate a root password with `passwd` .

```bash
passwd
```

![](/files/Cw6QoUixYQvVsNY8w0Cq)

Your almost done! You can now exit unmount the `/mnt` and reboot the computer to boot on your system.

```bash
exit
unmout /mnt # If you got an error try 'unmout -l /mnt' 
reboot
```

![](/files/CNfMabSD7HAfKyVLmzVd) ![](/files/uRrQBbCuL9SKRALP4jJn)

And bim! You have your Arch Linux!

![](/files/ABLChgBrZLe2U3gh04vo) ![](/files/fukwzRKoTwivyALvnhkG)

Use the following bash script to setup the network part.

```bash
ip link set enp0s3 up
ip a
ip addr add 192.168.0.10/24 dev enp0s3 # replace by what you want
ip a
ip route add 0.0.0.0/0 via 192.168.0.10
echo "nameserver 192.168.0.1" >> /etc/resolv.conf
echo "nameserver 1.1.1.1" >> /etc/resolv.conf
ping -c3 google.com
```

To setup permanently you network on Arch Linux, use the followings commands.

```bash
sudo nano /etc/netctl/<interface_name>

Description='A basic static ethernet connection'
Interface=<interface_name>
Connection=ethernet
IP=static
Address=('192.168.0.10/24')
Gateway='192.168.0.1'
DNS=('192.168.0.1' '1.1.1.1')

sudo netctl enable <interface_name>
```

{% embed url="<https://media.giphy.com/media/sRFym5lssgcTFrMSac/giphy.gif>" %}
WELL DONE BRO !!!
{% endembed %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fastiraz.gitbook.io/doc/documentations/servers/lrch-linux.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
