Arch Linux Monthly Install: 12.2021

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone welcome back to the channel and to a new video so many of you asked me to make again a monthly install of arch this time using line by line the commands to install it and so this is what i'm going to do in this video now if you want to install arch from scratch line by line it's definitely a great way not only to install arch but also to learn the basics of linux like for example partitioning your disk format new partition mounting the partitions creating new user all of these tasks are actually basics for linux and they're going to be found also in many linux certifications so it's not only a great way to install arch it's also a great way to learn linux now in this video i'm going to install it from scratch and we're going to install it together with a window manager i'm going to keep the system very light as light as possible and installing less packages as possible so without further ado let's get started [Music] [Applause] so here we go guys as i said in the intro in this monthly install of arch i will take a little bit more time here on the base install and i'm going to go through again line by line with the commands i'm using to install arch which are the commands actually that you find also on the arch wiki and we are going to install at the end maybe a window manager or desktop environment a very light version i'm not going to install the whole exwork display server just a part of it to make the installation as light as possible now of course this is all personal preference but feel free to adjust if you wish to do so now you can see here i put it up my machine with the december 2021 iso and i have the standard prompt so the first thing i want to actually increase the font size so that you can see better so let me type in set font this is actually the command which is used to increase the font size here on the console and you can see i have also a problem with the keyboard layout i'm going to change this in a second the command is set font 3132n so this is basically going to set the font to the terminus font and the size is 32 points so once you hit enter you will see the size increase and you can see better defense on the display so as i mentioned before the arch iso is actually booting up with the us keyboard layout and if you don't have one you will have to look for your keyboard layout so how can you do this well we can use a command which is called locale ctl it does have actually many functions but the one we are looking for right now is to list the key maps so to use it we can type in locale ctl and then list dash key maps and you can see by using tab completion it actually completes the command itself so let's hit enter here and you can see there is a long list of keyboards here so you might say oh okay i have to scroll through it and see where is mine but we don't need to do this we can hit q here to get out and we can pull up the last command here with the up arrow and what we can do we can pipe this command to a filter which is called the grep actually graph is not a filter but we can consider it in this case a filter and we are going to filter through the keymaps you are looking for so i know for example my keyboard has a connotation of d e this is for german dodge so i'm gonna search for that so i'm gonna type in d e here and hit enter and it's going to show you basically all the keyboard layouts which contains the e the one i'm looking for has a connotation ch because that's a swiss key so i need to put in this into the system so that i can have my keyboard layout setting properly so to do this we can type in load keys and then the string i want so d e underscore ch dash latin one and then hit enter and now i can use my keyboard here i see i have my y in the right place so this is done the second part is to look for our internet connection so i have an internet cable connected to my machine so i can type in directly pacman dash sy to check if the repositories are online and indeed they are now if you have a wi-fi connection you will have to use the iwctl utility which is already included in the iso now before we do this actually let's type in ip space ca here you will have a list of your internet interfaces so i have only one as you see there the number two is the interface number two is the npa one s0 this is my ethernet connection and it has an ip ending with two to one they're in purple now if you have a wi-fi adapter in this list you will see probably a third interface called wlan0 or something else depends on your wi-fi adapter so once we have this we can type in iwctl to configure our wi-fi adapter for wi-fi so usually here you will have to type in station and then wlan0 is probably the name you're looking for and then connect and then the name of the wi-fi network you want to connect to so for example in my case it would be ef tech 5 and then when i hit enter i would be asked for the passphrase once you enter the passphrase you will be back to the iwd prompt there now in my case i don't have a wifi here so i can just delete this command then once you're back in the iwd prompt you can just hit ctrl d and you go back to the iso and you can check again if you have an ip with ip ca like we did before and then you can packman sy to check if your repositories are online so once we have internet up and running we can type in lsp to check our disk so i have one disk in this machine is called vda as you can see there and it's 50 gigabytes in space so we need to perform here the partitioning the formatting and then the mounting before we can proceed installing the base system so because this is a ufi machine i want to use the gdisk tool which is meant to create gpt partition tables which are actually the best partition tables for ufi machines so let me type in gdisk slash dev slash vda and then hit enter so the disk is empty and is creating new gpt entries in memory which is fine so the first command we need to do here is to create a new partition and we're going to do this by typing the n letter for new the partition number by default is fine we can accept this so we can just hit enter the first sector is also okay we can just accept the defaults here it's just going to start not at the beginning of the disk but slightly after which is good for me and the last sector defines the size of the partition now for the ufi partition let's say let's go with 300 megabytes of space it could be also a little bit less some distributions require 512 but 300 usually is fine and let me actually have a plus there plus 300 mbytes and hit enter now the code for the efi partition ef00 if you don't know the code you can type in capital l here and then you can search with a pattern but i know is the f00 so make your life easier here and just hit enter and now we are done so now we need to create a second partition for this tutorial i'm going to create a swap partition as well so and for new the partition number two is fine the first sector is also fine here and the last sector again defines the size so i'm gonna create here a one gigabyte swap partition now this is gonna depend how much ram you have on your machine if you have a lot of ram like eight gigabytes or 16 gigabytes you don't need actually to make such a big swap but if you have one gigabyte or two gigabytes definitely create at least two gigabytes or four gigabytes of swap so that your system has enough swap space and then we can hit enter and the code for the swap is eight two zero zero again if you don't know you can search it and the swap is now done now let's type in n for new to create our root partition so partition number three is fine first sector is also fine and for the last sector i'm going to create for the root partition 30 gigabytes of space that should be plenty now linux file system is fine here so we can accept the default and the root partition is now done now let's create the last partition which is the home partition so n for new and here we are basically going to accept all the defaults because it's going to take the rest of the disk the size and the file system are also okay by default here and now we have our four partitions we just need to write the changes to the disk by typing w and hit enter and accept this by typing y and hit enter and you can see the operation has been completed successfully that means if we type in again lsbnk we have our four partitions there vda one two three four so we partition the disk now we can format the partitions so to do this we need to use the mkfs command which stands for make file system and let's begin with vda1 which is our efi partition so mkfs the efi partition has to be formatted with the fat file system so v-fat slash dev slash vda1 this is the partition path and then hit enter next the swap partition vda2 this time instead of mkfs we are going to use mk swap which stands for make swap so mk swap and then we just define the partition path again so slash dev slash vda2 and hit enter now we created the swap we need to activate it with swap on again partition path slash dev slash vda2 and hit enter and this is now done so now we can format our root partition so let's type in again mkfs because we need to make a file system i'm going to use ext4 the xd4 file system is pretty mature and pretty stable and then the partition path slash dev slash vda3 and then hit enter now i'm going to repeat the same for the home partition so i'm just going to pull up the last command here with the up arrow and replace vda3 with vda4 and the formatting is now done so lsplk again you will see there the swap partition is now defined there we formatted also the other partitions but we don't see the properties right now we can mount now our partitions so let's begin with vda3 because it's our root partition where the system is going to be installed so mount is the command slash dev slash vda3 so we are mounting our root partition into the installation directory which is slash mnt and this is now ready now we need to mount also the other partitions but before we do this we need to create the directories in the new system for them to be mounted in so to create the directories we can use the mk der command which stands for make directory and then dash p to create multiple directories at the same time now we want to create the directories under slash mnt because that's where the installation is going to be and we have a boot partition and a home partition so we need to create directories for both of these so i'm going to open here the curly brace and create the boot slash efi partition a comma and also the home partition and close the curly brace and then hit enter this way i created booth slash efi and a home partition under the mount directory so that means now we can mount vda1 on boot efi and vdi4 on home so let's do this by typing in mount slash dev slash vda1 and we're going to mount this under slash mnt slash boot slash efi and then hit enter and we can mount also vdf4 into home so mount slash dev slash vdf4 on slash mnt slash home and then hit enter now if i type in again lsprk you will see we have our mount points there which are correctly mounted so that means we can now install the base packages to do this we need to use the packstrap command and we're going to strap the packages so to say into the slash m t directory because that's where the installation is going to be and the packages i want to install as a base system are the base package we need to choose a kernel in my case i'm going to choose the linux kernel which is going to be the latest linux kernel which i believe is 5 15 5 at the time of this recording we are going to install also linux dash firmware provide some more firmware for your computer i'm going to use i'm going to install also git and vim because i'm going to need them anyway and i'm going to install also for my processor the amd dash u-code package now if you have an intel processor you can install of course intel dash u-code for amd processor this is going to be your package then we can hit enter here and proceed with the installation of the base packages which depending on your internet connection is gonna take a couple of minutes so i'm gonna pause the video here guys and i'll be back with you once it's finished so the installation is now done as you can see and we can now proceed to generate the file system table so remember when we mounted our partitions before let me actually type in lsb okay here so we mounted our partitions here on these mount points so what we need to do we need to tell the system to save these mount points into the fstop file which was just installed with the base packages into the new system and that's because when we reboot our machine afterwards those mount points will be in place if not the system will not be able to boot so to generate the file system table we can use the gen fstab script which is already available in the iso and we are going to use the uuid of the partitions which are unique identifiers that means even one day you put in other disks in your machine this uuid will never change and the file system table will always know which device will have to be mounted where and so we are going to take basically the mount points we have on slash m and t so these are the mount points we created before that you can see with the lsblk command and we are going to basically put them into slash mnt so into our installation directory in the etsy directory which was created now during our base packages installation and the fstab file which was installed also during the base packages installation so now that the file system table is generated we can go into the installation and proceed with the rest of the steps so let's type in arch dash root slash m t and then hit enter and if i type in now cat slash etsy slash fstab you can see here our mount points now some people get confused here well what we actually use slash m and d slash at c slash fstab yes but look at the previous command arch truth slash m t that means we went into the m t directory and when i used the cad command i used it from dark directory so i am inside now the mnt directory because that's where the new system is going to be installed and from there i don't need to repeat the mnt directory because i am in it so slash xc fstab it's actually the file system table of my newly installed system so now we can proceed with the rest of the steps for installing arch so the first one is to find out our time zone for this we have the time date ctrl command which has a lot of functions but the one we are looking for is the time zones so we can type in if you don't know your time zone we can type in time date ctl you can use also type completion here it helps a lot and then list dash time zones and then hit enter now again we have a long list of time zones here and you don't want to scroll through all of these so let's quit out from here with the q key and clean up the terminal with ctrl n and pull up again the last command with the up arrow and let's pipe this command again to the grep function which we can use it as a filter right now and let's see for example i know i'm in europe so i want to filter all the time zones in europe so i'm going to type in here europe and then hit enter now you can see there we have a list of time zones in europe but i don't see all of this because the fonts are too big so if you want to see also the top of the list what we can do here we can pull up again the last command and do another pipe to the less command which is going to show you just the first part of the list basically and you can see that we see now from a until m and if you hit the enter key you can scroll through the list here now i am in switzerland and the only time zone i can select here in switzerland is the europe zurich time zone which is the last one in the list now i will hit q here to get out and go back to the iso and the command there is going to be ln sf this is going to create a symbolic link from user share zone info and then i'm going to define europe and then zurich because that's my time zone and i'm going to link this to slash etsy slash local time which is a file we're going to create right now and then hit enter so the time zone is now set and we need to synchronize the hardware clock and the system clock to do this we can type in hw clock dash dash sys2hc to system 2 hardware clock and then hit enter and this step is also done now we need to work on the locales to do this we have the locale.gen file which was installed during the base installation of the base packages so we need to edit that with the theme editor or with your editor of your choice so to do this we need to type in vim slash etsy slash locale dot gen and then hit enter so here you can see we have a long list of locales so you need to decide basically which locale you want to use in your system in my case i want to use english so i want to type in here the forward slash in them and search for en underscore us because that's the language i want to use and you can see it right there it's highlighted so i can hit enter there to go to that line and hit the i key to enter edit mode in them and delete the hashtag so this is basically the locale i want to use in my system so i can hit the escape key and then call on x to save this file and exit them and now i can run the command to generate the locales which is local gen and then hit enter it's going to take a moment to generate the locales you can of course select multiple locales if you want you can select also three or four if you require that it's really up to you so now we have the locales in place we need to set also the locale.com file to do this i'm gonna use the echo command the echo command is going to basically put everything what you're going to put afterwards and in this case it's going to be the locale into the locale.com file so the locale is going to be lang for language equal the local we found before so in my case it's en underscore us dot utf-8 closing the quotes and we are going to put this information under etsy slash locale dot conf and then hit enter now we are going to do also the same in my case with the vconsole.com file and that's because i changed the keyboard layout of the console at the beginning of the video if you remember so i need to put this also in the vconsole.com file otherwise if i don't when i reboot the machine the console is going to use again the english layout so let's type in echo and then quotes again and then keymap equal the keyboard layout i used at the beginning was d e underscore ch dash latent one closing the quotes you can of course replace this with your cable layout and we are going to append this under slash etsy slash vconsole dot conf file now don't get confused here this console file this vconsole file is basically taking care of the keyboard layout only on the console not on your desktop environment and not in the terminal in the desktop environment if you're using a desktop environment afterwards or a window manager you will have to set the keyboard layout in the window manager or desktop environment as well this keyboard layout is going to work only if you boot into the console directly next we need to create a hostname for our machine so i'm going to use again the echo command and i'm going to call my machine simply arch you can of course choose another name if you want and i'm going to append this information to etsy slash hostname and then hit enter so next we need to work on the hosts file to do this i'm going to use this time the vim editor so vim slash etsy slash host that's where the file location is and i'm going to go here at the end of the file and create a few new lines the first one is the ipv4 address for the local machine which is 127.0.0.1 hitting a tab key and then the machine name is going to be localhost and i'm going to do the same for the ipv6 others which is colon column 1 and tap tap and again localhost this is again the same name for the machine and the last line is going to be 127.0.1.1 a tab key again and this is going to basically define the local domain so it's going to be arch this is the hostname for my machine you'll need to replace it with yours dot local domain a tab again and then at the end again the host name which is arch and that's it for the host file so here you can hit the escape here and then call on x to save the file and exit them and the next step would be to change the password for the root user so pass wd it's the command and you can select a new password and you will need to retype it and the password for the root user is now set now let's install the packages we want to have in our system so i'm going to install not that many in this tutorial because i want to install only really basic packages i did also many other tutorials when i installed more packages so if you want to see more packages go ahead and check those videos out so let's type in pacman dash s so the first packages i want to install our grub and the efi boots mgr or efi boot manager that's because i don't want to use the system debut in this video i'm going to use also network manager and not systemd network d i have another video for that so if you are interested in that you can check out that in the channel i'm gonna install also the network dash manager dash applet this is the applet for the network manager i'm not sure i'm gonna use this but if you're installing a desktop environment chances are this is going to be needed anyway i'm going to install also dialog and wpa supplicant although i'm not sure that this is already a dependency of another package that's why i'm going to install it anyway i'm going to install also the base devil and linux dash headers packages now these are two packages used for development but chances are if you're using arch you're gonna need them anyway especially if you're installing something from the aur or some more other packages from the main repository so i recommend you to install them anyway now we could install for example also the xgg utils which is going to provide some xdg utilities for the system and also xdg to create home directories if you need them they're not mandatory but they are nice to have if you have bluetooth adapters definitely install blues and blues dash utils if you want to install if you have a printer definitely install cups the cups printing system i'm going to install also pulse audio you can install pipe wire if you want but in this video i'm going to install probably a window manager so pulls audio is fine for me i'm going to install also alsa utils because i might need them for audio utilities later and also power control a very handy utility here for checking out your sound devices and i'm going to install maybe just the terminus font because that is not installed in the new installation so we can just hit enter here and accept the defaults for the installation so again this depending on your internet connection is gonna take some time so i'm gonna pause the video here and i'll be back with you once the installation it's done so the installation of the packages is now done and what we need to do right now we need to also install the grub bootloader because we installed the package but we didn't install yet the bootloader so to do this we need to use the grub dash install command and we need to define the target now this is actually a ufi machine that's why i'm using the dash dash target equal x86 underscore 64-efi and then we need to define also the directory for the efi machine so let's type in dash efi dash directory equal you remember the directory we selected at the beginning of the video when we actually mounted the mount point was slash boot slash efi and then we defined the bootloader with boots loader dash id equal grub now this is going to work in most cases in some cases you might have to add the recheck option but i would definitely recommend you to check the archwiki if you need to find out and if you need to troubleshoot if this command is not going to work so then we can hit enter and let's see what happens here installing and installation finished no error reported so grub is now installed but we need to generate the configuration file because that's not done automatically for us so to do this we need to type in grub dash mk config so make configuration basically of grub dash also the output because if we don't use the output switch here it's just going to print out in the terminal here the configuration file but that's not going to be useful we need to have it in the system so the output is going to be under the slash boot directory into the grub directory and the file is going to be called grub dot cfg and then hit enter and you can see that it's creating our images for the system now os prober here you can see we have grub os prober is not enabled that's fine in my case because i didn't install os prober i have many videos on this also on the channel so if you want to see how it's done you can check those up as well for example the last month installation i also changed this option as well and i can proceed now to enable some of the systems that we installed before so for example network manager the bluetooth service cups and everything else we can enable them so that when they are enabled the next time we boot the machine they are going to be working so let's begin by typing in the system ctl enable let's begin with network manager now this service has to be with these capital letters otherwise it will not find it and then we can hit enter network manager we'll make sure that our internet connection is up and running all our internet service is up and running when we reboot the machine next we can pull up the last command with the up arrow and replace network manager with the next service we want to enable which is the bluetooth service and then hit enter we repeat this process again this time we are going to select cups our printing system because we want to have it available when we reboot the machine so i think this is all i want right now so i can proceed by creating a user for the system because i don't want to boot as a root user and that's actually not best practice neither so to create a new user we can use the user add command that's a standard command for creating new users here on the terminal i'm going to use the dash m switch which is going to create also a home directory for the user and now i can select the username i want which is in my case my name and then i can hit enter and now we have a user in the system you can check this if you type in for example cat slash etsy slash pass wd and hit enter you can see here the last line in this file it's my new user so this is one way you can check for example if a user is present in the system it's to check the passwd file now i need to give also a password to this user so i'm going to use again the pass wd command we used before for the root user but in this case i'm going to add the username i want to change the password for so my name and then enter a new password and then retype it and now my user has his own password as well now we are not yet done because i want to give actually this user sudo privileges because right now it does not have them now let me clean up the terminal and if i type in idl mano you can see it has his uid which is default and it belongs also to its own group which is also default but it does not belong to any other group and if i want this user to have pseudo privileges it has to belong to the wheel group now the will group is something that needs to be activated in the via pseudofile which we need to do so because i installed vim and not v as an editor if you install nano you'll have to process here also the same thing we need to define the editor first so to do this we need to type in editor equal vim in my case if you're using nano replaces of course and then vice pseudo and then hit enter now we need to scroll down here with control f in vim and you can see that we have the root group which is already active and we have the wheel group here now we have two of these and i definitely recommend you here to uncomment the first one see the comment here uncomment to allow member of the group wheel to execute any command but they will have to enter their password in this group here if you uncomment the second wheel group here you can see there is an option here no password that means these users will not have to type in any password when they want to execute sudo commands so not really safe i'm gonna go here with the will group with the first one and uncomment this line here and then we can hit the escape key and then colon x to save the file and exit them so now we can actually give the wheel group also to my user well actually not id but id hermano here and i want to give actually the wheel group to hermano so to do this i can type in user mode which is the standard command that you would use to modify a user property and then dash a capital g so we are basically appending an extra group to this user we are not going to replace the default group because if you are not using the a switch the append switch you're basically going to replace the standard group with the wheel group that we are going to use right now but i want the user to have two groups its own group and the wheel group so that's why we have the a option there the a switch and the group i want to add is wheel and the user to whom i want to actually add this group is el mano and then hit enter now again if i use id hermano you can see under the groups there we have its own group and the wheel group so i know when i will reboot the machine my user will have sudo privileges so this is basically done for the base install so we can do right now we can type in exit and we need to unmount all the partitions especially the amount partition so you mount dash capital r on slash m t and then hit enter and now we can type in reboot and our machine will reboot openly into grub if everything went well and here we have the grub boot loader and i see i didn't set the resolution here i should have done this before because it's on a virtual machine if you are on metal probably the resolution will be already displayed correctly but in my case it's not so let me go in here with the e key and go to the linux line which is defining the kernel basically the boot parameter of the kernel and i'm gonna add in here video equal 1920 per 1080 and then i'll boot my machine with control x i'm going to change this afterwards in the grab configuration file and you can see we have our login prompt so we can login in here with my username and the password and because i installed the terminus font i can use again the set font one ter dash n command to set the fonts so let me clean up the terminal here and the first thing we need to do is to check if we have an internet connection if you have an ip so let's type in ip space dash seed space a to check again i have an ip again because i'm connected here with the ethernet cable now if you have wi-fi we installed network manager and network manager has a very handy terminal utility called nmtui so type this in the terminal if you want to use wi-fi and then you go to activate a connection now here you will see a list of wired networks and a list of wireless networks if you have them now if you have one you can just select it and once you hit enter you will be asked to enter your passphrase once you have done that you will be having an ip as well and then you can go back using the escape key here and go to quit and go back to your terminal now you can check again if you have an ip here with ipspace.ca and make sure that the ip is there and then we can check our repositories by typing in sudo pacman dash sy and then hit enter now you will need to authenticate because it's a pseudo command and you can see i'm connecting fine so you should be able also to refresh your repositories so from here we can just basically build our desktop environment or our window manager now in this video here i'm going to basically install a window manager very quickly i3 with the very basic packages so i'm going to type in sudo pacman dash s and i want to actually install not the whole exco group here i just gonna need xorg dash server and also x work dash x render and that's because i need to change the resolutions of my display eventually then i'm gonna use the i3 package and also the menu the launcher i'm gonna install also lx appearance and also nitrogen for the wallpaper i'm going to install also arch linux wallpapers for the wallpaper itself now for the file manager this time i'm going to use ranger and i'm going to do actually a separate video on ranger ranger is a file manager on the terminal which is really nice browser in my case firefox now i want to have also a display manager so i'm going to install a light dm here with its greater light dm gtk dash gritter and also hit settings so light dm gtk dash gritter dash settings and the last package i want to install is a terminator and then hit enter now i'm going to set i3 apps here as a repository and accept the defaults also here and install now the packages now again this is going to take a moment to install depending also on your internet connection so i'm gonna pause quickly the video here guys and i'll be back with you in a moment so the installation is now done so let me clean up the terminal with ctrl l and the last step is we need to enable the display manager so sudo system ctl enable light dm and then hit enter so now we can reboot the machine and if everything went well we should be greeted again by the grab bootloader the display manager and we should be able to boot into i3 so reboot it's going to take a moment to do this and here we have grub so let's hit enter and we should see like dm here there you go light dm is there it's not configured but that's fine so let's enter the password and hit enter to create the config file and i will accept here the default for the win key as a mod key and now we are in i3 as you can see so let me open up the terminal with mod enter here we have terminator and you see terminator is opening up fine so i can type in three dash h and you can see there we are using 181 megabytes of ram which is awesome now as i said before when we define a vconsol.com file the layout of your keyboard is going to be defined only in the console if you boot into the console but if you see right now here in i3 if i hit my y key the z key comes and that's because here the layout is not the same here is going to be back to the us layout so we need to set this again in the configuration file or you can set it also here in the terminal by using the set xkb map command and then ch this is the connotation of my keyboard and now if i hit the y key i have y typing on the terminal so this is a very barebone installation of arch that we did here i hope what i explained here line by line help you to understand the basic concepts of the installation actually by installing arch this way you understand a lot of basic concepts of linux which are going to find also in many other distributions like for example creating users or formatting your disk these are also tasks that you're going to find in notifications as well so installing arch from scratch manually line by line it's definitely going to help to get a grasp of the basic concepts of linux now linux can be much more complex and it is much more complex if you go more in depth but for the basic things arch linux is really going to provide your gym for your muscles on how to install linux with the basic commands so this was the installation of arch using the december 2021 i saw i went through again line by line i hope you found it useful and if you have any question let me know in the comments below i will try to answer you as soon as i can and i also hope that you liked the video if you did please hit the thumbs up and subs for the channel if you haven't already thank you so much for watching the video guys i'll see you very soon in the next one [Music]
Info
Channel: EF - Linux Made Simple
Views: 9,115
Rating: undefined out of 5
Keywords: Linux, Arch Linux, Software, Training, how to install, install arch linux, install linux, tech tips, it tips, linux tips, UEFI, linux help, monthly install, i3, december 2021
Id: gyiHrsr4IPA
Channel Id: undefined
Length: 40min 35sec (2435 seconds)
Published: Sat Dec 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.