Navigating to filesystem, of course, now you know a lot about filesystem, now we need to know how
are we going to get into the fastest and what are those commands that we really need to learn to actually
go from one directory to another, get their file contents and find out which directory we are and when
navigating a UNIX file system.
There are a few important commands.
Again, the number one command is code, which stands for change directory.
The second one is TWD, which is print working directory, which tells you which directory you are currently
in and the third one is less, which stands for listing, which lists the contents of your directory
or folder.
Citizens for Change Directory for Working Directory and L'Estrange will list.
Now let's look at the real example.
I'm going to start with Windows, because the reason I compare Windows and Linux all the time is because
it will be a lot easier for every one of you to really understand the concept behind it, because we
actually work on Windows almost every day and we scroll through everything and we click through everything
and we don't really realize how experts we have become.
So if you really need to know Linux, you there should be some comparison with Windows that I will be
doing.
So let's look at example of windows.
OK, so I have the C drive, which is what is the C drive for Linux is slash.
When I wanted to go into this C drive, I will just do double click.
And the folder comes up, and when I wanted to go into program files to double click.
And the folder's comes up and so on, and if I wanted to go in the windows directly, I'll just double
click in Linux.
It's called the Linux machine.
I remember Ilex machine, the first thing I want you to do, of course, is become root, meaning you
are as yourself right now.
How do you how do you know you are yourself?
Because first you see here on your you'll see, even if you just still wanted to know your name, you
could just type, who am I?
And you will see your username you.
When you become rude, you have to type Espoo, which means which user and just dash enter.
Put in your password.
OK, so you have this message that would tell you the last time you became rude was this date, this
time and so on.
Anyway, let's do clear as clear is something going to clear the screen.
So now when you are in a directory, how do you know where you are in windows?
You could tell, right?
You could tell you are in computer, local drive in windows right up right here, but in Linux, you
don't know.
So the command that you're going to need is deep.
This is what it's going to tell you, that you are in this directory.
If you wanted to go into a different directory, let's say you wanted to go to slash, which is slash,
slash is the primary or the parent directory of all the directories.
So you type seed, which stands for, again, change directory space slash, you hit enter.
Once you hit enter, how do you know you are in that directory again, you type W.D..
And it will tell you you are in slash directory now, what's inside of this directory, we need to see
that in order to see that you have to type LS option El.
And it will tell you all the listings of the directory and folders and files that are inside of this
directory.
In Linux and Windows, when you are my computer, you double clicking on a folder, let's say you're
clicking on program files.
Let me move this round and you click on any other folder, let's say Dell, so you notice you just double
clicking it and it is taking you to their directory and Linux.
You don't have that.
You you don't have clicking.
So what you need to do is you need to do a CD.
So you are already what director you are in.
You are in route.
And let's say if you wanted to go to a directory called, let's say Bhoot, so KDDI, B or T Bhoot and
there you are, you are in boot.
Now, let's say in this example, you want to come here, you already see the listing of what's inside.
How do I know the listing in Linux?
Well, you have to run a command.
It's not that easy.
There you go, it tells you this is what you have inside.
By the way, some of the lines are chopped up a little.
So I'm just going to make this a little more bigger.
OK, so you're going to see anything that starts with Dash right here, it means it's a file.
Anything that starts with D. It means it's a directory or a folder.
I want to go back to my root directory, but before I go back, I wanted to know where I am.
The command is what we are in Bhoot and I want to go to slash root again.
There are two ways you could do.
You could do either slash and we'll take you to slash directory or you could do KeyData, which is will
take you one step back, one directory back in windows.
How do you do that in windows?
You could simply just do backslapper.
You could simply press the backbend back button and there you go.
You have all that also in windows.
You notice you are when you double click once it is doing three things for you, you double click once
that is doing KDDI for you, then automatically it's listing all the directories inside.
So it's doing less for you already.
And now how do you know which directory you are in right here on top.
That's how it tells you is right.
You enter it in windows, you doing three things in one shot and then you actually have to use all three
commands, one by one, to see the same thing as you wanted to see in windows.
So let's see if I if I wanted to go in ETSI.
And I wanted to go into another directory, which is etsi sist config.
So I am too directress in How Do I Know TWD working directory, it tells you in ETSI Siskin fake.
Now if I wanted to go back to ETSI directory, what I would do is dot.
Dot.
And confirm, if you are a director, you do PWP and there you go.
What if you wanted to go one step back again?
Creadon and where you are, you are in route.
They go, what happens if you just type KDDI and hit enter?
OK, it did work because we got a problem back.
We didn't get any error, but we checked you RVN.
We are in.
Let's check.
We are in Route Y because we are who we are.
Who am I.
We are rude, we are logged in as rude and rude directories, slash rude, so everyone, this three
first three commands that you really need to learn in order to navigate the file system.
Without these still commands, you cannot do anything alone.
So what are the three commands really quickly?
First one is KDDI.
Let's go to home.
Let's see what's inside the home.
This type ls minus a.l.
You forgot which direction you are in this type W.D. you are in home.
If you want to go to a different direction, let's say you want to go to.
I wanted to see what's inside of slash so I would type slash and what's inside of it myself.
These are the directories.
I wanted to go into each of these directories and find out what's inside of let's say I want to go to
war.
Enter what's inside of the war.
These are these rectories different type of dresses.
I want to go to a file, a log directory right here, so I'll do a CD log.
What's inside of log?
I have to do a list myself again.
These are the files and directories inside of log directly.
OK, all right.
I forgot where I am, where I am.
PWP, wire log.
All right.
I want to go back to directory.
You could do dot dot then dot dot again.
Or you could just do simplicity slash.
And now where you are you are in slash.
All right.
So this concludes our lesson.
And I hope you have pretty much a very good idea about KDDI else.
And PWP commands as a homework.
I would strongly recommend you to log in to your Linux machine, go to CD slash.
Then I let myself and I want you to go into each of these directories one by one, Subdirectories Khambatta
from a directory, find out the listing of the directory, and then you will find out exactly how to
navigate the system.