In the previous article, we had learned about the following:
1. We have seen how we can create more than one file or directory.
2. We saw a little more of the echo command.
3. Cat Command
4. head Command
5. tail Command
6. stat Command
7. du Command
8. We have learned about md5sum Command.
Let's continue further...
#ps Command: It will show nothing but a snapshot of the currently running process.
Let's create a new process.
Input: sleep 60 &
Output: You will get an ID like 12582(In your case it could be different)
Now, type: ps
Output: You will see the process id on the screen
Again, type: ps
Output: You will see the sleeping process.
Let's see how to kill/stop the running process. For that we have this command:
#kill Command: It will kill/stop the running process
Input: kill 12582
Output: It will kill/stop the process.
Now, if you again check the running process list with the ps command, It will not show you the process you have killed before.
Sometimes, some processes won't die with the simple kill command, in that case, we use the " -9 " option.
Input: kill -9 12582
#killall Command: It will kill all the processes simultaneously.
For Example: let's create two new processes
Input: sleep 30 &
Input: sleep 30 &
Now, if you check the running processes, it will show you both the sleep process.
Input: kill all sleep
Output: Terminated sleep 30
#killall -u username Command: It will kill all the processes started by a user.
Input: killall -u Roshan
Output: It will kill all the processes created by me.
#pidof bash Command: It will provide you the process id (Pid) of running program bash.
#pidof -s bash Command: It will only have one running process ID, instead of all the running program bash.
Quick Recap:
1. ps Command: It shows the snapshot of the currently running process.
2. sleep Command: It is used to create a process.
3. kill Command: It is used to kill/stop a running process.
4. kill all Command: It is used to kill/stop all the running processes simultaneously.
5. kill all -u username Command: It is used to kill all the processes started by the user.
6. pidof bash Command: It shows you the process id (PID) of running program bash.
7. pidof -s bash Command: It will show you only one running process rather than all running processes.
#Penetration Testing Tutorial for Absolute Beginners
#Technical Tools Explanation#Linux for Absolute Beginners in Hindi
#Penetration Testing Tutorial for Absolute Beginners
#Technical Tools Explanation
#Linux for Absolute Beginners in Hindi
0 Comments
If you have any doubts, let me know