How to Install Arch Linux (with Pictures)

Table of contents:

How to Install Arch Linux (with Pictures)
How to Install Arch Linux (with Pictures)
Anonim

This article explains how to replace your computer's current operating system with Arch Linux, an advanced version of Linux. You can do this on both Windows and Mac.

Steps

Part 1 of 3: Start the Installer

Install Arch Linux Step 1
Install Arch Linux Step 1

Step 1. Back up the data on your computer to an external hard drive

You will erase the current operating system, so make sure you have a copy of everything you need before continuing.

Install Arch Linux Step 2
Install Arch Linux Step 2

Step 2. Download the Arch installation image

You can find it in ISO format and copy it to a blank DVD, in order to install it on your computer. To download it:

  • Make sure you have BitTorrent or uTorrent installed;
  • Go to the page https://www.archlinux.org/download/ on a browser;
  • Click the link Torrent under the heading "BitTorrent";
  • Open the torrent you downloaded with BitTorrent or uTorrent;
  • Wait for the download to complete.
Install Arch Linux Step 3
Install Arch Linux Step 3

Step 3. Burn the image to a blank DVD

After the Arch Linux ISO download is finished through the torrent client, you need to write the image to a blank DVD using your computer's burner. Once the disk is created, leave it inside the system.

If your computer doesn't have a DVD burner, you need to buy an external DVD drive and connect it to your computer via USB

Install Arch Linux Step 4
Install Arch Linux Step 4

Step 4. Restart your computer

Click Start

Windowsstart
Windowsstart

then Power

Windowspower
Windowspower

and finally Restart in the menu.

  • On a Mac instead, you have to click the Apple menu

    Macapple1
    Macapple1

    then System Preferences …, Start, Outdoor unit, finally click Restart … in the Apple menu e Restart again when asked.

Install Arch Linux Step 5
Install Arch Linux Step 5

Step 5. Press the button that allows you to change the boot order

On newer computers, this is F12, although the exact button should appear on the screen during startup. If you don't see any keys to change the boot order, press that to configure the BIOS (usually F1, F2, F10, or Del).

Skip this step if you are using a Mac

Install Arch Linux Step 6
Install Arch Linux Step 6

Step 6. Set the hard drive as the primary boot drive

Choose the drive (for example "DVD Drive" or "Disc Drive") that contains the Arch Linux DVD and configure it as the primary drive by selecting it and pressing the + key until it reaches the top line of the menu.

  • Skip this step if you are using a Mac;
  • On some PCs, you will need to select the "Advanced" tab or the "Startup Options" section.
Install Arch Linux Step 7
Install Arch Linux Step 7

Step 7. Save and Exit the "Boot Options" screen

You should see a button indicated at the bottom or bottom right corner of the screen, which you can press to save your changes and exit. After this operation, the computer will resume the start-up procedure.

Skip this step if you are using a Mac

Install Arch Linux Step 8
Install Arch Linux Step 8

Step 8. Select Boot Arch Linux and press Enter.

This will start the operating system installer and you can continue by creating a partition on your hard drive.

Part 2 of 3: Creating Partitions

Install Arch Linux Step 9
Install Arch Linux Step 9

Step 1. Check the existing drives

You must have at least two available: your computer hard drive and the Arch Linux installation disc. To check the status of the drives:

  • Type fdisk -l and press Enter;
  • Find the name of the largest hard drive on the results screen. The name will look like "/ dev / sda" and you can find it to the right of the "Disk" header.
Install Arch Linux Step 10
Install Arch Linux Step 10

Step 2. Open the Partitions page

Write cfdisk [drive name], making sure to replace [unit name] with the name of your hard drive, then press Enter, select DOS and press Enter again.

For example, if the disk is named "/ dev / sda", you should write cfdisk / dev / sda in the terminal

Install Arch Linux Step 11
Install Arch Linux Step 11

Step 3. Delete the contents of the hard drive

Select one of the partitions in the center of the screen, go to Cancel in the middle, hit Enter and repeat for all other partitions. At the end there should be only one line left: Pri / Log Free Space.

Install Arch Linux Step 12
Install Arch Linux Step 12

Step 4. Create a "swap" partition

This will act as RAM for Arch Linux. To do it:

  • Go up New and press Enter;
  • Go up Primary and press Enter;
  • Type a number in megabytes (e.g. 1024 for a gigabyte) and press Enter. As a general rule, you should create a swap partition that is two to three times the size of your system's RAM (for example, if you have 4GB of RAM, the partition should be 8192 or 12288MB).
  • Go up End and press Enter.
Install Arch Linux Step 13
Install Arch Linux Step 13

Step 5. Create the primary partition of the hard drive

It will be the one where you will install the Arch Linux operating system, where you will save the files and other information. To do it:

  • Make sure you have selected the partition Pri / Log Free Space;
  • Go up New and press Enter;
  • Go up Primary and press Enter;
  • Make sure the number next to the "Size (in MB)" header is correct;
  • Press Enter;
  • Select the primary partition again;
  • Select Bootable and press Enter.
Install Arch Linux Step 14
Install Arch Linux Step 14

Step 6. Label the "swap" partition

This will configure it as system RAM:

  • Select the "swap" partition;
  • Go up Type and press Enter;
  • Type 82 and press Enter;
  • Without deselecting the "swap" partition, go up Write and press Enter;
  • Type yes and press Enter.
Install Arch Linux Step 15
Install Arch Linux Step 15

Step 7. Write down the partition names

In the "Name" column on the left side of the screen, you should see a name (eg "sda1") next to the "swap" partition and a similar one (eg "sda2") next to the primary one. You will need both of these names to format the partitions.

