2

I wish to use command line ( bash ) to find and kill a process. How do I search for a known (VLC ) process and how do I kill it ?

Guy

Ravexina
  • 54,268
  • 25
  • 157
  • 179
guyd
  • 955
  • 4
  • 19
  • 39

3 Answers3

3

Fist type

pidof vlc

after

kill -9  pid

or

pkill pid
Gowthaman D
  • 417
  • 1
  • 5
  • 17
2

As an alternative to other suggestions you can use xkill, in a terminal type xkill then click on your desired window (VLC, or any other). it will kill it.

You can also combine kill and pidof:

kill $(pidof -s vlc)

or use killall:

killall vlc

which kill all instances.

terdon
  • 98,183
  • 15
  • 197
  • 293
Ravexina
  • 54,268
  • 25
  • 157
  • 179
1

Find the process with pgrep, kill it with pkill. Read man pgrep (the same man page documents pkill)

waltinator
  • 35,099
  • 19
  • 57
  • 93