I am trying to set my steamdeck for doing some coding. I installed VS Code from Discover store but for some reason I cannot set it to run bash in terminal. it only runs sh. The main problem is that I cannot use pacman, docker or distrobox that I installed through Konsole.
Adding this
"terminal.integrated.defaultProfile.linux": "bash"
to the settings.json it creates terminal that is labeled bash but
echo $SHELL
gives me /bin/sh
I also tried this
"terminal.integrated.shell.linux": "bash"
but it seems that VS code on arch does not recognize this option.
If I add just this VS Code is running terminal labeled sh
and gives same result for echo $SHELL
.
Running /bin/bash
also does not help(gives same result for echo $SHELL
) but no errors.
$SHELL
environment variable only indicates the default shell that is set for the active user.
So echo $SHELL
does not necessarily reflect the shell running in your current terminal session. Which means you can start other shell and that will not update $SHELL
environment variable, which reflects only default shell for your user. It could be modified explicitly if you want to do so.
Regardless on that, to check what is your current active shell in terminal session, type:
echo $0
or eventually
ps -p $$
You also have to have right shells installed and supported which you can check with:
cat /etc/shells
Regarding vscode, it should be enough to set "terminal.integrated.defaultProfile.linux": "bash"
in the settings.json
, but make sure you exit
and start the integrated terminal again after the change is applied.