3.1 Linux Basics Part 1

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *

Already have an account? Sign In »

5 hours 21 minutes
Video Transcription
Hello and welcome to command line basics. This video, we're going over limits. Basics commands part one. I'm Christopher Handler. On this begin,
so are learning objectives for this video. We're gonna learn the Ellis Command learned the CD command and learned what PWD does. And these air very core critical parts of learning the linen shell and knowing your way around the clinic shell. So it's very important to know and be very comfortable with these commands.
All right, pre assessment. Which linens? Command displays the directories contents. Is it a dirt
B l S C content or de cat?
The answer is B. L s for list files. The dirt command that is the correct commander. Display directors contents on windows, not on Lenox. The content command is not a real command. And the cat command is to see what's inside. Will file, not thio. Display the contents of a directory.
So the Alice Command, it is usedto list the contents of a directory, as we just learned. And there's a few different special ways to use it. We have thea l switch the dash l and this gives everything in a listing format which will allow you to see the permissions and the dates that files from 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 air files on Lennox that start with a dot before the file name. So if you don't have this dash a in front over as one of the switches for the L s, 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 Lennox machine right now. So as you can see, I'm in my home folder desktop files. I'm gonna type l s and see what is inside of this directory.
And as you can see, we have ah few files in here.
And now let's say I want to see the permissions, so I'm gonna do l as space dash l and hit enter. And now we have our limits 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 could be very useful,
all right. And now I'm gonna push the up arrow key. That way, I have my l s or my previous command that it just entered. I'm gonna add a 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 Lennox to just show you what you know is inside of the directory. So let's go to my home folder.
And as you may or may not know, using the tilde for changing directory to the tilde That'll bring you to your home folder in Lenox. And now I'm going to use my up a rookie twice, So I don't look the type in this command again and hit Enter.
As you can see, I have a whole bunch of hidden files here
and now these air any files to start with the dot And if I just do in l s,
you'll see you don't see these hidden files with the dark in there. 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 Ellis Dash L a.
Alright 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 on the show. And we can change it to any folder that, uh
is directly inside. And we don't have to give the absolute path the full past starting from the root of the file system.
Ah, and we can also do seedy space dot dot And what this does is it allows us to go up one directory directly instead of having thio, you know, type of full, absolute path of that directory.
So let's bring my lyrics machine back up. As you saw, we just changed to my home folder. Now let's say I want to get into my desktop folder from here, So gonna types C d all right, Space
and Capital D. Because, as you remember in Lenox, it is case sensitive,
and I don't have anything with a lower case D
and I'm gonna push tab
pushed, have twice, and I can see all of the available options.
type that out and then I will push tab for an auto complete and enter. And now I'm inside the desktop folder.
And if I type l s, 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
all right, and we have the PWD. 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 PWD will show you the entire directory listing the absolute file path of where you were working in the shell.
And it starts at the root of the file system in Lenox, which is always that slash.
And if you're not too familiar with Lennox, I'd recommend going over some of the limits plus videos in Cyber eri. But know that the Lenox file system always starts the slash as the absolute truth.
All right, I would 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 type Peter VD
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, it's gonna be very helpful.
All right. Supposed to Cecil which l s which displays hidden files. Is it a dash A
B dash L C dash H or D Dash Dash hidden.
The answer is dash A. So this is how you can see all of the files inside of a directory, including the hidden ones, the dash analyst for the long listening So we could see everything. And the dash h and the dash dash hidden are not valid. Switches for Alice
aren't doing this video. We learned the L s command, learned the CD command and learn what feed every d does. And I hope to see you in the next video.
Up Next