1
00:00:00,120 --> 00:00:03,030
The File Hierarchy Standard is a collaborative document

2
00:00:03,030 --> 00:00:04,680
that specifies a set of guidelines

3
00:00:04,680 --> 00:00:06,515
for the names of files and directories

4
00:00:06,515 --> 00:00:09,600
and their locations on a Linux system.

5
00:00:09,600 --> 00:00:12,245
Most Linux distributions are FHS compliant

6
00:00:12,245 --> 00:00:15,840
and therefore support compatibility with other systems.

7
00:00:15,840 --> 00:00:18,697
The FHS also creates a naming convention

8
00:00:18,697 --> 00:00:21,930
that helps administrators, users, and applications

9
00:00:21,930 --> 00:00:24,570
consistently find the files that they're looking for

10
00:00:24,570 --> 00:00:25,740
as well as store files

11
00:00:25,740 --> 00:00:28,860
where other entities can easily find them.

12
00:00:28,860 --> 00:00:29,693
So in this demonstration,

13
00:00:29,693 --> 00:00:31,170
we're going to walk through just simple ways

14
00:00:31,170 --> 00:00:33,210
to navigate the Linux file structure.

15
00:00:33,210 --> 00:00:36,798
We're going to go through some shortcuts and little tricks.

16
00:00:36,798 --> 00:00:39,600
First thing we need to think about and understand is

17
00:00:39,600 --> 00:00:42,150
absolute path versus relative path.

18
00:00:42,150 --> 00:00:44,490
So an absolute path is going to be

19
00:00:44,490 --> 00:00:46,710
when you're using the forward slash.

20
00:00:46,710 --> 00:00:49,320
That means you're going to start from the route directory

21
00:00:49,320 --> 00:00:52,140
and go to the follow the directory that you're looking for.

22
00:00:52,140 --> 00:00:56,913
For example, if you want a CD to the user bin,

23
00:01:00,780 --> 00:01:02,763
that's the absolute path.

24
00:01:04,230 --> 00:01:06,300
Now, if we look in the list,

25
00:01:06,300 --> 00:01:08,400
we can see that there's multiple different

26
00:01:08,400 --> 00:01:09,900
directors and files in here.

27
00:01:09,900 --> 00:01:11,790
So here, what we can use is a symbol

28
00:01:11,790 --> 00:01:13,710
called the tilde symbol.

29
00:01:13,710 --> 00:01:16,023
That brings us back to the home directory.

30
00:01:16,950 --> 00:01:19,410
So now we can easily have a shortcut

31
00:01:19,410 --> 00:01:20,760
to go back to our home directory

32
00:01:20,760 --> 00:01:23,640
and list out any, you know files or anything like that,

33
00:01:23,640 --> 00:01:25,983
that we're interested in getting to.

34
00:01:26,850 --> 00:01:30,510
Now, to get to another director

35
00:01:30,510 --> 00:01:32,250
within the current director you're working with,

36
00:01:32,250 --> 00:01:33,900
that's going to be a relative one.

37
00:01:33,900 --> 00:01:36,250
So for example, I'm just going to cd into desktop.

38
00:01:39,120 --> 00:01:39,953
And you see,

39
00:01:39,953 --> 00:01:42,240
I didn't have to use the forward slash to get there

40
00:01:42,240 --> 00:01:43,500
because Linux knows,

41
00:01:43,500 --> 00:01:46,020
okay, if they omit the forward slash,

42
00:01:46,020 --> 00:01:49,140
we're only going to search in the present working directory.

43
00:01:49,140 --> 00:01:51,210
Now another directory to be familiar with

44
00:01:51,210 --> 00:01:52,890
is the root directory.

45
00:01:52,890 --> 00:01:55,623
Now you'll switch to root really quick.

46
00:01:57,840 --> 00:01:58,673
And if we look,

47
00:01:58,673 --> 00:02:02,070
it's going to automatically put us in the roots home directory,

48
00:02:02,070 --> 00:02:02,903
okay.

49
00:02:02,903 --> 00:02:05,910
It's not going to be the root directory, which is the slash.

50
00:02:05,910 --> 00:02:07,760
So again, this is the root directory.

51
00:02:09,090 --> 00:02:13,470
But if we look at the actual root user,

52
00:02:13,470 --> 00:02:15,540
they have their own directory.

53
00:02:15,540 --> 00:02:16,500
So if I see the,

54
00:02:16,500 --> 00:02:21,450
you'll see I'm currently in the roots working directory,

55
00:02:21,450 --> 00:02:23,400
so it's a slight difference.

56
00:02:23,400 --> 00:02:24,870
Now let's exit out of here.

57
00:02:24,870 --> 00:02:26,670
Go back to my own working directory.

