WEBVTT Kind: captions Language: en 00:00:00.720 --> 00:00:07.000 Hello Blade Runners! In this video I want to show you how 00:00:07.000 --> 00:00:12.920 to install the Firefox browser from Mozilla's official repositories. You've probably been using 00:00:12.920 --> 00:00:20.000 Firefox the regular way, i.e. from your distribution's repositories, or if 00:00:20.000 --> 00:00:27.640 you use Ubuntu, for example, probably in Snap format. For some time now, 00:00:27.640 --> 00:00:34.960 however, Mozilla has been offering Firefox packages for Debian-based systems, and it's a good idea to use these because 00:00:34.960 --> 00:00:41.760 you'll always get the latest version of the browser there, directly from the manufacturer. I 00:00:41.760 --> 00:00:45.000 would now like to show you how to install Firefox on your Debian-based system from the official 00:00:47.560 --> 00:00:45.000 repositories. This applies not only to my distribution SpaceFun, 00:00:53.400 --> 00:00:45.000 but also to all Debian-based systems such as Ubuntu, MX Linux, Linux Mint, and many 00:01:00.920 --> 00:00:45.000 others. First of all, we want to go to the website that Mozilla 00:01:08.680 --> 00:00:45.000 has prepared for us, which contains installation instructions. I'll of course include the link 00:01:14.520 --> 00:00:45.000 in the video description below this video. Here you can see this point 00:01:19.960 --> 00:00:45.000 : 'Install Firefox .deb packages for Debian based distributions'. In the first step, point 1, 00:01:27.600 --> 00:00:45.000 a directory is created for the very first time. For this we will not use the 'mkdir' command, 00:01:34.800 --> 00:00:45.000 which you may already be familiar with if you have watched my other videos, but 00:01:38.440 --> 00:00:45.000 the 'install' command. The 'install' command has many advantages because you 00:01:44.960 --> 00:00:45.000 can also specify directly which permissions the new directory should have. Let's 00:01:50.280 --> 00:00:45.000 first check whether this directory already exists on our system. To do this, I will copy 00:01:55.800 --> 00:00:45.000 the directory name and say 'sudo ls -al', paste it here: '/etc/apt/keyrings', 00:02:04.480 --> 00:00:45.000 Enter. Yes, it already exists here. So we can create it again anyway, because if 00:02:10.360 --> 00:00:45.000 the directory already exists, nothing will happen here. We can simply run it again 00:02:14.320 --> 00:00:45.000 . So I copy the command 'sudo install -d' for directory, '-m' for mode, and 00:02:22.360 --> 00:00:45.000 then the directory mask '0755' and the directory name, in this case '/etc/apt/keyrings/'. 00:02:31.200 --> 00:00:45.000 I can now take a look at this directory directly by calling 'ls -ald' 00:02:37.160 --> 00:00:45.000 with the directory name, because then the directory is displayed. If I just 00:02:42.520 --> 00:00:45.000 call 'ls -al', it shows me the contents of the directory. It's currently empty. 00:02:49.280 --> 00:00:45.000 In the second step, the Mozilla signing key is imported here. The packages are signed 00:02:57.360 --> 00:00:45.000 with GPG, and this key, the public key of the Mozilla signing key, 00:03:04.360 --> 00:00:45.000 needs to be imported so that our system can compare it to see if it's really correct. And 00:03:08.760 --> 00:00:45.000 that's where this long command comes in. Let's unravel it now and look 00:03:14.000 --> 00:00:45.000 at it in detail. I'll paste it here for now. So the 'wget' command is used here. 00:03:19.240 --> 00:00:45.000 We first have to check whether we even have 'wget' on it. 'wget', yes, we 00:03:23.640 --> 00:00:45.000 do. If it's not on it, you can simply run 'sudo apt install wget'. If you 00:03:30.120 --> 00:00:45.000 add '-y' at the end, it will do it automatically. It's already on here, of course. So 'wget 00:03:36.736 --> 00:00:45.000 -q', quiet, the output is suppressed and then here is the URL where this key is located. 00:03:42.360 --> 00:00:45.000 We can just open that. I'll copy it again and open it in a 00:03:48.840 --> 00:00:45.000 browser. Then it will download it and I would now try to import it with 00:03:55.000 --> 00:00:45.000 Seahorse. I can also take another look at it here in the download directory, 'Open 00:04:00.160 --> 00:00:45.000 with' and then, for example, Featherpad, which is the text editor and here you can see this public key. 00:04:06.920 --> 00:00:45.000 We don't need it here in the download directory. So the command is 'wget -q', 00:04:12.760 --> 00:00:45.000 it downloads this file and then '-O'. -O actually gives an output. This 00:04:19.440 --> 00:00:45.000 means I can now specify a different name for where this file should be saved, 00:04:24.880 --> 00:00:45.000 or even a path. But there's another '-' at the end. This means that 00:04:30.400 --> 00:00:45.000 the output is sent to the so-called 'stdout', the standard output, by default. 00:04:35.280 --> 00:00:45.000 redirected to the standard output. I could now just 00:04:40.720 --> 00:00:45.000 call this command without that and then see that the key is simply 00:04:48.880 --> 00:00:45.000 output to the standard output, which is my standard output, my terminal. Now we want to install this key as 00:04:55.040 --> 00:00:45.000 described here, which I'll copy again. And it does 00:05:01.080 --> 00:00:45.000 the following: It downloads this key and outputs it to the standard output, 00:05:07.760 --> 00:00:45.000 but then pipes it, i.e. it passes it to another program, the standard output, and then says 00:05:12.720 --> 00:00:45.000 'sudo', i.e. with root privileges, which is still executed without root privileges, and here 'tee' is 00:05:17.120 --> 00:00:45.000 executed with root privileges. With 'tee' you can redirect output to a file, for example and then 00:05:24.360 --> 00:00:45.000 or append it with 'tee -a'. But here it is written to this file '/etc/apt/keyrings', 00:05:30.240 --> 00:00:45.000 the directory we created earlier, 'packages.mozilla.org.asc'. And the output of 00:05:36.480 --> 00:00:45.000 the command is redirected to '/dev/null'. That means I don't see anything. I can just 00:05:41.840 --> 00:00:45.000 run it now, and it simply doesn't show me anything. I could also 00:05:46.280 --> 00:00:45.000 run it without the '> /dev/null'. Then the key will of course still be displayed here. And now it has 00:05:52.080 --> 00:00:45.000 'ls -al /etc/apt/keyrings' in this directory, which we can look at again. 00:06:00.360 --> 00:00:45.000 It has created this file there. There's actually nothing else in it except this file that we just 00:06:04.520 --> 00:00:45.000 downloaded, which is still here. That was the first step. Now, 00:06:10.840 --> 00:00:45.000 in the optional part, you can compare this fingerprint again. This is a 00:06:17.080 --> 00:00:45.000 relatively complex command. Ultimately, you can simply have the fingerprint output, 00:06:22.440 --> 00:00:45.000 and it corresponds to what is requested here. In the next step, we want 00:06:30.160 --> 00:00:45.000 to add the actual repository. We'll look at this in more detail now. To do this, an 'echo' is executed here 00:06:36.360 --> 00:00:45.000 . We already know 'echo'. So with 'echo' you can simply 00:06:41.600 --> 00:00:45.000 create an output, and I can now simply run that individually, without the '|'. Then it 00:06:47.840 --> 00:00:45.000 simply outputs what is in the double quotes. This is 'deb', 00:06:52.960 --> 00:00:45.000 which is the type of repository. It's a repository file that I want to create, 00:07:00.120 --> 00:00:45.000 and then the key is specified there, with the complete path. This means that 00:07:04.200 --> 00:00:45.000 it knows exactly that these packages from the repository were signed with the key and can 00:07:09.600 --> 00:00:45.000 verify this. Then the URL of the repository is specified: 'mozilla' and 'main'. Now 00:07:16.400 --> 00:00:45.000 we want to redirect the whole thing to a repository file, as described here. 00:07:29.017 --> 00:00:45.000 And that's already been done here. Now it's gone 00:07:32.560 --> 00:00:45.000 to 'sources.list.d/mozilla.list' and is using 'tee -a' here. You ca 00:07:38.760 --> 00:00:45.000 n't run this more than once, because then it appends it to the end each time, appending this line 00:07:43.680 --> 00:00:45.000 . I can run it now with 'cat'. If I were to run it again 00:07:47.880 --> 00:00:45.000 because it says 'sudo tee -a', it would run twice. We 00:07:53.000 --> 00:00:45.000 don't want that, of course. I'll change that now by going in there. Of course, I would have to use 'sudo' to get in there. 00:07:59.840 --> 00:00:45.000 I don't have permissions there. I'll delete that. Now we only have it in there once. So now this repository 00:08:07.640 --> 00:00:45.000 definition is already in there. But now we want the packages, the Firefox packages from 00:08:13.320 --> 00:00:45.000 this repository, to be given priority. Because Debian itself offers Firefox, or your Debian or SpaceFun 00:08:19.800 --> 00:00:45.000 system also offers Firefox. So we need to 00:08:25.280 --> 00:00:45.000 define a so-called pin priority. This is done with this long command. Here it simply says 'echo' again and 00:08:30.840 --> 00:00:45.000 that, so I fill something out, first output something, and then fill something into a file again, namely the 00:08:36.680 --> 00:00:45.000 file '/etc/apt/preferences.d/mozilla', namely the content 'Package: * Pin: origin packages.mozilla.org' 00:08:44.120 --> 00:00:45.000 and give it the PIN Priority 1000. This tells me that packages from this 00:08:51.080 --> 00:00:45.000 repository should always be given priority. I've now executed that here and can now 00:08:59.920 --> 00:00:45.000 view 'apt-cache policy firefox'. Nothing is installed here yet, because 00:09:08.760 --> 00:00:45.000 Package has a different name under Debian. And now I can try to install it here 'apt update' 00:09:15.800 --> 00:00:45.000 'apt install firefox' 00:09:20.280 --> 00:00:45.000 If this was installed from the repository, then you need 00:09:27.640 --> 00:00:45.000 to check afterwards that the other package - if it has the same name on the Debian system, it's not a problem because 00:09:32.600 --> 00:00:45.000 it will then simply be updated. If the original package is called 'firefox-esr', for example, then 00:09:38.480 --> 00:00:45.000 you can of course uninstall it. Otherwise you'll have two versions of Firefox 00:09:42.920 --> 00:00:45.000 on it afterwards. Now we do 'apt-cache policy firefox' again and now we can see here that it was 00:09:48.640 --> 00:00:45.000 installed from the Mozilla repository. I can also have another look 'dpkg -l' and then 00:09:59.560 --> 00:00:45.000 I can use '|' here, which gives me all the Debian packages that are installed on my system, 00:10:05.320 --> 00:00:45.000 'grep firefox'. Then I restrict the output to Firefox and see that 00:10:12.880 --> 00:00:45.000 'firefox' and 'firefox-esr' are now on it, for example. We now probably have two 00:10:17.640 --> 00:00:45.000 Firefox versions in the menu. Yes, Firefox and Firefox ESR. You could of course 00:10:22.560 --> 00:00:45.000 try uninstalling the ESR version. You have to be careful if the system has a deep dependency on it 00:10:27.000 --> 00:00:45.000 so that it doesn't remove other things with it. On an Ubuntu system, 00:10:31.080 --> 00:00:45.000 you can also do 'snap remove firefox'. This will also remove the Snap package and you 00:10:35.960 --> 00:00:45.000 will always use the official Firefox from the repository. I hope you have fun 00:10:41.480 --> 00:00:45.000 recreating it and let me know how it went for you in the comments. If you 00:10:46.000 --> 00:00:45.000 have any further questions, please visit our Telegram community. I look forward to your visit. See you soon and bye!