1

So I recently installed the newest version of Linux Mint, some necessary packages ... Everything worked fine until I open my terminal inside a folder in Visual studio code.

It shows sh-4.4$ and no command works. For example when I open a normal terminal and type npm it shows all commands for npm but in my VScode terminal this command is not found.

Edit: I tried setting the default terminal to bash, but this doesn't solve the problem.

example

ruttydm
  • 671
  • 2
  • 8
  • 15
  • Possible duplicate of [VSCode Change Default Terminal](https://stackoverflow.com/questions/44435697/vscode-change-default-terminal) – brunorey Jan 31 '19 at 19:38
  • Open your configuration and change your terminal to `bash` or whatever you want. You can use `echo $SHELL` in your other terminal to see which one you are running. – brunorey Jan 31 '19 at 19:39
  • @brunorey I tried setting it to bash + reloading everything but this doesn't solve the problem. The other shell's output is /bin/bash – ruttydm Jan 31 '19 at 19:46
  • "No commands work"? Shell builtins will *definitely* work. `echo "$PATH"`, for instance -- `echo` is part of the shell itself, so it'll always be found. And once you've got that, you can assign a new/correct PATH so the shell knows how to find other commands. – Charles Duffy Jan 31 '19 at 20:40
  • (Well, the above was said before realizing you're using flatpack; that changes things a bit -- shell builtins will still work, but you may not have access to the rest of the filesystem). – Charles Duffy Jan 31 '19 at 20:43

1 Answers1

4

Ok, It seems I downloaded the unofficial vscode package from the software center (a flatpack). I tried installing the official vscode from the website and now everything works.

ruttydm
  • 671
  • 2
  • 8
  • 15
  • 2
    flatpack sandboxes applications it installs so they can't run things they're not supposed to. Even though it doesn't do so in a way that's robust/reliable against an attacker who's marginally competent, it's still enough to make your life unpleasant if you're trying to run arbitrary subprocesses of a program thus distributed. – Charles Duffy Jan 31 '19 at 20:42