Time
5 hours 21 minutes
Difficulty
Beginner
CEU/CPE
6

Video Transcription

00:00
All right. Welcome to command line basics. This video is for asking for help learning how to ask for help at the command line. This is very important because nobody remembers how to use every command on the command line. And you are goingto have toe asked for help. I guarantee it. Learn how to do it,
00:20
learn how to do it well, and understand the help that you're asking for.
00:24
All right, So in this module, we're gonna learn how and understand why asking for help is important.
00:30
Learned how to ask for help at seal. I understand. Help switches and learn about Lennox man pages.
00:38
All right. Pretty assessment that Lennox manual pages can be accessed. With which command
00:44
is it a manual? Be man.
00:48
See, get manual or d Lennox man get.
00:53
And we're trying to access the Lenox manual pages. If you said b man, you're correct. So this is shorthand for manual. And, uh, this is the command used in Lennox to get the manual pages.
01:08
And while the manual commands towns like it would be it, it's ah isn't so. And get manual is to separate things. That's not a really command As same thing with Lennox, man, get it? Just sounds fancy, but it's not a real command,
01:26
all right,
01:26
so why should you ask for help?
01:30
You need to know a front that every single computer professional ask for help every single day. No matter how far you are in your computer security career, every single person asked the terminal asked the command line for help on a command
01:47
you will never, never, never remember every switch on every command
01:53
you need to understand how to read the hell prompts that you asked for.
01:57
And it can also hope you learn new tricks, tricks and techniques on how to use these commands.
02:05
So this is very, very important. I'm going to keep constantly coming back to this point
02:10
that you need to ask for help if you don't know what you're doing.
02:14
If you're halfway through recommend and you can't remember the next part you need to do or any missing kind of switches like you need,
02:22
you need to ask for help and read through that documentation on How do you achieve what you're trying to do?
02:30
So how do we ask for help? It's as easy as typing in help h E L p and enter. So I have to screen shots. Here we have a Lennox one that goes over a bunch of limits commands that are available from hell
02:45
and a windows one that goes over specific windows commands When you type in help
02:53
and I'll show you too,
02:53
So ah,
02:55
let me pull up
02:58
this command prompt. Says the one I opened up earlier. It's hype in helped hit enter
03:02
and he re go check on all these different commands. We can use Thio accomplish our objective.
03:09
So ones you could probably use pretty often are gonna be CD for change directory. Here we have clear screen. Seemed you'd open a new instance of command Copy.
03:20
Um, exit to close command, find find string.
03:24
Um, s C starts, service serves control
03:29
and ex copy for, uh, copying more files. There's a whole bunch of different things we could do.
03:36
All right.
03:38
And four Lennox, this is my Lennox meant machine that I was showing before type in help
03:43
and we could get the same similar kind of demonstration of help and things we can do for Lennox.
03:51
So,
03:52
um, was great about Lennox, is that it's very easy to add new command, command line tools very easy. So if you don't see the command that you're looking for in Lennox, then on this help from Lennox,
04:08
then you can consult the documentation for the command you're looking for.
04:13
So that's a great way to get started To understand what kind of commands are available for you once you get into the command line interface.
04:23
So when you type help
04:25
at the command line as a command, it gives you a listing of different commands you can use. Um, but we wanna learn how to use each command individual.
04:39
So if you wanna learn help for each command we're gonna do is we're going to type the command and then a slash help or a dash each.
04:48
So, um,
04:50
and something that you should note is that any command that you enter at the command line generally follows this format where you type in the command,
05:00
any switch, and then parameters for the switch.
05:04
And don't worry, if you don't really understand this as we get more usage, you'll be able to understand this and really learn and feel comfortable with it.
05:12
And so, like I was saying before Windows switches. They generally are used with slashes, so you can type slash health slash question marks to ask for more information.
05:24
And then that's for Lennox. Uh, used. The dash is so it's usually a desk eight R dash H on the dash question mark or a dash dash help and generally for any kind of command line tool. If you're passing a word as a switch, is going to use two dashes and said it just one dash,
05:44
so I'll give you a quick example here.
05:46
So let's say for Lennox,
05:49
I wanna learn how to use the PWD command. I don't know what it does, so let's type P DVD tack, tack,
05:57
help
05:59
and never go tells us. PBD prints the name of the current working directory, and then we have two different switches. We confuse who can do the dash l,
06:10
which prints the value of PVT. If it names the current working directory
06:15
and dash P for print the physical directory without any symbolic links.
06:20
So, uh, this helps us understand how to use the command, what it can be used for,
06:27
and similarly for Windows.
06:30
Let's take a look at the tree command here. So let's say tree slash question
06:39
And it tells us that tree graphically displays the folder structure of a driver path
06:45
and then we have a few different switches here that we can use.
06:47
Ah, and then these are the parameters were put into the drive that we're looking for
06:51
so very useful information if you don't know what a command does.
06:57
All right.
06:59
So Lenox fan pages
07:00
the manual pages are kind of like the help prompts, except much more in depth, and they could go through a lot of pretty great documentation.
07:13
So the great command is one that we're going to become very familiar with. It stands for new regular expression, and it is very useful for searching through files. All the links man pages are stored in these slash user slash share slash man folder.
07:31
And if you don't understand the Lenox kind of hierarchy and documentation,
07:36
and I highly recommend checking out one of these cyber Harry Lennix plus or Lennox courses that they offer so you could learn more about that.
07:45
And like I said, the man pages are detailed and well documented for each command.
07:50
Let me show you an example of one, we're gonna type man
07:55
grip.
07:57
And this will bring up the manual page for grip.
08:00
And it has a very easy, very readable kind of documentation. Goes through every single old switch we can use How to use the switch.
08:13
Ah,
08:15
we can scroll up and scroll down. So it's very easy to kind of work through
08:20
and go all the way down.
08:24
Let me see.
08:26
And it'll give us more information about when this was published
08:31
and some other information about who to contact. If you have questions in order to quit, you can see down here it says press, uh, the cue to quit,
08:41
and then we return to the command line.
08:43
So, uh, links man pages are fantastic. Resource and I have the recommended Miss. You want to learn more about a specific command?
08:52
All right, post assessment. So what is the general format? Four commands. Is it a parameters and switch?
09:01
Be a command switch parameters or C switch and then Paramus,
09:07
we're learning the general format for commands.
09:11
This be command switch parameters, and you will learn that they're going to be a few exceptions to this rule as well. But generally going to type of commanding. We're going to put a switch in and then give the parameters for the switch.
09:26
All right, so in this video, we learned why ask him for help. It's important how to ask for help at the command line interface, how help switches work and how Lennox Man pages are used. And I hope that you join me in the next video.

Up Next

Command Line Basics

In this course you will learn the fundamentals of Command Line basics, a fundamental tool for any user of Windows and Linux machines. Command line allows developers to manipulate files easily and quickly, Learning command line saves developers time and resources.

Instructed By

Instructor Profile Image
Christopher Haller
Senior Intelligence Operations Analyst at Centripetal
Instructor