In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
How to install Arch Linux, I believe many inexperienced people are helpless about this, this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.
Arch Linux is an x86-64 general purpose distribution popular with DIY Linux users and hardcore Linux fans. The default installation file contains only a basic system, and it expects users to configure and use Arch themselves. Based on the KISS principle (Keep It Simple, Stupid!), Arch Linux is a system focused on elegance, code correctness, simplicity and simplicity.
Arch supports rolling release mode and has its own package manager, pacman. In order to provide a cutting-edge operating system, Arch never misses out on any of the latest sources. In fact, it provides only a minimal base operating system that allows you to install Arch on low-end hardware and install only the software packages you need.
It is also one of the most popular operating systems to learn Linux from scratch. If you want to experience it yourself in the DIY spirit, you should try Arch Linux. This is seen by many Linux users as the core of the Linux experience.
In this article, we'll learn how to install Arch, configure it, and install a desktop environment on top of it.
How to install Arch Linux
The installation method discussed here is to remove the existing operating system completely from your computer and install Arch Linux on it. If you want to follow this tutorial to install Arch, make sure you have backed up all your files or you will lose them. Cut it.
Before you install Arch from USB, make sure you have met the following conditions:
Conditions for installing Arch Linux:
A x86_64 (e.g. 64-bit) compatible machine
Once you have confirmed that all conditions are met, you can start installing Arch Linux.
Step 1: Download the ISO file
You can download ISO from the website [4]. Arch Linux installation requires a machine with at least 512 MB of RAM and 800 MB of disk space and x86_64 (e.g. 64-bit) compatibility. However, it is recommended that you have at least 2 gigabytes of memory and 20 gigabytes of disk space so you don't have trouble installing your desktop environment.
Step 2: Create an Arch Linux field USB drive
We need to create a live USB drive for Arch Linux using the ISO file you just downloaded.
If you are using Linux, you can create a live USB memory with dd command. Remember to change/path/to/archlinux.iso in the example below to the actual storage location of your ISO file and/dev/sdx to your disk device number (e.g./dev/sdb). You can learn about your device by using the lsblk[5] command.
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdx status=progress && sync
Under Windows, there are several ways to create a live version of USB memory. The recommended tool is Rufus. We have already had a tutorial on how to use this tool to create an Antergos live USB memory [6]. Because the Antergos distribution is based on Arc h, you can use the same tutorial.
Step 3: Boot from the Field USB Memory
Once you have created Arch Linux Live USB drive, shut down your computer. Plug in your USB drive and boot up the system. At boot, press F2, F10, or F1 (depending on your computer model) to access boot settings. Here, select the item "Boot from USB memory or removable device."
Once you select it, you'll see an option like this:
Arch Linux
Select Boot Arch Linux (x86_64). After various system checks, Arch Linux boots to the root user's command line interface.
The next steps include partitioning the disk, creating the file system, and mounting it.
Step 4: Disk Partitioning
The first step is to partition your hard drive. A single root partition is the simplest, creating the root (/) partition, swap partition, and home partition on top of it.
I have a 19 gigabyte hard drive and I want to install Arch Linux here. To create a partition, enter:
fdisk /dev/sda
Press n to create a new partition. Press p to create the primary partition, and then select the partition number.
The first sector will be selected automatically, you just press enter. When determining the last sector of a partition, enter the size of that partition.
Create two partitions in the same way for the home and swap partitions, press w to save the changes and exit.
root partition
Step 4: Create a file system
Since we already have three partitions, the next step is to create a file system to format the partitions.
We create file systems on the root and home partitions with the mkfs command, and swap partitions with mkswap. We format the disk with ext4 file system.
mkfs.ext4 /dev/sda1mkfs.ext4 /dev/sda3mkswap /dev/sda2swapon /dev/sda2
Mount these partitions under the root and home partitions:
mount /dev/sda1/mntmkdir /mnt/homemount /dev/sda3/mnt/homeStep 5: Install
We have created and mounted partitions and started installing the most basic packages. The basic package includes all the packages necessary for the system to run. For example, GNU BASH shell, file compression tools, file system management tools, C language library, compression tools, Linux kernel and its modules, class libraries, system tools, USB device tools, Vi text editor, etc.
pacstrap /mnt base base-devel Step 6: Configure the system
Generate an fstab file that specifies how disk partitions, block devices, or remote file systems are mounted into the file system.
genfstab -U /mnt >> /mnt/etc/fstab
Enter the chroot environment so that you can switch the current root directory for the current process and its children.
arch-chroot /mnt
Some systemd tools that need to remain connected to the data bus cannot be used in chroot environments, so you need to exit from the current environment. To exit chroot, use the following command:
exit Step 7: Set Time Zone
Set the time zone with this command:
ln -sf /usr/share/// /etc/localtime
To get a list of time zones, enter:
ls /usr/share/zoneinfo
Set the hardware clock with the hwclock command:
hwclock --systohc --utc Step 8: Set Region
The file/etc/locale.gen contains all locale and system language settings in comments. Open it with Vi and remove the comments before the language you want to select. I chose en_GB. UTF-8.
Now generate a configuration file for the locale in the/etc folder using the following command:
locale-genecho LANG=en_GB. UTF-8> /etc/locale.confexport LANG=en_GB. UTF-8 Step 9: Install bootloader, set hostname and root password
Create the/etc/hostname file and add a corresponding hostname:
127.0.1.1 myhostname.localdomain myhostname
I added ItsFossArch as my hostname:
echo ItsFossArch > /etc/hostname
Then add it to/etc/hosts as well
To install bootloader use the following command:
pacman -S grubgrub-install /dev/sdagrub-mkconfig -o /boot/grub/grub.cfg
To create a root password, enter:
passwd
Enter the password you want.
When you're done, update your system. But chances are your system is already up to date because you downloaded the latest ISO.
pacman -Syu
Congratulations! You have installed the command line version of Arch Linux.
Next, we'll learn how to set up and install a desktop environment for Arch. I love the GNOME desktop environment, so I chose it here.
Step 10: Install the desktop (in this case GNOME)
Before you install desktop, you need to set up network.
You can see your port with the following command:
ip link
On my computer, the port name is enp0s3.
Add the following paragraph to the document:
vi /etc/systemd/network/enp0s3.network[Match]name=en*[Network]DHCP=yes
Save and exit. Restart the network to apply your changes.
systemctl restart systemd-networkdsystemctl enable systemd-networkd
Add the following two sentences to/etc/resolv.conf
nameserver 8.8.8.8nameserver 8.8.4.4
The next step is to install the X environment.
Enter the command below to install Xorg and use it as a display server.
pacman -S xorg xorg-server
gnome contains the basic GNOME desktop, gnome-extra contains GNOME applications, archive manager, disk manager, text editor and other applications.
pacman -S gnome gnome-extra
The final step is to open the GDM Display Manager on Arch.
systemctl start gdm.servicesystemctl enable gdm.service
Restart your system and you will see the GNOME login screen.
After reading the above, do you know how to install Arch Linux? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.