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.
ubuntu scripting process ps
add a comment |
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.
ubuntu scripting process ps
add a comment |
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.
ubuntu scripting process ps
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
ubuntu scripting process ps
edited yesterday
Stephen Kitt
162k24362440
162k24362440
asked yesterday
Noshiii
2717
2717
add a comment |
add a comment |
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.
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
Yourscript
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 betweenterminal
,shell
andterminal 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
|
show 1 more comment
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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.
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
Yourscript
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 betweenterminal
,shell
andterminal 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
|
show 1 more comment
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.
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
Yourscript
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 betweenterminal
,shell
andterminal 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
|
show 1 more comment
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.
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.
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
Yourscript
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 betweenterminal
,shell
andterminal 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
|
show 1 more comment
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
Yourscript
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 betweenterminal
,shell
andterminal 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
|
show 1 more comment
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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