How to determine the subshell 'level' in bash?

by dCSeven   Last Updated March 14, 2019 20:00 PM - source

When entering subshells in bash with e.g. su, bash, vim (:sh command there), I occasionally find myself in a situation, where I don't know how deep I went (i.e how often I am allowed to exit to be at a specific position; reminds me a bit of the film Inception;) ).

Is there any tool that can show this subshell list/tree?

Tags : linux bash

Answers 1

You could use command pstree. It shows process tree. Example: Process tree with different shells

Alexander Tolkachev
Alexander Tolkachev
March 14, 2019 19:55 PM

Related Questions

Stop ssh login from printing motd from the client?

Updated April 16, 2015 05:00 AM

How to save + close file when editing in bash?

Updated March 31, 2015 06:00 AM

How to run a command multiple times?

Updated June 16, 2015 10:00 AM

How can I sort du -h output by size

Updated August 23, 2015 19:00 PM

Bash move and rename folders

Updated August 31, 2015 19:00 PM