How to close any application program using linux command line
sometimes we get that application program like firefox, geany or image editor which is running on our computer is not responding.Then we get various question in our mind like
*. How to close application from command line?
*. Is there any way to close application from command line.
And others.
Resolution
Linux and Unix both Operating system has a very good command named Kill command.Here is the steps to use kill command to stop or close any application forcely.
For example:How to close mozilla firefox using command line?
Step 1:Use the below command
Command Structure:
ps aux | grep {application-name}
Actual Command:
ps aux | grep firefox
This will show all process which name like
user 2556 27.6 18.1 756884 183840 ? Sl 15:15 2:25 /usr/lib/firefox-3.6.24/firefox-bin
So you can see the process id in second column
You can check process id of any application with below command
pidof firefox-bin
This will provide the process id
3045
Step 2: Now you have process id of application . Use simply below command to kill application
kill 3045
You are done.
Alternate one line linux command to do close application
pkill -f firefox-bin
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments