In this video, we're going to talk
about how Linux applies a simple
and modular design philosophy through the use
of the command line interface and the shell.
Now, the Linux operating system emphasizes
a simple user interface in which the user types
in text commands into a prompt,
and that way they can interact with the system.
This differs from the primary visual operating systems,
like Windows and macOS, which use a graphical user interface
or G-U-I, known as a GUI.
In Linux administration,
one of the most crucial skills is becoming comfortable
at entering text commands using the command line interface,
also known as the CLI.
Now, the CLI is a text-based interface
between the user and the operating system
that accepts input in the form of typed commands.
A command prompt is presented to the user,
and the user enters a command to interact
with the system in a variety of different ways.
Developers and administrators often use
the command line interface,
whereas regular users will like to rely
on a graphical user interface, or GUI, instead.
Many distributions though, especially the ones used
for servers, do not come with a graphical user interface,
but there are many different GUIs
that are developed that can be installed
on top of Linux after the fact too.
So throughout this course, we're going to focus primarily
on using the command line interface
because as a system administrator,
this is where you're going to spend a lot of your time.
Now, in addition to the command line interface,
we have something known as the shell.
Now, a shell contains the core portion
of the operating system, referred to as the kernel,
and it permits the user to pass commands
and information to that kernel.
The kernel is also able to respond back
to the user through that shell.
The shell can be thought of as an interpreter
between the humans and the kernel of the operating system.
Linux users are going to issue commands to the shell
in order to tell the operating system
what they want it to do.
The operating system will then respond back
to the user with the results of the command.
A shell can be implemented as either
a command line interface or a graphical user interface.
Like most things in Linux,
you can actually choose which shell you want to use
within your command line interface too.
For this course and the exam,
we're going to focus on the Bash shell.
The original Unix shell was called the Bourne shell or SH.
Although it's still available on some Linux systems,
it has been virtually replaced
on most systems by the Bourne-again shell
or B-A-S-H, known as bash.
Virtually every Linux distribution will use
this shell as the translator
between the user and the system by default.
Now, it is possible to install and use other shells
in Linux though, if you want to, things like Korn,
the Z shell and the TC shell are all popular as well.
Now, when you're using a shell, you need to make sure
you're using the proper syntax for that shell.
Syntax is the proper way of structuring a command
and any supporting information.
For example, in English, we all understand that
when I make a statement like, "I want some water,"
I am using the subject I.
I'm using a verb, what, and an object, water,
but if I was speaking a different language,
the syntax here might change.
For example, Yoda from Star Wars likes
to follow a more Japanese style of syntax,
and he says, "water, I want," which is object,
then subject, then verb.
Now, either of these isn't right or wrong,
but it's right or wrong based on the syntax being used.
So Yoda uses a different syntax
than we do in the English language.
Now, many command line interfaces have their own unique ways
of entering in information or having a different syntax.
It's important for you to understand the syntax
for the shell you're going to be using.
Otherwise, you're not going to be able
to effectively communicate with that interface.
Again, in this course, we're going to be focusing solely
on the Bash shell syntax.
Now, the Bash shell syntax contains three main components.
We have the command, the options to modify the command
and an argument for the command to act upon.
It's important to take note here that there are spaces
in between each of these three components.
Also, at this point, it's really important
to remember that the commands entered
in Bash are going to be case-sensitive.
So if I wanted to create a copy of a text file named Jason,
and I wanted to make it called Dion,
I could use the command cp -i Jason.txt Dion.txt.
Now, what I just told the command here to do is
to use the copy command or CP,
and I want to do that using the modifier option of -I.
This tells the shell to warn me before overriding a file,
then I'm going to perform the action on the two arguments,
the input file, Jason.txt and the newly created
output file, Dion.txt.
Now, if you fail to enter a command in the proper syntax,
Bash will return an error to you.
Typically, these error messages are very descriptive
and will help you understand what Bash expects from you.
For "command not found" errors,
this simply means the shell doesn't understand
the command you've asked it to do.
For example, if I type CPT instead of CP,
that's not a command it understands.
Usually, this occurs whenever you misspell something.
So always check your commands for typos
if you're getting one of these errors.
If you get an error like "no such file or directory" errors,
this means you need to check
for typos in the directory, file or path names.
In my example, the Jason or the Dion files.
Now, we're going to cover specific commands much more
in depth throughout this course,
but for now we just need to understand
that the command line interface is a place
for us to interact directly with the shell,
and the shell requires us to use specific syntax
when we do that, so it can understand
the commands we're asking it to perform.