Hello, everyone.
In this demo, I'm going to show you how to use PWD command and CD Command.
The BWP command is used to print the name of the current working directory.
For example, I'm going to type PWD and hit enter.
As we can see here, WD prints the name of the current working directory.
So the current working directory we are in slash home slash student.
Okay.
Now let's move on to the next command.
The CD command.
The command is used to change the current working directory.
For example.
I'm going to type CD and I already created a directory called Directory one and I hit enter.
So CD space.
Then the name of the directory.
I hit enter and I'm going to type CD to print.
The name of the current working directory.
As we can see here, we moved down from the previous directory or the working directory to the new working
directory.
So we are right now in directory.
What if I would like to change the current?
Their history and go back to the home directory of this current user.
I'm going to type CD.
Then I hit enter.
Type P.w.d. just to make sure that we went back to the previous directory.
So what is this directory?
It's slash home slash student.
And what is the previous one?
So this one is the current one?
The previous one we were on slash home slash student slash directory one.
If I would like to move on.
Two steps, not just only to the next directory, the directory after.
So I'm going to type CD, then the name of the CD, CD, then space, then the name of the directory
directory one.
Then the name of the next directory directory two then I hit enter.
And p.w.d and hit enter.
As we can see here, we moved on to steps to directory.
To.
Now, if I would like to change and or switch back to the directory that we were working before, also
to print the current working directory, I type the command CD, then space dash, then I hit enter.
As you can see here.
With this command prints, the the working directory that we were working before.
And also.
Prints the current working directory.
Now let's move on to change to the.
Okay, let's try PWD.
Now, just to make sure we are here in this working directory.
Now, if I hit CD, then dot is not going to change anything.
Just it's going just to change the working directory to the current working directory.
Now, if I would like to go back to the and move on next to like two more steps.
So directory one and directory two.
So CD space directory one slash directory two.
And then I hit enter.
WD Perfect.
So we move down two more steps.
Now, if I would like to change.
The directory and go back to the home directory of the current user.
There is another command CD, then Tilde Space Delta and I hit Enter and we can see over here that we
went back to the home directory of the current user.
Let's move on to the if I want to move on to the next directory.
CD directory one and I hit enter.
Now, if I would like to change the directory and go back one more step to the previous directory,
I can type the command CD then.
Dot dot.
And I hit enter and we can see over here we went back to the home directory.
Of the current user.
If I want to go back right now, lest I want to move on right now to the directory one and directory
two also.
So two more steps then I hit enter.
Then what I'm going to do right now.
Um, I would like to change and go back one more step to the previous directory also so I can do CD
then dot dot, then slash.
And had entered.
D.w.d.
You can see here, we went back one more step to the previous directory.
Now, if I would like to move on, let's move on to the next one directory to P.w.d..
You can see here this is the working directory right now.
We moved on to the directory two.
Now if I would like to go back from directory two to this, two more steps.
If I would like to go back two more steps from the current directory here to the home directory of the
user here to this one there is another command we can type CD then dot, dot slash dot dot slash.
It means that two more steps back.
Then I hit enter it.
Can be wd and I hit enter.
Okay.
You can see over here.
We went back to that from from we went back two more steps from the current working directory to the
home directory of this current user.
If you would like to get more information about these two commands, we can just type man then p wd.
Man space food.
Then we hit enter.
So then we can find more information about this command.
So we hit Q to go back to the Q to quit, to go back to the, to the main page.
So now we're here.
We type also man CD space, CD and hit enter.
When I hit enter.
So you can see here more information about CD Q to go back.
Yup.
That's it for this session.
Thank you and see you in the next lesson.