 Hi, I'm Denshi and this is my Arch Linux troubleshooting guide. In this video, I'm essentially gonna be running through a few basic mistakes and things that people tend to do when installing or using Arch Linux. Now the first big one is internet connectivity. So you plug in your Arch USB stick into your laptop and you don't have an ethernet cable and you're trying to connect to Wi-Fi from the command line. Here's a short little video I made that explains how to actually do that with the IWCTL utility. All right, so let's say we have this laptop over here which it's got the Arch Linux ISO littered up into it. So after booting in, we won't have any internet connectivity because, well, it's not plugged into any ethernet or anything like that. So we're gonna have to use Wi-Fi through the IWCTL utility. But basically, once you're in the actual ISO, you wanna run IWCTL just like that. And there you go, we're now in the IWD prompt. Now, once we're in here, you can type help and you'll get a bunch of useful commands you can use to connect to the internet. The big one we wanna look at over here is the station section. So we wanna, first of all, run station list. And that's gonna give us information on all the devices which are in our computer. Now, as you can see, we have WLAN zero and it's scanning for networks. Now, I didn't set it to do that, but if your one isn't scanning, then you wanna run station, then remove list. You wanna run WLAN zero scan. Just gonna turn on its scanning. Now, once you've done all of that and it's scanning, you wanna run station WLAN zero get dash networks. And that's gonna list the networks that I found. Now, there's my phone. That's what I'm trying to connect to. It's my phone's hotspot and it has a password because the security says it's got a password key. So in that case, I'm gonna run station WLAN zero connect and then the name of the network, which in my case is Alex phone, just like that. It's gonna ask for a passphrase. I'm gonna put it in and there you go. Now it should be connected, but just to make sure you wanna run station WLAN zero show and there you go. It's showing that it's connected. It says over here, state connected. So if you wanna exit to leave the prompt, now we're connected to the internet. You can run ping google.com or any other website or whatever and boom, you're gonna get a connection. So that's how you connect to WiFi on the command line on Arch Linux using the IWCTL utility. Okay, now that we've run through that, let's take a look at a few other basic things which people often get wrong when installing Arch Linux. The first big one is setting the time and date. Now, if you go to the Arch Wiki, there's actually a little note that says to do this when installing Arch Linux, but some people tend to skip this, but essentially what you wanna do is you wanna run time date CTL set dash NTP true and then boom. Now your system will be checking with an NTP server, which is a time server, to make sure that its own time is correct. The reason you wanna do this is because SSL connections, they need the time on your computer to be set relatively correctly, otherwise they won't work. Now let's take a look at another thing which people sometimes get wrong, which is using the Pacman package manager. They get an error that says something like, oh, the keys couldn't be verified, it couldn't verify the integrity of packages. This is because the Arch Linux key ring isn't updated. So I just wanna make sure that people are updating it when they're booting up into their Arch ISO. So you would have to run Pacman dash SY to update the database as well and then Arch Linux dash key ring, just like that. And if you wanna run this faster, you can do dash dash no confirm to skip the enter. And as you can see, it'll start downloading that package right over there. And if there are any new keys, it will add those. Now in this case there weren't any, so it's fine and that should be pretty much it. Okay, so that's all the basic stuff out of the way. Now for the more complex things people tend to mess up. The first big thing is partitioning. Now if you run CF disk on a new disk, you'll get a prompt like this. Now if you already have a disk that's already partitioned, which is likely because you're installing Linux and it's not pre-installed, then you just gotta pick either DOS or GPT depending on your system. If you have a BIOS machine, which in Arch Linux terms means that when you boot it up into the ISO, you got a colored prompt with a colored Arch Linux logo and all that kind of stuff. That's the Arch Linux BIOS prompt. Then in that case, you wanna select DOS. But if you're using UEFI, which means that when you boot it up into Arch Linux, you got that black prompt with the black and white Arch Linux text and stuff, then you wanna select GPT because it's generally better for UEFI. Okay, so I'm gonna select GPT because that's what I'm using. And the first thing I wanna make sure here is that you're making a boot partition. People often forget to do this because lots of Arch Linux install guides skip this step, but you have to create a boot partition if you're on a UEFI system. So most modern laptops and modern computers, you have to do this. And this partition should be around 200 megs in size, so you can type 200M. Now for the type, you have many options here. You can pick from any of these things. You can select EFI system if you want it to be an EFI boot partition, but it doesn't really matter as long as you format this partition to FAT32, which we'll take a look at later. Now besides that, you only really need a root partition to get Arch Linux working, which is where all your files are actually stored. If you want, you can make a swap partition to make something like, I don't know, two gigs and that can be a swap. And this over here, this can be the root to the rest of the space. But essentially what I want to clarify is that when you're on UEFI, you have to have this 200 megabyte EFI partition. And if you do not have it, then you're gonna struggle. You're not gonna be able to boot in your system. Anyways, now I'm gonna write these changes. And one thing you want to make sure is that you're formatting all your partitions right as well because people tend to forget to do this or mess it up as well. So if you run LSBLK, you'll see the status of all your partitions in SDA1, as you can see, that's the 200 meg one. And as I said before, you want that to be a FAT32 partition. So you want to run mkfs.fat-f32dev-sda1 just to make sure. And for SDA2, if you want that to be swap, you can run mkswapdev-sda2 and then for SDA3, mkfs.exd4dev-sda3. But remember, you want to make SDA1 or whatever partition you're using for boot, which should be the first one really, FAT32, you always want to format it to FAT32. But anyways, that's the partitioning stuff people tend to mess up. Now, here's another thing which I see people get wrong all the time. So first of all, let's mount all our systems. Let's mount dev SDA3 to slash mnt. Let's make a directory in slash mnt called bootefi, mount dev SDA1 to bootefi and then turn on the swap for dev SDA2. Now, if you look at the guide, it tells you to run packstrap. Okay, we're gonna run packstrap slash mnt. We're gonna run base linux, maybe sudo. You definitely want that, network manager, all that kind of stuff, right? You want all these packages, vim, grub, efi, boot, mgr, which you need for efi. Okay, here's a step which people often forget after they've ran that packstrap command. They forget to change route. You have to run arch-chrute slash mnt, just like that. And now that we have this white non-colored prompt, we're actually in our route. So if you run lspok, SDA3 right there, that disk we formatted to ext4, that's mounted on the slash. That is our system where we're at right now. And if we type exit, we're back in the USB. And just like that, the SDA3 partition that's mounted to mnt on the USB. So I want to clarify that when you're installing archlinux, a lot of the steps, in fact, most of the steps are done from inside your system. Once you've already installed all the bases and you're inside of it after running that chrute command. And here's another thing which people often mess up at this step, they forget to generate the fstab. Now thanks to people who've pointed this out in the comments, it is best practice to run genfstab with the dash capital U option to generate UUIDs. So if you run genfstab dash U then slash mnt, you get an output of all the things mounted to slash mnt. And we're gonna take that and send it over to slash mnt at C fstab. And people often forget to do this step. And that's why then they boot up into their system and no drives are mounted, nothing is mounted. And they get stuck because only the kernel is loaded. They don't have anything mounted. So just make sure you generate the fstab and send it over to at C fstab relative to your mount point, which is slash mnt in my case. Okay, so now that's covered. Let's actually go into the system and do a few other things that people often mess up. Now setting your locale, time zone and stuff. Yes, it's important and you should do it, but it is not necessarily gonna break a system if you don't set it. It will break certain programs and certain programs will just refuse to run if you haven't done it. So you have to set locale and time zone. However, it's not gonna like break the system. It's not like you're not gonna boot because the time isn't set correctly. However, you are genuinely gonna have problems or not boot if you don't do the following things. The first big thing is setting up grub, which is the boot manager. I installed grub to this system and grub comes with all these helpful commands to help you install it. The first one is grub dash install. You give it a device, so in my case, dev sda, which is the device where everything's mounted to. So the virtual hard disk over here and it will automatically detect whether you're EFI or you're EFI or BIOS or whatever and it will install everything accordingly. And there you go, it did it. The other big thing is configuring grub which you have to do otherwise, it'll just boot up into grub and it won't know where your kernel is. Now if you list your boot directory, you'll notice there's a kernel right there. It's VM linus-linux right over there. Grub has to know where that is so it can boot up into your kernel. So if you run grub-mkconfig, it will automatically do that, find your kernel and spit out configuration. Now this output over here is pretty useless for us because we want this to be in a file. So you can give it the dash O option and send it to the boot grub-grub.cfg file which grub reads every time it boots up. So if you run this command, it will show you the log of the config and there you go, it has successfully generated the config. Anyways, there's one last little tip that I want to mention here and that's your network daemon. Now in my case, I have network manager installed here but this applies for any other network daemon you want to use or whatever network config you do. A lot of people boot up into Arch Linux and then they're stuck because they don't have networking working. I recommend using network manager, not only because pretty much every desktop environment uses it but because it automatically sets up networking and all that kind of stuff as soon as you boot up into your system. If your system's plugged into LAN, it will connect to LAN instantly and do all of that for you. You won't have to do any configuration or run any commands. Now it'll also help you set up wifi with its utility called NMCLI over here but obviously I'm not gonna run it now because we're in the USB and network manager isn't running. So running system CTL enable network manager is very important because if you don't run that, you won't have networking. But anyways, I hope you enjoyed and found this actually useful and actually gained some knowledge here especially with that wifi on the terminal guide. I hope that helps people I might make that into a short just to help more people. I've been Denshi, goodbye.