🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 53 (from laksa128)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
9 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.3 months ago
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://askubuntu.com/questions/1464949/killing-multiple-processes-by-name
Last Crawled2026-03-28 01:48:26 (9 days ago)
First Indexed2023-05-09 17:39:14 (2 years ago)
HTTP Status Code200
Meta Titlecommand line - Killing multiple processes by name - Ask Ubuntu
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
This question shows research effort; it is useful and clear 3 Save this question. Show activity on this post. I have a question regarding killing processes that are running (and that I have started) I have started many procesess and now I want to terminate them doing ps aux | grep aword gives me the processes I want to kill. (aword being a word related to the processes) There are a lot so it takes me a while to kill them all I would like to do it faster. Now a peculiarity of these processes is that some have as USER "theuser" and some have "root" I tried and it seems I have to kill first the ones with "theuser" because if I try the roots first , the process comes back to life. So my question is how can I kill all the processes that come out of the grep command above but in the order that first the ones by "theuser" and then the ones with root (which require sudo of course) asked Apr 24, 2023 at 6:01 1 This answer is useful 15 Save this answer. Show activity on this post. You better use pkill ( alone ) for that task: Kill processes by name ( partial/full match ): pkill 'name' Kill processes by name ( exact match ): pkill -x 'name' Kill processes by full command line ( partial/full match ): pkill -f 'command' Kill processes by full command line ( exact match ): pkill -xf 'command' Run it without sudo to attempt to only kill matched processes "kill-able" by the invoking user or with sudo to attempt to kill all matched processes. Notice : A dry-run( i.e. only print matched process IDs without killing them ) can be done with changing pkill to pgrep or pgrep -l and pgrep -a ( respectively, to also print process names and full command lines ) ... For example: pgrep 'name' or: pgrep -l 'name' or: pgrep -lx 'name' or: pgrep -lf 'command` or: pgrep -lxf 'command' The same goes for pgrep -a as well. answered Apr 24, 2023 at 10:15 Start asking to get answers Find the answer to your question by asking. Ask question Explore related questions See similar questions with these tags.
Markdown
# ![site logo](https://stackoverflow.com/Content/Img/SE-logo75.png) By clicking “Sign up”, you agree to our [terms of service](https://askubuntu.com/legal/terms-of-service/public) and acknowledge you have read our [privacy policy](https://askubuntu.com/legal/privacy-policy). # OR Already have an account? [Log in](https://askubuntu.com/users/login) - [Ubuntu](http://www.ubuntu.com/) - [Community](http://community.ubuntu.com/) - [Ask\!](http://askubuntu.com/) - [Developer](http://developer.ubuntu.com/) - [Design](http://design.ubuntu.com/) - [Hardware](http://www.ubuntu.com/certification) - [Insights](http://insights.ubuntu.com/) - [Juju](https://jujucharms.com/) - [Shop](http://shop.ubuntu.com/) - [More ›](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name) - [Apps](http://apps.ubuntu.com/) - [Help](https://help.ubuntu.com/) - [Forum](http://ubuntuforums.org/) - [Launchpad](http://www.launchpad.net/) - [MAAS](http://maas.ubuntu.com/) - [Canonical](http://www.canonical.com/) [Skip to main content](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name#content) #### Stack Exchange Network Stack Exchange network consists of 183 Q\&A communities including [Stack Overflow](https://stackoverflow.com/), the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. [Visit Stack Exchange](https://stackexchange.com/) 1. - [Tour Start here for a quick overview of the site](https://askubuntu.com/tour) - [Help Center Detailed answers to any questions you might have](https://askubuntu.com/help) - [Meta Discuss the workings and policies of this site](https://meta.askubuntu.com/) - [About Us Learn more about Stack Overflow the company, and our products](https://stackoverflow.co/) 2. ### [current community](https://askubuntu.com/) - [Ask Ubuntu](https://askubuntu.com/) [help](https://askubuntu.com/help) [chat](https://chat.stackexchange.com/?tab=site&host=askubuntu.com) - [Ask Ubuntu Meta](https://meta.askubuntu.com/) ### your communities [Sign up](https://askubuntu.com/users/signup?ssrc=site_switcher&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F1464949%2Fkilling-multiple-processes-by-name) or [log in](https://askubuntu.com/users/login?ssrc=site_switcher&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F1464949%2Fkilling-multiple-processes-by-name) to customize your list. ### [more stack exchange communities](https://stackexchange.com/sites) [company blog](https://stackoverflow.blog/) 3. [Log in](https://askubuntu.com/users/login?ssrc=head&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F1464949%2Fkilling-multiple-processes-by-name) 4. [Sign up](https://askubuntu.com/users/signup?ssrc=head&returnurl=https%3A%2F%2Faskubuntu.com%2Fquestions%2F1464949%2Fkilling-multiple-processes-by-name) [![Ask Ubuntu](https://askubuntu.com/Content/Sites/askubuntu/Img/logo.svg?v=472cf2768bba)](https://askubuntu.com/) 1. 1. [Home](https://askubuntu.com/) 2. [Questions](https://askubuntu.com/questions) 3. [Unanswered](https://askubuntu.com/unanswered) 4. [AI Assist](https://stackoverflow.com/ai-assist) 5. [Tags](https://askubuntu.com/tags) 6. [Chat](https://chat.stackexchange.com/) 7. [Users](https://askubuntu.com/users) 8. [Companies](https://stackoverflow.com/jobs/companies?so_medium=askubuntu&so_source=SiteNav) 2. Stack Internal Stack Overflow for Teams is now called **Stack Internal**. Bring the best of human thought and AI automation together at your work. [Try for free](https://stackoverflowteams.com/teams/create/free/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams) [Learn more](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams) 3. [Stack Internal]() 4. Bring the best of human thought and AI automation together at your work. [Learn more](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams-compact) **Stack Internal** Knowledge at work Bring the best of human thought and AI automation together at your work. [Explore Stack Internal](https://stackoverflow.co/internal/?utm_medium=referral&utm_source=askubuntu-community&utm_campaign=side-bar&utm_content=explore-teams-compact-popover) # [Killing multiple processes by name \[duplicate\]](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name) [Ask Question](https://askubuntu.com/questions/ask) Asked 2 years, 11 months ago Modified [2 years, 11 months ago](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name?lastactivity "2023-04-24 14:54:53Z") Viewed 38k times This question shows research effort; it is useful and clear 3 Save this question. Show activity on this post. **This question already has answers here**: [Shell script to -9 kill based on name](https://askubuntu.com/questions/239923/shell-script-to-9-kill-based-on-name) (6 answers) Closed 2 years ago. I have a question regarding killing processes that are running (and that I have started) I have started many procesess and now I want to terminate them doing ``` ps aux | grep aword ``` gives me the processes I want to kill. (aword being a word related to the processes) There are a lot so it takes me a while to kill them all I would like to do it faster. Now a peculiarity of these processes is that some have as USER "theuser" and some have "root" I tried and it seems I *have to* kill first the ones with "theuser" because if I try the roots first , the process comes back to life. So my question is how can I kill all the processes that come out of the grep command above but in the order that first the ones by "theuser" and then the ones with root (which require sudo of course) - [command-line](https://askubuntu.com/questions/tagged/command-line "show questions tagged 'command-line'") - [process](https://askubuntu.com/questions/tagged/process "show questions tagged 'process'") [Share](https://askubuntu.com/q/1464949 "Short permalink to this question") Share a link to this question Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this question](https://askubuntu.com/posts/1464949/edit) Follow Follow this question to receive notifications asked Apr 24, 2023 at 6:01 [![KansaiRobot's user avatar](https://www.gravatar.com/avatar/4b19b54142d820aad565ca95f920c11c?s=64&d=identicon&r=PG)](https://askubuntu.com/users/1047017/kansairobot) [KansaiRobot](https://askubuntu.com/users/1047017/kansairobot) 58555 gold badges1717 silver badges2828 bronze badges 1 - `pgrep` and `pkill` are the tools for this. Read `man pgrep`. Consider doing this in 2 steps - kill the `$USER` processes first, then kill the `root` processes. waltinator – [waltinator](https://askubuntu.com/users/25618/waltinator "1 reputation") 2023-04-24 15:29:01 +00:00 [Commented Apr 24, 2023 at 15:29](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name#comment2565954_1464949) [Add a comment](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name "Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.") \| ## 1 Answer 1 Sorted by: [Reset to default](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name?answertab=scoredesc#tab-top) This answer is useful 15 Save this answer. Show activity on this post. You better use [`pkill`](https://manpages.ubuntu.com/manpages/xenial/en/man1/pgrep.1.html)(*alone*) for that task: - Kill processes by **name**(*partial/full match*): ``` pkill 'name' ``` - Kill processes by **name**(*exact match*): ``` pkill -x 'name' ``` - Kill processes by **full command line**(*partial/full match*): ``` pkill -f 'command' ``` - Kill processes by **full command line**(*exact match*): ``` pkill -xf 'command' ``` Run it without `sudo` to attempt to *only* kill matched processes "kill-able" by the invoking user or with `sudo` to attempt to kill all matched processes. *** **Notice**: A dry-run(*i.e. only print matched process IDs without killing them*) can be done with changing `pkill` to `pgrep` or `pgrep -l` and `pgrep -a`(*respectively, to also print process names and full command lines*) ... For example: ``` pgrep 'name' ``` or: ``` pgrep -l 'name' ``` or: ``` pgrep -lx 'name' ``` or: ``` pgrep -lf 'command` ``` or: ``` pgrep -lxf 'command' ``` The same goes for `pgrep -a` as well. [Share](https://askubuntu.com/a/1465004 "Short permalink to this answer") Share a link to this answer Copy link [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/ "The current license for this post: CC BY-SA 4.0") [Improve this answer](https://askubuntu.com/posts/1465004/edit) Follow Follow this answer to receive notifications [edited Apr 24, 2023 at 14:54](https://askubuntu.com/posts/1465004/revisions "show all edits to this post") answered Apr 24, 2023 at 10:15 [![Raffa's user avatar](https://i.sstatic.net/dSN4e.jpg?s=64)](https://askubuntu.com/users/968501/raffa) [Raffa](https://askubuntu.com/users/968501/raffa) 35\.4k33 gold badges4848 silver badges107107 bronze badges [Add a comment](https://askubuntu.com/questions/1464949/killing-multiple-processes-by-name "Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.") \| Start asking to get answers Find the answer to your question by asking. [Ask question](https://askubuntu.com/questions/ask) Explore related questions - [command-line](https://askubuntu.com/questions/tagged/command-line "show questions tagged 'command-line'") - [process](https://askubuntu.com/questions/tagged/process "show questions tagged 'process'") See similar questions with these tags. - The Overflow Blog - [Prevent agentic identity theft](https://stackoverflow.blog/2026/03/27/prevent-agentic-identity-theft/?cb=1) - [Building shared coding guidelines for AI (and people too)](https://stackoverflow.blog/2026/03/26/coding-guidelines-for-ai-agents-and-people-too/?cb=1) - Featured on Meta - [Should the Community Bot stop bumping questions from EOL releases?](https://meta.askubuntu.com/questions/20776/should-the-community-bot-stop-bumping-questions-from-eol-releases?cb=1) #### Linked [36](https://askubuntu.com/questions/239923/shell-script-to-9-kill-based-on-name?lq=1 "Question score (upvotes - downvotes)") [Shell script to -9 kill based on name](https://askubuntu.com/questions/239923/shell-script-to-9-kill-based-on-name?noredirect=1&lq=1) #### Related [4](https://askubuntu.com/questions/18862/ps-aux-as-non-root-doesnt-show-all-processes?rq=1 "Question score (upvotes - downvotes)") [ps aux as non-root doesn't show all processes](https://askubuntu.com/questions/18862/ps-aux-as-non-root-doesnt-show-all-processes?rq=1) [264](https://askubuntu.com/questions/104903/how-do-i-kill-processes-in-ubuntu?rq=1 "Question score (upvotes - downvotes)") [How do I kill processes in Ubuntu?](https://askubuntu.com/questions/104903/how-do-i-kill-processes-in-ubuntu?rq=1) [11](https://askubuntu.com/questions/199327/how-is-one-supposed-to-stop-chromium-processes?rq=1 "Question score (upvotes - downvotes)") [How is one supposed to stop Chromium processes?](https://askubuntu.com/questions/199327/how-is-one-supposed-to-stop-chromium-processes?rq=1) [0](https://askubuntu.com/questions/320527/defunct-processes-and-their-parent-processes?rq=1 "Question score (upvotes - downvotes)") [defunct processes and their parent processes](https://askubuntu.com/questions/320527/defunct-processes-and-their-parent-processes?rq=1) [2](https://askubuntu.com/questions/752194/how-to-avoid-killing-the-wrong-process-in-a-bash-script?rq=1 "Question score (upvotes - downvotes)") [How to avoid killing the wrong process in a bash script?](https://askubuntu.com/questions/752194/how-to-avoid-killing-the-wrong-process-in-a-bash-script?rq=1) [0](https://askubuntu.com/questions/884965/cant-kill-processes-of-a-user?rq=1 "Question score (upvotes - downvotes)") [Can't kill processes of a user](https://askubuntu.com/questions/884965/cant-kill-processes-of-a-user?rq=1) [0](https://askubuntu.com/questions/946411/high-cpu-load-on-server-with-no-processes-running?rq=1 "Question score (upvotes - downvotes)") [High CPU load on server with no processes running](https://askubuntu.com/questions/946411/high-cpu-load-on-server-with-no-processes-running?rq=1) [2](https://askubuntu.com/questions/1138790/extend-battery-by-killing-unnecessary-services?rq=1 "Question score (upvotes - downvotes)") [Extend battery by killing unnecessary services](https://askubuntu.com/questions/1138790/extend-battery-by-killing-unnecessary-services?rq=1) [1](https://askubuntu.com/questions/1429542/multiple-un-killable-looping-processes-spawning?rq=1 "Question score (upvotes - downvotes)") [Multiple Un-killable Looping Processes Spawning](https://askubuntu.com/questions/1429542/multiple-un-killable-looping-processes-spawning?rq=1) #### [Hot Network Questions](https://stackexchange.com/questions?tab=hot) - [Is the class of all commutator-closed groups closed under subgroups?](https://math.stackexchange.com/questions/5130227/is-the-class-of-all-commutator-closed-groups-closed-under-subgroups) - [If an emoji renders differently on two devices due to compatibility issues, whose interpretation is valid?](https://law.stackexchange.com/questions/114460/if-an-emoji-renders-differently-on-two-devices-due-to-compatibility-issues-whos) - [What is reservation in anticipation of demand?](https://travel.stackexchange.com/questions/203514/what-is-reservation-in-anticipation-of-demand) - [Replacement parts for old sliding glass shower door](https://diy.stackexchange.com/questions/329765/replacement-parts-for-old-sliding-glass-shower-door) - [Getting accurate estimates of TSA line lengths?](https://travel.stackexchange.com/questions/203508/getting-accurate-estimates-of-tsa-line-lengths) - [Number of Solutions to Equations involving Floor Function](https://math.stackexchange.com/questions/5130337/number-of-solutions-to-equations-involving-floor-function) - [Got called back for a job, but haven't received the follow-up call](https://workplace.stackexchange.com/questions/203310/got-called-back-for-a-job-but-havent-received-the-follow-up-call) - [How can I restore the VS Code color theme after update 1.113?](https://stackoverflow.com/questions/79914612/how-can-i-restore-the-vs-code-color-theme-after-update-1-113) - [Acoustically speaking, are Norse "hunting horns" going to sound similar to Jewish shofars?](https://music.stackexchange.com/questions/143408/acoustically-speaking-are-norse-hunting-horns-going-to-sound-similar-to-jewis) - [feature generating strategy](https://datascience.stackexchange.com/questions/137866/feature-generating-strategy) - [how to reliably interface with normally closed/open contacts](https://electronics.stackexchange.com/questions/767442/how-to-reliably-interface-with-normally-closed-open-contacts) - [What are my license obligations when distributing a statically linked executable?](https://opensource.stackexchange.com/questions/15724/what-are-my-license-obligations-when-distributing-a-statically-linked-executable) - [I built a database. What should I do next?](https://stackoverflow.com/questions/79914227/i-built-a-database-what-should-i-do-next) - [What does "he got plucked" mean in "Jane Eyre"?](https://literature.stackexchange.com/questions/31837/what-does-he-got-plucked-mean-in-jane-eyre) - [Which angel saved Shadrach, Mishach, and Abed-nego?](https://judaism.stackexchange.com/questions/155616/which-angel-saved-shadrach-mishach-and-abed-nego) - [How may I construct a doubly augmented basis set?](https://mattermodeling.stackexchange.com/questions/14772/how-may-i-construct-a-doubly-augmented-basis-set) - [When to use fateor and confiteor?](https://latin.stackexchange.com/questions/27144/when-to-use-fateor-and-confiteor) - [In an Ansible INI file, does a blank line break a group?](https://unix.stackexchange.com/questions/805183/in-an-ansible-ini-file-does-a-blank-line-break-a-group) - [Different types of lines in tree diagram](https://tex.stackexchange.com/questions/761312/different-types-of-lines-in-tree-diagram) - [Should I avoid a Dunn's test if my groups have different variability?](https://stats.stackexchange.com/questions/675352/should-i-avoid-a-dunns-test-if-my-groups-have-different-variability) - [Power analysis for determining what amount of time to analyze data](https://stats.stackexchange.com/questions/675374/power-analysis-for-determining-what-amount-of-time-to-analyze-data) - [How idiomatic is the term "library person" in this context?](https://ell.stackexchange.com/questions/374405/how-idiomatic-is-the-term-library-person-in-this-context) - [Which prepositions can be placed before the word « où » ?](https://french.stackexchange.com/questions/58820/which-prepositions-can-be-placed-before-the-word-o%C3%B9) - [Poor shifting after new chain](https://bicycles.stackexchange.com/questions/100108/poor-shifting-after-new-chain) ![](https://askubuntu.com/posts/1464949/ivc/14c8?prg=b4fb301a-944a-4fe5-a8b7-feba691aa22e) # Why are you flagging this comment? It contains harassment, bigotry or abuse. This comment attacks a person or group. Learn more in our [Abusive behavior policy](https://askubuntu.com/conduct/abusive-behavior). It's unfriendly or unkind. This comment is rude or condescending. Learn more in our [Code of Conduct](https://askubuntu.com/conduct/abusive-behavior). Not needed. This comment is not relevant to the post. ``` ``` Enter at least 6 characters Something else. A problem not listed above. Try to be as specific as possible. ``` ``` Enter at least 6 characters Flag comment Cancel You have 0 flags left today # ![Illustration of upvote icon after it is clicked](https://askubuntu.com/Content/Img/modal/img-upvote.png?v=fce73bd9724d) # Hang on, you can't upvote just yet. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. **Upvoting** indicates when questions and answers are useful. [What's reputation and how do I get it?](https://stackoverflow.com/help/whats-reputation) Instead, you can save this post to reference later. Save this post for later Not now ##### [Ask Ubuntu](https://askubuntu.com/) - [Tour](https://askubuntu.com/tour) - [Help](https://askubuntu.com/help) - [Chat](https://chat.stackexchange.com/?tab=site&host=askubuntu.com) - [Contact](https://askubuntu.com/contact) - [Feedback](https://meta.askubuntu.com/) ##### [Company](https://stackoverflow.co/) - [Stack Overflow](https://stackoverflow.com/) - [Stack Internal](https://stackoverflow.co/internal/) - [Stack Data Licensing](https://stackoverflow.co/data-licensing/) - [Stack Ads](https://stackoverflow.co/advertising/) - [About](https://stackoverflow.co/) - [Press](https://stackoverflow.co/company/press/) - [Legal](https://stackoverflow.com/legal) - [Privacy Policy](https://stackoverflow.com/legal/privacy-policy) - [Terms of Service](https://stackoverflow.com/legal/terms-of-service/public) - Cookie Settings - [Cookie Policy](https://policies.stackoverflow.co/stack-overflow/cookie-policy) ##### [Stack Exchange Network](https://stackexchange.com/) - [Technology](https://stackexchange.com/sites#technology) - [Culture & recreation](https://stackexchange.com/sites#culturerecreation) - [Life & arts](https://stackexchange.com/sites#lifearts) - [Science](https://stackexchange.com/sites#science) - [Professional](https://stackexchange.com/sites#professional) - [Business](https://stackexchange.com/sites#business) - [API](https://api.stackexchange.com/) - [Data](https://data.stackexchange.com/) - [Blog](https://stackoverflow.blog/?blb=1) - [Facebook](https://www.facebook.com/officialstackoverflow/) - [Twitter](https://twitter.com/stackoverflow) - [LinkedIn](https://linkedin.com/company/stack-overflow) - [Instagram](https://www.instagram.com/thestackoverflow) Site design / logo © 2026 Stack Exchange Inc; user contributions licensed under [CC BY-SA](https://stackoverflow.com/help/licensing) . rev 2026.3.27.41560 Ubuntu and the circle of friends logo are trade marks of Canonical Limited and are used under licence.
Readable Markdown
This question shows research effort; it is useful and clear 3 Save this question. Show activity on this post. I have a question regarding killing processes that are running (and that I have started) I have started many procesess and now I want to terminate them doing ``` ps aux | grep aword ``` gives me the processes I want to kill. (aword being a word related to the processes) There are a lot so it takes me a while to kill them all I would like to do it faster. Now a peculiarity of these processes is that some have as USER "theuser" and some have "root" I tried and it seems I *have to* kill first the ones with "theuser" because if I try the roots first , the process comes back to life. So my question is how can I kill all the processes that come out of the grep command above but in the order that first the ones by "theuser" and then the ones with root (which require sudo of course) asked Apr 24, 2023 at 6:01 [![KansaiRobot's user avatar](https://www.gravatar.com/avatar/4b19b54142d820aad565ca95f920c11c?s=64&d=identicon&r=PG)](https://askubuntu.com/users/1047017/kansairobot) 1 This answer is useful 15 Save this answer. Show activity on this post. You better use [`pkill`](https://manpages.ubuntu.com/manpages/xenial/en/man1/pgrep.1.html)(*alone*) for that task: - Kill processes by **name**(*partial/full match*): ``` pkill 'name' ``` - Kill processes by **name**(*exact match*): ``` pkill -x 'name' ``` - Kill processes by **full command line**(*partial/full match*): ``` pkill -f 'command' ``` - Kill processes by **full command line**(*exact match*): ``` pkill -xf 'command' ``` Run it without `sudo` to attempt to *only* kill matched processes "kill-able" by the invoking user or with `sudo` to attempt to kill all matched processes. *** **Notice**: A dry-run(*i.e. only print matched process IDs without killing them*) can be done with changing `pkill` to `pgrep` or `pgrep -l` and `pgrep -a`(*respectively, to also print process names and full command lines*) ... For example: ``` pgrep 'name' ``` or: ``` pgrep -l 'name' ``` or: ``` pgrep -lx 'name' ``` or: ``` pgrep -lf 'command` ``` or: ``` pgrep -lxf 'command' ``` The same goes for `pgrep -a` as well. answered Apr 24, 2023 at 10:15 [![Raffa's user avatar](https://i.sstatic.net/dSN4e.jpg?s=64)](https://askubuntu.com/users/968501/raffa) Start asking to get answers Find the answer to your question by asking. [Ask question](https://askubuntu.com/questions/ask) Explore related questions See similar questions with these tags.
Shard53 (laksa)
Root Hash9277990770814737653
Unparsed URLcom,askubuntu!/questions/1464949/killing-multiple-processes-by-name s443