Time
5 hours 21 minutes
Difficulty
Beginner
CEU/CPE
6

Video Transcription

00:00
Hello and welcome to command line Basics. This video ring a ling about Lennox Basics three. I'm Christopher Heller, and let's begin.
00:08
So are learning objectives for this video. We're gonna learn the locate, command when the Nano command and understand the pseudo command
00:16
Pretty assessment
00:18
by default. Which user account does pseudo use? Is it a administrator? Be guessed, C system or D route.
00:30
The answer is the root. This is the default account that pseudo is going to use unless you tell it very specifically otherwise. And that pseudo is a command you're gonna become very familiar with when you're using Lennox because you're gonna constantly need to elevate your permissions to either install files, connect new things to the system
00:48
pretty much anything you can imagine. So
00:51
it's very important to be able to be comfortable with pseudo and learn how to use it.
00:56
The administrator is for Windows three. Guest account does not.
01:00
Yeah, used by default. Prosciutto in the system account is kind of like the root account for a Windows machine, not for analytics machine.
01:11
All right, so our first command is located. Now, what locate does is a command that helps us find files on the file system,
01:19
and it is very, very speedy because it reads indexing databases that constantly indexing your files on your machine in the background.
01:27
So the way to use it, we'll just type in locate and then what we're searching for, like either the beginning of the file name or something along those lines. So this is very useful if I know that I have a specific filing one machine, but I don't know where it's at.
01:44
So by typing locate, it'll show us where, exactly where that finally is.
01:49
Now, in order to update the indexing, uh, manually for the locate command, we can use the update Devi Command.
01:57
So let's take a look inside of Lennox machine.
02:00
Now. I'm gonna see what's inside of my, uh, my directory here.
02:06
So let's say I have this my program
02:08
and I am going to go back to my desk times when a type CDs face dot dot
02:15
Now let's say I know I have a file called my program in in my system somewhere, but I don't know exactly where, So I'm gonna take locate my
02:27
program,
02:29
and there we go. It's found it two spaces so This is the home user Desktop files my program. This is from, ah, this output right here. So I know that's where it is. And then that I had any dragon drop where I was dropping my program into this virtual machine.
02:49
So I know I have a copy over there as well, so that's good to know.
02:53
Now, the only kind of draw back with the locate command is that if you add new things and you're trying to find them, you're usually the indexing in the background. Hasn't had a chance that index it to search through with the locate database. So let's give a brief explanation of that. So I'm gonna do touch, and
03:13
this is
03:15
new.
03:15
Now, if I look in this directory, I could see I have the is new file.
03:21
Now, if I try and locate, let me spell it correctly. Yes, he is.
03:29
You.
03:30
It's gonna come back with nothing. Now, this is because it hasn't indexed it yet.
03:34
So if we take the update TB command,
03:37
you will see we do not have permissions. So this is something we're gonna cover in the pseudo portion of this video, so hang tight.
03:49
All right, Nano. What the nana command is it is a very basic text editor that is a very useful and user friendly at the command line. So nano is something that you need to be very familiar with because you're gonna need to be able to edit files or text inside of, uh, the command line.
04:08
So it's similar to them. If you talk to a program that they're going to tell you they use V I or them.
04:14
If your chest beginning at the command line, don't feel bad just to use Nano, it's very user friendly. And, uh, you know, there's not a big barrier to learn how to use Nano.
04:25
So, and it's also very useful because you can open it to see what's inside of a file. Change it, save it,
04:30
and you've got to create a file with Nana as well. So if a file doesn't exist when you type in the Nanna command, it'll automatically make it for you.
04:40
So I'm gonna go back to my linens machine and let's say I want to you
04:46
let me go into my files folder.
04:50
Unless now let's say I want to look into the awards that t x t.
04:56
I want to change something in there. So nano words not t x to you
05:00
They can see I have all these words. And if I want to move around, I can just use the arrow keys.
05:06
And in order to type something in,
05:11
I can hit enter just like any other text editor were on word or something.
05:15
This
05:16
he's you.
05:19
And now you can see we have This is our new line in there twice. So we can go ahead and type in there.
05:26
And I love you. Command line.
05:30
Look at that. And now we can see in the bottom here, too. We have all sorts of different options for us to be able to use. So in order to save it, we can write out which is the control. Oh,
05:43
and then hit. Enter, and that will give us. It'll save it back to the system. Now the exit You hit the control X,
05:49
and we're automatically back,
05:53
all right. And now we have the pseudo command. Pseudo is very important because it will allow you to run commands as route. So like we were saying and that were shown of the update D B Command. We couldn't run it because we weren't running as route.
06:08
And if you're not familiar with route, it is kind of the super user for Lennox thes system account for clinics where
06:15
everything and anything can be done to the system. So in order to run these indexing in the background when I need to type, run pseudo and then update TB
06:26
So let's go back here. I'm gonna type pseudo
06:30
of date devi.
06:32
He's gonna ask me for my password
06:35
and there we go. So I didn't get any errors, which is a good sign. Now let's say locate
06:43
this
06:45
his new
06:46
and check it out. So the indexing ran because we told it the update, the database. And now we have our This is new file. So this is a really good way in order to verify that, you know, pseudo command works and ah that our update TV works so we can find these files.
07:03
Now, if you wanna have a shell for route, we'll have to do is type CTO
07:08
Dash s.
07:10
And as you can see, I am now route.
07:13
So this is a very good way in order. Thio, you have that interactive shell stone.
07:17
All right, post assessment.
07:19
The Nano command will make a new file if one does not exist. Is this true or false?
07:28
The answer is true. If you were using Nana and you type Nano in a new file name, it will automatically create that fun. That way you don't have to worry about creating that file first than opening it with banana command. You can just go ahead and start typing away.
07:44
All right, So in this video, we learned the locate command. We learned the Nano command and understood the pseudo command. And just like the other videos, they're all very important to have in your arsenal for the command line.
07:57
And I hope to see you in the next video.

Up Next

Command Line Basics

In this course you will learn the fundamentals of Command Line basics, a fundamental tool for any user of Windows and Linux machines. Command line allows developers to manipulate files easily and quickly, Learning command line saves developers time and resources.

Instructed By

Instructor Profile Image
Christopher Haller
Senior Intelligence Operations Analyst at Centripetal
Instructor