Why do I often receieve `no such process` in response to a process I want to kill?












1















me@me:~$ ps aux | grep -i firefox
me 15413 0.0 0.0 14428 1036 pts/1 S+ 05:46 0:00 grep --color=auto -i firefox
me@me:~$ kill 15413
bash: kill: (15413) - No such process


Why might this happen, or what am I doing wrong?










share|improve this question













migrated from stackoverflow.com Jan 7 at 17:15


This question came from our site for professional and enthusiast programmers.























    1















    me@me:~$ ps aux | grep -i firefox
    me 15413 0.0 0.0 14428 1036 pts/1 S+ 05:46 0:00 grep --color=auto -i firefox
    me@me:~$ kill 15413
    bash: kill: (15413) - No such process


    Why might this happen, or what am I doing wrong?










    share|improve this question













    migrated from stackoverflow.com Jan 7 at 17:15


    This question came from our site for professional and enthusiast programmers.





















      1












      1








      1








      me@me:~$ ps aux | grep -i firefox
      me 15413 0.0 0.0 14428 1036 pts/1 S+ 05:46 0:00 grep --color=auto -i firefox
      me@me:~$ kill 15413
      bash: kill: (15413) - No such process


      Why might this happen, or what am I doing wrong?










      share|improve this question














      me@me:~$ ps aux | grep -i firefox
      me 15413 0.0 0.0 14428 1036 pts/1 S+ 05:46 0:00 grep --color=auto -i firefox
      me@me:~$ kill 15413
      bash: kill: (15413) - No such process


      Why might this happen, or what am I doing wrong?







      linux bash grep kill ps






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 7 at 11:54









      RulentRulent

      63




      63




      migrated from stackoverflow.com Jan 7 at 17:15


      This question came from our site for professional and enthusiast programmers.









      migrated from stackoverflow.com Jan 7 at 17:15


      This question came from our site for professional and enthusiast programmers.
























          1 Answer
          1






          active

          oldest

          votes


















          7














          Do you see what process it was?



          me     15413  0.0  0.0  14428  1036 pts/1    S+   05:46   0:00 grep --color=auto -i firefox
          ~~~~


          It was the grep itself, it had already finished when you got the prompt back, so there was nothing to kill. Use psgrep for searching in the running processes, or at least use the "square brackets first character" trick



          ps aux | grep -i '[f]irefox'


          to exclude the grep from the match.






          share|improve this answer
























          • Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

            – Rulent
            Jan 7 at 13:49











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391562%2fwhy-do-i-often-receieve-no-such-process-in-response-to-a-process-i-want-to-kil%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          7














          Do you see what process it was?



          me     15413  0.0  0.0  14428  1036 pts/1    S+   05:46   0:00 grep --color=auto -i firefox
          ~~~~


          It was the grep itself, it had already finished when you got the prompt back, so there was nothing to kill. Use psgrep for searching in the running processes, or at least use the "square brackets first character" trick



          ps aux | grep -i '[f]irefox'


          to exclude the grep from the match.






          share|improve this answer
























          • Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

            – Rulent
            Jan 7 at 13:49
















          7














          Do you see what process it was?



          me     15413  0.0  0.0  14428  1036 pts/1    S+   05:46   0:00 grep --color=auto -i firefox
          ~~~~


          It was the grep itself, it had already finished when you got the prompt back, so there was nothing to kill. Use psgrep for searching in the running processes, or at least use the "square brackets first character" trick



          ps aux | grep -i '[f]irefox'


          to exclude the grep from the match.






          share|improve this answer
























          • Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

            – Rulent
            Jan 7 at 13:49














          7












          7








          7







          Do you see what process it was?



          me     15413  0.0  0.0  14428  1036 pts/1    S+   05:46   0:00 grep --color=auto -i firefox
          ~~~~


          It was the grep itself, it had already finished when you got the prompt back, so there was nothing to kill. Use psgrep for searching in the running processes, or at least use the "square brackets first character" trick



          ps aux | grep -i '[f]irefox'


          to exclude the grep from the match.






          share|improve this answer













          Do you see what process it was?



          me     15413  0.0  0.0  14428  1036 pts/1    S+   05:46   0:00 grep --color=auto -i firefox
          ~~~~


          It was the grep itself, it had already finished when you got the prompt back, so there was nothing to kill. Use psgrep for searching in the running processes, or at least use the "square brackets first character" trick



          ps aux | grep -i '[f]irefox'


          to exclude the grep from the match.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 7 at 12:16









          chorobachoroba

          13.2k13341




          13.2k13341













          • Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

            – Rulent
            Jan 7 at 13:49



















          • Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

            – Rulent
            Jan 7 at 13:49

















          Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

          – Rulent
          Jan 7 at 13:49





          Ah, I did not notice that. It has my command attached to the end of it. --color=auto is aliased into my grep, which I didn't think of and sort of didn't read that as what it was. I'm getting used to sifting through a lot of excess information that I often unintentionally disregard some things to find what I'm looking for. I'm still getting the hang of where what I'm looking for is located sometimes. Typically processes that I need killed, I cannot find the means to kill them though and just do a reboot. It's not often though. I will try some of those commands.

          – Rulent
          Jan 7 at 13:49


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Super User!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1391562%2fwhy-do-i-often-receieve-no-such-process-in-response-to-a-process-i-want-to-kil%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Paul Cézanne

          UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

          Angular material date-picker (MatDatepicker) auto completes the date on focus out