Hello and welcome to Command Line.
This video we're going over, Linux
Basics commands part one.
I'm Chris for this begin.
So our learning objectives for this
video, we're going to learn the
command, learn the CD command
and learn what PTSD does.
And these are very core critical
parts of learning the learning
shell and knowing your way around
the shell. So it's very important to
know and be very comfortable with
these commands.
Aren't presentment which Linux
command displays a directories
content?
Is it a letter
B? Ls C
content or D Keat
and the answer is B ls
for list files the
in. That is the correct command to
display directory contents on
Windows, not on Linux.
The content command is not a real
command and the command
is to see what is inside of a file
not to display the contents
of a directory.
So the command it is used to
list the contents of a directory, as
we just learned, and there's a few
different special ways to use it.
We have the L switch,
the dash l in.
This gives everything in a listing
format, which I'll allow you to see
the permissions and the dates that
files were modified.
There's also the dash, a
switch as well.
And what this is used is it is used
to show any hidden files and these
are files on Linux that start with a
dot before the file name.
So if you don't have this dash a
in front or as one of the switches
for the URLs, then you won't be able
to see a hidden file.
So let's go ahead and take a look.
All right. Let me pull up my Linux
machine right now.
So as you can see, I'm in my home
folder, desktop files.
I'm going to type LS and see what is
inside of this directory.
And as you can see, we have a few
files in here.
And now let's say I want to see the
permissions, so I'm going to do
L as space dash
l and hit enter.
And now we have our Linux
permissions and we'll go over these
a little bit in the future video.
It'll show me who is the owner
and the group owner of the file
as well as the date that the file
was modified.
So this can be very useful.
All right.
And now I'm going to push the up,
OK? That way I have my LS
or my previous command that it just
entered. I'm going to add an aide to
it and see if there's any hidden
files in this directory.
And it looks like there's not
this dot and the dot dot are
for Linux to just show
you what is inside
of the directory.
So let's go to my home folder.
And that, as you may or may not
know, using the tilde for changing
directory to the tilde that will
bring you to your home folder in
Linux.
And now I'm going to use my
up arrow twice so I don't have to
type in this command again and
enter.
As you can see, I have a whole bunch
of hidden files here
and now.
These are any files to start with
the DOT.
And if I just do an else,
you'll see you don't see these
hidden files with the dot in there.
So that's a good way to know if some
files are hidden or not and
allow you to see all the files
inside of directory.
So I like using endless
dash l a
CD. So we just went over this a
little bit too.
It's to change the directory and
this is how we navigate through the
file system in the shell
and we can change it to any
folder that is
directly inside.
And we don't have to give the the
absolute path, the full path
starting from the root of the file
system.
And we can also do CD space,
dot, dot.
And what this does is it allows us
to go up one directory directly
instead of having to type
the full absolute path of that
directory.
So let's bring my
Linux machine back up as you
so we just change to my home
folder.
Now, let's say I want to get into my
desktop folder from here.
So when it's
CD Space
and Capital D, because
as you remember in Linux,
it is case sensitive
and I don't have anything with a
lowercase D and I'm
going to push tab, push
tab twice and I can see all of
the available options.
So I
type that out and then I will push
tab for an autocomplete and
enter and now I'm inside the desktop
folder and if I
type I can see everything inside
of this folder as well.
So this is very important so that
you know how to get through files
and go back between them.
And we have the DVD.
This stands for Print Working
Directory.
Now, this is very important because
you may be lost or don't know
exactly where you are in the file
system.
So typing we'll show
you the entire directory listing,
the absolute file path of where you
were working in the show.
And it starts at.
The root of the file system in
Lennix, which is always that slash,
and if you're not too familiar with
Linux, I'd recommend going over some
of the Linux plus videos and
SIBERRY, but know
that the Linux file system
always starts the same as the
absolute root.
All right. Now let's see a
demonstration.
So as you can see, I'm already in
my home folder slash desktop,
but let's say I don't know exactly
where my home folder is.
So if I typed a video
and hit enter, you can see that
we start at the root.
It goes into the home folder,
user and desktop.
So that's how you can know exactly
where you are in the file system if
you think you might be lost.
This can be very helpful.
All right. Suppost assessment, which
is less which displays hidden files.
Is it A dash A,
B, C,
dash H or D,
dash, dash hidden
chanceries, dash A..
So this is how you can see all
of the files inside of a directory,
including the hidden ones, the
dash analysts for the long listing
so you can see everything and the
dash H and the dash dash hidden
are not valid switches for Alice.
All right. So in this video we
learned the come in when the CD
came in and repeat does
and I hope to see you in the next
video.