OK, so we have covered a few comments in the last video.
Let's learn a little bit more just so we can feel confident when we get to use the word terminal later
in the course.
Another important comment that you will use a lot is called pseudo.
Now, pseudo allows us to run certain commands as truth account or in other words, as an administrator
account.
For those of you who don't know, Ruth account on Linux is something similar as administrator on Windows.
So let's check Suda comment by running it with another familiar comment that we already covered, which
is touch comment.
So if I typed this pseudo and then touch and then file one, let's see what will happen.
So I'm just going to press enter.
Hmm.
It asks for password, which makes sense because we're actually trying to create a file with elevated
privileges.
So the actual password that you want to type here is the same password that you used once you created
an account during the installation of Linux.
So I'm just going to type mine right here.
And the file has been created.
We can check it by typing Allez.
And now that we created file one with elevated privileges, you will also notice that on desktop, if
I lower my terminal, this file one has a lock on its icon, as we can see right here.
This means we cannot change content of the file as a regular user.
Let me show you what I mean.
If I also go and create a file as our Mr. Hacker can't just be typing oops, just by typing touch and
then file to.
Here, if we take a look, this falta won't have any locks on its.
This is a file that we created is a regular user.
OK, we'll get back to this in just a second.
For now, another useful comment that I want to show you is called Nano.
Nano is a text editor.
Once you open a file with Nano, you will be able to write text there or even code if you're creating
a program.
Let me show you how it works.
So if I go to my terminal and I type Nano file two, which is the file that we just created, it will
open a window that looks like this here.
We can write anything we want.
Let's say we want to write Hello World.
How is your day going?
OK, just a simple sentence.
We can save this and then we can see whether we managed to write it using the cat comment.
So to save a file in the nano editor you type control.
OK.
Then once this pops up, you press enter and then you can press control X to exit out of Ed to make
sure that we typed something inside of our file.
If we can catch it like this or cat file too.
And here we have our sentence.
Hello, world.
How is your day going?
OK, but if we try to do the same thing with file one.
It will open this window, but as you can see, it wont work, it will tell us down below that this
file is on writable, as we can see right here.
Why is this?
Well, this is because we don't have enough privileges to change the contents of this file or to write
any new content.
Remember, we created it with pseudo comment.
So how can we write to it?
Well, we can run now with the comment.
Let me show you what if I type pseudo now and then file one.
Now it works, we don't get the error down here and we can also type something like today is Tuesday,
we can save it with control.
Oh, press, enter and then control, exit to exit if we can't find one.
Now, we also have the content written inside of our pseudo.
So this is a way that we can actually create the file that cannot be accessed by a regular user.
You would need pseudo privileges to open and write to that file.
OK, but there is also another command that we can run to elevate our privileges.
And this command is called pseudo s you.
If I type pseudo pursue this comment instead of elevating our privileges for just one single command
that we want to run, this will give us growth account terminal.
As you can see right now, we have Mr. Hacker terminal.
But if we run pseudo you.
Now we get Ruth terminal.
We see it's not really the same, we have Mr. Hacker right here while as here we have Ruth name and
we get this cool call.
I come right here.
But be careful while using root terminal, because with this terminal, you can actually delete any
file that might be crucial for the operating system or you can make any changes whatsoever.
There is no limitation.
You can delete the entire operating system if you want, so only use this one, you know what you're
doing and when there are a lot of commands that you need to run with SUDO.
So in that case, you can open the root terminal and run those comments and then exit out of the terminal.
Now, you might be asking, well, how can I exit once I entered?
Well, it's simple as that, simple as typing exit and we get back Mr. Hacker account.
And let's also mention the last comment for this video, probably the one that you will use more than
any other comment, and that is clear now clear simply does as it says, it clears our terminal window.
Perhaps you ran too many commands and you're looking at a lot of output that you no longer want to read
or you no longer need it at all.
Well, simply by typing clear and pressing enter, we can get rid of all of that and get fresh and clean
terminal window.
Awesome, you're starting to get a hang of this, as you can see, terminal is not that hard to use.
It will take some time for you to get used to these commands, but eventually it will become second
nature for you.
OK, so there's one more video to cover for terminal.
And we're left to cover some other comments aimed at networking and discovering our IP address and so
on and so on.
So practice a little bit with these comments that we already learned in past videos, and I will see
you in the next one.