Hello and welcome to command line Basics. This video ring a ling about Lennox Basics three. I'm Christopher Heller, and let's begin.
So are learning objectives for this video. We're gonna learn the locate, command when the Nano command and understand the pseudo command
by default. Which user account does pseudo use? Is it a administrator? Be guessed, C system or D route.
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
pretty much anything you can imagine. So
it's very important to be able to be comfortable with pseudo and learn how to use it.
The administrator is for Windows three. Guest account does not.
Yeah, used by default. Prosciutto in the system account is kind of like the root account for a Windows machine, not for analytics machine.
All right, so our first command is located. Now, what locate does is a command that helps us find files on the file system,
and it is very, very speedy because it reads indexing databases that constantly indexing your files on your machine in the background.
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.
So by typing locate, it'll show us where, exactly where that finally is.
Now, in order to update the indexing, uh, manually for the locate command, we can use the update Devi Command.
So let's take a look inside of Lennox machine.
Now. I'm gonna see what's inside of my, uh, my directory here.
So let's say I have this my program
and I am going to go back to my desk times when a type CDs face dot dot
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
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.
So I know I have a copy over there as well, so that's good to know.
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
Now, if I look in this directory, I could see I have the is new file.
Now, if I try and locate, let me spell it correctly. Yes, he is.
It's gonna come back with nothing. Now, this is because it hasn't indexed it yet.
So if we take the update TB command,
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.
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.
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.
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.
So, and it's also very useful because you can open it to see what's inside of a file. Change it, save it,
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.
So I'm gonna go back to my linens machine and let's say I want to you
let me go into my files folder.
Unless now let's say I want to look into the awards that t x t.
I want to change something in there. So nano words not t x to you
They can see I have all these words. And if I want to move around, I can just use the arrow keys.
And in order to type something in,
I can hit enter just like any other text editor were on word or something.
And now you can see we have This is our new line in there twice. So we can go ahead and type in there.
And I love you. Command line.
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,
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,
and we're automatically back,
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.
And if you're not familiar with route, it is kind of the super user for Lennox thes system account for clinics where
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
So let's go back here. I'm gonna type pseudo
He's gonna ask me for my password
and there we go. So I didn't get any errors, which is a good sign. Now let's say locate
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.
Now, if you wanna have a shell for route, we'll have to do is type CTO
And as you can see, I am now route.
So this is a very good way in order. Thio, you have that interactive shell stone.
All right, post assessment.
The Nano command will make a new file if one does not exist. Is this true or false?
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.
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.
And I hope to see you in the next video.