Task manager ��� linux

Аналог диспетчера задач в Linux

Программы имеют свойство зависать — никуда от этого не денешься, даже в Linux. Поэтому один из вопросов, через который обязательно проходит начинающий линуксоид: где в Linux диспетчер задач? Как завершить зависший процесс?

Используем консоль

Стоит сказать, что (как и в Windows, если Вы не знали) один из простейших способов завершить процесс в Linux — сделать это через консоль.

Для этого сначала придется узнать PID процесса, а затем выполнить специальную команду.

Для того, чтобы увидеть все процессы в системе введите:

Результат будет выглядеть так:

В выведенном списке процессов найдите нужный, видите его PID? Он идет вторым значением в каждой выведенной строке. Берем его, и выполняем вводим следующую команду:

Само собой, вместо букв PID надо ввести PID нужного процесса.

Вот, собственно, и все. Осталось добавить пару хитростей.

Если Вы заранее знаете, как называется процесс, можно воспользоваться командой:

ps axu | grep название-приложения

Например, если я захочу найти KTorrent (хотя он у меня ни разу не вис, просто под руку попался) я введу:

ps axu | grep ktorrent

Здесь у нас и представится возможность использовать вторую хитрость — как видите, у KTorrent несколько процессов, чтобы завершить их все, я использую команду killall:

Эта команда завершит их все.

В завершении разговора о консоли осталось только порекомендовать интересующимся почитать про различные сигналы завершения процесса и их использование.

Для любителей графического интерфейса

Графические решения для просмотра и завершения процессов в Linux, конечно же, тоже существуют. Их наличие или отсутствие по-умолчанию зависит от Вашего дистрибутива. Если в Вашем дистрибутиве используется среда KDE — нажмите ctrl+escape, чтобы вызвать здешний «диспетчер задач» KRunner. В моем Linux Mint 17.2 KDE выглядит он вот так:

В Linux Mint 17.2, использующем в качестве DE Cinnamon, ничего такого «сходу» не нашлось, однако, установив пакет mate-system-monitor я обрел желаемое.

sudo apt-get install mate-system-monitor

После установки программу можно найти в меню, а выглядит она вот так:

В Ubuntu 14.04 программа System Monitor оказалась сразу включена в дистрибутив, осталось только найти ее в меню.

Ну и наконец, если в Вашем дистрибутиве ничего такого не нашлось, а орудовать в консоли не хочется, можете установить Htop. Хотя работает программа в консоли, интерфейс все-таки вполне можно назвать если не графическим, то псевдо-графическим точно:

Установить в Ubuntu-подобных дистрибутивах можно командой:

Источник

Best Task Managers for Linux

Top is a command line tool to show resource consumption of various processes and tasks running on your Linux system. It comes installed by default on almost all Linux distributions and it can show overall usage of system resources as well. It also features an option to tweak priority (niceness) of running processes. Top is really useful if you want to identify processes that are eating up system resources and if you want to do a comparison between different applications. Top presents data is in a nice tabular form.

Читайте также:  Memory pressure mac os

To run Top, execute the following command:

You can learn more about Top using the following two commands:

Htop is a command line task manager that works similar to the “top” application mentioned above. However, it comes with a lot of extra features and interactivity that will allow you to use some advanced functions. Based on the ncurses library, Htop can also show you colored output for better readability. The bottom row in Htop shows keyboard shortcuts for changing settings and filtering the results. You can also use Htop to change resource consumption priority of processes.

You can install Htop in Ubuntu by using the command mentioned below:

Htop can be installed from the package manager shipped with your Linux distribution. You can also download it from its homepage.

To run Htop, use the following command:

You can learn more about Htop using the following two commands:

Pre-installed Task Managers

A dedicated task management utility is included in the application stack of most Linux based desktop environments. If you are using GNOME, KDE, Xfce, MATE, LXDE, and LXQt based desktop environments, you will get a task management tool available by default as a pre-installed application. You can run this tool from the application launcher to start managing the tasks. Usually you can find these task management applications by searching for the term “system monitor” or “task manager” in the application launcher and package manager of your Linux distribution.

If for some reason one of these these task managers are is not available by default on your Linux distribution, you can install it by searching for “KSysGuard”, “Gnome System Monitor”, “Mate System Monitor”, “LXTask”, “XFCE4 Task Manager” terms in the package manager.

Ps is another useful tool that comes pre-installed by default on almost all Linux distributions. While it is not as advanced as Top and Htop, it is good enough if you just want to find the process ID (PID) of a certain task to further run any commands on it.

You won’t need to install “ps” in your Linux distribution. However, if for some reason it is not available, you can search for it in the package manager.

To run “ps”, use the following command (replace user name):

You can learn more about “ps” by using the following two commands:

Pstree

Pstree works similar to the “ps” command, with a unique “tree view” feature . It can show processes and their child sub-processes in a tree format, allowing users to better monitor running tasks.

Pstree should come pre-installed on your Linux distribution. If not, then search for it in your package manager as it is included in repositories of all major Linux distributions.

To show processes and subprocesses along with their their process IDs, use the following command:

You can learn more about “pstree” using the following two commands:

Glances

