So I initially used windows, but recently decided to switch to linux. In windows, my vscode terminal look like this:
It shows which directory I am in. But when i try vscode in linux, i get this on run:
It shows nothing but sh-5.1
, which i don’t know what is it. And when i run a simple c program:
the output is on the same line as the sh-5.1
. How to change the terminal to look like in windows? (not exactly the same, I mean at least show the directory and generate a newline when done running program)
2
Answers
You can simply write:
to your console since bash shell is the closest one to what you want. Your current shell is sh. To switch back to sh, you can write sh again. To see other available shells in your computer, you can write:
cat /etc/shells
If you don’t have bash installed on your computer (which is pretty unlikely), you can install it by:
If you want to fix it on the VSCode terminal or make it stay that way, go to Settings. Type ‘Linux exec’ in the search bar. You should see ‘Terminal > External Linux Exec.’ Change it to your preferred terminal, like mine, gnome-terminal
you should see this
Change it to your preferred terminal.