【Linux Process Management Commands】What are they? ▷ 2022

Admin commands are the most useful tools that you should know in this environment so that you can carry out your task successfully and without wasting time.

For this you will need to know what this one is about. You can find this information, in detail, in the next paragraphs of this article.

Also, We will explain in a simple way the 30 most used commands that you should know so that you become an expert in programming and in the management of Linux. Check out.

What are process management commands in Linux and what are they for?

When talking about process management commands in a Linux environment what is being referred to is the tools offered by the operating system to know, through a list, all the processes and threads that are executed at a certain moment. In addition, these commands are used to assign a task an order and a priority within the set of processes.

This implies that they allow any type of process to end, modify the priority and run in the background. Finally, thanks to these process management functions You can get a report about the use of memory and CPU capacity that the computer has. This is done based on the parameters established through the processes. It also helps to know the execution times of the tasks that you want to carry out and delete them, if they cause problems.

The main commands for managing Linux processes that you can use

The most important commands that you can run in a Linux console to manage processes are the following:

  • &: This operator will allow you to send to background those processes that are estimated to last a long time in their execution.
  • bg: This command is short for background and is used to send any application to the background to run without complicating the current operation. Note that if you bring an app to the background and this process uses the console to interact with the user, the process pauses until you bring it back to the foreground.
  • fg n: You will use this tool when you want to bring a certain process to the foreground. In this example it is called n.
  • fg: You will be able to use this Linux tool when you want to know a program that is in the background to give it a number when the jobs command is executed. It can also be used through the Ctrl + Z key combination.
  • free: You will use this tool when you want to know the memory capacity you have on your computer. If you use it with the argument -m the result that it will show you will be expressed in megabytes.
  • htop: It fulfills the same function of the top command, but much easier to use. You should keep in mind that not all Linux distros have this tool, so you will have to install it manually.
  • iostat: This command that you can use in a Linux console will show you the CPU utilization, according to the programs you have running at any given time.
  • iotop: You will find, when you use this tool, a table with a complete listing of the I/O usage of the processes you have. It also includes the threads that belong to the parents.
  • jobs: This command is used to see what kind of tasks are running in the background. It is ideal when the & operator is not used at the end of the command, since with this we can make it return control of the console once the process has finished.
  • kill pid: You can close a process identifying with the integer number that is used in the . In this way you will be sure to finish with the execution of the correct process.
  • kill: It is one of the most used, since it is useful to kill a certain process that is being carried out in the terminal.
  • killall proc: With this command you will end all the processes called process.
  • killall: Unlike kill, with this tool you will kill all the processes that are running at a certain time.
  • lsof is a useful tool that tells the user what type of executable a given file uses.
  • man htop: To handle the htop command perfectly, you will need to read its manual to understand the configuration and other aspects of the criteria used to order the list it displays as a result. You can do this by typing in the console man htop.
  • nice: You will have to use this command when you want to carry out a process with a certain priority.
  • nohup: You will be able to send a certain process to the background and prevent it from stopping when the terminal is used.
  • pkill: This tool will be useful when you want to kill the parent process of a certain application.
  • ps aux: If what you are looking for is to know all the processes of the system, you will have to use this Linux tool.
  • ps axjf: With this command you can find the path through a hierarchical tree of a given process.
  • ps: When you need to see the processes that are running at a certain time you will have to use this function of Linux. Being a general Unix command, it can be used with all accepted parameters, so it is advisable to read the manual.
  • pstree: You will be able to use this function in a Linux console when you want to see the tree of processes that you have active.
  • renice: It is complementary to nice, since it can establish a priority. But if you want to change that order you must use renice.
  • sigterm: If for some reason, your application or a service causes a problem in development, you can issue a process completion signal using this Linux command.
  • sysctl: When you need to configure the /proc/sys/ directory of the Linux kernel you will have to use this tool in the console.
  • systemctl: This function is used in Linux to control the services that you have within the operating system. That is, to know the main PID in a fast way.
  • systemd: This tool appears in the Linux environment to replace SysVinit. It is used to administer and control management services within the operating system.
  • time: It is ideal to use this function when developing programs, since it allows you to measure the execution time of the processes.
  • top: With this command you will be able to see all the processes that are being carried out in the console, but it will show you a limited list so to continue you will have to press a key to continue executing.
  • vmstat: You will have to use this function that Linux offers you when you want to know the status of the processes, paging and also the memory you have available. If you use it with the -a parameter it will return a list with all the active and inactive processes you have.
Loading Facebook Comments ...
Loading Disqus Comments ...