1
00:00:00,550 --> 00:00:01,900
Hey, welcome back.

2
00:00:01,930 --> 00:00:05,890
So in this lesson, we are going to learn about the home directory.

3
00:00:05,920 --> 00:00:13,390
Now, as the name suggests, home, this is the home directory or the home folder for each user.

4
00:00:13,420 --> 00:00:20,830
Now, for example, if you use a username or if you add a user, Rohit into a computer, you have a

5
00:00:20,830 --> 00:00:25,180
home folder for that user, which is Rohit into the home directory.

6
00:00:25,180 --> 00:00:30,550
So it would look something like this which is slash home, slash Rohit.

7
00:00:30,850 --> 00:00:39,700
Now this home folder contains Rohit users data files or any user specific configuration files that he

8
00:00:39,700 --> 00:00:40,240
makes.

9
00:00:40,540 --> 00:00:47,290
Now, you should remember one very important thing that each user only has right access to their own

10
00:00:47,290 --> 00:00:48,280
home folder.

11
00:00:48,310 --> 00:00:55,900
That means Rohit cannot modify if there is any other user X, Y, Z, or Rohit cannot modify the root

12
00:00:55,900 --> 00:00:58,570
user's home directory that is slash root.

13
00:00:58,690 --> 00:01:05,980
Now to do that, he should have elevated privileges or permissions from the root user.

14
00:01:06,220 --> 00:01:06,790
All right.

15
00:01:06,790 --> 00:01:12,120
So we understood basically what is a home directory, which is the user's home directory.

16
00:01:12,130 --> 00:01:16,150
So let's see in the practical time, what exactly create one.

17
00:01:16,720 --> 00:01:17,230
All right.

18
00:01:17,230 --> 00:01:23,530
So let's quickly navigate first into the home directory, which is KD slash home and hit enter and let's

19
00:01:23,530 --> 00:01:25,240
see what is over here.

20
00:01:25,240 --> 00:01:31,420
So there are few users into this computer as you can see admin pad, Joker, Rohit, Shifa, etc.,

21
00:01:31,420 --> 00:01:38,110
which are the users that have been created and they're each specific individual home directory in which

22
00:01:38,110 --> 00:01:39,040
they can work.

23
00:01:39,250 --> 00:01:46,090
Now in case you want to add a new user in this system and automatically you want a home directory to

24
00:01:46,090 --> 00:01:50,470
be created for that user in which they can work for that.

25
00:01:50,470 --> 00:01:58,000
The command that you are going to use is user add hyphen M now hyphen M stands for to add a new home

26
00:01:58,000 --> 00:02:00,450
directory if does not exist.

27
00:02:00,460 --> 00:02:06,460
So let's say we are going to add a new user or let's say Hacker Pro and I'm going to hit enter and you

28
00:02:06,460 --> 00:02:10,180
can see it says the user already exists, no problem.

29
00:02:10,180 --> 00:02:16,300
So we are going to modify this and let's say instead of hacker, we are going to add us a pro and hit

30
00:02:16,300 --> 00:02:23,830
enter and you can see it successfully added the user and let's verify if a new directory has been successfully

31
00:02:23,830 --> 00:02:24,910
created or not.

32
00:02:25,030 --> 00:02:32,260
And you can see there is a new home directory for the user that we created just now that was crack a.

33
00:02:32,860 --> 00:02:39,850
Now this user then makes any changes or needs to do any configuration file change.

34
00:02:39,850 --> 00:02:44,410
He can do that into his respective home directory, which is crack pro.

35
00:02:44,620 --> 00:02:51,410
So I hope you guys understood the importance and usage of the Home Directory into the Linux file system.

36
00:02:51,430 --> 00:02:52,180
Thank you.
