Arch Linux Installation (2020) | Full Guide

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to top Linux Tech in this video I am going to show you how to install configure and perform some essential maintenance tasks in Arch Linux I have to point out that this is going to be a very long video somewhere around two hours and it goes into the details of not only installing Arch but also covers topics such as configuring basic shell environment settings installing and managing software various ways to mount disks and set permissions configuring the ignore nest of environment and performing essential system maintenance tasks also I have provided timestamps for this video so you can easily jump and review it topic by topic this video is meant to be a complete full guide that will show you how to have a fully working system and desktop environment out of the box I also have to point out that this video is mostly suitable for those of you who have at least basic understanding of the Linux operating system and those of you who like to experiment and you have used some beginner friendly Linux distributions in the past like Ubuntu for example if you are totally new to Linux make sure you first try to reproduce the steps that you see in this video inside a virtual machine and if you don't have that one installed on your computer I would recommend that you go with VirtualBox now before we go and dive into the video I'd like to point out a few things about arch and why it is my favorite distribution one reason is because it's built from scratch unlike mini distros out there that are based on other distros like a bunch of being based on Debian for example arch is quite independent and original in this regard it is a very lightweight distribution that allows you to build your Linux system almost from scratch by carefully selecting and putting all of the components yours to make it fully usable system this is the preferred method for those that know exactly what they want but also for those that are interested in learning more about Linux because arch provides great learning experience for those that want to know more another reason is the community and documentation Arch Linux has a vast user community that is always willing to help contribute and give back to its users and also the arch wiki is a rich documentation library that contains guides and answers to anything related to the operating system also arch is a rolling release distributions texas and new features so there is really nothing to worry about too much and finally the a you are or the arch user repository is a collection of software that is compiled packaged and maintained by the user community if there is a package that is not to be found in the official arch triple chances are you'll find it here in the a you are and with all that being said let's go and begin with this tutorial the preferred method to install Arch Linux is from a bootable flash drive all you need to do is prepare a small USB flash drive with minimum size of one gigabyte to be used for installation in this tutorial we are going to install Arch Linux in UEFI mode which is the preferred method for modern computers first download the ISO image from one of the official Arch Linux repository servers that is closest to your location and save it to your computer if you're on Windows the best tool that I can recommend for flashing USB drives is Rufus go ahead and visit Rufus dot IA and download the USB flash though once the atoll is downloaded simply plug your flash drive in one of the USB ports start the application and choose it from the device menu then click on select and click on the arch ISO image that you have just downloaded choose GPT as a partitioning scheme and finally click on start click OK and wait for the process to finish you finally click close and reboot your computer if you're using Linux you can simply achieve this by using the DD command to flash the USB execute DD input file equals and then the name of the ISO file that you have just downloaded and for the output file here simply specify your USB device name keep the block size to four megabytes or don't specify block size at all if you have a slow USB flash drive when you are done simply boot your computer from the USB if you're doing this on a virtual machine simply use the ISO as a bootable media okay so right after you boot your system with the 'life installation USB you'll be presented with this efi selection menu so go ahead select the first option here on the menu press enter and wait for a system to boot into the live environment and we are finally inside the live environment but before I do anything else I'm going to choose a bigger font so that you can see the information on the screen better and you might also want to do the same before installing your new system so let's use the set font command to change our console funds so we type in set font slash USR share KBD console fonts and let's choose Sun twelve by 22 and by the way there's auto completion enabled for a current shell so you can just press tab to autocomplete commands just like that and hopefully that's much better and the text is now much easier to read now before we begin with the installation process we must first verify that we are connected to the Internet in my case I am using a virtual machine that's connected via ethernet but for those of you who are using wireless you will have to set up your connection first in order to do that we are going to use this nice utility called Wi-Fi menu so let's type in Wi-Fi - menu and press Enter and immediately you'll be presented with the list of available networks from which you can choose so choose yours in my case this is vo - press Enter let's give it a name so wlan0 is fine type in your Wi-Fi password and press enter and that's it we should now have connectivity keep in mind that this might take a few seconds until the Wi-Fi adapter gets its IP address from the DHCP and we can verify this by typing in the command I did our show and sure enough we can see that the wlan0 interface has been already assigned an IP address so let's test internet connectivity now by pinging Google so let's type in ping - C for count for google.com and there we go we have successfully established a connection to the Internet and now comes the part where you need to select a server that hosts the arch installation packages which is geographically close to your location this list can be found in the e.t.c slash pac-man that D directory there's a file called mirror list so let's open it and by the way I'm using vim because that's my favorite text editor but you can use Nano or any other editor you like so as you can see here from the list all of the servers are actually available for the system to use but we don't want that because we want to select only those that are closest to our location so I'm going to alter this file by using them substitution so I'm going to type in : % s for substitute and I want to substitute everything that says server with hash server and let's do that globally so as you can see I have commented out all of the options and now I am free to choose only those that are that I'm going to use so in this case I'm going to select a server that is closest to my location and that should be this one so let's uncomment that and by the way you can choose from one up to three servers for example in this case I'm only going to use this server and this is fine for this demonstration so when you're done selecting your servers simply save the file and just a quick update here in this video I am NOT going to show on how to use BIM but for those of you who are new to Linux you should use the Nano editor instead so type in Nano on /et see Backman that the mirror list and this will open the Nano editor so press ctrl + backslash and then down here where it says search to replace type in server and replace with hash server replace this instance we press a for all instances and finally you can select these servers that you plan to use so uncomment those and when you are done simply save the file by pressing ctrl + X save modified buffer gracias file name - right press Enter and that's it there we go and now after we have selected our server we actually have to refresh our local package database information so to do that we need to type in pac-man capitalist why why and press enter and there we go we have successfully synchronized the package database okay good and now we need to prepare our hard disk or SSD for the operating system installation and configure the boot and home partitions first I'm going to list all of the available block devices that exist into this system by typing in the command is VLK and press Enter and as you can see here from this list we currently only have one disk to work with and that's V da now V da is my virtual disk but on a real system is probably going to be s da s DB or may be SDC depending on your configuration and number of drives so let's call the G disk utility now G disk is a disk partitioning utility and it's just like f disk maybe you have used that one in the past but this one it's specifically made to work with GPT partitions and since this is a UEFI type of installation we will use this utility so let's type in C disk on /dev /v da which is my disk okay so as you can see the program has already created a new GPT entry into memory and let's actually create our first partition now which will be the boot partition so let's type in n for new and press Enter we'll accept the default number which is 1 and the first sector will be the beginning of the disk so let's press Enter and for the last sector we can either specify the sector number or we can specify the size of the partition so in this case we want our boot partition be at least 500 megabytes in size so let's type in plus 500 m 4 megabytes and press Enter now the current proposed partition type is 8300 which is the Linux file system and that's not what we want so we have to change it into EF 0 0 because that's the code for efi partitions and let's press enter and there we go we have successfully created our first partition the boot partition we can verify the information anytime by typing in P for print and press Enter next let's create the second partition now or the operating system partition so type N again press Enter the default number will be 2 and the first sector will be right after the last sector of where the previous position ends so press ENTER here and for the size or the last sector we can specify plus 24 gigabytes which should be sufficient for most Linux operating systems so press ENTER and we're going to accept the default type 8300 which is the Linux file system so press ENTER type P again okay and finally let's create our home partition which will contain the user data press n again for new accept the default number 3 for the first sector press ENTER and for the last sector here I'm actually going to use all of the remaining disk space available so I'll press Enter except the 8300 filesystem press P to verify and there we have it we have created our partitions and the changes are currently operating in memory so we'll have to flush the changes to the disk so to do that we type W or write press Enter do you want to proceed yes enter and the partition table has been successfully written to the disk we can verify this by typing in LS VLK again to list block devices and sure enough we can see that under the VDA there are three partitions created ok and now that we have created our partitions before we can use them we'll have to format them with the appropriate file system to do that we will use the mkfs command so let's format our first partition or the boot partition so we are going to type in mkfs - t for type and we are going to use the f80 filesystem which is the standard for efi partitions and then we are going to say - capital F space 32 because this is going to be a fat32 type partition and we are going to use this on /dev /v da 1 which is the boot partition in my case and there we go now we will format the operating system partition so again n k FS - t4 type and in this case my choice is going to be the ext4 filesystem which is one of the available file systems that you can use to format Linux partitions now this is just my preference you can use X FS or any other filesystem you like so mkfs - t ext4 on /dev /v da - and we are going to repeat the same for VV a3 or our home partition there we go and now that our partitions have been formatted we need to mount them within the installation environment inside the MNT folder this folder will serve as a temporary mount directory that we will use during the initial operating system files extraction process and bootloader setup so let's list block devices again and let's mount our operating system partition first so I'm going to type in mount slash dev slash vd8 - inside the temporary mount folder which is /mnt and once this is done we will now need to create a few more folders inside the operating system partition which is by the way mounted inside /mnt so next we will create the boot folder that will serve as a mount point for our boot partition so let's type in MK dir - p on slash command t / boot / efi and also will create our home folder that will serve as a mount point for our home partition so again NK dir /mnt slash home ok and let's clear the screen again and we see here that the operating system partition is mounted under MNT so let's list the contents of the MNT folder and we'll see that the operating system partition contains the boot and the home folder and now we will have to mount the respective partitions on these folders so let's mount the boot partition first so mount /dev /v da one on /mnt boot efi and let's also mount the home partition so mount /dev /v da tree inside M&T home okay and let's always block the rice again ok everything seems fine so we can finally proceed with the next step and so the next step is to download and extract the operating system files and the kernel into the operating system partition for this we will use the pack strap command on the M&T folder where our operating system partition is mounted now before we use the backstrap command to pull the operating system files you have to make a choice which linux kernel are you going to use arch comes with two versions of the kernel one is the LTS or the long-term support kernel that's proven to be stable but it is a little bit older and then there is the latest kernel with built in latest patches fixes and kernel modules if you want to be on the safe side then you can use the version however if you want the latest and greatest or if you plan to do gaming or maybe use theme then I suggest that you use the current version now I've been using arch for a very long time and I always use the latest kernel version and in my experience I never had any problems so let's install the base system now for this we will use the backstrap command on /mnt so backstrap /mnt and we want to install the base system files we also want to install the linux kernel and the linux firmware let's also add our text editors move in and nan-oh and let's also install bash completion and also let's add a few more extra packages because you'll end up hitting them anyway so let's install Linux - headers and base develop now if you want to go with the LTS version of the kernel you will have to in type in here Linux - LTS - headers and Linux - LTS but in this case we are going to go with the latest version of the kernel so this should be fine and let's press Enter and everything seems okay so far we have successfully downloaded the operating system files onto the OS partition and now we will have to tell the system where to find its partitions during the startup phase so basically we'll have to supply the operating system with the FS tab file which tells the system where to find its own partitions for this purpose we have this nice cool utility called Gen FS tab so let's use it so we type gen FS tab - capital u for unique identifiers on /mnt and we can see that all three partitions are now listed properly with their unique identifiers as mount points but we are not done yet because we need to write this file inside the operating system partition so let's repeat the last command and here we'll add greater than greater than /mnt slash etc' slash FS tab okay that should be good so let's verify that the file has been successfully written so let's do cat on /mnt EG c FS tab and there we go we have successfully generated the FS tab file okay and now it's time to finally switch inside our actual arch installation and resumed process from there to switch to our new system we will use the arch chroot command so arch chroot on /mnt and there we go we are now inside our new operating system environment and let's install the bootloader so we can boot our system later so for this we can use the arch package manager to do that which is pac-man by the way so pac-man - capitalist or synchronized and we will need to install the following packages so we will need grub the bootloader we will also need EFI boot MGR and then we will need efi var we will also need network manager that one we will need later and finally there is one important and very specific package that you must have installed on your system and that is the package that's actually the micro code for your CPU architecture so if you are on an intimate to install the Intel you code package or if you are on an AMD system you will need to install the a and EU code package this package needs to be installed so that the grub bootloader can use it during the boot phase otherwise you might have problems later on while using the system in my case I'm on an Intel system so I will need Intel - new code press ENTER yes to confirm and once this is complete we can now install the grub bootloader to the disk so the command to do this is grub - install on slash dev VVA in my case and that's it the bootloader has been installed to the disk so no problems there and finally we will finish the grub installation by writing its settings into the grub config file now before I write the grub config file I'm going to alter the configuration specifically to my needs this step is completely optional you don't have to do it because it's not that important but you are welcome to try and use these modifications as well so I'm going to type in within on slash EGC default grub I'm going to open the file for editing so first thing first I'd like to change the grub time out period to be two seconds instead of five and down here where it says grub CMD line Linux default I'm actually going to erase this quiet option and then I'm going to change the grub gfx mode to my monitors native resolution which is 1920 by 1080 pixels and I'll save the file okay so now that we have made these changes we can write the rap config file and the command to do that is grub - 10 K config - o on / boot / grub / grub dot C F G and press enter and as you can see the grub config file has been successfully written to the disk and also the microcode package for the CPU has been included so let's now enable the network manager service that will allow us to have network connectivity when we put into our operating system for the first time so in the command to do that is system CTL enable the network manager and you you'll have to type in network manager with capital N and capital M press Enter that looks good and finally let's change the root accounts password so here we type in pass WD and press Enter type in your password and make sure you type in a strong ace and secure password so let's exit the chroot environment now type exit and we are back inside the life installation environment and from here we'll have to unmount all partitions that we used during the installation phase so first we'll unmount the boot partition and the command to do that is you mount /mnt slash boot slash efi and then we'll do the same with the home partition you mount /mnt slash home and finally we unmount the MT partition or the operating system partition and there we go we are now ready to reboot and start our installed operating system for the first time so let's type reboot and press Enter and if everything went well you should be greeted by the grub bootloader screen and there we go the arch installation is now complete we are now ready to continue installing all necessary software drivers and the graphical user environment so let's login to our system for the first time so let's type in root and give the password that we have just assigned previously and let's also change the council once again so let's go with set font slash USR share DVD Council fonts sound 12 by 22 there we go let's clear the screen okay now for those of you who are using wireless you will have to connect to an existing Wi-Fi network we did this earlier for the life installation environment but now since we are in our newly installed system we'll have to do it again so let's list the network interfaces in our system by issuing the command network CTL list and from this list you can see your WLAN networks adapter name so go ahead take a note of that and then type N n tu Y to access the network manager text user interface and here choose the first option and then go to add choose Wi-Fi give the profile name so I will keep this simple and just name it Wi-Fi and down here type in your device name in my case this is going to be WL P to s 0 P for and for the SSID simply type in your wireless network name the mode is going to be client for the security I'm using wpa2 personal and you're probably using the same so let's go with that then finally type in your Wi-Fi password and finally which is ok select pack and then quit and now let's actually examine the network connections and see if our Wi-Fi network is active so let's type in nm CL i connection show and sure enough we can see that the Wi-Fi network is now active and let's ping Google again to make sure we have network connectivity so ping - see for google.com and there we go we have successfully established a connection to the Internet now in order to make things more clear on the screen and instead of me using the console phones I have actually logged in via SSH into my virtual machine so we can resume the installation from here now the first thing before installing your software is to give our system a name set the proper time zone and the system locale so let's give a name to our system now to do this we will edit the file inside the EGC and it's called hostname so I will simply name my system test VM and save the file next we also want to assign the loopback address for local name resolution so we edit the file inside etc' and it's called hosts and here I will simply assign a loopback address to localhost and also I will assign a loopback address to my systems name which is test VM and save the file let's now change our time zone or set the proper time zone so to do this we will use the command time date CTL set - time zone and here simply input your own time zone so in my case this is going to be Europe slash scorpion and if you are wondering where is the list of all of the available zone files they can be found inside here's our share zone info let's also enable the network time protocol service which will synchronize our system clock against internet time servers so let's type in time date CTL set - NTP and let's set this to true and to verify that everything is set correctly we type in time date CTL status and here we can see the time zone that we have just activated we can see that the system clock is now synchronized and the NTP service is also active next we set up our system locale so let's open the file inside etc' and it's called locale dot gen basically sitting at the system locale will enable programs on your computer to correctly display time date and monetary regional values among other things so here in this list all you have to do is in simply uncomment the ones that you need so in my case I need English underscore us and I also need MK for Macedonian and when you are done choosing your locale simply save this file and we also want to set the system-wide primary locale so let's create a new file called locale Kampf and this goes into /e TC as well so we create a new file here and here we insert the variable Lang equals and underscore us that UTF dash 8 and by the way here you will have to specify your own preferred locale in my case this is going to be English and this file will also get Auto populated with extra values by your desktop environment later so let's save the file and let's issue the command locale - Jen to generate our new settings and there we go okay let's actually create our SWAT file now basically if you have a system that is low on system memory then you should definitely set up a SWAT file and you should set the size according to your needs but if you have more than enough system RAM then swap might not be required however it is still recommended to create at least a small swap file because there are still some system processes that might need it just in case especially if you are going to use hibernation so let's first switch into the root directory and here let's create an empty file called SWAT file and now we need to make this file equivalent to the size of the virtual Ram that we want so I'm going to inflate this file with zeros and make it one gigabyte in size so to do that I'm going to use DD so DD input file equals slash / 0 and the output file will be this small file that we just created and the block size will be one megabyte and the count will be one thousand so basically this will make the file one thousand megabytes in size or one gigabyte press Enter and there we go let's verify that everything went correctly and here we see our swap file however the permissions are insecure so we need to change them so we use the command chmod and give it permission of 600 on swap file there we go and now we will need to convert this empty file into an actual swap file so we use the command NK swap on swap file and this creates the swap file and if you want to immediately use this swap file then we use the command swap on swap file and if we type 3 - M we will see that the swap file is created and currently in use so far so good but if we want to make this change permanent and if we want to have the swap file to be loaded automatically every time when the operating system starts we will have to assign it as an entry inside the FS tab file so let's make modifications to the FS tab so I will use them as editor to do this so beam on /e to c FS tab and here we add another line so for the file system will say forward slash swap file because this file is located inside the root filesystem and for the directory well actually there is none for the type we specify swap for the options we specify SW and for the dump and the pass we assign the value of 0 and that's it we simply save this file and now we need to reboot our system so let's type in reboot and press Enter okay so now that you have restarted your system and logged back in we are going to make some general environment modifications that will reflect across every user in the system in this case we are using the bash shell and we want to customize few things that will apply to every new user account that we create in the system this step is completely optional but in my case I'd like to use a few extra color options and some other environment fixed variables like the default Elder for example so I'm going to switch inside the etc' scale directory now keep in mind that the contents of this directory will always get copied inside the users home folder after you create the account so here we are specifically interested in the dot bash RC file which is responsible for our local bash environment settings so let's open it right now so first what I would like to specify here is the environment variable for my text editor and since that is vim I'm going to say here export editor equals vim and by the way you should specify your own default editor in this file and I would also like to specify a few more aliases here for example I would like to have an alias for the grep filter and I also want the great filter to have color output and let's duplicate this and do the same for Ygritte and f grep as well and also I would like to have an extended color support through dear colors so here I'm going to write a tiny little shell script that will allow me to do that so here I'm going to say that if the endeared color settings file does not exist inside the users home directory and by the way this applies to every user then I would like that to be created by printing out the dear colors database inside the home folder of every user and also if the dear colors binary exists into the system and it does by default in every arch system then we actually want the dear colors settings to be applied immediately into the user shell environment so let's save the file now let's test if everything works well now and by the way you will need to copy all of these files from the scale directory into the home folder of the root account but keep in mind that these files will be copied into the home folders of every new user account that you create automatically so this is an exception let's copy everything from this folder into the home folder of the root account and let's check if the files have been copied and yes they have and now let's quickly log out and log back in to check if everything works correctly so let's type exit to log out and log back in let's list the contents of the root directory and yes we have color output now and probably the aliases will work as well and yes they do so everything seems fine and we see that the dear colors file has been automatically created so we are all set so let's now create a standard user account that we will use as they default in our system to create a new user in the system we use the command user add and then - - create - home and then we specify the desired user name so in my case I'm just gonna say TLT press Enter and immediately you'll have to change the user's password because there is none so let's use the command pass WD on the user name to give it a password press Enter make sure you type in secure password and there we go and now let's make this user a member to the following common groups to do that we use the command usermod' - a for append and then G for group and then we add the user to the following groups wheel users storage power LP ADM and optical and these are by the way the most commonly used groups and then we specify the username so TLT now if we want to verify to which groups the user already belongs we can simply type in ID and then the username press Enter and here we can see all of the groups that the user has been assigned to next let's actually modify the suitors file so that every user who belongs to the wheel group can request super user privilege escalation and by the way if you haven't specified your default text editor in the bash RC file like we did earlier you have to temporarily enable it in your current environment by typing in the command to execute the I pseudo to edit the sudoers file so let's type in VI sudo and press Enter and here we simply scroll down and uncomment the following line that says percent wheel all equals all in brackets and then all when you are done then simply save the file and that's it we have successfully created a standard user account and we can now proceed to installing the necessary software so let's install xorg now as you know xor is the display server used on UNIX operating systems that allows you to run a graphical environment and to install it we can either use the XOR - server or the full XOR package I always go with the full package because it's not like it's going to cost us a lot of disk space anyway so to install it we use the pac-man package manager and we type in pac-man - capital s and then export and press enter now we accept the default suggestion here so we press ENTER and proceed with installation yes and we wait for your components to be installed into the system and now that X work has been installed let's add some common font packages so let's type pac-man - capital s and let's type in t TF - and we press tab twice so here I'm going to choose default and once TTFN deja vu PDF droid t TF hack and let's also add t TF font awesome and there is also another package OTF font awesome let's also add t TF plateau d TF liberation d TF Linux libertine TTFN open Sam's let's also add TTFN Roboto and finally TTFN Ubuntu font family and press Enter proceed with the installation yes and there we go we have added a several font packages by the way I always install these as the default but you may choose a different font packages if you like now there are a few extra font options that you might also want to enable system-wide for the font rendering this step is completely optional and out of the box you will have a fine font rendering since the freetype library has different licensing options regarding the rendering these days but you might also want to enable some specific font configuration anyway to do this will symbolically linked the font options that we need from the e.t.c fonts kampf dot avail into the etc' fonts count that d directory so let's first navigate into the EGC fonts count that d directory and let's list the available options that we have right now let's also list the available options that we can use from the conf avail directory and basically what I would like to use here is sub pixel RGB else filter default and no bitmaps because I don't want to use the old bitmaps phones so let's link the unit options right now so let's type in Ln for link - s for symbolic and we want etc' font count that avail and I 110 that then - sub pixel RGB into the comm that D directory I also want 11 LCD filter default and finally I also want the no bitmaps let's see if we actually have all the needed settings and yes we have enabled the sub pixel the LCD filter default and the no bitmaps configuration and finally let's enable some free type font settings to be used in our user environment by default so we edit the file inside etc' profile dot d free type - that Sh and here you can see all of the available settings that you can use so let's uncomment the bottom line here and I will simply use the version for you because that is the default and I will simply save the file and there we go we have made changes to our font configuration now let's install video card drivers I assume that you are aware of the video card that you're using inside your computer but if you are not aware of the model and the type simply use the command LS PCI to find out and look for the line where it says VGA compatible controller or something similar now here I have compiled a list of video card driver packages that you need to install depending on the video card type so for example if you have Intel then you would install the X f-86 - video - intel lip GL mesa and optionally Vulcan - Intel package and so on now keep in mind that these driver packages are intended for the newer generation of video cards so if you have an older video card you should always consult with the arch wiki webpage to find out the corresponding driver package that you need now in my case this is a virtual machine with limited video card support so in this case I will not be installing any video card drivers but let's pretend that I have a new and video card so I would need to install the following packages so here I would say pac-man - capitalist Nvidia and video - settings and Nvidia - utils and I would also need to install the Mesa package okay so time to install our desktop environment now when it comes to graphical desktop environments there are plenty to choose from the most popular on the list are gnome KDE xfce matei budgie the surprisingly newer and interesting dip in desktop environment and maybe a few others there's plenty of them to choose from however in this tutorial we'll be installing the gnome desktop environment now I like to install down with all of the available extras that comes with so we will need the gnome the gnome extra and the gdn package so let's use pac-man to install gnome genome - extra and also gdm and presenter accept all the default selections and proceed with the installation so type in why now sit back and relax because this might take a while since we are downloading about nearly 3 gigabytes of software you okay so the installation is finally done so let's now enable the gnome display manager service by typing in the command system CTL enable gdm here we go and also as a final touch before we boot into our graphical desktop environment let's purge the local package cache of downloaded software by using pac-man - capital S CC and we confirm both selections and by the way sometimes you might receive an error while you're downloading software so if that happens it's most likely because your local package database information is outdated and you will have to simply refresh the database by issuing the command pac-man - capital s YY and that should fix the problem so let's finally reboot our computer and login into the desktop environment so if you have installed everything correctly you will be greeted by the login screen so let's click the user account that we created earlier during the installation phase and now before we actually login I would like to advise you to choose whether you want to use the old x11 or the newer valent session type keep in mind that the Wayland display protocol is intended to replace x11 but it is still under development and sign features might not be working correctly such as screencasting for example so if you click down here in the lower right corner of the screen you will get to choose between the session types so gnome on X org will give you X 11 and Nome will give you the Wayland session and here for the gnome classic this will actually give you the classic shell and I think that one relax some 3d acceleration features so you shouldn't really use this one unless it is absolutely necessary for you to do so and I would also like to point out that if you have an int o or a name the card you will probably get to choose between the two sessions however for those of you that are using Nvidia card you may or you may not get to choose valent at all regardless if each use the ignore option it will still get you the x11 so let's type in the password and press ENTER to login into our desktop environment and now that we have successfully logged in into our desktop environment let's first customize a few settings so here I will choose the settings option from the upper right corner of the screen which will open the gnome settings panel and from here we can set all of the system settings that we need there is also the gnome tweaks tool that gives us additional settings and more on that later so for example we can change the background and let's now actually change some system settings that you would most likely want to configure for example here in the search option you can configure the various indexing options available I personally don't like constant indexing to be active on my system school I always turn this option off next under the privacy tab you can choose the different options for the camera microphone defile history and the screen locking for the power options here you can configure the settings related to power savings and suspend and also very important for those of you that need multi-language support keyboard layouts and other input methods you can select them here under the region and language so let's add another input source here we click the plus sign and then we click on the three dots and immediately the language that we defined earlier in the locale settings will appear so let's choose that and also let's choose the formats for the dates and currencies display options you would probably want them to be displayed in to your own language so we can define those settings here as well so I'll choose mine and click done and finally after you have defined all the settings click the restart button you have to real log into the system for all of the settings can take effect and there we go those are the most basic settings that you would like to configure immediately after the installation now let's also review the known tweak tool so pretty much by default and out-of-the-box the gnome desktop environment is heavily focused on workspace management and much less on classic desktop features and by comparison it might actually look poor when compared to other desktop environments out there the positive aspects of gnome are the speed and the easy snappy workspace management which gives you fluid and smooth workflow if you are someone that needs to work with multiple workspaces and windows now regardless of this classic desktop lack of features genome can be further customized by installing various shell extensions and the app to manage this is called the gnome tweak tool so if we press the super key on the keyboard or the Windows key the activities window will open and here we have the search bar the applications dash and the applications menu so we can either look for the tool in this menu or we can simply type in the name so let's type in tweaks open that and here we have the tweaks tool so let's enable some commonly used settings in the tweak tool and then we will install some additional extensions from the internet the most commonly used options here are the appearance tab from where you can choose your theme icons and sound settings I usually like to go with the dart team so let's enable that and here in the extensions tab let's actually enable few extensions so here I'd like to have the places status indicator for example which will give us an additional menu here in the top bar and as you can see this provides shortcuts to the most commonly used folders and for example you might also want to enable the removable drive menu and it will give you also quick access to the mounted removable drives you might also want to enable the user things if you plan to install additional themes from the internet and workspace indicator for example this will show you the current workspace that you are in so let's go to the fonts tab and here everything looks good but we can choose the subpixel for LCD screens this relates to the font rendering that we previously enabled during the installation phase for a keyboard and mouse tab here you can customize additional settings the defaults are fine in my case you can also add your start up favorite applications here and for the top bar you can customize additional settings like the weekday for example and in the window title bars it is actually very important and one of the most commonly used features so it enables to have the maximize and minimize buttons for the application windows and here for the windows and the workspaces the defaults are pretty much fine but you can further customize according to your needs so let's actually now install a few more extensions from the internet that are actually quite useful so let's open up the terminal real quick let's make this window bigger and let's first quickly refresh our local package information database so sudo pac-man - capital s YY and let's install Firefox and let's now install a package that will enable us to install extensions through our web browser so here we can install the Chrome - gnome shell and by the way this one will work with most browsers so let's install that exit let's open up Firefox let's actually add it to favorites and let's search for the gnome shell extensions and we obviously need to install the browser extension so that we have this functionality so let's go to that refresh the page and now let's add a few more extensions that are really really useful let's add open weather this will display weather information on the top bar so let's add that click install and there you have it let's also look for - to dock and this is a useful dock for lignum shell it allows you to move the application dashboard anywhere on the screen so let's install that as well now let's search for a very useful extension it's called clipboard indicator and basically it will add a clipboard indicator to the top panel and it will cache clipboard history very useful definitely I must want to have and if we have multiple sound devices in your system you would also like to have the sound input and output device chooser it will also extend the functionality of the top menu here and finally let's look for the app indicators so this is the one case status notifier item / app indicator sport so let's install that one as well and basically this will enable the application tray icons in the top panel I'm not sure why this functionality was removed from gnome but I am glad that we can still have it through this extension and for this extension to work we also need to install a very specific package so let's open up the terminal again and let's install lead app indicator - GT k3 this is the one that you need now let's open up the genome tweak tool again and under the extensions tab you will find all of the new extensions that you have just installed via the internet and if you click here on the COG icon you can customize each and every one of them and in case if that doesn't work for you you can always customize them through the extensions app it will basically do the same job so let's position the dashed dock to the bottom of the screen and there we go now these extensions will give you the most of the needed desktop functionality so make sure you confer them according to your needs and here we are I have finished some customizations to my gnome desktop environment and as you can see this is now the end product a minimalistic but very functional and fast desktop environment I simply love the performance of genome compared to other desktops you now the one good thing about arch is that not only it has a vast repository of software but also it has the arch user repository or the aur from where you can install almost any software that you need and it is completely maintained by its users keep in mind that the aur is not the official arch repository and you should pay attention when installing software from other sources in other words you have to trust or inspect the packages that you download and that is if you want to be very cautious in my opinion in 99% of the cases you shouldn't worry about it too much because all of the repositories are always under the supervision of the users themselves let me show you how you can add an unofficial repo and install something from the aur database so basically when you search for software in the central arch repository you may not always find what you're looking for for example let's search for Skype and we see that the package does not exist in the central arch repository and by the way let me just quickly here enable the color output for pac-man so sudo vim slash PTC pacman.com and this will give us a nice color output so that we can see the package information much better on the screen so let's search again pac-man - SS for search and there we have it we have color output now so as you saw we couldn't find the package that we were looking for let's open up the heart website instead and look for the package there let's click this link which will take us to the central repository and let's search for Skype here and of course the package does not exist because pac-man package manager pulls its information from this database so let's try the aur link now and let's search again for Skype and there we have it Skype for Linux stable binary this is the one that we want let's click on that and you will have to copy this link where it says get clone URL so let's copy that and let's go back to our terminal now I would recommend that you create a special folder where you will download the packages from the aur database let's create it right now so make dear aur and this is inside my home folder where I want to keep my a your packages so let's switch to that one right now and let's actually check if we have git installed because you have to download the packages with the get program so pac-man - Q capital Q for query and let's see if I have get on my computer and yes I do so the command is get clone and then simply paste the link here we go now we if we list the contents we will see that the aur has downloaded all of the necessary files from which we'll have to build the Skype binary so let's switch inside and here we only have to use the command make pkg for make package - s I so make good kg - s I and this will automatically pull this software and all of the dependencies from the source and then the system will compile it into a working program and we are done now the make program requires CPU resources so we actually want to make sure we give it all of the available CPU cores for this operation so before we install it let's actually quickly modify the make pkg file so let's go Sweden vim /e g c / make PKG Kampf type in your password and down here where it says make flags equals - J - and by the way this option tells the system to use two of the available CPU cores so we don't want that so let's uncomment this option and let's replace the number two with the variable and track and this will allow us to use all of the CPU cores available so let's save the file and now let's finally execute the make package command so make pkg - si press ENTER confirm yes you may also get a password prompt so we should enter your password at any time when it is required to build the packages so this is going to probably take a while because the system is compiling the binary from source and depending on the size of the program the waiting time will be different and now we proceed with the installation you can see that the total installation size will be about 267 megabytes so type yes and there we go the Skype program is now installed into our machine let's switch to other workspace and let's see if the app is here and there we have it let's actually add this to our favorites and there we go that is how you actually install a package manually from the aur database so the only downside to using the aur is that you will have to manually check and update any package that you have installed into the system the arch package manager pac-man has no information about the aur packages on your system and therefore it cannot be used to up date them and for this reason if manual updates are a trouble for you then let me show you how you can automate this process by installing an aur helper so let's search for aur helpers let's go to the wiki and let's type in aur help and from this page we can find that actually there are several of a you are helpers available and you can see the detailed information about each of them on this list so let's pick one let's actually go with ei for this demonstration so again we will have to clone this get URL so let's copy that go back and do the same for the EI helper so get clone and let's paste the address let's switch inside and let's do make pkg - si proceed with the installation and there we go we have installed the ei aur helper so now let's install another aur package but this time we will use the EA program and the good thing about EA is that it is also a wrapper for pac-man and it also supports these same commands that you can use with pac-man also keep in mind that when it comes to updating aur packages you have to use EA instead of pac-man we will discuss this in more detail later when we will talk about system maintenance so let's actually install another package now let's install viber a chat and messaging program most popular on mobile devices so let's search for viber here in the aur database and as we can see it exists in the aur there it is let's switch back to our terminal and now let's do yay - capitalist just like pac-man and let's install viber well let's first search for it and there we have it so let's now install it and to accept the defaults here proceed with the installation yes and finally it is done and let's actually check see if the program has installed correctly so let's type in viber and there it is so we have automated the installation of software from the aur database now there is one other alternative there are other repositories that exist and contain precompiled packages found in the aur in order to use these repositories you will have to add them to the pacman.com file these repositories may offer you a way around you are helpers such as y-a and even though they are carefully maintained these reside on private servers and nobody can guarantee their safety and you should use them at your own risk so let's configure a few unofficial ripples now let's Google unofficial arch ripples and here we get the list from the arch wiki so let's actually choose a few from this list for example let's go with the end anti aur and this repo is signed so we will also have to obtain and locally signed occurrence ponding PGP key and the instructions are on the screen let's quickly grab the keys and let's place them into the terminal and there we go and let's now open the pacman.com file so sudo convene /et see back nine count and down here at the bottom let's add the repository and let's also add another one let's choose this one Parekura now for this one no key is required so let's just copy and paste it in here save the file and finally let's refresh the local package database information so see the back man - capital s YY and we can see here on the list that the two repositories have been added and let's now search for a package that we can install let's for example search for the Vivaldi browser so pac-man - capital s small s Vivaldi and as you can see here from the list the Vivaldi browser is found in both ripples that we have just added so sometimes there might be conflicting packages meaning one repo can have an older version of the package and this might create conflict in this case you would have to explicitly choose which one to install by providing the repository name / the package name so let's install revolta now and let's also install the ffmpeg codecs for the Vivaldi browser let's exit from here let's close Firefox and there we go we now have configured the system to use unofficial packages and it is up to you to choose which one of these three alternatives you would like to use when installing packages that are not found in the central of visual repositories okay now let's go over managing mount points for other discs or blog devices that you may have installed into your system there are several methods of how we can accomplish this for example you can have automatic disk mounting by manually specifying the mount points into the FS dad file or you can mount them on demand with a single click through the file manager let's first install a few more packages that are required for mounting types of file systems such as NTFS or ISO file systems directly from user space so let's here install NTFS - 3G and use ISO and also let's include G part ad which is a nice desktop application for managing disk partitions and if you haven't used it before it might actually be useful to you in the future so let's install that let's open up the file manager here and as you can see I have already added another disk in my system and labeled it as media now when I left click on the disk it immediately prompts me to enter my super user password in order to mount the disk this may seem fine but you would probably want this to happen automatically and save you the trouble of having to enter your password every time unless you have some specific security concerns of course I will show you how to mount the disk without passport and on demand later by modifying the system policy that is responsible for mounting file systems in user space let's first add an automatic mount point for our disk inside the FS tab file you can mount the disk by simply specifying the mount point such as VDB 1 for example or by its unique identifier mounting by unique identifiers is a lot more convenient approach because it always refers to a specific block device and not virtual references such as these now these references are randomly generated for each disk that is installed into the system and for example if you are swapping drives inside your machine or maybe you move other disks from other machine this may become a problem and then maybe your mount points will be invalid because they will no longer refer to the same disk now to list all of the block devices by their unique identifiers instead of using the command LS blk in in this case we will use the command VLK ID so sudo BLK ID so as you can see in this case my vdp1 partition has the following unique identifier so let's copy that and let's import this into the fstab file so let's add a new entry down here and let's add a few comments for our own personal reference so maybe here we can say my media disc and let's now add the unique identifier so we type view ID equals and then we simply paste the value and that's the value for a filesystem and here for the directory we need to specify where exactly in the file system we want this to be mounted so I want to mount this disk into this lash M&T / media for example and here for the filesystem I'm going to specify ext4 because the disk is formatted with the ext4 filesystem and by the way you can specify any filesystem here so if for example you have a disc which is formatted with the NTFS filesystem and then in that case you would say NTFS - 3 G here and here for the options let's go with the default options so we type in defaults and by the way the defaults are suitable in most cases however they still won't allow a non privileged user to mount the disk so let's actually override few of the default settings by specifying them with comma so comma and let's add the user option here which will allow any user to mount and unmount the disk manually and in case if we want to also run executables file from this file system we can also say comma exec here and for the dump option let's give the value of 0 this is not something that you need to be concerned with right now and for the pass we assign the option to usually so the possible values are 0 1 and 2 and they all relate to the filesystem error checking during system startup so 0 means no filesystem check 1 means which filesystem gets checked first and 2 means which filesystem gets checked last so for example the operating system partition or the root filesystem is always the that will be checked first as you can see from this example and for all other add additional discs these values can be either zero or two so let's save the file now and the amount point that we've specified in the FS tab file currently does not exist so before we mount the disk we actually need to create the directory so let's go sudo mkdir on /mnt and media and let's now switch inside the M&T directory so CD /mnt and let's list the contents and there we have it we have created the folder and now we can simply mount the disk so to do that we can do it by the directory name or by the blog device name so I can say something like mount slash there slash v DB 1 or simply if it's easier we can say something like mount /mnt media and there we go we have mounted the disk so even though we have mounted the disk we still need to change the permissions so that we can have full access so if we list the contents now we will see that the permissions currently default to root for both the user name and the group name and if we want to give our user or a group of users read and write access then we will simply have to change the ownership of this directory to do that we can use the command sudo CH own - capital R for recursive because there may be some other sub directories within this directory and we want the ownership to be applied on those as well and now here we need to specify the desired username to which we will give these permissions so in my case this is going to be guilty : and now for the group name let's actually use the users group and finally we specify the directory name and now if we do directory listing again we can see that the TLT user has full read write and execute access and anybody who belongs to this group to the users group will only have written execute permissions and for all else outside of that they will get read and execute as well now if you want to give everyone in the users group also full access we can simply change the permissions to seven seven five so sudo chmod - capital R or recursive seven seven five on media and let's do the listing again and now we can see that both the user name and the group have full read write and execute permissions and let's try to create a folder and maybe an empty text file so mkdir test and let's create a text file and there we go we have now read and write access and in most cases it will probably be just you yourself on your computer so let's actually change the ownership to only this user account so sudo CH own - capital are our username and the group name will be the same on media and there we have it let's actually restart the system now and the disk should be automatically mounted when we walk back in so let's open up the file manager now let's go to other locations computer M&T media and there we have it the disk is now mounted automatically now let me also show you the other way of mounting disks on demand and without any password from the file manager for this you will need to have a policy file inside the slash PTC pocket - one rules that D directory but first let's actually unmount the drive now and let's remove the entry from the et CFS tab file so I'm simply going to comment out this line and let's restart the computer one more time okay so let's quickly navigate to My Documents folder and here is the file that you need to have and I have provided this file for you and it is in the video description down below so when you get it you will simply have to copy it inside the rules that de directory has super user or root so let's actually do that now okay and once the file is in place you will be able to mount and unmount block devices with a single click from the file manager just like that and they will be conveniently displayed in the other locations tab so from here you will see all of the block devices and you can easily mount and unmount them with a single click so mounting through the file manager will actually mount them inside the run media your username directory let me show you let's switch into the / - run slash media and here we see our user so let's switch to this directory and now media is mounted in this location and these are the very essential basics that you need to know for mounting disks from FS tab the file manager and assigning the basic permissions welcome to the final part of this video now we will talk about keeping your system always up to date clean and optimized previously we talked about how to install software with pac-man yay and through the a you are so now let's go over managing removing and cleaning up unused packages ok let's start with pac-man as you are aware the command pac-man - capitalist will install a package on your system but if you add the small ass flag it will actually search for the package that you need if you add the I flag instead it will give you the detailed information about the package you are searching for if you want to query your local package information and get a list of all packages currently installed on your system you can do that with the command pac-man - capital Q and this will give you the list you can also look for a specific package that exists on your system by typing in pac-man - capital Q and then simply type the package name you are looking for and this will list the package name and the version number you can also get an extended information about the same package by adding the S flag and this will provide a brief package description and also you can get the full and the detailed information about the package by simply specifying the I flag here in case if you are wondering how many packages exist on your system you can simply query your local package database by using the command pac-man - capital Q and then pipe that through WC for word count - L for lines and here we can see that we currently have 936 packages installed in our system and we can accomplish the same with EA - capital P for print and then s for statistics and this will also give us the information it will also give some other useful information about the 10 biggest packages that exist on our system finally for a quick overview of all available flags or options that you can use with the pac-man command type in pac-man - - help and this will list all of the options for more help and detailed explanation you should use the manual page for pac-man which you can access by using the command man pac-man and basically this will give you the manual page from where you can find detailed explanation about every option now what if you want to remove the installed package from your system you can simply use pac-man - capital R for remove and then the package name and you will have to do this with superuser privileges so type in sudo pac-man - capital R and then the packages you want to remove now doing it this way will only remove the package itself and not its dependencies so I will answer no here to remove the package and all of its dependencies just append the S flag to the pac-man - capital R command and this will completely remove the package in the same way as it was installed the additional s flag that we specified stands for removing packages recursively so I will type in yes here and this will completely remove the package from the system and all of its dependencies for maintenance purposes you can always check if there are any unneeded orphaned packages which exist on your system and that you can safely remove just to keep your system clean to find out if such packages exist on your system simply use the command pac-man - capital Q for local query and then T for unneeded D for dependencies and Q for quiet operation and here you will see a list of packages that are no longer needed on your system we can safely remove these packages by using the command sudo pac-man - capital R for remove s for recursive operation and then simply specify the previous query command as a shell variable and this will remove these unneeded and unused packages on your system and in case if you're using an a your helper such as yay and you want to accomplish the same you can simply type yay - Capital y and MC for those of you coming from other Linux distributions you can find the pac-man rosetta page which is part of the arch wiki that will show you a list of package management corresponding commands from other distributions compared to arch for example the apt install command in Debian or a bundle is equivalent to pacman - capital S and so on now if you are not using any aur helper and you prefer to manually install a your packages by downloading and compiling them in this case you will also have to manually update them as well so all we have to do is switch inside the aur package folder of the application that you want to update for example I want to check if there are updates for the Skype app that I've previously installed so I'll switch to that and then to check for updates we have to run the command get pull and if you get something like already up-to-date like in this case then there is nothing else to do however if you get something like new files added or updated then you will need to run the make pkg - as I command again to download the new version and make sure that you manually delete the old cached package installers like these for example they will simply take up your space and if you ever want to remove a package that you have installed for the aur you can simply do that with pac-man to update all packages to their latest versions were simply to install system updates here's the command sudo pac-man - capital as y-you and if you have an au or helper such as yeh simply use that one instead so sudo PA - capital as y-you and this will update everything including the packages that you have installed through EA so let's update our system now and after installing the updates simply restart your computer by the way running system updates or installing software on your computer will eventually create a large pool of cashed packages which grows in size over time and to keep your system clean and to always have the maximum disk space available you should purge this cache during system maintenance if you want to find out how large is the cache of downloaded packages you can use the command D U for disk usage - HS on slash var slash cache slash pacman and here we can see that the current cache of downloaded packages is almost 400 megabytes in size so we can clean this cache by either using pac-man or the aur helper if you have that one installed on your system so we would say something like pseudo Eggman - capitalist cc or yay - capitalist CC and this will remove all packaged cash from the system and if we simply repeat the command again we will see that now the cached information only takes 76 kilobytes finally regarding system updates it is generally recommended that you run them only once a week and let this also be your maintenance window and this is all of the essential information that you need to know in order to manage packages and updates on your arch system ok let's talk about cleaning system log files now in Arch Linux the default logging is performed by a journal d which is part of system D it is a system service that collects and stores log data and other information about your system using the command journal CTL will list the current log that occurs within the system and for example if we specify the - B option it will give us the logging information that occurred during boot time and also if we specify the - XP option it will give us the extended information including error messages coming from services if there are any now we will not get into the detail on how to manage journal D in this video we will save that for another time but instead I will show you how to clean system logs because over time they will grow and take up a lot of space if they are not maintained properly first if we want to check how much space is currently used by journal d-logs we can execute the command D U for disk usage - H s for statistics on /var log to Journal and here we see that currently the logs take 8 hundred and seventy-three megabytes of disk space to clean the logs first we must archive them so they are no longer relevant for the system and to do this we execute the command journal CTL - - rotate and we will have to do it with super user privileges and this will rotate or archive the log information and now that we have backed up the logs we can finally clean them by executing sudo journal CTL - - vacuum - time equals and let's actually clear everything from the beginning of time up until the last second so I will specify one s here and press Enter and there we go we have freed 856 megabytes of archived journals now you may also want to automate this process so in this case you need to edit the file journal d Kampf which can be found inside /et c system D folder and down here where it says system max use let's say something like 500 megabytes and simply save the file and then once the logs reach 500 megabytes in size they will be automatically cleaned and the system will be limited to only 500 megabytes on each journal lot rotation let's now restart the service by executing the command sudo systemctl restart system D - Journal D and now if we examine the service by saying systemctl status system D Journal D we will actually see that the limit that we have imposed on Journal D is now active if you need more information simply read section 5 of the manual on Journal decom so you can execute the command man 5 Journal decomp and this will provide all the detailed information that you need about maintaining your log size and this is how you perform configuration and maintenance on system logs in arch for the end of this video let's talk about how to optimize your SSD drive performance by an ape link automatically in function as a general recommendation it is always advised that you keep the tree function enabled in your operating system and many operating systems including various Linux distros do this automatically in arch you will need to enable the service if you want to have automatic trim because over time as you write information to your SSD it will slow down because these drives unlike ordinary mechanical drives write and erase the information in a very different way the trim function will force the SSD to resynchronize and schedule clearing function for unneeded blocks before new information can be written let's now enable periodic SSD trim in arch by enabling the FS trim service so here we execute the command sudo systemctl enable FS trim dot timer and FS trim dot service and next we simply start service and there we go finally let's check that the service is active and it is that is all you need to do and this service will automatically run once every week or all of your mounted SSDs you can still force manual trim anytime by executing the command sudo FS trimmed - a for all and V for verbose and this is all you need to do for enabling the trim function this is the end of this video and I'd like to thank you for watching I hope the video was informative for you and if you enjoyed it please comment like share and subscribe
Info
Channel: Top Linux Tech
Views: 43,690
Rating: undefined out of 5
Keywords: arch linux installation, arch linux install, install arch linux, arch linux, full guide, aur helper, arch linux pacman, how to install arch linux 2020, install gnome on arch linux, how to install arch linux, arch linux 2020, arch linux gui
Id: QMBE5Kxb8Bg
Channel Id: undefined
Length: 142min 2sec (8522 seconds)
Published: Fri Jun 05 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.