I didnt know how to force Quit applications from the command line. Yesterday my friend(Ravi Jaya) taught me how to..!
$pgrep process_name (Type this in the command line, So the output will be the process id)
pid: 1245 (this is the process id)
$sudo kill -9 1245 (This command will force quit the application.
useful tip...
ReplyDeleteIt was you who taught me how to..!
ReplyDeleteThanks..
Try xkill, when pkill doesnt work.
ReplyDeleteType #pkill and use TAB completion to complete.
No need to find process-id,
pkill would kill all the instance of the specified process.
ReplyDelete$ps ax
ReplyDeleteIt will show all the running processes with its pid.
now , $ kill pid
and to one more way is (eg) $ killall firefox.
It will kill the running firefox applications.
:-)
it is good to learn all the KILL sigs.
ReplyDeleteHave you tried the kill -HUP, very useful in production environment where sys admins need to maintain 99.99999 avail.
You could always use
ReplyDeletekillall -r [process_name]
to kill all the instances of the process