'Change default terminal in VS Code to cmd

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) enter image description here

############################################################################# 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>: enter image description here



Solution 1:[1]

Press Ctrl + Shift + P. Type "def" and the default terminal selection option pops.
enter image description here

Click on it and select your preferred terminal
enter image description here


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"
    },
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Geeky Quentin