Ubuntu Killall Command

Every single Linux distros is a collection of standard and something other tools at the core. Ubuntu, being one of the most popular ones, offers the most popular and powerful Linux tools in the wild. “killall” is such a powerful tool at your disposal. Let’s find out what you can do with “killall”. It’s just like “kill” but with a lot more power in the pocket. It’s a CLI tool. Caution is a must as a wrong command can completely render your system useless.

Killall command

“killall” follows the following structure –

killall [OPTIONS] name

According to the man page of “killall”, the tool sends a signal to the target processes. Without specifying the signal type, the default is SIGTERM. If “killall” is able to kill at least 1 process matching the requirements, it returns a zero return code. You can’t kill a “killall” process.

Killing a process

This is the most basic usage of “killall” command. All you have to do is just pass the name of the process.

For example, I’ve got GNOME Disks open, process name “gnome-disks”. For killing the process, run the following command –

killall gnome-disks

Asking for permission

When you’re running “killall” commands, there’s a pretty good chance that you’re about to kill something unintended. You have to use the “-i” flag.

killall -i gnome-disks

Case sensitivity

Generally, “killall” is a case-sensitive tool, so make sure that you type the name correctly.

# Wrong command
killall GNOME-disks

# Correct command
killall gnome-disks

If you want to force killall as case-insensitive, use “-I” flag.

killall -I GNOME-disks

Choosing the ENDING signal

There are different types of termination signal available. If you want to use a specific end signal, use the following structure –

killall -s

# OR
killall –signal

# OR
killall -SIGNAL

For finding out the available signal list, use the “-l” flag.

killall -l

Killing process by the time

You can also tell “killall” to terminate the processes depending on their time of running!

killall -o [TIME]

# OR
killall –older-than [TIME]

For example,

killall -o 2h

This command will kill all the processes that have been running for more than 2 hours.

killall -y [TIME]

# OR
killall –younger-than [TIME]

For example,

killall -y 2h

This command will kill all the processes that are younger than 2 hours.

Killing all the processes owned by a user

This is a very risky thing to do and may even render your system useless unless you restart it. Make sure that you have all your important tasks finished.

The structure goes like this –

killall -u [USERNAME]

For example,

killall -u viktor

This command will kill everything under the user “viktor”.

Other “killall” commands

There are a number of other available commands of “killall”. For the short list, use the following command –

killall –help

For an in-depth explanation of every single parameter and options, the man page is the best option.

man killall

You can export the man page to a separate text file for reading later.

man killall > ~/Desktop/killall.txt


Sandclock IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, Sandclock IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How To Install Bitcoin Core on Ubuntu

In this article, I will talk about what Bitcoin is, what a Bitcoin wallet is, how to install Bitcoin core on Ubuntu and how...

How to install PeaZip 6.4 on Ubuntu – Supports Optional Tabbed Browsing

PeaZip 6.4 recently released, is a free cross platform, portable file compression utility as well as a file manager based...

Install and Get Started with .NET Core on Ubuntu

.NET Core is a high performance, free and open source software framework. It is developed by Microsoft. .NET Core is a...
Bài Viết

Bài Viết Mới Cập Nhật

Hướng dẫn chuyển đổi windows server windows evaluation to standard và active windows server 2008 + 2012 + 2016 + 2019

How to Update Ubuntu Linux

Squid Proxy Manager cài đặt và quản lý Proxy Squid tự động trên ubuntu

Hướng dẫn cài đặt Apache CloudStack

Hướng dẫn ký file PDF bằng chữ ký số (chữ ký điện tử) và sửa lỗi mới nhất 2021 foxit reader