How to kill a proccess?

Discussion in 'Command Line' started by carbon333, Feb 16, 2012.

  1. animaguy

    animaguy New Member

    Messages:
    53
    Likes Received:
    1
    Trophy Points:
    0
    thanks to all on this thread.


    Office Libre froze on me for the first time.

    I was working on a complex data base and as part of a reformatting technique, I copy and pasted a worksheet to another worksheet for backup and the whole thing froze.

    Eventually I was able to close and start all over again from where I last saved.

    If it happens again I will remember this thread and try some of the commands.
  2. Hector

    Hector New Member

    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Interesting. I usually run skill $name.
  3. KenJackson

    KenJackson Active Member

    Messages:
    129
    Likes Received:
    27
    Trophy Points:
    28
    I never heard of skill before. I was going to congratulate you on the find, but grief! Look how unflattering the man page is:

  4. Hector

    Hector New Member

    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    What can I say? It works fairly well for my needs. :p
  5. Bill

    Bill New Member

    Messages:
    127
    Likes Received:
    4
    Trophy Points:
    0
    If it is a graphical process, like Libreoffice, you can use xkill. After you type xkill in a terminal, you then just click on the program that you want to close. Works great for me and is much easier than trying to find the process ID.
  6. nixsavy

    nixsavy Member

    Messages:
    65
    Likes Received:
    17
    Trophy Points:
    8
    You can also use fuser command to kill all processes. For example you want to kill apache2, find full running command with top as below

    Code:
    #top -c
    Output will as

    Code:
    1312 root      18   0 73516 2724 1252 S  0.0  0.3   0:00.02 /usr/sbin/apache2 -k start
     1313 www-data  18   0 73516 2048  564 S  0.0  0.2   0:00.00 /usr/sbin/apache2 -k start
    
    and run fuser with -k option and command as below

    Code:
    #fuser -k /usr/sbin/apache2
    and all processes will kill and output will as below of this command.

    Means these process ids has been killed.
  7. ryanvade

    ryanvade Administrator Staff Member Staff Writer

    Messages:
    889
    Likes Received:
    288
    Trophy Points:
    63

Share This Page