Linux - File systems
8K views
Nov 28, 2024
Linux - File systems
View Video Transcript
0:00
so let us start with this file system
0:02
practical we are going to start with our
0:04
terminal into our Linux machine so we
0:08
can manage or to scan it file systems
0:10
even by the utilities provided to you
0:12
that it is your desk utility I'm just
0:15
going to show you over here so that at
0:17
least you will have an idea of the disk
0:19
utility generally you have so you can
0:22
see this is the devices which is
0:24
attached to my system I have right now
0:26
one hard test here and see it's on CD
0:29
drivers are somewhat you know hard tests
0:31
which has a by default attached into my
0:33
Linux operating system so now I want to
0:36
attach one more than so I have already
0:40
attached one does so just we need to
0:42
synchronize and check whether it has
0:44
been detected into our kernel or not so
0:46
I'll use
0:51
I can use the fdisk
0:54
space - L come on so it's not showing me
0:59
because I'm not a root user so a limited
1:02
user cannot handle the administration
1:04
tasks so I'm going to switch the user to
1:07
the root and this is the password of my
1:10
root now I have assigned here okay so
1:13
I'm in the root now now I'll give the
1:14
same command of this space - L it will
1:17
show me the list of discs I have you can
1:19
see it's showing me the list of the sky
1:23
have into my system so it is showing me
1:25
the first disc which is the SDA disc of
1:30
your near about a dt v8 8 or 9 TB and
1:34
this is the partitions I have created on
1:36
that disc and also and also there is on
1:42
other partition for the disc if we have
1:46
it will show you those discs as well
1:55
you
2:08
so the order discussed not detected just
2:12
I'll reboot my machine and then we will
2:14
be able to get this thing so I just
2:17
rebooted
2:25
you
2:28
so my system is restarted again I'm
2:31
moving to the terminal okay so I'm going
2:39
to
2:44
it's run the same command before that
2:47
I'll just log in at my work Logan and
2:50
then I'm going to run the command
2:52
quality of space - your fdisk
2:56
space - l so you can see there are two
3:02
different tests which will be listed
3:03
over here can also see it in a page wise
3:07
so that again you can easily get the
3:11
information so very first is we have
3:13
that is SDA which we have seen and the
3:15
second disc we have now that is your STP
3:17
so where Steve contains two different
3:19
partitions while as GV contains no
3:21
partitions into it and I want to create
3:25
partitions into STP so the same thing
3:28
you generally get into the utility of
3:31
your disk as well so you can check into
3:34
utility now you have two different discs
3:36
one is of 20g v around and the other is
3:40
off I get 6 GB around so this - just I
3:44
have added into my machine now I want to
3:46
now create some partitions into the disk
3:49
so for creating the partition we have to
3:52
give the command called as fdisk of this
3:56
space slash dave slash the name of the
3:59
disk so right now the disk which I have
4:02
connected which is applying this it
4:04
contains the name STP I'll just keep the
4:07
utilities in a boost that you can even
4:10
check it graphically so this is the SDA
4:13
and this is your STP so I am going to
4:17
create partitions into it so till now
4:19
this is a completely blank hard disk
4:21
with unknown file system it is showing
4:23
you so I'm going to create the
4:25
partitions and defining the file systems
4:27
and do it so now I'm going to move into
4:31
the f-test /th is DP now it's asking me
4:36
like you are going to create and you
4:39
don't we are going to manage your tests
4:41
so if you require some help you can
4:43
press and for getting the help so that
4:45
it will show you the key leaders we can
4:47
use for creating managing the partitions
4:49
now very first let me check the number
4:52
of partitions we do have existing into
4:55
the Rhino hard disk so for that we can
4:57
also give
4:58
come on or you can use the he let her
5:00
speak so for printing the partition
5:02
table so I'll check
5:05
there is no partition has been created
5:07
as of now so for that I want to create a
5:10
new partition so I will be creating it
5:12
by and so I'll use N and it is asking me
5:15
which kind of partitions we have and
5:18
which we want to create actually so
5:21
generally there are three type of
5:22
foundation which we can use in our
5:24
create into ms-dos partition table or we
5:27
can say MBR partition table they are
5:29
three that is your primary extended and
5:32
logical partitions so ultimately in MBR
5:36
you can create only four partitions
5:37
either three primary one extended or
5:41
you're out of four of four you can use
5:44
as a primary or same thing we can also
5:50
use an external partition so external
5:54
partition can be only one but if I want
5:56
to create more than four partitions like
5:58
as I said as I already told you that it
6:02
can accept 24 partitions so what I'll be
6:06
doing is I'll be creating three primary
6:09
one extended and into that I'll be
6:11
creating number of partitions the number
6:13
of partitions will be creating under the
6:14
extended they will be a logical so this
6:17
type of partitions you can explore over
6:19
things not you will find more rules of
6:21
it so right now ultimately we need to
6:24
find like there are four partitions or
6:26
which are free partitions out of that we
6:28
can either create a primary or extended
6:30
but again there is no restrictions
6:32
extended can be created only once means
6:34
three primary one extended or four
6:37
primary is your extended we can create
6:39
so maximum partition which we can create
6:42
is only four so for example I'm going to
6:44
create the partition now which the
6:47
perfect primary partition have selected
6:49
so that I can create a primary partition
6:51
partition number it is asking me for
6:53
like what will be the name of a number
6:55
of the partition defining the default
6:59
one that is one and it is asking you for
7:02
this sector the hardest sector from
7:04
where you are going to create the
7:05
partition so we won't come to know cube
7:08
from fit sector to with sector I will be
7:10
creating 20 GB of
7:12
in spite of that we'll skip it and we
7:15
are going to define our value from here
7:17
so it is asking for the first and last
7:20
sector but I do not want to define
7:22
anything in two sectors so I can go for
7:24
defining into this size so for defining
7:27
in two size you need just need to add
7:29
the plus sign in front of it
7:30
so the solution sign then this size and
7:33
then what the size you want again
7:36
whether you want to define it when Katie
7:38
K bees and bees or gp's so i'll just
7:41
define as plus the size I want to define
7:45
for the first partition and so for
7:47
example Phi GB so I'll define Phi G and
7:50
hit enter so we have created with the
7:53
first partition showing you the
7:54
notification the partition one of type
7:57
planets of size 5 GP is set let us check
8:00
for it you can see my pressing P I've
8:04
been able to create the or check the
8:07
partition which I have created so
8:08
automatically it will take your cycle or
8:12
the sectors of your hard disk
8:15
so the sector got started from to 0 for
8:18
it and it won't ended on this sector for
8:21
creating about 5 GB of partition so this
8:25
is what we have next again if I am going
8:27
to create a new partition so I'll create
8:30
a new partition by pressing Y n right
8:33
now I'm going to create an external
8:34
partition so ok e and you can define the
8:40
name of the partition or the number for
8:41
the partition I will define the to
8:43
itself again first sector I'm going to
8:46
skip and I'm going to add the partition
8:49
for my extended as 10 GB done let's
8:54
check the partition has been created or
8:56
not yeah it has created switches showing
8:58
you this is the x-hundred filesystem and
9:00
for different kind of file systems we
9:02
have different IDs right so same way we
9:07
can also create the partition now again
9:09
for creating the partition I'll press
9:11
and now it's asking me whether you want
9:13
to create a primary or a logical so as I
9:15
said you can create only one extended it
9:18
won't ask you for creating the new
9:19
extended partition now because already
9:21
you have used it right so
9:25
now either I can create one or two
9:29
multiple primary partitions that is to
9:31
power primary partitions or I can go on
9:33
creating the logical partitions and the
9:35
logical partition will start numbering
9:37
the partitions from five so as of now we
9:41
have seen we have created two partition
9:43
and got number as one and the other
9:45
number as two but now if I create a
9:48
logical partition which generally gets
9:49
created inside the hex net partition so
9:53
external partition is of 10 GB so I can
9:55
create the partition max - max of 10 GB
9:59
not more than 10 GB like if I cry doing
10:02
it I cannot write so it's showing you
10:07
I'm out of range so I'll create it off 2
10:12
GB hit enter and let us check into print
10:18
table now I can see your even the
10:24
logical partition has been created and
10:27
it's by default created from file and we
10:29
cannot change it I know and it won't ask
10:32
you to change the number while creating
10:33
a logical partition so by default it
10:35
will restart creating from 500 words so
10:38
this is how generally we create the
10:40
partition we have created a primary
10:42
partition extended partition and your
10:43
logical partition now let us check which
10:46
are the type of file systems we do have
10:48
into the Linux operating system for
10:50
checking the file systems and forgetting
10:52
the menu help we can also press M now
10:55
here you can see for to check the file
10:58
system type or the list of no partition
11:01
types we have we can go for pressing L
11:03
so L will show you all the filesystem
11:05
types we have like fat 516 the different
11:10
file systems you generally use into the
11:12
day-to-day life right
11:16
so by default when you create the
11:18
partition you get 83 when you read these
11:22
swap partitions you will get 82 when you
11:26
create the LVN partitions you get by
11:28
default 80 and then if you create an
11:32
extended partition
11:40
for extended partition you generally
11:42
have this that is fine but this is what
11:48
the file systems are like if I want to
11:49
you know change the file system of my
11:51
partition I can also do it from here
11:53
like if I want to make my partition as
11:56
NTFS so I can also use NTFS volume set
12:00
by giving the or changing the partition
12:03
type to 86 let us check we have these
12:06
partitions created I'm going to change
12:09
the last partition type to 86 that is my
12:13
NTFS partition just give a command to
12:15
change the partition type T which
12:18
partition you want to change I want to
12:19
change partition number five and define
12:23
the codes so that is the 83 which is the
12:25
code you need to remember so I'm going
12:28
to use 86 so it is X was the code for
12:32
your NTFS right so I'm using 86 and hit
12:39
enter now I can find here this has
12:43
changed to NTFS right so this way you
12:46
can change your partition you can create
12:47
your partition can change the type
12:49
whenever you require if I want to make
12:51
it default 83 I can button so this is
12:57
how generally we change the file systems
12:59
on different kind of file system we have
13:01
into the Linux and which it allow you to
13:03
create now once you have done with that
13:05
all these changes which I have made was
13:07
temporary now if I want to make the
13:09
changes permanently over the partition
13:11
table I need to press W W means right
13:14
and quit if I give cube so cuman's quit
13:19
without saving so I want to write all
13:21
those things into my partition table of
13:23
your partition your disk / as Dave / s
13:28
DB surgeries and I am going to write it
13:30
down so once we have written it
13:32
you can check into the of the space - L
13:36
and I just now I want to check my desk
13:40
SDP which is located into the device it
13:45
is showing you some of the three
13:48
partitions you have created
13:50
and sometimes if you do not get any
13:52
entries you can also give the command
13:54
called as part pro which will prove your
13:56
partitions and you it updates your
13:58
corner with the new partition table
14:02
part pro right so it will update your
14:08
variation table completely okay so
14:10
either eight fred is giving you it is
14:11
busy cannot right it's okay it generally
14:14
liked it
14:15
okay so now if i want to use that
14:21
particular variation which i have
14:22
created so we know we have created the
14:25
three partitions which is listed over
14:27
here alright I want to use as db5 I
14:34
cannot directly move into the they have
14:38
/ as DV 5 because it is not sorry that's
14:43
t be fine because it is not directory
14:45
not in a manner file so it won't take
14:48
you to you to access this file in such a
14:50
way right and if I try using BR / they
14:56
have / as DP why I won't it will create
15:00
a new file in spite of it
15:08
you
15:15
now Holly will be using it very first
15:18
what you need to do is you need to
15:19
format that particular partition by
15:21
using the different file system type
15:23
called as ext3 or the latest one which
15:26
we have that is the HD for as DP file
15:31
format it once you have formatted it it
15:35
will show you everything that's been
15:37
done or if it contains some error it
15:39
will prompt you with the error as well
15:41
like for example if I use 6 it will give
15:45
you error like there is no such file or
15:47
directory right so I have already
15:50
formatted it by using the mkfs - t means
15:53
type of your file system high view that
15:55
is ext4 slash dev slash as gb y ever
15:59
have to find so it is formatted so in
16:02
the number of time you will format it
16:03
can format it but only if you have kept
16:05
some data you have to be you know ensure
16:08
that your data which you have intuited
16:10
it's not an important data because it
16:12
will be flushed out completely so once
16:14
you have done with the formatting what I
16:17
can do is I can when I mount this
16:20
partition as we have also discussed it
16:22
int slide itself like mounting we need
16:24
to locate these particular devices so
16:27
for that I'm going to create a directory
16:28
into the MT with the name C : for
16:32
example and I want to mount slash tape
16:37
slash s DP v into MNT C :
16:43
so it is mounted if it is no error and
16:46
if there is an error means there is a
16:48
known something wrong with your file
16:50
system or the partition now we can move
16:55
into your CD /mnt / c : and you can find
17:01
a lost purse phone directory once you
17:03
find it you come to know that it is
17:05
really mounted so again we can check
17:07
from the command called as DF space - a
17:11
it will show you the number of drives
17:13
which are mounted at which location so
17:17
this all are by default mounted and this
17:19
is a drive which I have mounted right
17:21
now so it is showing me this is the
17:23
mounted and right this is source and
17:25
this is the destination now if I want to
17:27
work into this particular
17:29
I'll move into the MNT say :
17:32
and I'll start walking right I'll create
17:35
a directory
17:36
mkdir a b c d whatever i want i can
17:41
create same way if i want to create some
17:44
touch files one file two and so on right
17:49
i can create defaults as well so this
17:57
i've created into the partition it's
17:59
actually we come to know like we are
18:01
walking into the fryer directory but
18:03
actually we are working into the
18:05
partition we are receiving all the data
18:06
into the partition now if i want to you
18:09
mount it once i want to remove this
18:11
device from the mounting i can give the
18:13
command you mount either the source or
18:17
either the destination location so I'm
18:19
going to define slash tape slash so once
18:24
you have done with that you can see it
18:27
has been removed completely right and
18:30
suppose for example that Ron you again
18:32
wanted to be mounted you can also mount
18:34
it again by giving the same command into
18:41
thee and one more thing before if we
18:43
move ahead let us check whether do we
18:45
have any data into MNT nothing right so
18:51
for that I'm coming out and again I'm
18:52
going to mount slash Dave / sgp fire
18:57
into MN t and z : move into the /mnt
19:06
it's nicely : check for your files we
19:10
have recovered all the things because
19:12
this was safe in the Tea Party scene not
19:14
into this directory so this is how
19:17
generally we create a partitions we
19:19
mount the partitions and you move even
19:21
more you mounted partitions into the
19:24
Linux operating system so you can create
19:26
your own partitions you can no formats
19:29
you can create you know manage it you
19:31
can see the date I into it by using this
19:33
command so this is what we have seen how
19:35
we can manage your file systems into the
19:38
Linux operating systems by defining the
19:41
different commands we have seen so into
19:43
the next video we are looking part on
19:45
the user and management and how to
19:48
manage their entries how to create the
19:50
users into the Linux operating systems
19:52
into the next video so keep watching
#Computer Drives & Storage
#Computer Hardware
#Operating Systems
#Programming