 Have you ever wanted to install Arch Linux, but maybe you were a little afraid because you've heard these horror stories You know a lot of people like to overblow Arch Linux as far as the difficulty of the installation process It's really quite easy to install some people. I think mistakenly think it takes a long time to install Arch Linux It's actually very quick to install Arch Linux. So today. I'm gonna run through an arch installation Installation I'm gonna do this inside a virtual machine I'm gonna install Arch Linux inside virtual box and if you're new to installing Arch Linux or new to installing any Linux using a Command line installer. I would suggest you also do it in a virtual machine before trying it on physical hardware What I want you to do is install virtual box and follow along with me And I promise you at the end of this video both you and I will have working Arch Installations inside virtual box for the first thing we need to do of course is create a virtual machine inside virtual box I'm gonna go to the menu here that says machine I'm gonna click on new and I'm gonna title this virtual machine Arch Linux and by the title it's already figured out that the OS type is Linux and the version is Arch Linux 64 bit If I needed to I could go through the drop-down menu and select something else But this is correct in my case. So I'm gonna click next now. Let's give it some RAM I'm gonna give my VM four gigs of RAM the amount of RAM you give your VM Well, of course, depend on how much RAM your host machine has how much RAM you can spare I've got 64 gigs of RAM on my host machine So I can give this VM as much RAM as I want but four gigs is more than enough for what we're doing Then create a virtual hard disk now. Just leave it on default VDI as the disk image is fine. Just click next Dynamically allocated for the hard disk that is fine click next and then let's choose a virtual hard disk size I'm gonna give this virtual machine a 20 gigabyte disk and I'm gonna create and Create one more time. All right, and we have created that VM now click on the new VM that we just created go to settings and In settings what I want to do is I want to go to system. I want to give the processor More than one CPU. I'm gonna give it two CPUs You say I have up to 24 available on my machine your machine may have a different number of CPUs available But I want to beef it up just a little bit. So I'm gonna give it a little more power I'm also going to enable EFI because the last time I did a arch installation video I did BIOS and a lot of people wanted a EFI installation. So today, let's run through a EFI Installation of arch and I'm gonna go to display video memory the max you can give virtual box at least in the GUI is 128 megs give it 128 megs max it out and then I'm gonna enable 3d acceleration even though I don't think we're ever gonna boot into a graphical environment for this video then I'm gonna go to storage and I'm going to click on the little optical disc here and We are gonna add our arch Linux ISO. So I downloaded the latest ISO and It appears there. I'm not gonna change anything with audio or network I matter of fact the only other thing I'm gonna do is I'm gonna go down to user interface And this is just for me not for you guys I'm gonna click off the menus and the bottom sys tray that the windows have just because I'm recording these windows And I want them to be as clutter-free as possible and I'll click okay. I'm gonna go ahead and launch my new VM All right, and we get to a command prompt and we need to read the installation guide especially if you've never done this what you need to do is go to the arch wiki and On the main page of the arch wiki. There will be a link to the installation guide This installation guide is not very long. You could page down two or three times and be at the end of the installation guide It's not a very lengthy process matter of fact more than half the guide is probably stuff that won't even apply to us So really it's a very short and quick installation So the very first thing we need to do is set our key map now by default the key map is set for us But if you were unsure about the key map What you would do is you would go in here and you will run this command LS Meaning list all the contents of this directory and what do we want to run LS on? We want to run it on this directory slash user slash share slash KBD slash key maps and then slash two asterix slash one more asterix dot map dot GZ and If you run that it will list out all the available key maps that are Possible for you to choose matter of fact what I would do is I would actually Pipe that through less So I would run that same command and then at the end add a pipe symbol and then the list command so that you can Just hit enter and scroll the entire list Makes it a lot easier to to find what you need for me though Like I said the US key map is the default So I actually don't need to set anything but those of you that do you would then run this command load keys Space and then the key map that you found so if you were German for example, you would load D e dash Latin one for the German key map. Let me clear the screen the next thing we need to do is make sure we have Working internet because we don't have internet then nothing's gonna work. So let's go ahead and do a ping Google.com and Let's see if we actually have a ping It doesn't look like we do oh there it goes. It's just really really slow Really really slow there it goes. All right, it took a second, but now it's working as expected All right control C kills the ping so we do have network next We need to make sure our system clock is accurate So we need to run the following command time date CTL all one word time date CTL space Set dash NTP space true run that command and if everything worked right you can verify it with time date CTL space status and Yeah, it's active everything worked just fine with that The next thing we need to do is we need to partition our disk now. This is Probably the most critical part of the installation So this is the part where you can mess some stuff up But the arch wiki suggests that we use f disk to partition our drives I'm not very familiar with f disk. I've used it a little bit in the past Typically I do CF disk when I do my partitioning but for purposes of this video I'll actually do the f disk so I'm going to run f disk space dash L and This will list all of our drives that are available for us to use here now There are two drives here instead of just one even though I Created one drive for the VM the second drive here is just the loopback device It's really just associated for the live environment that we booted into but really our device is that top one the 20 gig Hard disk that I created at slash dev slash sda. So now let's run f disk slash dev slash sda and Now it's asking for more commands. We have a prompt I don't know a lot of the commands, but you can type M for help So I'm going to type M for help and the first thing we need to do is create a new label And we need to either do oh on the keyboard for a doll's partition table or G for a GPT partition table So since I'm doing EFI what we should do GPT So I'm going to type G to create a GPT partition table. All right now that we've done that again I'm not sure what command I want to type next. I'm going to do M for the help again And I think what we need to do at this point is we need to add a partition to that disk and to add a new partition We need to do in so type in hit enter It's going to ask us partition number one through 128 because using EFI you can have up to 128 partitions on a disk That's insane. You'd have to be a complete nutter to have 128 partitions on a disk But all right, what's the partition we're doing here and we'll do partition one Then it's asking. What is the first sector by default? It's at 2048 I would just go with the default and then the last sector what you need to do here is give it a bite size For the last sector or just give it the plus symbol plus a size and I'm going to do plus 550 m 550 megabytes because that is going to be our EFI partition and it needs to be 550 megabytes All right created new partition one and it created it as a type Linux file system That's not the correct type for that partition, but we will change it later for now Let's keep going because we need three partitions. We just created the EFI partition I'm also going to create a swap. So in on the keyboard for add new partition partition number This will be partition two First sector just leave it as default. It's going to be the end of the last sector And then the last sector for this partition again, we'll give it a size I'm going to do plus and since it's swapped that I'm creating here. I'm going to do two gigs in this vm So plus two g All right, and it created new partition two and it also created it as type Linux file system That's not correct. We'll change it in a minute. But let's add that third partition. So in for add another partition partition three First sector just hit enter and then the last sector I'm just going to hit enter and it's going to by default give it the remaining space And it created partition three of Linux file system That's will be the correct type for this one size 17.5 gigabytes because that was all the remaining space After the 550 megabyte efi partition and the 2 gigabyte swap partition So i'm going to hit m on the keyboard again And to change a partition type you need to hit t on the keyboard. So t Which partition do we need to change the type of well, let's start with partition one and Partition type or alias. I'm not sure what we want to choose out of list It says type capital l to list everything. So Let's do l and it looks like the very first one. You see number one is efi system. That's what we want So q to quit out of that and then i'm going to type one for efi system And it changed that partition to from linux file system over to efi system Perfect. Now i'm going to type t on the keyboard again for change partition type and now we need to do partition two And partition two Let me do l to get the list partition two needs to be linux swap Which linux swap is number 19 in the list q to get out of that and then type 19 And it changed partition two from linux file system to linux swap And then partition three is also set to linux file system. I don't need to change that because that's going to be our System file system, right? That's going to be the big partition and it needs to be linux file system So I think we're done here. I think what we need to do now is write the table to the disc So let me hit m here and it looks like we need to type w To actually write the table and then it automatically exits out of f disk for us Now we need to go ahead and make our file system So we need to make three different file systems on those three different partitions that we did Now we did the efi partition. It needs to be fat 32. So we need to do mkfs dot fat space dash F 32 capital f 32 actually space slash dev slash sda one All right, so we made the fat 32 file system on sda one now sda two is the swap So let's do mk swap all one word make swap space slash dev slash sda two We just made the swap. We need to turn the swap on so do swap on all one word space slash dev slash sda two All right, and finally we need to make the file system on the big partition on sda three So let's do a make file system mkfs dot extend for ext four space slash dev slash sda three And we have made our file systems now. We need to mount The big partition sda three. So let's do a mount space slash dev slash sda three space slash mnt And now that that is mounted over onto the live image What we need to do is run the packstrap command. This actually installs the base system for arch So run packstrap all one word space slash mnt because that's where we're mounted to space And then what we are installing we're going to install base Which is the base arch system. We also are going to install linux, which is the kernel and also install linux dash firmware hit enter And this is installing The base package this usually takes just a couple of minutes. I'll pause the recording And then according to the wiki we need to go ahead and generate our file system table our fstab or our fstab However, you want to pronounce it. So let me clear the screen here and then i'm going to run this command gen fstab space dash capital u space slash mnt space and then two greater than signs So two of the right pointing chevrons space and then slash mnt slash at c Slash fstab and hit enter and that should have generated our file system table Then the next thing we need to do is go ahead and run arch Dash charoot. So a charoot is changing into the root directory of our new installation is basically what that is And of course, I messed that up because I didn't tell it where we were charooting to I want to do arch dash charoot space slash mnt because that's the mount point. All right And you see the prompt changed. We are now logged in as root You know over at slash mnt on sda3 because that's where we're going to be installing everything on the sda3 partition Now we need to go ahead and set our time zone and how you do that is you run this command l in for link dash sf space and then this path slash user slash share slash zone info Slash region And this is not actually region, but it is the name of your region slash City again, that's the name of your city And then space and then slash etsy slash local time Now I actually know my region and city because I've done these installs so many times My region is america slash and then the city is chicago. I don't actually live in chicago I'm nowhere near chicago, but we're in the same time zone. So that's what I would need to run I'm going to go ahead and run that now you may not know exactly what your region or city is So what I would do is I would run this command here ls for listing the contents of a directory Slash user slash share slash zone info and what you see in this directory Those are the regions and once you find your region for example europe What I would do is then ls user slash share slash zone info slash europe And those are the cities And then hopefully you you know your region and city So you just go back and you know plug in what you needed to do for that ln command the link command And I control c to cancel that clear the screen The next thing we want to do is set our hardware clock you run this command hw clock space dash dash s y s t o h c run that command That sets our system clock Then the next thing we need to do is set the locale now. This is a little tricky You can mess this up and the arch wiki and on this if you guys are following along in the arch wiki It is a little confusing here. What you need to do It says you need to edit the locale dot gen and uncomment your particular locale So what they're saying is whatever editor you use for example nano space slash etsy slash locale Dot gen let's hit enter nano is not found because it's not part of the base packages that were installed earlier So let's do a pacman space dash s space nano Let's go ahead and install that neither nano or vim. We're going to be installed by default You have to install those the only thing I think that's here by default is vi Nobody really cares to use vi most of you guys probably are not vim users either I think nano is be a little easier. So I'm going to use that throughout this tutorial Oh now, let me run the nano space slash etsy slash locale dot gen All right, and you see this file it has a whole bunch of lines and every line is commented go find Your locale and uncomment that line for me. I need to find the line en underscore us english us So i'm going to go through the list and I want this line right here En underscore us dot utf dash eight space utf dash eight. Okay Now i'm going to do control x and nano to exit y for yes to write it hit enter and then the next thing you need to do after editing that file Is run this command locale dash gen It's generating locale's generation complete now you can uncomment more than one locale if needed for me English us is all I need the next thing we need to do is set the host name So what i'm going to do is i'm going to do nano again space slash etsy slash host name We need to create this config file And then we just need to type the host name the host name is the host name of the computer and in this case I'm going to call this vm arch vbox makes sense to me. So control x to exit y to save That set the host name and then we need to create a host file So I need to once again nano space slash etsy space slash host And this file is not empty. There are two lines, but they're commented out But we need to add some lines ourselves the arch wiki actually tells you exactly which lines to add these three lines here that i've highlighted And just copy it exactly the way you read it from the wiki So it says to do 127.0.0.1 and then tab over or space over a few times and then do local host And then the second line needs to be colon colon one and then the same thing tab over or space over And then once again local host and then on the third and final line 127.0.1.1 Tab over or space over and then do my host name And this needs to be your actual host name that you just created and the host name file. So in my case arch vbox dot local domain And then tab over or space over and then do your host name again, which is arch vbox for me And of course, it'll be different for you control x y to save and clear the screen The next thing we need to do is create some users and some passwords because by default There's only going to be one user on the system the root user unless you create other users also You need to set a password for your root user if you forget that Then at the end of the installation, you're going to have to just cheroop back into this thing and do this later You might as well do it now. So run the command as root pass wd That's going to ask for your new root password Create it confirm it. All right. Now. Let's add a normal user a non-root user So i'm going to run the command user add all one word and then dash m And then space and then the name of that user i'm adding i'm going to call this new user dt Then we need to create a password for the dt user pass wd space dt Then create that password Then confirm that password All right, and then the last thing we need to do here really is to make sure that dt is a member of some groups Especially the wheel group which would give him sudo privileges that way you don't have to log in as root to do things as root You know you can do sudo, you know as the dt user in my case or whatever username you created So i'm going to do this command user mod space dash lowercase a capital g space And then i'm going to list out some groups. I'm going to do the wheel group comma audio comma Video comma those are the most important, but you can keep adding groups. Some of the other groups that are available would be optical Storage as a virtual box user I'll eventually add dt to the vbox users group if I use vert manager I'm going to need to add dt to the lib vert group, you know But for now i'm just going to stick with these so i'm going to hit enter It complained because I wasn't through with that command. You need to do user mod Dash lowercase a capital g all those groups with no spaces between the commas And then space and then the user you're adding to all these groups In my case dt now hit enter again Okay, no errors now. We wanted to add dt to the wheel group So he had sudo privileges, but sudo is not installed unless we install it Let's go ahead and do a pacman dash capital s sudo And install sudo and now that we've installed sudo We can run the command vi sudo to edit the sudo or spile and make sure dt has those privileges And now vi sudo is going to edit that file as vi If you don't want to edit in vi and I don't want to edit in vi do this editor all caps Equals nano or whatever editor you want to use here in the command line, but editor equals nano space vi sudo And now we can edit this sudo or spile We need to find one line in here. We need to find a line about the wheel group And it's right there Uncomment that you see that it says wheel all equals all equals all means the wheel group has all privileges They can do anything and by my dt user being a member of the wheel group He has super user privileges so he can do anything so control x to exit y to save Next let's go ahead and install grub. So let's do a pacman dash capital s grub And why for yes Now that we have grub installed Um, since we're doing efi other than grub. There's some things we need alongside grub We also should do a pacman dash capital s efi boot manager mgr So efi boot mgr all one word. We also need dos fs tools We also need os dash prober and then we need m tools Hit enter install all of those packages and then we need to make a efi directory and our boot directory So we need to run this command mk dir make directory space Slash boot slash and this is the directory we're creating efi all caps hit enter Then we need to mount our efi partition. So mount space slash dev slash sda one remember was the efi partition Space and then where are we mounting it to we're going to mount it to of course boot slash efi All right, that is mounted now. Let's run the grub install command because just sudo pacman dash s grub It installs grub, but it doesn't really install grub to a proper partition because it doesn't know where to Put it you actually have to then run this command grub dash install And since we did efi, we're going to have to add some flags here So do grub dash install space dash dash target equals x86 underscore 64 dash efi space and then dash dash boot loader dash id equals grub underscore u efi space dash dash recheck Hit enter it says installing installation finish no error reported. Okay, so it installed grub We still need to make a grub configuration file now. This is easy. We don't have to edit anything by hand Just run this command here grub dash mk config space dash o space slash boot slash grub slash grub dot cfg It generates the grub configuration file and that is it at this point We've really installed arch Linux the base system. We could actually Reboot the system right now, but before you do you may want to install some other stuff while you're already here and mounted onto sda3 What I would do is for networking Usually people install network manager before you reboot because chances are you'll most likely have internet If you install network manager now then waiting till later So we could do a pacman dash capital s network manager Space and then is there anything else I want to install For me. I use vim as my editor. I could go ahead and install that that way I don't have to keep using nano you could go ahead and install You know window manager and all that stuff x or all that stuff will take some time You're going to have to configure some stuff too. I'm not going to take the trouble of getting into the graphical environment stuff Let's just stick with this for now. So I'm going to just install network manager and install vim I don't think git is installed by default. I would like to have git too So I'm going to go ahead and pacman dash capital s git just to make sure I have git installed on the system Really, I think that's enough for a base install Since we installed network manager. We probably should enable it with a system d So let's go ahead and run a system ctl space enable space network With a capital n network with a capital n manager with a capital m It created that sim link and really let's go ahead and exit out of the charoot And reboot. So let's exit type exit. All right And then we're still mounted here. So run you mount for unmount you mount space slash mnt Says target is busy Do it up arrow to get that command to come back up and add a dash f flag So you mount space dash f slash mount. We're going to force it to unmount. So target is busy Maybe f wasn't the right flag. I think there is a l flag for a lazy flag. Let's see. Okay The l flag you mount space dash l space slash mnt will force The unmount. All right now that we have got out of the charoot and we've unmounted Now we could type reboot and reboot into our freshly installed arch since I'm in a vm don't reboot I actually am going to do shutdown Run shut down now pseudo shut down now or halt now or whatever Command you want to run to shut down the system The reason we need to shut down instead of reboot is because I need to go back Into the settings of the vm Because remember the iso is still attached. So just rebooting won't work It's just going to reboot us back into the live environment So go to storage click on the iso and then go down to this disc with the red x on it click on it And it's going to say remove selected storage. Yeah click. Okay Now that we've detached that iso now restart All right, we've gotten to a command prompt. You see it says arch vbox login So that's the hoose name of the computer And we created The dt user of course we could log in as root as well, but I'm going to log in as dt Let's see if we have networking So if I do a ping google.com We have networking we have internet we can do anything So that's really it. I mean we just did a base arch install I don't know how long that took I rushed through a lot of that from here You just pacman dash capital s all of your stuff xor your login manager Your desktop environment your window managers and your various applications your graphical applications And some of that stuff can take a while Especially if you're not exactly sure what you want to install what most people do That run things like arch linux or gen 2 and things like that. They keep an install script They just keep a list of programs. They always need that way when they reinstall They can just plug that script in and it just installs all that stuff for you So that is it for this arch linux installation guide again, you know practice in a vm Follow along with me in a vm Maybe install it in a vm half a dozen times to really get comfortable using the command line and editing things Using things like nano and reading the wiki and if you run into some errors reading the wiki figuring out the solutions Once you've done it half a dozen times You know install it on physical hardware if you have a spare machine that would be best But if you don't have a spare machine after you've played around with it a little bit in a vm And then maybe go ahead and roll the dice and install it on your main production machine arch linux is not That advanced right if you know a little bit about linux If you use linux a few months Then I think you can get through an arch linux installation and I think you can maintain the system now before I go I need to think a few special people I need to thank the producers of the show michael gabe corbinian michael devin fran chuck claudio donnie dillan george kelev devils Lewis paul scott and willy they are my highest tiered patrons over on patreon without these guys This 2020 version of the arch linux installation guide wouldn't be possible The show is also brought to you by each and every one of these ladies and gentlemen These are all my supporters over on patreon because this channel is supported by you guys the community There are no corporate sponsors here at distro tube. It's just me and you You want to support my work look for distro tube over on patreon peace