This is the full transcript of The Only Arch Linux Installation Guide You'll Ever Need, published on YouTube by Josean Martinez. Every paragraph carries the moment it was spoken, so you can click any line to jump straight to that point in the video, search the whole thing for a word, or copy it out.
0:00What's up, you guys? In this video, I'm going to be showing you everything you need to do to install Arch Linux onto your machine. I'll be installing Arch onto a used Andy ThinkPad I got off of eBay, so you can see the entire process from scratch on real hardware. We'll be doing a manual installation as it's the best way to really understand everything you're doing, how the system works, and have full control. At the end, you'll have Arch installed on your machine with the GNOME desktop environment. This is just to get you started. In my next video, I'll be doing a complete guide on how I set up Hyprland for a simple and
0:34productive keyboard-centric workflow. Once we're done, you'll finally be able to say, "I use Arch, by the way." All right, let's get started. The first thing we need to do is to acquire the Arch Linux installation image. I find that the easiest way is to go down here to the HTTP direct downloads. Down here, you'll see a list of mirror websites
0:55that you can use to install the image. You can use the worldwide ones. I'll just use the first one here for United States. You'll want to locate the dot ISO file and click on it to get it downloaded. Then we can go back, and if we scroll up again, even though this step is optional, it's recommended that you check the integrity and authenticity of your image. And to do this, we'll need the SHA256 sums text file. In Chrome, I'll do command S and just save it to my downloads folder. And I'll also click on the PGP signature to get that downloaded as well. So, we'll have three different
1:32downloads, a dot ISO.sig file, this 256 sums text file, and the actual Arch Linux ISO that we'll flash onto a USB. Now, in a terminal window, I'll go into my downloads folder where these three files were downloaded, and then we can use SHA256 sum. I already have this installed on my Mac. If you don't, you can use homebrew
1:57and do brew install coreutils. And after you do that, then you can do sha256sum -c and then the name of the text file we downloaded, which is sha. I'll press tab and enter. Then this is what we want. It says that the ISO is okay. Then we need to verify the signature to validate the ISO file's authenticity. To do this, we can use GNU PG. We can install it with
2:26brew install GNU PG. And then we can copy this command from the download page, paste it. This will download the signing key. Then copy this command, go back to the terminal, paste it. This will actually verify the signature. What we want to see is a message like this one, good signature from Pierre Schmitz. And you don't need to worry about this particular warning. If the signature isn't valid or there's an error with the checksum, you should try installing the ISO file again, but from a different mirror. And then verify once again. Now that we've made sure that we've downloaded a good image, we can go ahead
3:05and flash it onto a USB. I think the easiest way to do this is with Balena Etcher. You can go ahead and download it. I'm on my Mac, so I'll click this link here and complete the installation. It'll look something like this. Then we can click here, flash from file. And in my downloads folder, I want to locate this dot ISO file here and then click open. Then you'll need to make sure that your USB flash drive is connected to your computer. I'm using an adapter like
3:35this one to connect it to my MacBook. I'll click allow here, select target. And this is the flash drive I want to use. And then you can finally click flash. You might get asked for your password. And then just wait till it finishes flashing. And now we're ready to actually install Arch Linux onto our computer. All right, so the first thing we need to do is make sure that secure boot is disabled, especially if you're using a modern PC that came with Windows pre-installed like this one. To turn it off during the boot process, you have to press on a specific key. I'm just going to click on restart, and as it starts
4:13up, I'll press enter, and then I get this menu here. It says that I have to press F1 to enter the BIOS setup utility. You might need to check online what the steps would be for you. I have to go over here to security, and then to secure boot. If it's on, make sure to turn it off. Then on this machine, I can
4:33do F10 to save and exit. Connect the USB flash drive onto the computer, then I'll go ahead and restart the computer once again. Press enter repeatedly. If I press F12, we can access a special menu called the boot menu, and I want to select the USB that I just connected to the computer. Then I'll press enter on this first one
4:59that says Arch Linux install medium. And then you'll see a screen like this one. You can increase the font size by doing set font tr-132b. And then you can continue the installation on this computer, or you can connect to it through SSH. I'm going to show you how to do it, but this is completely optional. It'll also allow me to show you a better resolution screen for the rest of the tutorial. Now, regardless, we want to connect to the internet. The easiest way is to plug in an Ethernet cable. I'll show you how you can connect to Wi-Fi. You can run iwctl, then device list. This will show you
5:40your wireless device name. Mine is called wlan0. Make sure it's powered on, then you can do station and then the name of your wireless device, WLAN0 in my case. Scan. This will scan for available networks. Then, station WLAN0 get networks. And then, station WLAN0 connect and the name of your Wi-Fi network. And then, you'll need to enter the password for it if it has one. Now, you can check if you're connected to the internet by using ping and then a
6:18website like ping.archlinux.org. And you should periodically get results from that website. Then, if you want to find your local IP for SSH, you can do IP addr show. And under WLAN0, you'll find your IP address. You should probably write that down or save it somewhere. And then, you can do passwd to set a password for the root user. Finally, make sure that SSH is enabled by doing systemctl status sshd. And you
6:56should see that it's active and running. If not, you can do systemctl enable --now sshd. All right. So, now I'm back on my MacBook and I can SSH onto the ThinkPad. I can do SSH. It's going to be the root user at and then the IP address we recorded earlier. You might get asked if you want to trust this. Just type yes and press enter. And then, the password we created for the
7:25user. This is the same password you created when doing passwd earlier. All right. So, now that we're connected to the ThinkPad, we can continue the installation. Before we move forward, we should do timedatectl status and make sure that the system clock is synchronized. Once you connect to the internet, this should say yes. Now, what we should do next is to verify the boot mode of our computer. You can run the following command. If it's 64 or 32, it's a UEFI boot mode. If you get no such file or directory, it's a BIOS boot mode. This will affect the way we partition our disks, which leads us to
8:03the next step, which is to partition the disk. Essentially, what this means is that we'll take the physical disk. In my ThinkPad, it would be the SSD where files are stored, and we're going to split it up into separate sections that each have an individual purpose. This is especially useful for keeping specific data separate. You'll at least need a single partition for the root directory, and if you're in a UEFI system like mine, then we'll need an EFI system partition that the computer will use to boot the operating system. Now, we'll also be adding a separate partition for our home directory. So, the operating system itself and any applications or
8:46packages you install will be kept separate from your user configuration files, anything in your downloads folder, or any other user-specific files. This way, you can reinstall Arch Linux or even switch to a different operating system and keep your user-specific files untouched. We'll also add a small swap partition that can be used as extra memory if your RAM runs out. To identify your devices, you can do fdisk -l, and then you can use the size of the device to identify which one is your main drive. This is my USB flash
9:23drive. This one up here is my SSD, which is supposed to have about 500 GB. Now, the important thing here is to take note of the name of the device, and down here you'll see that it's already has some partitions because this computer came with Windows pre-installed, and these are the partitions for that. So, I'm going to be getting rid of these. Now, to actually do the partitioning, I think CFdisk is a great tool for this. And then, we need to type the name of the device. For my SSD, this would be {slash} dev {slash} nvme0n1, which is the name I just identified with the previous command. Now, I want to
10:04delete these partitions. Make sure that if you have important data on these, you back everything up so you don't lose it after we delete these partitions. Now, to delete a specific partition, you can just type d. This hasn't been made permanent yet, so nothing really has changed. I'm going to go down and press d again, and d again, and d again. And now, we have 476 GB of free space. Now, first, we'll create our EFI system partition for booting the operating system. We'll press n for new. I just want this to be
10:391 GB, so 1 capital G, and press enter. Then, we need to change the type. We'll press t, and then up here, we have EFI system. Press enter to select that. And let's go down. I'm just using my up and down arrows for this. I'm going to press n for new. This is going to be our root partition. This is where the operating system and any packages you will install will be stored. So, the size of this depends on what you're actually planning to install. The Arch Wiki recommends at least 32 GB for this, but it's better to have extra, especially if for some reason you want to install some
11:19specifically heavy packages. And because changing this in the future is going to be more tricky than getting it dialed right now. So, I'm just going to do something like 75 GB for the root partition with 75 uppercase G. Now, by default, the type is set to Linux file system, which is what we want. Now, you can go down with J or down arrow, press N for new, and now we'll create a partition for swap. Again, this is used for when you run out of memory. It used to be recommended for this to be twice the amount of RAM you have on your machine, but with the memory
11:56capabilities of modern computers, the Arch Wiki recommends 4 GB as a sane default. So, I'll do four capital G and press enter, and then we need to press T to change the type. This is going to be Linux swap, and then for the last one, we'll go down, press N for new, press enter to use all of the remaining space, and we'll just leave it as the default type of Linux file system. Now, make sure to confirm all of your changes, and then we can press shift and W, and then again, make sure that you've backed up everything on your disk if you have any important information. I've never used
12:32this computer before, so I'm going to type yes to confirm and press enter. And we're done. I'm going to press Q to quit. Now, again, we can do fdisk -l, and over here we can see all of the different partitions we just created, and on the left-hand side, you can see the name for each. So, it's the name of the device followed by P1, P2, P3, P4, and it's important you make note of the type of each of these partitions along with their name because we now have to format each. Formatting each of these partitions just means that we're going to assign a specific file system to each
13:10so that the operating system can actually organize and store files in each of these partitions. We'll do something like mkfs.ext4. This is to create an ext4 file system, which is one of the most popular, and if you're unsure, you should probably just use this, and we're going to assign this to our root partition, which is
13:32/dev/nvme0n1p2.
13:38I know this because of the result of fdisk and the size of it. Now, this message means that this partition has some data in it. This doesn't really matter to me. I'm going to format it and clear all this out, so I'll do Y and press enter. And for the swap partition, we want to do mkswap /dev/nvme0n1, and this is partition number is
14:02partition number three. Then for the EFI system partition, we want to format it to fat32, so we'll do mkfs.fat -f32 /dev/nvme0n1, and this is partition number one. Then finally, I also want to make the home partition ext4, so this is the same command we used before, mkfs.ext4 /dev/nvme0n1, and this is partition number four. Again, if you need to remember what the name of the partition is, you can do fdisk
14:46-l and check the partitions again. Before I continue, I wanted to let you know that I'm still working on my course platform, Terminal Hackers. Thank you to all of you who have subscribed to the waitlist. I'm currently working on building the platform and putting the course together. This is going to be a complete guide on setting up your terminal environment for software development with zsh for your shell, Neovim for the code editor, and tmux for multiplexing. It's the setup that I use daily for professional software development. If you're interested, you can sign up for the waitlist and newsletter linked in the description, so you can get updates from me and know
15:21exactly when it gets released. All right, let's continue. Now, we need to mount the partitions. What this means is that essentially we'll assign each partition to a specific directory, so that the files that are accessed within that directory will be stored in that specific partition. First, we need to mount the root partition, and the command we'll use is mount, then the name {slash} dev {slash} nvme 0 and 1, and this is partition number two, and we have to mount it to {slash} mnt. {slash}
15:56mnt here represents the root directory. So, the root partition will be mounted to the root directory, so that all the files under the root directory in your Arch operating system will be stored in the specific partition. As I mentioned earlier, we want to separate the home directory, which is where all of the user-specific files are stored, by assigning it to a different partition, which would be the home partition we created. If I do ls {slash}, you'll see that mnt is a directory. It just represents what the root directory will look like when we boot onto our Arch Linux installation. So, we want to create a new directory at {slash} mnt
16:39{slash} home, and then mount {slash} dev {slash} nvme 0 and 1 partition 4, which is our home partition. We want to mount it to {slash} mnt {slash} home. We also want to create a boot directory under {slash} mnt, like so, and we'll mount our EFI system partition here by doing mount the name of the EFI partition {slash} dev {slash} nvme 0 and 1 partition 1 to {slash} mnt {slash} boot, which is the directory we just created. And then we just need to enable our swap partition by doing swap on and the name of the swap partition {slash} dev {slash} nvme0n1
17:27partition number three. Again, just use fdisk if you forget what the name of the partition is. Now you can check what we just did by doing lsblk. You'll see our four different partitions here and each of the mount points. You can make sure that these are correct by taking a look at the size and where it should be mounted. Now we need to install essential packages to our system, but to do this we have to first set up our mirrors. Arch mirrors are essentially servers around the world that you can install packages from and it's best to install from the fastest ones and the ones that are closest to
18:03you. The mirror service are defined in {slash} etc {slash} pacman.d. Pacman is the official Arch package manager mirror list. We can open this up with the less pager to take a look at the list. You can scroll with J and K or your up and down arrows and take a look at this list. You can exit with Q. We can use a very useful tool called reflector to update this list so that we only use the best servers according to your location. I'm going to do {dash} {dash} latest five to just use the best five servers. I want them to be only in the US. I'll do {dash} {dash}
18:47protocol and HTTP, HTTPS to only use servers that use this protocol. I want to sort by rate and I want to save this to the file with our mirror list. So it's {slash} etc {slash} pacman. d {slash} mirror list. All right, so once that's done we can take a look at the contents in the file now by doing cat /etc/pacman
19:17.d/mirrorlist. As you can see, we only have five results now. You can use the Arch Wiki to learn more about this tool and run Reflector --help to see all of the available commands. Now, the only thing that will get carried over from this live environment we're currently in to the actual Arch installation will boot
19:40into once we finish is the mirrorlist. So, anything else you have to actually install yourself. Now, to actually install packages onto the future Arch system, we'll use pacstrap -K. We want these to go to /mnt, which represents our root directory and it's where our root partition is mounted and we're required to install base. We also need Linux, which is the Linux kernel,
20:07basically the operating system core. We'll do Linux firmware. That's for hardware stuff like Wi-Fi and Bluetooth. We'll also install NetworkManager. This is for managing Wi-Fi and Ethernet connections. We'll install vim and vi to have a text editor, base-devel for useful commands on the terminal like sudo and make. And I also recommend you install CPU microcode updates. This includes hardware bug and security fixes. If you have an Intel CPU, you can
20:39do intel-ucode. And if you have an AMD, then you can do amd-ucode. My ThinkPad has an AMD CPU. And then I'll press enter and we'll have to wait for that to finish. All right, next we need to generate an fstab file. We can do genfstab -U /mnt, then double greater than sign. We want the output of this to go to
21:05/mnt/etc/fstab. Now, we've mounted our partitions to where they should go manually, but when the system reboots, it needs to know where to automatically mount each partition. The file that we're creating with this command tells the operating system exactly how to do that. We're using {dash} u to use UUIDs to identify each file system. We specify /mnt so that genfstab automatically identifies all of the mounts under this mount point, and we want to output the result
21:41to a file located in /mnt/etc/fstab. Now, we can take a look at the results by doing cat /mnt/etc/fstab, and you'll see that each file system is referenced by a UUID. This first one will be mounted at root and is the ext4 partition we created for this. Then, there's the other ext4 partition that will be mounted at home. Then, this is the EFI system partition will be mounted to /boot, and then the swap partition isn't really mounted to a specific
22:18directory. Perfect, so this looks good. Just make sure that everything looks correct for you as well. Now, we need to configure the system to be able to interact with it as if we have booted into the new system instead of the USB flash drive. We can do arch-chroot to change root, and we want to change the root to /mnt. And now, we can configure the system. The first thing we should do is to set up the time zone. We can create a symbolic link with ln {dash} sf, and the source will be at user/share/zoneinfo/ {slash} and now we have to specify a region. You can press tab here to see
22:57available options. I'm going to do ame tab. I'm just going to do p u e tab for Puerto Rico and we want to create the sim link at /etc/localtime. The wiki also recommends that you run the following command. Now we need to set up localization. This is so that we have the correct formatting for stuff like dates and currency according to our region. We can use an editor like vim to then open the file located in /etc/locale.gen and then we need to uncomment the utf-8 locales that we're going to be
23:38using. In my case, mine is called en_US. I can look for it in vim by doing /en_US. Then I can press zero to go to the start of the line and x to delete the hash tag, j to go down and x to do it again. That just uncommented those two lines. Then I'm going to save this with colon w q and press enter. Now we can generate
24:07the locales by running locale-gen. Now to set up the system locale, we need to open, again with vim, /etc/locale.conf and then press i for insert mode, type lang, all in uppercase, and set this to a specific locale. Use the value of the first column of one of the lines we just uncommented. So in my case, it would be
24:35en_US.utf-8. Then press escape, colon w q to write and then quit and press enter. If we want to see the contents of this file, we can do so with cat and do /etc/locale.conf. Now we also want to assign a consistent identifiable name to our system. To do so, we can create a hostname file by
25:00doing them {slash} etc {slash} hostname. And then write our hostname here. I'm going to do I for insert mode. Mine is going to be called ossean arch thinkpad. Then I'm going to do escape, colon, write and quit. Now earlier with packstrap we installed network manager. We need to enable this as a system service so that it automatically starts when the system boots. To do so, we can do system CTL enable and then network
25:31manager. For some reason the N and the M need to be capitalized here. We'll just press enter. Now we should set the password for the root user. Do passwd and assign a password to it. This is for the root user of your new Arch Linux installation. And I also recommend you add a user for yourself. You can do useradd {dash} m to create the home directory for this user, {dash} uppercase g to assign groups to this user. We'll assign wheel {comma}
26:03users, and then the name of the user. I'm just going to call this ossean. And then we can set a password for it. You can do passwd and the name of the user, in my case ossean, and then provide the password. We added this user to the wheel group so that it can run commands as root with sudo. So I could do something like sudo systemctl, for example. But we need to
26:29enable this. To do so, we can do visudo. You have to have vi installed, so that's why we installed it earlier with packstrap. Then do {slash} and look for percent wheel. And we need to uncomment this line. This will allow members of group wheel to execute commands as root. So I'm just going to go into insert mode with I and backspace to delete the hashtag. Now we've uncommented this line and we can do colon wq to save and quit. So now users in the wheel group can run commands as root. Now the last thing we need to do is to install and configure our boot loader so that we can boot into
27:10Arch Linux whenever we power on our computer. I'm going to be using grub for this as it works well. We can install it with pacman, which is the Arch package manager -S and you need to install grub and EFI boot mg r. Y to proceed with the installation. Now the steps here will look a little bit different if you're on BIOS instead of UFI. I recommend you take a look at the grub wiki if you're on BIOS for the specific instructions on that. I'm going to be setting this up for UFI. Now we need to install grub to the disk. This will be installed onto the EFI system
27:48partition we created earlier. To do this we'll do grub install and then we specify the target like so. My system is 64-bit UFI so this would be x86_64-efi. If you have 32-bit instead, it would look like this i386-efi. Then we do --efi-directory and our EFI directory is /boot. Remember earlier we mounted the EFI system partition to /mnt/boot, but now that we changed root into /mnt, it's just /boot. And then we'll do --bootloader-id to assign an ID to the boot loader and we'll call this just grub. You should now see a new directory under /boot
28:44called grub. Now we need to generate Grub main configuration file. To do this, we run grub-mkconfig -o. We want the output to go to boot /grub/grub.cfg and press enter. We're almost done now. We can just add some additional packages to the system. We can use pacman -S and I'm going to add just git, man-db, and man pages so that we can use man pages to learn more about the commands that we're using. I also want to add reflector so that we can update our
29:21mirror list. Now, I'm also going to go ahead and install the GNOME desktop environment just to get you started with something that you can actually use. In my next video, I'm going to be showing you how to set up Hyperland from scratch, but this will give you something usable to start with. I'm going to do just pacman
29:40-S gnome. This is going to install a bunch of different things. If you want to just use Hyperland later, we can remove them in the future. I'm going to press enter, enter again, again, and Y to proceed with the installation. And then we need to enable GDM, which is the GNOME display manager, which will allow us to
30:00choose a desktop environment and log in. We'll do systemctl enable gdm. Now, we can exit to exit out of the chroot environment, then run umount -R to unmount everything we've mounted starting at /mnt. We can execute reboot to restart the computer. All right, so now it's rebooting. You have to disconnect the flash drive. You'll see Arch Linux at the top. You can just wait and it'll boot up automatically or you can press enter, and then the GNOME display manager will show up with the user account we created earlier. I can log in with it, Enter the
30:42password that I created for this user. And you should get a tour to explore your new environment. As a final thing I'd recommend for you to do, you can press your super key, which would be the Windows key, look for terminal, and open the console. We're just going to set up time synchronization to prevent clock drift and ensure accurate time. To do so, you can do sudo timedatectl set-ntp true, and enter your password. Then if you do timedatectl status, you should see system clock synchronized yes. Now you should update your system and all of the packages we've installed. You can do this with sudo pacman - capital S Y U. The S is
31:27for synchronize, Y is to refresh all of the package databases, and U is to update all of the outdated packages. Also, if you want to use Bluetooth, you'll need to install the necessary packages and start and enable the service. You can do this with sudo pacman - capital S, and you'll need bluez, bluez-utils,
31:50and bluez-deprecated-tools.
31:58And then you can enable and start the service with sudo systemctl enable --now bluetooth. You can check if it's active and running with systemctl status bluetooth, and we're good to go. And that's it, you guys. You have a working Arch Linux installation. All right, you guys, that's it for this video. I hope you enjoyed it and found it helpful. My next video will be on how to set up Hyprland, so make sure to subscribe to the channel and hit on the bell icon so you can know exactly when that gets published. If you enjoyed this
32:31video, please leave a like down below. It really helps me out. And if you have any questions or feedback for me, you can also leave a comment. I'll see you guys in the next one. Peace.
No line in this video contains that word.
Where these words come from. This is the caption track YouTube holds for this video, written automatically by YouTube rather than by the creator. We read it, tidied the line breaks and laid it out so it can be read. The plain text version is at https://viewrankai.com/tools/youtube-transcript/TS1ghG3c3xI.txt.
All rights in this video belong to Josean Martinez. Watch it on YouTube. If this is your video and you would rather this page did not exist, tell us and we will remove it.