In this video, you'll learn some essentials about Linux commands.
So Linux commands have common properties.
Most commands can be used with arguments, which further specify the use of the command.
As an example, ls is the command that shows files in the current directory, ls space minus
l is showing attributes of these files as well.
So the minus l in this case is an argument.
Let's define an argument as anything you put behind the command.
Options can be used to modify the behavior of the command.
Now that's confusing.
Isn't that an argument?
Yes, but an argument is anything that you put behind the command.
And an option is a specific argument that modifies the behavior of the command.
If you use ls minus l slash etc, for instance, you have two arguments minus l and slash etc
and only one option minus l.
And that's because the options have been programmed in the command itself.
For all of the commands to get a short overview of options, use minus minus help with the
commands.
Let me give you a quick demo.
So I'm using ls to start with.
And now I'm using ls minus l.
Do you see the difference?
You see all kinds of properties for the directories that are found in the current directory.
So minus l is the argument, but also an option.
Now I'm using ls minus l slash etc, where slash etc is the directory where you will
commonly find configuration files.
And what is it doing?
It is considering the two arguments, minus l for the long listing and slash etc, which
is telling the ls command that I want to see the contents of the etc directory.
And this is the result.
Now, for all of your Linux commands, you can use minus minus help to get help about the
different options that exist.
And oh, that doesn't fit on one screen.
Well, fortunately, in this graphical terminal, we can scroll up using the mouse.
But we can also do a more Linux-like way, and that is piping the output to the less
command.
We first use control l to clear my screen, and then ls minus minus help pipe less.
And that is showing the first part of the output.
And in less, which is called the pager, I can press the spacebar to see the other parts
of the output as well.
One final thing, Linux commands are case sensitive.
So if I type ls in uppercase, then it's telling you ls command not found.
Fortunately, the shell is friendly enough to tell you that there's a similar command,
ls lowercase.
So be mindful of the case sensitivity of commands in Linux.