What is everybody this is Jason with does soapstar calm end in this video we are going to cover some
basics of navigating using the terminal.
So we're going to be covering how to change directories going back and forth between them and also had
a list out items so we can see what's inside these directories.
Now the first thing that we want to do is open up our terminal or our command line.
So I'm on that.
You can do this one of two ways.
You can either hit command space and just type in and do a spotlight search for the terminal or we could
simply do this through the finder and to do that.
Just go to your applications come down to the bottom you'll see a folder called utilities and then just
find the Terminal application.
So we'll go ahead and double click them.
So let me open this up here and we're going to zoom in so we can see this a little bit better.
All right just a little more perfect.
So what we're going to cover is first changing directories.
Now what does that mean.
Well changing directories is like a way of navigating through folders on your computer or different
location such as the desktop documents and folders that might live within that section of your computer.
So for example right here you can see that we are at my home directory.
And to give you a visual of this what I want to do is open up my finder and I'm going to put it right
next to this.
OK.
Let me make this a little bit smaller.
OK.
So right now this little house here right here Jay Ramnath.
That is where I'm at.
That's where I'm located.
All right.
And you can see inside of this directory.
I've got a bunch of folders and things so we can go to.
So to get onto the desk top forming sample we would write the command CD which stands for change directory
and we can simply type out the word desktop and go ahead and press enter.
Now you'll see in your terminal that the location has changed to the desktop.
And we can do this again by listing out some items that are on my desktop so to view items that are
on your desktop go ahead and write the command.
LS can.
This is going to list out everything that lives within this directory.
So on my desktop you can see that I have a couple of folders here.
All right.
And if we switch over here in the Finder you can see that the same folders that appear in my terminal
are also here in the Finder.
All right so let's dive a little bit more into how to change directories.
So I've got this folder on my desktop called first Durm.
So her first directory.
So if I want to get to this I'm going to simply type in CD and I'm going to type in first.
This is taking me into the first directory here.
And then if we type out LS to list out the items in here you'll see that I have a couple of files and
another folder.
So over here in Finder.
Why don't we go ahead and click that and you'll see that we're looking at the same files and folders
that we see here in the terminal and we can dive a little bit deeper in here.
So let's go to CD and we're going to dive into the second directory.
Now I just pressed the tab Kiem which auto completed the path here.
And you can do that.
It's kind of like a hockey I guess to finish typing out the directory that you'd like to enter.
So I'm going to go ahead and click enter here and let's go ahead and list out everything that's in here.
And we have two files and another folder.
All right so if we click over here we can see the same location where I'm at here.
All right so cool.
So we're learning how to dive deeper into directories into folders and listing out those items.
But how do we go back.
Well there is a command for that.
So simply we're going to change the directory of I'm typing it in over here.
So we're going to change the directory make sure you're in your terminal type in CD space.
Dot dot all right.
And this allows you to step back one level.
All right so then we hit enter and you can see we're back into our first directory.
So essentially what we did in the Finder is we're in our second directory here.
OK.
And we just clicked back to go to the first directory.
I'm actually going to put this in an application view so it makes a little bit more sense here.
So we're in the second directory up here and we just hit the backyard pretty much and then went into
the first directory here.
Let me change this here.
Perfect.
OK.
So that's a little bit about what's going on here.
All right and then we can list out these items here.
Now what I want you to do is if we want to get back to Homebase like the the level that we were at right
over here we could simply type in the command CD and that's going to take us back to the home base.
So this is a really important thing to know how to do to be able to change directories through the terminal.
And what you're mainly going to be using this for is when you create projects that you're developing
and you're going to have certain folders and different files in there and you might have to install
certain dependencies or third party libraries and what you're going to need to do is you're going to
need to know how to change directories into specific folders into your project so you can install or
download specific dependencies and things like that into your project so congratulations we've just
covered how to change directories navigate through our computer and list out the items.
That's a wrap for this lesson.
Let's move on.