Reputation: 51
After selecting WSL as my default terminal in Visual Studio code, I am unable to open up a terminal window. The terminal window opens, random text appears on the screen, and then the terminal closes with an error message that says: "The terminal process terminated with exit code: 4294967295".
Does anyone know why this is? I have looked at some of the vscode github issue posts, but I can't seem to make anything work.
See screenshot of my settings.json file and a gif of what is happening below:
Upvotes: 5
Views: 11382
Reputation: 163
On vscode 1.85.1, is working just by adding in my settings:
"terminal.integrated.defaultProfile.windows": "Ubuntu (WSL)",
Upvotes: 0
Reputation: 4822
When try to open WSL from VSCode was getting error
The terminal process "C:\WINDOWS\System32\wsl.exe" terminated with exit code: 4294967295.
Similar error when tried to execute C:\WINDOWS\System32\wsl.exe from Windows Console (cmd.exe)
Did a WSL shutdown from Windows Console (wsl --shutdown) and got the popup below. Re-started Docker and could open WSL from VS Code.
Upvotes: 1
Reputation: 1069
Similar issue as in https://stackoverflow.com/a/70035055/5078874
Instead of terminal.integrated.shell.windows
.
Use setting like this: "terminal.external.windowsExec": "wsl.exe"
Upvotes: 0
Reputation: 177
Answer updated for vs code 1.56.2. I started seeing a warning in my Settings.json. Here's how I managed to do this:
Settings.json:
"terminal.integrated.defaultProfile.windows": "WSL",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [],
"icon": "terminal-cmd"
},
"Git Bash": {
"source": "Git Bash"
},
"WSL": {
"path": [
"C:\\WINDOWS\\System32\\wsl.exe"
],
"args": [],
"icon": "terminal-ubuntu-wsl"
}
},
Upvotes: 4
Reputation: 11
I have the same problem, here is how i fix it
Upvotes: 0
Reputation: 1085
if you have a line in the settings.json file like this
"terminal.integrated.shellArgs.windows": ["--login", "-i"],
just remove it, or comment out this line to be like this
//"terminal.integrated.shellArgs.windows": ["--login", "-i"],
Finally, change the terminal.integrated.shell.windows settings to be like this
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\wsl.exe",
Upvotes: 4
Reputation: 27
Open your settings.json file and change the line to:
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
Upvotes: 0
Reputation: 1
This problem might occur when you don't have Ubuntu or any other linux installed in system.
You can install Ubuntu through Microsoft store in Windows:
https://www.youtube.com/watch?v=wM-wBciLeDw
Upvotes: 0