August 23, 2016

The method of checking available shell and shell depth

❑ Checking Available shells : cat /etc/shells

❑ Environment variable for recording depth of shell : SHLVL(=SHell LeVeL)

FYI.
1. Checking Shell depth : env | grep SH
2. SHLVL = 1 is a state that only login-shell is executed
3. Based on Ubuntu