Install Arch Linux Step 16
Install Arch Linux Step 16

Step 8. Close the "cfdisk" utility

To do this, go up Quit and press Enter.

Install Arch Linux Step 17
Install Arch Linux Step 17

Step 9. Format the primary partition

This way the operating system can use it. To do this, type mkfs.ext4 / dev / [primary partition name] and press Enter.

If the partition has the name "sda2", type mkfs.ext4 / dev / sda2

Install Arch Linux Step 18
Install Arch Linux Step 18

Step 10. Mount the formatted partition

Type mount / dev / [partition name] / mnt and press Enter. This operation makes the partition a usable drive.

Install Arch Linux Step 19
Install Arch Linux Step 19

Step 11. Add a swap file to the "swap" partition

Type mkswap / dev / [partition name] and press Enter, then type swapon / dev / sda1 and press Enter again. After completing this step, you can move on to installing Arch Linux.

For example, if your "swap" partition has the name "sda1", type mkswap / dev / sda1 then swapon / dev / sda1

Part 3 of 3: Install Arch Linux

Install Arch Linux Step 20
Install Arch Linux Step 20

Step 1. Set up the Wi-Fi connection

If your computer is connected to the router via ethernet, you can skip this step. Using ethernet is a better choice than Wi-Fi.

  • Type ip link and press Enter to determine the interface name of your network adapter;
  • Type pacman -S iw wpa_supplicant and press Enter to install the necessary software;
  • Type pacman -S dialog and press Enter to install the Wi-Fi menu;
  • Type pacman -S wpa_actiond and press Enter to install the software that allows you to automatically connect to known networks;
  • Type systemctl enable netctl-auto @ interface name.service to enable the auto connect service for your wireless network adapter;
  • At the next start, type wifi-menu interface name to access your adapter's wireless menu. Once you have connected to a network for the first time, in the future this will be automatic on every boot. Do not enter this command now or you will lose access to your network.
Install Arch Linux Step 21
Install Arch Linux Step 21

Step 2. Install the base system

Type pacstrap / mnt base base-devel and press Enter. This will start the installation of the system.

This usually takes about 15-30 minutes depending on the speed of your internet connection

Install Arch Linux Step 22
Install Arch Linux Step 22

Step 3. Open the open "chroot"

Type arch-chroot / mnt and press Enter. This allows you to change the root directory configuration, including the password.

Install Arch Linux Step 23
Install Arch Linux Step 23

Step 4. Choose a password

You will use it to log into your root account. To do it:

  • Type passwd and press Enter;
  • Type in a password and press Enter;
  • Repeat the same password and press Enter.
Install Arch Linux Step 24
Install Arch Linux Step 24

Step 5. Choose your language

To do it:

  • Type nano /etc/locale.gen and press Enter;
  • Scroll down until you find your preferred language;
  • Select the letter directly in front of the "#" symbol next to your language and press Delete;
  • Remove the "#" symbol for all other versions of your language (for example all versions of "it_IT");
  • Press Ctrl + O (or ⌘ Command + O on a Mac), then press Enter;
  • Exit by pressing Ctrl + X or ⌘ Command + X;
  • Type locale-gen and press Enter to complete the language setup.
Install Arch Linux Step 25
Install Arch Linux Step 25

Step 6. Choose a time zone

To do it:

  • Write cd usr / share / zoneinfo and press Enter;
  • Type ls and press Enter;
  • Find your country or region, then type cd usr / share / zoneinfo / nation (for example Italy) and press Enter;
  • Type ls again and press Enter;
  • Find your time zone, then type ln -s / usr / share / zoneinfo / country / time zone / etc / localtime and press Enter.
Install Arch Linux Step 26
Install Arch Linux Step 26

Step 7. Assign a host name to your computer

Type echo name> / etc / hostname and press Enter.

For example, if you want to name your computer "Panda", type echo Panda> / etc / hostname

Install Arch Linux Step 27
Install Arch Linux Step 27

Step 8. Download the GRUB bootloader

This is the program that will install Arch Linux. To do it:

  • Type pacman -S grub-bios and press Enter;
  • Type y and press Enter;
  • Wait for the GRUB download to finish.
Install Arch Linux Step 28
Install Arch Linux Step 28

Step 9. Install GRUB

When you do this, make sure you install it on the real hard drive (eg "sda") and not the partition (eg "sda1"). To do it:

Type grub-install / dev / drive name (e.g. grub-install / dev / sda and press Enter

Install Arch Linux Step 29
Install Arch Linux Step 29

Step 10. Create an "init" file

Inside this file information about your computer's hardware is saved, so that Linux can use it. To create it, type mkinitcpio -p linux and press Enter.

Install Arch Linux Step 30
Install Arch Linux Step 30

Step 11. Create a configuration file for GRUB

To do this, type grub-mkconfig -o /boot/grub/grub.cfg and press Enter.

Install Arch Linux Step 31
Install Arch Linux Step 31

Step 12. Create an "fstab" file

Type genfstab / mnt >> / mnt / etc / fstab and press Enter. This way Arch Linux will be able to identify the file systems of your partitions.

Install Arch Linux Step 32
Install Arch Linux Step 32

Step 13. Restart your computer

To do this, type umount / mnt and press Enter, then type reboot, press Enter, eject the installation disk and wait for the boot procedure to finish.

Install Arch Linux Step 33
Install Arch Linux Step 33

Step 14. Log into your account

Type root in the "login" field and press Enter, then type your password and press Enter. Congratulations, you have successfully installed and opened Arch Linux on your computer!

Recommended: