ps is not showing all processes











up vote
1
down vote

favorite












I used the script command immediately after I started the terminal, it started recording my current session but when i used ps command after that it is showing only two processes, one for bash and one for ps itself but it is not showing any process for the script command that is running in the background, why is it so? Speaking in a more general way actually I have never seen the ps command showing more than 2 processes on my terminal, is there something wrong with my shell or terminal settings? I am currently using Ubuntu.










share|improve this question




























    up vote
    1
    down vote

    favorite












    I used the script command immediately after I started the terminal, it started recording my current session but when i used ps command after that it is showing only two processes, one for bash and one for ps itself but it is not showing any process for the script command that is running in the background, why is it so? Speaking in a more general way actually I have never seen the ps command showing more than 2 processes on my terminal, is there something wrong with my shell or terminal settings? I am currently using Ubuntu.










    share|improve this question


























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I used the script command immediately after I started the terminal, it started recording my current session but when i used ps command after that it is showing only two processes, one for bash and one for ps itself but it is not showing any process for the script command that is running in the background, why is it so? Speaking in a more general way actually I have never seen the ps command showing more than 2 processes on my terminal, is there something wrong with my shell or terminal settings? I am currently using Ubuntu.










      share|improve this question















      I used the script command immediately after I started the terminal, it started recording my current session but when i used ps command after that it is showing only two processes, one for bash and one for ps itself but it is not showing any process for the script command that is running in the background, why is it so? Speaking in a more general way actually I have never seen the ps command showing more than 2 processes on my terminal, is there something wrong with my shell or terminal settings? I am currently using Ubuntu.







      ubuntu scripting process ps






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited yesterday









      Stephen Kitt

      162k24362440




      162k24362440










      asked yesterday









      Noshiii

      2717




      2717






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          There is nothing wrong with your terminal or your shell. By default, ps shows processes with the same effective user identifier as the user running it, and associated with the same terminal. This typically results in only two processes showing up: the current shell, and ps itself. If there are any background processes associated with the current terminal, they will show up too; you can see this by running



          sleep 120 &
          ps


          To see all processes, run



          ps -e


          There are a number of other process selection flags, see man ps on your system for details.



          When you run script, it allocates a new terminal and starts a new shell; so ps inside script is running on a different terminal (even though it’s in the same terminal window on your system, or on the same virtual console). That’s why you don’t see script. You can see this happen by running tty before and after running script: you’ll see it output two different values.






          share|improve this answer























          • hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
            – Noshiii
            yesterday










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            yesterday










          • Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
            – Stephen Kitt
            yesterday










          • thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
            – Noshiii
            yesterday












          • That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
            – Stephen Kitt
            yesterday











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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%2funix.stackexchange.com%2fquestions%2f489732%2fps-is-not-showing-all-processes%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








          up vote
          3
          down vote



          accepted










          There is nothing wrong with your terminal or your shell. By default, ps shows processes with the same effective user identifier as the user running it, and associated with the same terminal. This typically results in only two processes showing up: the current shell, and ps itself. If there are any background processes associated with the current terminal, they will show up too; you can see this by running



          sleep 120 &
          ps


          To see all processes, run



          ps -e


          There are a number of other process selection flags, see man ps on your system for details.



          When you run script, it allocates a new terminal and starts a new shell; so ps inside script is running on a different terminal (even though it’s in the same terminal window on your system, or on the same virtual console). That’s why you don’t see script. You can see this happen by running tty before and after running script: you’ll see it output two different values.






          share|improve this answer























          • hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
            – Noshiii
            yesterday










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            yesterday










          • Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
            – Stephen Kitt
            yesterday










          • thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
            – Noshiii
            yesterday












          • That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
            – Stephen Kitt
            yesterday















          up vote
          3
          down vote



          accepted










          There is nothing wrong with your terminal or your shell. By default, ps shows processes with the same effective user identifier as the user running it, and associated with the same terminal. This typically results in only two processes showing up: the current shell, and ps itself. If there are any background processes associated with the current terminal, they will show up too; you can see this by running



          sleep 120 &
          ps


          To see all processes, run



          ps -e


          There are a number of other process selection flags, see man ps on your system for details.



          When you run script, it allocates a new terminal and starts a new shell; so ps inside script is running on a different terminal (even though it’s in the same terminal window on your system, or on the same virtual console). That’s why you don’t see script. You can see this happen by running tty before and after running script: you’ll see it output two different values.






          share|improve this answer























          • hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
            – Noshiii
            yesterday










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            yesterday










          • Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
            – Stephen Kitt
            yesterday










          • thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
            – Noshiii
            yesterday












          • That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
            – Stephen Kitt
            yesterday













          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          There is nothing wrong with your terminal or your shell. By default, ps shows processes with the same effective user identifier as the user running it, and associated with the same terminal. This typically results in only two processes showing up: the current shell, and ps itself. If there are any background processes associated with the current terminal, they will show up too; you can see this by running



          sleep 120 &
          ps


          To see all processes, run



          ps -e


          There are a number of other process selection flags, see man ps on your system for details.



          When you run script, it allocates a new terminal and starts a new shell; so ps inside script is running on a different terminal (even though it’s in the same terminal window on your system, or on the same virtual console). That’s why you don’t see script. You can see this happen by running tty before and after running script: you’ll see it output two different values.






          share|improve this answer














          There is nothing wrong with your terminal or your shell. By default, ps shows processes with the same effective user identifier as the user running it, and associated with the same terminal. This typically results in only two processes showing up: the current shell, and ps itself. If there are any background processes associated with the current terminal, they will show up too; you can see this by running



          sleep 120 &
          ps


          To see all processes, run



          ps -e


          There are a number of other process selection flags, see man ps on your system for details.



          When you run script, it allocates a new terminal and starts a new shell; so ps inside script is running on a different terminal (even though it’s in the same terminal window on your system, or on the same virtual console). That’s why you don’t see script. You can see this happen by running tty before and after running script: you’ll see it output two different values.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited yesterday

























          answered yesterday









          Stephen Kitt

          162k24362440




          162k24362440












          • hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
            – Noshiii
            yesterday










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            yesterday










          • Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
            – Stephen Kitt
            yesterday










          • thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
            – Noshiii
            yesterday












          • That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
            – Stephen Kitt
            yesterday


















          • hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
            – Noshiii
            yesterday










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            yesterday










          • Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
            – Stephen Kitt
            yesterday










          • thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
            – Noshiii
            yesterday












          • That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
            – Stephen Kitt
            yesterday
















          hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
          – Noshiii
          yesterday




          hey man i am not able to understand your answer, can you explain in more easy way ,sorry i am a newbie in LINUX
          – Noshiii
          yesterday












          the script process is running on the same shell on which i typed ps , still it is not showing this process
          – Noshiii
          yesterday




          the script process is running on the same shell on which i typed ps , still it is not showing this process
          – Noshiii
          yesterday












          Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
          – Stephen Kitt
          yesterday




          Your script process is running in the same terminal window, but it’s not running the same shell and it’s not running in the same terminal. I’ll revisit my answer in a little while to explain things further, if no one else beats me to it.
          – Stephen Kitt
          yesterday












          thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
          – Noshiii
          yesterday






          thank you so much i get it , just one last thing can you please explain the difference between terminal ,shell and terminal window i am a bit confused
          – Noshiii
          yesterday














          That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
          – Stephen Kitt
          yesterday




          That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
          – Stephen Kitt
          yesterday


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • 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%2funix.stackexchange.com%2fquestions%2f489732%2fps-is-not-showing-all-processes%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

          サソリ

          広島県道265号伴広島線

          Setup Asymptote in Texstudio