3

How I can kill a program corectlly?

Because when I use xkill very often it's closed incorectlly.

Scenario:

I have a game, game lags, I can't close it normally, im forced, to use forced kill, in this scenario xkill should be good but when I close a game (in steam), steam still thinks that game is opened, and I can't launch it again.

Error that is shown

Any solutions? And please no answers like reboot, because it's not I'm focused to.

muru
  • 197,895
  • 55
  • 485
  • 740

2 Answers2

3

In terminal...

ps auxc # to determine the PID (process ID) or process name

example...

           PID                                                     name
            |                                                       |
            V                                                       V
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0 205712  7904 ?        Ss   Jun17   0:05 systemd
root         2  0.0  0.0      0     0 ?        S    Jun17   0:00 kthreadd
root         4  0.0  0.0      0     0 ?        S<   Jun17   0:00 kworker/0:0H
root         6  0.0  0.0      0     0 ?        S    Jun17   0:01 ksoftirqd/0
root         7  0.1  0.0      0     0 ?        S    Jun17   2:57 rcu_sched
root         8  0.0  0.0      0     0 ?        S    Jun17   0:00 rcu_bh
root         9  0.0  0.0      0     0 ?        S    Jun17   0:00 migration/0
r

By process ID...

sudo kill -HUP PID # the nice way
sudo kill -9 PID   # if -HUP doesn't work

or by process name...

sudo killall -HUP process_name # the nice way
sudo killall -9 process_name   # if -HUP doesn't work
heynnema
  • 70,711
2

I usually do this:

  • find the pid of application is having problems
    ps - A | grep someTextToFind

Example: if your app is doubleCommander

 ps -A | grep doubl 
 2727 ?        00:04:06 doublecmd
 kill -9 2727

If in this way the program also is running.

click on dashboard, search System Monitor

  • find your application
  • click right botton
  • Kill I hope this can help!