Trying to identify the path to the default shell in my environment, using:
echo $shellHowever, when I run this, I get a blank response. The system runs for about 5 seconds, then returns nothing in the next line, followed by the command prompt again.
Any ideas what this means, and how do I find the path?
BTW, there is meant to be a path visible if I type that command.
Edit:
Tried echo $SHELL and got the same response from the system.
1 Answer
Its possible to read "shell" directly from passwd file:
echo $( getent passwd "${USER}" | cut -d: -f7 )