325
votes
How to kill all tmux sessions (or at least multiple sessions) from the CLI?
You can use tmux kill-server to cleanly and gracefully kill all tmux open sessions (and server).
If you are inside a tmux session you would like to keep, use tmux kill-session -a to close all other ...
95
votes
Accepted
How to see detailed information about a given PID?
ps -Flww -p THE_PID
will show you some information. See the ps manpage for more information about the ps command. The "STANDARD FORMAT SPECIFIERS" section explains what the different columns mean.
80
votes
Accepted
How to fix processing with runit and git-daemon-run
I was having a similar problem after I recently upgraded to Ubuntu 16.04. I found this answer and Jonathan's purge and reinstall commands took care of it for me. Hope this helps.
sudo apt-get purge ...
57
votes
Accepted
How to stop a bash while loop running in the background?
I started
while true; do yad; sleep 60; done &
and closed the terminal to test it, now I got the same problem.
If you already closed the terminal you've started the loop in
Let's get an ...
56
votes
How can I kill a process with a phrase in its name?
If myName is the name of the process/executable which you want to kill, you can use:
pkill myName
pkill by default sends the SIGTERM signal (signal 15). If you want the SIGKILL or signal 9, use:
...
52
votes
Accepted
Tracker process taking lot of CPU
Tracker, which is enabled by default in Ubuntu since 19.10, is a file metadata indexer. It indexes your files to allow for fast searching for content in files from Files or Gnome Documents, find ...
47
votes
Accepted
upowerd hogging CPU while iPhone is connected
From @JonasCz, whose comment was:
Do you happen to have an iPhone plugged into your computer ? If so,
you may need to select "Trust this computer" on the phone (or
disconnect it), which may fix ...
42
votes
How do I get the parent process ID of a given child process?
Using only shell variable to get parent PID :
echo $PPID
if you need the command from this parent pid:
cat /proc/$PPID/comm
if you need the full command line (with all options):
cat /proc/$PPID/...
33
votes
Bring nohup job to foreground
nohup does not disconnect a command from terminal, it makes your script ignore SIGHUP, and redirects stdout/stderr to a file nohup.out, so that the command can continue running in the background after ...
33
votes
Process 'niceness' vs. 'priority'
Short Answer
PR is the priority level. The lower the PR, the higher the priority of the process will be.
PR is calculated as follows:
for normal processes: PR = 20 + NI (NI is nice and ranges from -...
30
votes
Accepted
How to see thread name in htop?
F2 → Display options → Show custom thread names
https://stackoverflow.com/questions/4461289/change-thread-name-on-linux-htop
27
votes
What should I do when I get 'There are stopped jobs' error?
You got the message, because system warns you about active jobs associated with your current shell.
You can list these running/stopped jobs by running: jobs,
Then you can do one of the following:
...
27
votes
How to kill all tmux sessions (or at least multiple sessions) from the CLI?
This would list and kill all the sessions:
tmux list-sessions | awk 'BEGIN{FS=":"}{print $1}' | \
ifne xargs -n 1 tmux kill-session -t
25
votes
In System monitor, what is the difference between Kill Process and End Process?
I was curious too, so I just browsed through the source code and found the below in application.cpp. There is more to this code but I think these correlate to the options, at least for System Monitor ...
25
votes
Accepted
Process status of S+ S S< Sl
When in doubt, check the manpage. From the command man ps:
PROCESS STATE CODES
Here are the different values that the s, stat and state output
specifiers (header "STAT" or "S") will ...
24
votes
How to see detailed information about a given PID?
I don't know what is your exact requirement. but this may help you.
There is separate directory for every process with name as pid number in /proc .
ps -ef | grep docker
root 1700 1 0 ...
23
votes
Accepted
How can I hibernate a running application?
You can use the killall command to send a SIGSTOP signal to all processes matching a given name to freeze them and later send SIGCONT the same way to thaw them again.
First find out the process name ...
23
votes
Firefox: "isolate+" process CPU usage 100%
About isolate+
Assuming you are seeing this in the top command interactive screen output in the terminal, the + sign means the string is shortened to fit in the current terminal window ... Expanding/...
22
votes
What process of Google Chrome to kill to close window from terminal?
You can stop all of them with a single command:
sudo killall chrome
Then to prevent it from doinng this in the future, go into Settings, pick Advanced, and near the bottom you will find a switch ...
22
votes
Accepted
Easy way to get process information from a window
If you can use Terminal, try this:
xprop | grep WM_CLASS
and your cursor should turn into cross allowing you to click on any window to get its process name. If you just need the PID, try:
xprop | ...
21
votes
Accepted
htop displays identical program in multiple lines
The duplicated lines are threads of a single process. You can recognize them by the different color in the command column (if you have configured that in Setup > Display options > Display threads in a ...
20
votes
What is a <defunct> process, and why doesn't it get killed?
expanding on Paddington's answer..
From your output we see a defunct, which means this child process has either completed its task or has been corrupted or killed. Its parent process is still running ...
20
votes
Accepted
How do I tell if a command is running or waiting for user input?
There's several approaches:
Try signalling end of input:Without superuser privileges it is hard to know what is going on underneath the hood. What can be done is to press Ctrl+d. Terminals and ...
19
votes
bioset process - what is its function?
It's part of the kernel block IO:
https://lwn.net/Articles/26404/
Those bioset threads specifically are part of some recovery system.
https://github.com/torvalds/linux/blob/...
19
votes
What is the difference between cat /etc/services and service --status-all?
The contents of /etc/services do not actually correspond to the services on your system. That file is actually a mapping of ports to the services that usually use them (say, port 22 by SSH). It's used ...
19
votes
Check memory usage of process which exits immediately
A popular framework for memory profiling is Valgrind (available from the Ubuntu main repository). In particular, you could use its massif heap profiling tool. For example, given a minimal C program:
#...
18
votes
How to stop mysqld process?
/etc/init.d/mysql stop
service mysql stop
killall -KILL mysql mysqld_safe mysqld
When you see the following information, you success
mysql: no process found
mysqld_safe: no process found
mysqld: no ...
17
votes
How do I get the parent process ID of a given child process?
Using pstree by command name
Using pstree you can search by the child process name and get the Process ID (PID) along with the parents, grandparents and any children of the child process:
$ pstree -hp ...
17
votes
Can't disable redshift
You can now use redshift -x to reset everything:
-x Reset mode (remove adjustment from screen).
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
process × 785command-line × 149
kill × 84
bash × 77
cpu × 51
scripts × 46
server × 38
14.04 × 28
top × 26
ps × 26
ram × 24
cpu-load × 24
12.04 × 22
java × 22
services × 21
python × 20
system-monitor × 20
16.04 × 19
kernel × 18
memory-usage × 18
permissions × 14
htop × 14
background-process × 14
zombie × 14
networking × 13