58
00:02:28,410 --> 00:02:31,683
Again, it's going to bring us back to where we currently were.

59
00:02:37,890 --> 00:02:40,740
All right, because every user, whenever they're created,

60
00:02:40,740 --> 00:02:44,100
again has their own working directory

61
00:02:44,100 --> 00:02:45,930
under the home folder.

62
00:02:45,930 --> 00:02:48,510
So any user that's assigned to this operating system

63
00:02:48,510 --> 00:02:52,170
will have their own directory under the home folder.

64
00:02:52,170 --> 00:02:53,910
Another system to be familiar with,

65
00:02:53,910 --> 00:02:58,593
a little bit more practice, is the etc directory.

66
00:02:59,820 --> 00:03:02,670
This one contains a lot of different information.

67
00:03:02,670 --> 00:03:04,171
Typically configuration files

68
00:03:04,171 --> 00:03:06,090
for many services and applications

69
00:03:06,090 --> 00:03:07,560
that you're going to be running.

70
00:03:07,560 --> 00:03:09,333
So can list a few out here.

71
00:03:14,760 --> 00:03:19,760
Again you'll be using the etc folder a lot.

72
00:03:20,550 --> 00:03:22,110
Just a lot of different useful things

73
00:03:22,110 --> 00:03:25,443
that most system admins are going to have to use.

74
00:03:36,943 --> 00:03:37,776
Okay.

75
00:03:42,210 --> 00:03:43,893
Now just to show how the

76
00:03:43,893 --> 00:03:46,560
relative and absolute directories works,

77
00:03:46,560 --> 00:03:47,880
just show that's an error.

78
00:03:47,880 --> 00:03:49,320
So if we were just try to, let's say,

79
00:03:49,320 --> 00:03:51,870
let's go back to our home directory.

80
00:03:51,870 --> 00:03:54,060
And just say we wanted to go back to etc

81
00:03:54,060 --> 00:03:55,560
and we just did this.

82
00:03:55,560 --> 00:03:56,550
It's going to give us this error.

83
00:03:56,550 --> 00:03:58,080
Again because it's searching

84
00:03:58,080 --> 00:03:59,430
in our present working directory

85
00:03:59,430 --> 00:04:02,910
and there's no etc directory available there.

86
00:04:02,910 --> 00:04:05,670
But once we add the forward slash,

87
00:04:05,670 --> 00:04:07,383
now we're in the etc directory.

88
00:04:09,900 --> 00:04:11,490
Just a tidbit of information.

89
00:04:11,490 --> 00:04:13,470
Again, the bin folder,

90
00:04:13,470 --> 00:04:15,960
that's going to contain a lot of our binary command tools.

91
00:04:15,960 --> 00:04:19,800
So this is going to store pretty much all of our

92
00:04:19,800 --> 00:04:22,260
command functions and essential tools

93
00:04:22,260 --> 00:04:23,400
when we're typing a command line.

94
00:04:23,400 --> 00:04:25,980
For example, if we're using the list command.

95
00:04:25,980 --> 00:04:29,403
So we're listing out the directories and folders,

96
00:04:30,810 --> 00:04:33,120
that command has to be stored somewhere.

97
00:04:33,120 --> 00:04:35,100
And again, the bin, which is,

98
00:04:35,100 --> 00:04:36,720
since we're binary folder,

99
00:04:36,720 --> 00:04:38,670
is where all these commands are stored.

100
00:04:41,820 --> 00:04:43,870
Now this directory typically stores a lot

101
00:04:45,032 --> 00:04:46,530
of our third party installations.

102
00:04:46,530 --> 00:04:48,016
So as you see,

103
00:04:48,016 --> 00:04:48,870
I don't really have any going on here.

104
00:04:48,870 --> 00:04:51,720
But that's where if they were to be installed on the system,

105
00:04:51,720 --> 00:04:53,685
it'll be stored in its option folder.

106
00:04:53,685 --> 00:04:55,290
And the last folder we're just going to go over

107
00:04:55,290 --> 00:04:57,120
is just the prop folder.

108
00:04:57,120 --> 00:04:58,920
Again, this one's going to have

109
00:04:58,920 --> 00:05:00,690
most of our directories.

110
00:05:00,690 --> 00:05:03,360
That's for the virtual file system.

111
00:05:03,360 --> 00:05:04,860
So it represents the information

112
00:05:04,860 --> 00:05:07,500
that's reported by the Colonel.

113
00:05:07,500 --> 00:05:11,670
And again, most distributions use this FHS hierarchy.

114
00:05:11,670 --> 00:05:13,650
So just to make sure that it's consistent

115
00:05:13,650 --> 00:05:16,470
across all of the Linux distributions.

116
00:05:16,470 --> 00:05:18,070
I'll see you in the next lesson.

