1 00:00:06,780 --> 00:00:09,960 - This lesson is dedicated to the root user. 2 00:00:09,960 --> 00:00:12,180 Now, what is the root user? 3 00:00:12,180 --> 00:00:15,843 The root user is the almighty administrator user. 4 00:00:16,710 --> 00:00:20,100 There are no restrictions to the root user at all, 5 00:00:20,100 --> 00:00:21,780 and that makes the root user in Linux 6 00:00:21,780 --> 00:00:25,230 more powerful than administrator in a Windows environment, 7 00:00:25,230 --> 00:00:26,063 for instance, 8 00:00:27,120 --> 00:00:28,770 because an administrator user 9 00:00:28,770 --> 00:00:31,800 in a Windows environment is just a user that has 10 00:00:31,800 --> 00:00:34,230 all privileges that you can imagine. 11 00:00:34,230 --> 00:00:36,690 The root user in Linux is living 12 00:00:36,690 --> 00:00:39,690 in a world where privileges do not apply. 13 00:00:39,690 --> 00:00:43,080 And this world is called Linux kernel space. 14 00:00:43,080 --> 00:00:45,990 The Linux kernel is the heart of the operating system 15 00:00:45,990 --> 00:00:47,400 and there are no restrictions 16 00:00:47,400 --> 00:00:49,050 in what the Linux kernel can do. 17 00:00:49,050 --> 00:00:51,510 Because it's the heart of the operating system, 18 00:00:51,510 --> 00:00:54,000 it needs to be able to do everything. 19 00:00:54,000 --> 00:00:55,500 And in that environment, 20 00:00:55,500 --> 00:00:58,833 we need a user and that's the root user. 21 00:00:58,833 --> 00:01:01,410 So the root user needs no permissions to 22 00:01:01,410 --> 00:01:03,180 whatever root wants to do. 23 00:01:03,180 --> 00:01:06,360 And that's because a root has kernel level access. 24 00:01:06,360 --> 00:01:09,690 And that makes root an unlimited user account. 25 00:01:09,690 --> 00:01:13,020 Using this account should be avoided for that reason. 26 00:01:13,020 --> 00:01:13,920 Now, the good thing is 27 00:01:13,920 --> 00:01:17,310 that recent Linux distributions either 28 00:01:17,310 --> 00:01:19,770 don't set a password for the root user, 29 00:01:19,770 --> 00:01:21,122 so you cannot use it, 30 00:01:21,122 --> 00:01:24,780 or they make enabling the root user optional, 31 00:01:24,780 --> 00:01:26,880 so that it's your choice. 32 00:01:26,880 --> 00:01:28,792 In all the Linux distributions, 33 00:01:28,792 --> 00:01:32,730 it was common to set a root password while installing 34 00:01:32,730 --> 00:01:34,320 and not do anything else. 35 00:01:34,320 --> 00:01:37,530 So there, it was common to open a shell as the root user. 36 00:01:37,530 --> 00:01:39,363 Nowadays, we don't do that anymore. 37 00:01:40,320 --> 00:01:43,590 The best alternative to using the root user is 38 00:01:43,590 --> 00:01:44,550 to use sudo. 39 00:01:44,550 --> 00:01:47,910 Sudo does require authorization, 40 00:01:47,910 --> 00:01:49,620 so it doesn't work for any user. 41 00:01:49,620 --> 00:01:51,720 It only works for authorized users. 42 00:01:51,720 --> 00:01:55,140 And sudo is what you put in front of a command. 43 00:01:55,140 --> 00:01:57,330 We've already seen it a couple of times. 44 00:01:57,330 --> 00:01:59,490 If you put sudo in front of a command, 45 00:01:59,490 --> 00:02:03,429 you run that specific command with super user powers. 46 00:02:03,429 --> 00:02:05,733 Alternatively, there is also su. 47 00:02:06,660 --> 00:02:08,760 su can be used to open a root shell 48 00:02:08,760 --> 00:02:11,610 after logging in as an ordinary user, 49 00:02:11,610 --> 00:02:15,450 but su is going to prompt you for the root password and 50 00:02:15,450 --> 00:02:18,420 how is that going to work if you don't have a root password? 51 00:02:18,420 --> 00:02:19,920 Well, it doesn't, 52 00:02:19,920 --> 00:02:22,860 and that is what makes su of limited use. 53 00:02:22,860 --> 00:02:23,880 In the next video, 54 00:02:23,880 --> 00:02:26,903 we will further explore the use of sudo as well as su.