Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Dec 252010

How do I know if I am running a shell inside another shell?


We can enter another a shell from a current shell, e.g. enter sh from a bash. To show the current "shell stack", you can use the pstree command.

# pstree -p | grep bash


 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>