OK, now that we had a quick overview of colonics, I want to spend some time talking about the Linux
terminal so you can access the terminal through this application right here.
So if you click on that, it will open the terminal window for us.
And as you can see, all it is, is a black screen where you can type commands.
Now, the Linux terminal is actually very, very powerful because it can be used to do anything that
you can think of really a lot of the applications and Linux that have a graphical interface where command
prompt programs first and then people made a graphical interface for it.
So a lot of the time, maybe the graphical interface will be buggy or crash and the terminal program
will still work.
Also, a lot of the penetration testing tools do not even have a graphical interface.
A lot of them can only be used throughout the terminal.
Not only that, but in many scenarios you might only have an SS hech or a command prompt access to a
machine.
So you need to know how to use this command prompt in order to achieve your goals.
So throughout the course, we're going to be using the terminal a lot.
And that's why I want to spend some time just showing you the basics of it and making sure that you're
going to be comfortable using it.
Now, the basic idea is you type a command and the result will be displayed for you on screen.
So let's have a look on a very, very simple command, which is P.
W.D..
Now, this command prints the current working directory has the name P.
W.D..
So if I hit enter, you can see it's printed forward slash root, which means right now I am in the
road directory.
So basically I am in here.
This is the route.
It's home.
So if I do lose, which is a command to list all the directories and files in the current working directory,
we should get all of these directories that we see in here.
So if I had enter, as you can see, I can see all these directories in the current working directory.
Now, another very useful command is this command, this command allow us to navigate into another directory.
So, for example, let's say I want to navigate into the downloads.
All we have to do is type Khedive, followed by the name of the directory that I want to navigate to.
So I'm going to type download.
Now, if I hit enter.
I should be inside the downloads now, so if I do need to see my current working directory, you'll
see that it's saying I'm in rude forward slash downloads.
So if I do, let's hear it should show me all the directories and files inside downloads.
So if I do enter, as you can see, I have a directory and the file in here, and these are the exact
same files that you'll see if you double click the downloads here.
Now, if you want to go back one directory so similar to pressing the button in here, all you have
to do is do KDDI again, the command to change the working directory, followed by the DOT.
And now if I do P.
W.D., you'll see I'm back in route.
And if I do Ellyse, you'll see all the directories and files and root.
So that's all good and there's actually a huge number of commands that you can use.
So I'm going to include a link in the resources of this lecture of all the Linux commands that you can
use.
You don't need to know them by heart.
We're actually going to be using a lot of them throughout the course.
So you're going to naturally learn them as you go through the course.
Now, if you are using a command and you're not sure about how this command works, you can just use
the mind command to display the manual of this command.
For example, we've used the command here to list the files and directories and the current working
directory.
But if I do mine followed by ls this basically means I'm requesting the manual of URLs, so I'm asking
how can I use the command.
So if I had enter you'll see I'll get a screen similar to a text file and basically it's given me a
lot of information on how to use the command.
So you can see that it's telling us that this command will listed directory contents.
He can see the way it works by type in ls followed by the options, followed by a file.
If you if you want to run it on a file, you can see a longer description of the command.
And then you can see all the options and the arguments that we can use with this command.
Now and Lennix, most of the time, the options will always follow the same syntax, so you either use
the letter or dash dash a word to specify the argument, for example, and hear the dash, a dash dash,
all will ignore entries, starting with dot com.
So if you keep going down in here, you'll see all the options and arguments you can use with the command.
And we have another example here.
We have the dash URL, which means it's going to use a long listing format which will display more information
about the files in the current working directory.
So let's have a look on that.
I'm going to press cue to exit this and then we're going to do list as usual.
And since we read the manual, we know we can do Dush URL to see more information about the files.
And if I hit enter now, you can see I'm still getting the same directories, but it's also showing
me the permissions, the users, the data created and so on.
So you can use demand command on any command you want, not only on the URLs so you can use it on the
P W.D. You can use it on the CD or any other command and it'll show you full description or the manual
page of how to use this command.
Now I'm going to clear the screen by typing clear.
And the next thing that I want to show you is the dash dash help.
So this is something that you can use again in almost all commands and all programs and Linux.
So you can just type the program name or the command name, followed by Dash Dash Help.
As you might think, this will show you a health message telling you what this command is or what this
program is, the arguments that it takes, how to use these arguments and examples at the bottom.
Now, another useful thing with the terminal, so I'm going to clear this again is the arrows so you
can press up to go up to see all the commands that we executed before.
And again, you can go down to C to navigate between the commands that you executed previously.
You can also use the tab for autocomplete.
So, again, let's do Ellas and you can see all the files.
And let's say we want to go into documents so we can do Khedive followed by documents.
You can type documents or if you're lazy like me, you can just do Deacy and press tab.
And as you can see, it's automatically completing the rest of the world for me.
So this is something that comes very, very handy when you're using the terminal for a long time.
Now, what I also want to show you is how to install programs and Karlee from the terminal.
So first I'm going to clear this and the first thing that you want to do is update the sources where
you can search and download programs from.
So we're going to do about get an update.
Now, up is the name of the application that allow us to download and install programs.
And we're saying update because I'm saying that I want you to update the list of all the programs that
I can install.
So I'm going to hit enter and you want to make sure that you have Internet connection when running this.
And as you can see, it's telling me that it's done and now we can go ahead and start installing applications.
So the first program that I want to install is actually a terminal program.
So similar to this one, what it allow us to have multiple terminal windows open and the same window.
So in order to install a program through the command line, we're going to do up to get which is, again,
the name of the program that allow us to install programs on the system.
We're going to say that I want to install and the program that I want to install is called Terminator.
So very, very simple.
First of all, we're typing the name of the command, which is up get, we're saying that I want to
install and the program name that I want to install is called Terminator.
So I'm going to hit Enter.
And this is going to download and install Terminator for me so you can use the same command to install
any programs that you want.
You just need to replace Terminator with the name of the program that you want to install.
Now, I've already downloaded and installed this before, so it didn't ask me to confirm, but if you're
running this for the first time, it might ask you to confirm whether or not you actually want to install
this program.
So all you'd have to do is press away from the keyboard and hit enter.
Now, as you can see, it's done, so if I go to my all applications in here.
And just type Terminator, you can see that I have it here, so I'm actually going to drag it and put
it in my dog so I can access it easily in the future.
So now I can just click it in here and that'll open Terminator for me.
Now this is another application that allow me to run commands.
So it's exactly the same as this.
So, again, I can do less.
And W.D., the only difference is with this one, I can actually.
Right.
Click and click on Split Horizontally, for example.
And this will split the same screen into two screens where I can run commands at the same time so I
can have some commands in here and I can run commands in here.
And then I can even split this more if I want again, vertically or horizontally, and as you can see,
I can have as many terminal windows as I want.
And this will be very helpful in the future when we'll be running a number of programs in a number of
commands at the same time.
Now, before I let you go, I just want to show you two websites that I'm going to include in the resources
of this lecture.
First of all, we have a website here that includes the most common Linux commands, if not all.
So you can go through them and familiarize yourself with them.
But keep in mind, you don't need to know them all by heart.
Like I said, as you go through my course and as you continue on with your journey, you will learn
the commands that you need as you go.
Another really useful resource that I'm going to include is explaining shell dot com.
This website is designed to explain Linux commands to you.
So all you have to do is type the commands in here.
So, for example, if you just type Élysées and hit explain it, explain that less well, less directory
content, you could make it more complex and do less dash L.A. and if we hit enter now, it will break
all the arguments and explain every single argument.
So again, all this contents, if we highlight the URL, as you can see, it's telling us that it's
going to use a long listening format, as we've seen earlier.
And the AI at the end is the same as Dyche AI, which is all, which means that we do not want to ignore
entries starting with a dot.
So we do not want to ignore hidden files.
So you can do any command in here, you can do up get installed, for example, and it'll actually explain
it to you, so it'll explain what is a package manager installed can be used to install packages and
so on.
So if you ever see a Linux command that you don't understand, you can always just come in here, put
the command and it'll break it down to you and explain it really nicely.