ps is not showing all processes

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1














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




























    1














    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


























      1












      1








      1







      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 Dec 18 at 18:12









      Stephen Kitt

      164k24365444




      164k24365444










      asked Dec 18 at 17:51









      Noshiii

      2717




      2717




















          1 Answer
          1






          active

          oldest

          votes


















          3














          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
            Dec 18 at 17:58










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            Dec 18 at 17:59










          • 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
            Dec 18 at 18:01










          • 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
            Dec 18 at 18:09











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










          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









          3














          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
            Dec 18 at 17:58










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            Dec 18 at 17:59










          • 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
            Dec 18 at 18:01










          • 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
            Dec 18 at 18:09











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















          3














          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
            Dec 18 at 17:58










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            Dec 18 at 17:59










          • 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
            Dec 18 at 18:01










          • 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
            Dec 18 at 18:09











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













          3












          3








          3






          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 Dec 18 at 18:20

























          answered Dec 18 at 17:54









          Stephen Kitt

          164k24365444




          164k24365444











          • 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
            Dec 18 at 17:58










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            Dec 18 at 17:59










          • 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
            Dec 18 at 18:01










          • 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
            Dec 18 at 18:09











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
















          • 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
            Dec 18 at 17:58










          • the script process is running on the same shell on which i typed ps , still it is not showing this process
            – Noshiii
            Dec 18 at 17:59










          • 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
            Dec 18 at 18:01










          • 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
            Dec 18 at 18:09











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















          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
          Dec 18 at 17:58




          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
          Dec 18 at 17:58












          the script process is running on the same shell on which i typed ps , still it is not showing this process
          – Noshiii
          Dec 18 at 17:59




          the script process is running on the same shell on which i typed ps , still it is not showing this process
          – Noshiii
          Dec 18 at 17:59












          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
          Dec 18 at 18:01




          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
          Dec 18 at 18:01












          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
          Dec 18 at 18:09





          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
          Dec 18 at 18:09













          That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
          – Stephen Kitt
          Dec 18 at 18:13




          That’s explained here — the answers may seem daunting but it’s worth taking the time to read them.
          – Stephen Kitt
          Dec 18 at 18:13

















          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

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?