Glances is an open source and cross-platform process monitor tool written in Python. It features a ncurses and text based interface that can be viewed in a terminal emulator as well as a web based interface that can be viewed in any browser. The web based viewer requires a client-server setup, binaries for both are included in the official builds. Glances can show an overwhelming amount of information and it is much more powerful than other utilities mentioned in the article. You can customize it to show only limited information using its numerous command line options.

Читайте также:  Состояние ожидание скачивания windows 10

To install glances in Ubuntu, use the following command:

You can install Glances in other Linux distributions either from the package manager or you can follow official installation instructions available here.

To know more about Glances, using the following two commands:

Conclusion

Task management tools allow you to better control your system by providing useful information about resource consumption of individual processes. These tools are especially useful for system admins, application developers and gamers who routinely monitor process behavior.

About the author

Nitesh Kumar

I am a freelancer software developer and content writer who loves Linux, open source software and the free software community.

Источник

Use Task Manager Equivalent in Linux

Last updated April 11, 2020 By Abhishek Prakash 9 Comments

These are some of the most frequently asked questions from Linux beginners: “Is there a task manager for Linux?” “How do you open the task manager on Linux?” “Where do I find the Ubuntu task manager?”

People who are coming from Windows know how useful the task manager is. You press Ctrl+Alt+Del to get to the task manager in Windows. This task manager shows you all the running processes and their memory consumption. You can choose to end a process from this task manager application.

When you’re just starting out with Linux, you may look for a task manager equivalent on Linux as well. An expert Linux user prefers the command-line way to find processes and memory consumption, etc., but you don’t have to go that way, at least not when you’re just starting out with Linux.

All the major Linux distributions have a task manager equivalent. Usually, it’s called System Monitor, but it actually depends on your Linux distribution and the desktop environment it uses.

In this article, we’ll see how to find and use the task manager on Ubuntu and other Linux distributions that use GNOME as the desktop environment.

System Monitor: The Task Manager of Linux distributions

If you’re using the GNOME desktop, press the Super key (Windows key) and look for System Monitor. In other desktop environments, search for System Monitor in the menu.

This will start the GNOME System Monitor. It shows you all the running processes and their memory consumption.

You can select a process and click on End process to kill it. You can also select multiple entries here and kill the processes in one click.

You can also see some statistics about your system in the Resources tab, such as CPU consumption per core basis, memory usage, network usage, etc.

Читайте также:  Linux переключение графической оболочки

You can watch this video to see it in action:

There are more ways to manage tasks

That was the graphical way. If you want to go the command line way, just run the top command in terminal and you can see all the running processes and their memory consumption. You can easily kill processes in the Linux command line.

If you want a command-line based task manager on Linux, I recommend using htop. You can see running processes, memory usage, and more, and you can easily use hotkeys to end processes. And it looks good as well.

This is all you need to know about task manager equivalents on Linux. I hope you found this quick tutorial helpful. If you have questions or suggestions, feel free to comment.

Like what you read? Please share it with others.

Источник

Диспетчер задач в Ubuntu

Многих новых пользователей Linux, только-только перешедших с Windows, интересует, где же диспетчер задач в Ubuntu. Да и вообще, что делать, если какая-либо программа не отвечает. Но такая вот штука — нет в Ubuntu диспетчера задач, зато есть системный монитор и пара очень полезных консольных команд.

Да и сама система виснет очень редко, зависнуть может только окружение рабочего стола, да и то, если что-то намудрить с настройками. Подробнее о том, что делать в таких случаях, читайте в статье что делать если зависла Ubuntu, а пока поговорим про диспетчер задач.

Диспетчер задач Ubuntu

Чтобы запустить системный монитор, откройте главное меню системы и наберите в поиске monitor или монитор:

Здесь так же как и диспетчере задач вы можете просмотреть список запущенных процессов, завершать процессы, следить за использованием памяти, центрального процессора и файловых систем. Для этого у программы есть три вкладки:

Чтобы завершить программу кликните, по ней в списке правой кнопкой мыши и выберите:

Если программа после этого не завершилась, можете выбрать в том же меню пункт Убить. Подробнее об этом читайте в статье как убить процесс Linux.

Но если зависло окружение рабочего стола то системный монитор уже не поможет, в этом случае можно воспользоваться всей мощностью терминала Linux. По умолчанию в системе открывается 7 независимых терминалов, в одном из которых запускается окружение рабочего стола. Обычно это седьмой терминал. Переключаться между ними можно с помощью сочетания клавиш Ctrl+ Alt + номер терминала, чтобы открыть первый терминал, нужно нажать Ctrl+Alt+1 и т д:

Здесь нужно авторизоваться, указав сначала логин, затем пароль. После авторизации можно делать всё что угодно, например, перезапустить графическое окружение командой:

sudo systemctl restart display-manager

Если вам нужен аналог диспетчера задач в терминале, можете воспользоваться утилитой htop. Для её установки выполните:

sudo apt install htop

Затем её можно запустить одноимённой командой:

Если вам нужно завершить конкретное приложение, его легче найти командой:

ps aux | grep имя_приложения

Затем завершить его командой:

sudo kill -TERM pid_приложения

Где pid_приложения — уникальный идентификатор приложения в системе, который вы узнали в предыдущей команде, во второй колонке:

На этом всё. Желаю вам, чтобы ваша система никогда не зависала.

Источник

Оцените статью