Restart audio (Fedora)
systemctl --user restart pipewire
Kill a process and its descendants
kill -- $(ps -o 'pgid=' -p "$(pgrep -f 'PROGRAM TITLE' | xargs)" | uniq | xargs -IX echo -X | xargs)
$(pgrep -f 'PROGRAM TITLE' | xargs)- Get
PIDof processes you want to kill based on a match against the full title of the program - Use
xargsto convert multi-line input to a single line
- Get
$(ps -o 'pgid=' -p "123 456 789" | uniq | xargs -IX echo -X | xargs)ps -o 'pgid=' -p ...prints out thePGID(Process group ID) without any headingspgid=of the process IDs123,456, and789uniqremoves duplicate lines from the outputxargs -IX echo -XPrefix eachPGIDwith a--IXtellsxargsto replace letterXwith a value from the input.-NUMBERtokill,psand friends, means to match processes against thePGIDas opposed to thePID
xargschanges the multi-line output to be a single line, space separated
kill -- -998 -991--Tells kill that all option arguments have ended (so that it does not confuse-998with a signal such as-9(-SIGKILL)