We can run something like chsh -s /usr/local/bin/zsh
to set a new default shell. Is there a command we can run to know what that shell is?
I don’t mean having a terminal open and running a command to know which shell we’re in. I mean like in the example above, if I’m in a terminal with /bin/bash
open, what should I run to get /usr/local/bin/zsh
if it’s the current default shell?
In most Linux systems, the default shell is bash but we can change that to any other shell-like zsh, fish, sh, and any other.
Hold the Ctrl key, click your user account's name in the left pane, and select “Advanced Options.” Click the “Login Shell” dropdown box and select “/bin/bash” to use Bash as your default shell or “/bin/zsh” to use Zsh as your default shell. Click “OK” to save your changes.
You can use the following command:
echo $SHELL
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With