How would I run the following command in windows:
$ sudo django-admin.py startproject NEW
?
17 Answers
There is no sudo command in Windows. The nearest equivalent is "run as administrator."
You can do this using the runas command with an administrator trust-level, or by right-clicking the program in the UI and choosing "run as administrator."
All the answers explain how to elevate your command in a new console host. So, I wrote: gsudo to behave like Unix/Linux sudo, allowing to execute the command inside the current console.
gsudo
- Source Code, Documentation, and Releases available at:
Most relevant features:
- Elevates in the current console (no new window)
- Elevates
cmdcommands, but also PowerShell / WSL / Git-Bash / cygwin / Msys / commands natively. - Optional: Credentials Cache (Elevate many times with only one UAC popup)
Installation
- Using scoop:
scoop install gsudo - Using Chocolatey:
choco install gsudo - Using Winget:
winget install gerardog.gsudo - Manually: Download the latest release, unzip, and add to path, from