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 going to have
to ask for help.
I guarantee it, learn how to
do it and learn how to do it well
and understand the help that you're
asking for.
All right. So in this module, we're
going to learn how and understand
why asking for help is important.
Learn how to ask for help at Seelie,
understand help switches
and learn about Linux man pages.
All right. Pretty assessment.
The Linux manual pages can be
accessed with one comen.
Is it A manual
B man.
C get manual
or D Linux man get.
And we're trying to access the Linux
manual pages.
If you said B man, you're
correct.
So this is shorthand for manual
and this is the
command used in Linux
to get the manual pages.
And while the manual commands,
sounds like it would be it, it
isn't so
and get manual is
two separate things.
That's not a real command.
And same thing with Linux men
get it just sounds fancy, but
it's not a real command.
All right.
So why should you ask for help?
You need to know up front that every
single computer professional
asks for help every single
day. No matter how far you are
in your computer security career,
every single person asks
the terminal, ask the command
line for help on a command.
You will never, never,
never remember every switch
on every command.
You need to understand how to read
the help prompts that you ask for.
And it can also
help you learn new tricks and
techniques on how to use
these commands.
So this is very, very
important. And we're going to keep
constantly coming back to this point
that you need to ask for help.
If you don't know what you're doing,
if you're halfway through a command
and you can't remember the next
part, you need to do any
missing kind of switches like you
need.
You need to ask for help and
read through that documentation
on how to achieve what
you're trying to do.
So how do we ask for help?
It's as easy as typing in
help, help
and enter.
So I have two screenshots here.
We have a Linux one that goes over
a bunch of Linux commands that are
available from the home and
a Windows one that goes over
specific Windows
commands when you type in help.
And I'll show you, too.
So let
me pull up this command
prompt. This is the one I opened up
earlier. You can type in help
hit enter.
And here we go.
Check on all these different
commands we can use to
accomplish our objective.
So ones you'll probably use pretty
often are going to be code for
change directory.
Here we have clear screen,
seemed to open a new instance of
command copy
exit to close the command,
find find String
Southsea, start to service Serve's
Control and
copy for
copying more files.
There's a whole bunch of different
things we can do.
All right.
And for Linux, this is my Linux Mint
machine that I was showing before.
You type in help and we
can get the same similar kind
of demonstration
of help and things we can do
for Linux.
So what's
great about Linux 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 Linux,
then went on this
help from Linux, then
you can consult the documentation
for the command you're looking for.
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.
So when you type help
at the command line as a command,
it gives you a listing
of different commands you can
use.
But we want to learn how to use
each command individually.
So if you want to learn help for
each command, we're going to do is
we are going to type
the command and then a slash
help or a dash
each.
So and
something that you should know is
that any command that you enter
at the command line generally
follows this format.
We type in the.
Man and a switch
and then parameters for the switch
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.
And so, like I was saying before,
Windows, which is
they generally are used with
slashes.
So you can type slash help
or slash questionmark to ask
for more information.
And then it's for Linux.
We use the dashes.
So it's usually a iDesk eight or
Desh each in the dash questionmark
or a dash dash help.
And generally for
any kind of command line to, if
you're passing a word as a switch,
is going to use two dashes instead
of just one dash.
So I'll give you a quick example
here.
So let's say for Linux,
I want to learn how to use the
WD command.
I don't know what it does, so let's
step back to
help.
And there we go, it tells us PBD
Prince, the name of the current
working directory, and then
we have two different switches
we can use.
We can do the dash URL,
which prints the value
of Preedy if it names
the current working directory
and dash P for
print the physical directory without
any symbolic links.
So this helps us understand
how to use the command, what it can
be used for, and
similarly for
Windows.
Let's take a look at the
tree command here.
Let's say tree
slash question
and it tells us that tree
graphically displays the folder
structure of its proper path.
And then we have a few different
switches here that we can use.
And then these are the parameters we
can put into the drive that we're
looking for.
So very useful information if you
don't know what a command does.
All right, so
Lendix fan pages, the manual
pages are kind of like
the help prompts
much more in depth and they can go
through a lot of
pretty great documentation.
So the Greb command is one that
you're going to become very familiar
with. It stands for new
regular expression, and
it is very useful for searching
through files
on the links. Man pages are stored
in these user SlideShare
Sigmon folder.
And if you don't understand the
Linux kind of hierarchy
and documentation, and I highly
recommend checking out one of these
Siberry Linux plus
or Linux courses that they offer
so you can learn more about that.
And like I said, the main
pages are detailed and well
documented for each command.
So let me show you an
example of one we're going to type
man grip
and this will bring up the manual
page for grep.
And it
has a very easy, very
readable kind of
documentation, goes through
every single switch we can
use. How to use the switch.
We can scroll up and scroll down.
So it's very easy to kind
of work through
and go all the way down.
Let me see.
And it'll give us more information
about when this was published
and some other information
about who to contact if you have
questions in order to quit.
You can see down here it says press
the queue to quit and
then we return to the command line.
So links fan pages
are a fantastic resource and I
highly recommend them if you want to
learn more about a specific
command
post assessment.
So what is the general format
for commands?
Is it a parameters
and switch be
a command switch parameters
or C switch and
then parameters?
And we're learning the general
format for commands.
This B command switch
parameters and you learn
that there are going to be a few
exceptions to this rule as well.
But generally going to type of
commanding, you're going to put a
switch in and then give the
parameters for the switch.
All right. So in this video, we
learned why asking for help is
important, how to ask for help
at the command line interface,
how help switches work and
how Linux men pages
are used.
And I hope that you join me in the
next video.