When I open VS Code, the default terminal is PowerShell and the default path is PS E:\Research\GM\Articles\Modularity\Covariance network\Graph theory\Metric basics\Consensus clustering\clustering_programs_5_2
.
Q1: How could I change the default path in PowerShell to C:\Users<UserName>? (red line below)
Q2: How could I change the default terminal from PowerShell to cmd? (yellow circle below)
#############################################################################
I followed Geeky's method which worked well. However, the default path is still E:\Research\GM\Articles\Modularity\Covariance network\Graph theory\Metric basics\Consensus clustering\clustering_programs_5_2
rather than something like C:\Users<UserName>
:
CodePudding user response:
Press Ctrl Shift P. Type "def" and the default terminal selection option pops.
Click on it and select your preferred terminal
Alternatively, add this in your settings.json
file
"terminal.integrated.defaultProfile.windows": "Command Prompt",
If the following code exists already in your settings.json
file or else add the following code also
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell",
"path": "C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
},
"Command Prompt": {
"path": ["${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe"],
"args": [],
"icon": "terminal-cmd"
},
}