All right, so in this video, I'm going to run through some of the essential terminal commands for
navigation, for moving around on your machine.
We need this in order to work with it.
If you already know these commands, things like Ellyse and P and C, D, if you know those commands,
feel free to skip this, of course.
But if you don't, I'm going to run through this quickly.
But also, I recommend you take some time to practice and just keep a reference or a cheat sheet up
that you can look back at, because I'll be using a lot of these commands throughout the course, but
nothing super difficult, I promise.
The hardest part is just remembering them.
OK, so I've got my Mac window here.
I've got my terminal open, just the terminal app on Mac.
So if you're following along with a Mac, you'll look at the screen and then occasionally when there
is a small deviation or difference on a Windows machine, here is my Windows terminal.
This is the Basche or Get Bash show that I've opened up.
So if you install that on a Windows machine, it will look something like this.
So the first command we'll talk about is called LC.
It is short for list list the contents of a folder or of the current directory.
So if you type Ellas into your terminal and you hit enter wherever you currently are and we haven't
learned how to move yet.
So we'll talk about where we currently are, wherever that location is, we will see the contents printed
out.
So in this case, I'm in the folder that contains some JavaScript files, HTML file access file, Alamo's
Python file, a folder called Secret.
That is what's printed out at least in this slide.
So if I try it over here, this is a brand new terminal window.
I just made a new tab.
I haven't moved.
I haven't talked about moving.
Where am I?
Well, I'm at a location called the Home Directory, and it's abbreviated or it's symbolized by this
Tildy character.
You can find that above a tab key on most keyboards.
Anyway, my home directory contains a lot of a lot of things.
If I hit Ellyse, you won't see all of these.
Some of them are standard on a Mac like applications, desktop documents, downloads, public pictures.
Some of them are my folders.
I've made like, you know, get demo and get stuff.
What else?
Pets.
Terminal demo.
Those are my folders I've made anyway.
You'll see something, right, you'll see the contents of your home directory.
And if you're on a Windows machine, we can do the same thing.
You can get Basche.
So Ellas now I see different things because there are different files and folders on a Windows machine,
but I'm in the same location on this Windows machine.
Tildy, that is my home directory.
All right, so we can't move right now.
We're just simply looking at files and folders in one location and I'm going to show you a command that
I don't have a slide for on a Mac.
The command is open.
If we type open dot, it's actually going to open up in Finder on a Mac.
The file explorer is called Finder, the same directory where I currently am.
So this is my home directory.
And if you've never used the terminal, you're probably familiar with this sort of navigation, right?
If I want to look at, you know, my courses folder, I double click.
If I want to go back, I click the back arrow.
That's kind of the basic navigation without the terminal.
Now, if I'm on a Windows machine, the open command actually does not work.
It tells me command not found, but instead I can do start dot.
This is really the one major difference I can think of so far.
And then this opens up the Windows equivalent of Finder.
I think it's called File is a file explorer.
Not much of a Windows user anyway.
I probably shouldn't admit that you can see the folders and files that are listed here.
So we've got pictures as an example.
And if I do start Dot, I can see.
All right, here's the pictures folder.
We have videos, there's a videos folder there.
So all of those things that we see represented here are also here.
It's just two different ways of interacting or viewing the contents of this folder.
All right.
So that's Ellyse on its own.
Just ls nothing.
Afterwards you hit enter and it shows us what it's in the current directory.
But I can also use us on a folder so I could say, you know what's inside this pets' folder and all
I need to do is reference the path.
So the name in this case is Pets'.
So Elspeth's.
And that's what's inside that PED's folder, and I can actually open that folder, too, if I just do
open pets and it opened on my other screen.
Let me drag this up.
There we are.
You can see those content cats, chickens, hamsters and so on.
All right.
I'll do that on a Windows machine as well.
Let's say I want to know what is inside of this gett course directory so I can do Ellas get and I need
to spell it correctly, but I can also hit tab to autocomplete and it looks like it's an empty directory.
Well that's my fault for picking that one.
Let's try another one.
How about what is in gets stuff.
I don't know, I don't remember making that but we'll try to get stuff.
OK, there's one folder called Demo, not very exciting but hopefully you get the idea here.
We can use less with nothing afterwards.
Also, there's a command called the Clear.
I'll just show because I'll be using this kind of annoys me when I have a lot of stuff in my terminal.
So that goes away.
So that has nothing to do with navigation.
So I was everything else on its own will list the contents of our current directory.
Ellyse followed by the name of a directory like I could do pets.
As I've shown you, I see the files and pets.
It's a bunch of folders actually.
And if I wanted to look at, let's say, the goats directory or how about the cats directory, I can't
do ls cats because there is no cats directory where I currently am.
Remember, this is what I see, right.
I currently interviewing or I'm inside this home directory.
That's what I see when I type.
I was I have to type out the path to access cats.
It's inside of pets.
So it's actually this allows pets, cats.
And there we are.
It's one of my cats.
Her name is Blue Blue Steel and that's all.
I'll show you what else we can reference these paths where we chain things together.
Anyway, the next command, I'll show you.
It's pretty simple.
It's called P W.D. for print working directory.
And what this will do, it's very simple.
It just print out your current location.
It prints out the path to where you currently are.
So we haven't been able to move.
Right.
We haven't changed locations yet.
We've been able to peek into other folders with less.
But P W.D. is if I just type it like that, it's going to give me the exact location where I am right
now.
So the home directory here is just short.
That little Tildy is a short way referencing this location.
My user on here, it's called Cold Steel.
That is where I currently am.
But if I'm on my Windows machine, it's going to it's quite different and similar, but it's different
because on a Windows machine, we've got this C drive, right?
So C slash users slash cold steel and that's obviously going to be your username.
So probably not cold steel.
So that is where we currently are.
If I type D, that's my location.
And that brings me to our next command, which is code for change directory.
This is how we move around.
It's the equivalent if I do open, it's the equivalent of double clicking on one of these things.
Right.
And moving between folders.
I'm now in a different folder you could think of.
This is my current directory.
Now, if I click here, this is my current directory and if I click in pictures, that's my current
directory and there's one of my chickens, Stoebe Chicks.
All right.
So if I want to change directories from the terminal, which I'll be doing all the time in the course,
I use CWD, followed by the directory that I'm trying to change into.
So I often you tell us first, what do we have, let's go into this code directory, you probably don't
have that, but you could pick any other folder of yours and CD into it.
So CD code.
All right, so my prompt changes, it tells me I'm in the code folder, your prompt will look different,
but it should light it likely will reveal to you where you are.
But if not, you can always type D and we see, oh, now I'm in users called steal code.
So just to illustrate this, if I were to open the current folder, now I'm in the code folder, not
the home directory and I can continue to move.
But first if I type Ellas.
Now we see completely different contents.
A lot of stuff in this code folder just from one of my other courses and I could take a look at any
of these other locations.
How about S.O.S, intro for Success intro.
So CD 004 and I'm just going to hit tab to autocomplete for me and if I cd into that I type W.D. if
I can spell it.
Notice my working directory, my current location has changed, and if I type ours, we now see the
contents and if I open, this is what we're looking at and finder text properties, S.O.S intro and
then a zip file right there.
Same thing on a Windows machine.
If I pick some folder to CD into how about.
I don't really know.
I don't have much on here but let's go into desktop.
Maybe I'm not sure what's on there.
So CD desktop and I'm going to clear.
And now, if I type would my working directory, my location has changed, I'm now on my home directory
see such user slash cold steel on a Windows machine slash desktop if I type Aulus.
Oh, there's nothing on here.
Wow, that's underwhelming.
And that actually leads me to my next command, which is a variation of CD CD followed by two dots.
This is how we move backwards.
So remember I showed you this example and finder.
If I open this up, if I want a CD into this CD, if I want to double click in and then I decide I want
to go back, I just click the back arrow.
But using CD, what we actually can do is CD Dot Dot and this will take us back one level, one folder
so we back up.
So currently I'm in this case intro folder.
This is what's inside of it.
If I do CD, Dot Dot and I type W.D..
This is where I am now.
That's where I was before, I'm now one level back right here and I could do it again.
But first, let me just show you the contents.
All that stuff.
Dot, dot.
Now I'm back in my home directory.
So same thing over here.
I'm in the desktop or I'm on the desktop.
There's nothing to look at.
It's empty CD.
Dot, dot.
And now I'm in my home directory, so that's the very basics of navigation.
We'll get more practice in the next video as we talk more about some other commands, like making folders
and files and deleting folders and files along with those commands we still need to use and else all
the time.
So you'll get practice if you're new to this.
But also, keep in mind, you're not going to just, you know, memorize it and become a terminal genius
overnight.
It takes time and it feels a little bit clunky when you're starting out.
You don't need to feel like an expert before you move on to learn.
Get just make it eat some sticky notes to remind yourself that, you know, five or six commands that
we cover and stick them on your computer and just look at that if needed.
Anyway, that's the basics of navigation.
We covered allies for list for working directory and CD for change directory, CD Outbacks out one folder.
And the other thing we did was open open doors will open a folder, the current folder that we're looking
at and on a Windows machine it's start.