Brethlosze
Brethlosze

Reputation: 1612

Kill a Running Process by its Name

When running a kill command by its name in a Linux RT ARM version:

kill -9 'pidof program'

I have the error

kill: invalid number 'pidof myprogram'

what is wrong in here? how can i know which version of kill?

Upvotes: 0

Views: 332

Answers (2)

hailinzeng
hailinzeng

Reputation: 995

You are using the wrong quote ', use ` instead.

kill -9 `pidof program`

Upvotes: 2

Tony Damon
Tony Damon

Reputation: 76

or you can use command 'pkill'

pkill program

pkill -9 program

Upvotes: 1

Related Questions