5 hours 21 minutes
Hello and welcome to command line basics. In this video, we're gonna go over Lennox system commands to I'm Christopher Hyler, and let's begin.
So are lending ejected from this video? We're gonna learn the idee command, understand the last command when the p s command and learn the kill command as well. They're all very useful system commands in orderto, you know, manage and manipulate your system into what you needed to do.
Pre assessment that P s command lists all running processes by default. Is that true or false?
The answer is false. It will only list the running processes for your user account by default. In order to list everything that is running on the machine, you're gonna need to use the A U X switch as well. And we learned that this video
all right, So I d c I. D. Command disused, for it is used to print user and group information, and it can also show up permissions for other users as well. So this is a useful command in order to quickly understand the permissions for a user. See, look rich, they're part of and all that. So
if we jump over to my linens machine.
I can do I d user because this is my easier account name, and I'll show all the groups that I'm a part of this one. So this is my user I d here 1000
the group I d and a whole much different groups that I'm a part of
so important to understand, and we can use it for other accounts as well. So let's say I d route
you can see you it zero That is always the route you would.
And then it's in the root group hand. He a group ideas well, so very useful to find information about a user account.
Now the last command, What this command does is it shows the user's that last long into the system. And also she was exactly what, exactly they usedto long into the system. If it was remotely over as, say, Jer, if it was with the keyboard and also show when the system booted as well.
So this is useful in order to kind of keep tabs on exactly how users are authenticating to the computer.
So over here, I'm gonna get back to my limit show. I'm going to type last
and check it out. You can see that I have longed into the machine a few times and reviewed it a few times. 12.
So the last time I logged in was Saturday, September 14th at 14. 47 it is still running.
I have not logged out yet. And this reboot I did at 14. 47 as well.
So this is useful in order to keep track of user accounts and have their logging in.
So the P s command, this is what we're learning about in the pre assessment where it'll display running processes on the system
so it only displays the current user processes by default as well. And if you won't be able to see all the processes on the system and P s a u X now, these switches the a u X, which is do not have that dash in front of it. So keep that in mind,
right? So let's take a look. Take PS and you can see I'm running bash. And then the PS command as well does it. P s is a program that is running through bash so we can see the process idea where the pid for these commands as they run as well.
And now let's say I want to see everything on the machine. I'm gonna take P S, u X,
and this shows everything running on the machine and the commands that reused to submit them to start them as well.
So this is useful in order to see exactly what's going on with your Lennox machine at one time.
All right, we have the kill command with kill commandos is it ends a running process. And the best way to do this is to use the pit of a process night. Wait. You know exactly which one is going to be ended
so this could be used to either, you know, help end a process that is frozen, a process that you did not mean to start or you know something that another user left running up when they were loved. And it's eating up. System resource is
so it's important to be ableto feel comfortable with the kill command and use it to end processes as you need it too.
So let's go back over, and I'm going to start a new process, gonna start Terminator,
and as you could see this? The Terminator program we installed in a previous idea and when this starts up has 27 88. This is the pit for this new program that we just started
and that you're not aware already having the single and percent after a command in a clinic, Shel, it sets it up in the background. That way we'd still have control of our show, and we'll learn this in a later video, So don't be worried about it.
Now stay PS again. And as you can see, we have the Terminator program running the paid 27 88
and we still have this window up so you can see the window in the background a little bit. Now it's type kill
and 27 88.
And as you can see, that window is going to the background.
And if we tie PS again, that program is terminated. So it's a very useful wait in order Thio end a process that you may not want started. We're still learning,
and it's important to keep in mind, too, that we can end other user processes if we're using the route account because the root is in charge. of the entire system so we can use it and kill any other pit running for any other users.
All right, post assessment. The kill command can be used to end other, easier process. Is is this true or false?
The answer is true. I hope you got this one right, because I just said it. So using the route account we can end process is running on under other user accounts. This is a very useful way in order to be able to make sure that
we can keep control of our system or end any hang processes or processes that air using a way too many resource is
aren't so. In this video we learned the idea Command understood the last command during the PS command and learned the kill command. And I hope to see you in the next video.
SOC Analyst Assessment Level 1
Cydefe's SOC Analyst Assessment, Level 1, Capture-the-Flag (CTF) Assessment
How to Use GDB (BSWJ)
The GNU Debugger (GDB) is one of the most commonly-used debugging tools in the world. ...
Certificate of Completion Offered