In CentOS 7, when I execute:
export PS1="NewPrompt: "
bash
The prompt “NewPrompt” remains the same in the subshell.
I verify I’m in a subshell with the command:
echo $SHLVL
that returns “2”.
I believe that this is the expected behaviour.
However, when I repeat the same commands in Ubuntu 18.04, the “NewPrompt” doesn’t remain in the subshell.
I was testing this behaviour as part of my LPIC-1 training.
Is there a workaround for getting the “NewPrompt” to stay in a subshell in Ubuntu 18.04?