Linux operating system killing Process

Source: Internet
Author: User
Tags pkill
Article Title: describes how to kill a process in a Linux operating system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In today's society, computers are becoming more and more popular. We use computers, but do we know how computers work? An operating system is essential to a computer. However, the Linux operating system has developed very rapidly and is catching up with Microsoft. Here we will introduce the knowledge of Linux, so that you can learn how to use Linux. Today I will explain how to kill processes in Linux. I hope you will remember how to explain how to kill processes in Linux. After collecting and sorting out the relevant Linux operating system killing process materials, I would like to recommend this article to you here, I hope you will have a lot of GAINS.

  1. kill

Purpose: kill a process based on the process number.

Usage: kill [signal code] process ID

Example:

[Root @ localhost ~] # Ps auxf | grep httpd

Note: kill-9 to force termination and exit

Example [root @ localhost ~] # Ps aux | grep gaim

Or [root @ localhost ~] # Pgrep-l gaim 5031 gaim

5031 gaim

[Root @ localhost ~] # Kill-9 5031

Special usage:

Kill-STOP [pid]

Send SIGSTOP (17,19, 23) to stop a process, instead of killing the process in Linux.

Kill-CONT [pid]

Send SIGCONT (, 25) to start a stopped process again.

Kill-KILL [pid]

Send SIGKILL (9) to force the process to stop immediately without cleaning.

Kill-9-1

Terminate all processes you have.

  2. killall

Purpose: directly kill all processes by program name

Usage: name of the program that is running killall

Example:

[Root @ localhost beinan] # pgrep-l gaim 2979 gaim

[Root @ localhost beinan] # killall gaim

Note: This command can use the-9 parameter to force the process to be killed.

  3. pkill

Purpose: directly kill all processes by program name

Usage: # Name of the running program

Example:

[Root @ localhost beinan] # pgrep-l gaim 2979 gaim

[Root @ localhost beinan] # pkill gaim

[1] [2] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.