How to kill processes in Linux easily with fkill-cli

The processes on Linux They are nothing more than a series of programs that are running, they contain information from the applications as well as information necessary for interaction with the system. When we kill a process, we cancel the execution of the application it represents, we eliminate all communication with the other processes and the system, in addition to freeing all the resources that it consumes.

It's been a while here in DesdeLinux A great article was made that teaches How to kill processes easily, this time we are going to complement that article by adding a tool called fkill-cli that allows us to kill processes in Linux in an easy and very practical way.

What is fkill-cli?

It is a Cross-platform spirit, developed by sindre sorhus, which provides us with a practical and comfortable user interface for manage the processes of our operating system. The tool allows us to kill processes in Linux in an easy and dynamic way, accessing all processes with a single command and locating the one we want to kill through a list or search by name or fractions of it.

The tool works with the main operating systems of today (Linux, Windows and macOS, its use is quite simple and it is aimed at any type of user. Cross-platform is having a lot of acceptance in the community, however, it is only an alternative to the traditional commands to kill processes.Kill Process command

How fkill-cli is installed

To install fkill-cli we must have installed npm, which is found in the official repositories of almost all Linux distros. Then we must execute the following command so that fkill-cli install automatically:

sudo npm install --global fkill-cli

Then we can run the tool with the command fkill

Learning to kill processes on Linux with fkill-cli

Once we have installed fkill-cli, we can kill processes in Linux in a very simple way. The tool gives us some fairly basic commands for its use, the same ones that we can know if we execute fkill --help from the terminal.

$ fkill --help

  Usage
    $ fkill [<pid|name> ...]

  Options
    -f, --force  Force kill

  Examples
    $ fkill 1337
    $ fkill Safari
    $ fkill 1337 Safari
    $ fkill

Using fkill-cli is extremely simple, we just have to execute the fkill command with some of the arguments mentioned above, or failing that, just fkill and the tool will show us the list of all the processes that are running, we can navigate on the list with the keyboard arrows and finally select the one we want to kill. In the same way, we can write the name (or part of the name) of the process for the tool to filter the matching processes automatically.

In the following gif we can see in more detail the behavior of this tool:

kill processes in linux

This is undoubtedly a great tool that will help us kill processes in Linux in an easy, enjoyable and quite interactive way. Do you dare to try it?


4 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Argimir said

    Hello, is it possible through any of those commands to kill a process and immediately restart it again? That is, if a zombie process has been left or in some other way and does not respond, can it be killed and restarted with a single command or various?.
    Thank you

    1.    federico said

      Hello Argimiro !. What we normally do when we want to start a program is to execute it, either through systemctl start, service start, firefox, pen, etc., where the last two commands directly invoke a specific program. If we want to kill or kill a process, we usually do it through the kill command, or as Lagarto indicates in this post, through fkill. That is, if you want a service or a program to start after killing it, I think the best option is to run it again using the appropriate start commands for each program or service.

  2.   mario alonso said

    Does it do the same as kill -9 .. ??

  3.   gcjuan said

    In case it happens to someone. After installing npm and wanting to run fkill from the terminal I got the following error:

    / usr / bin / env: "node": The file or directory does not exist

    I found the solution here:

    http://stackoverflow.com/questions/30281057/node-forever-usr-bin-env-node-no-such-file-or-directory