It's particularly frustrating because most Linux distributions fixed this a long time ago: the sudo command. Basically, on Linux, if you need to run a single command as an administrator you can just put "sudo" at the beginning and run it—you're asked for an administrator password and the process runs. It's such a useful feature that it even inspired one of the most famous XKCD comics.
Anyway: this pseudo-sudo feature is included with Windows 11 version 24H2, released in October 2024 and still rolling out to Windows users as of February 2025. You can check whether you have access to the feature by opening System Settings and heading to System > For developers. Scroll down and you'll see the option to enable sudo (if you don't see the option, you're not using 24H2).
Credit: Justin PotUsing the feature is straightforward: when running a command that requires administrator privileges, start with sudo. You will see a pop-up asking to confirm.
Credit: Justin PotClick Yes and the command will run as administrator. That's really it: just put sudo at the beginning of your commands to run as administrator.
Credit: Justin PotThere are reasons Microsoft's sudo may not work for you. Maybe you're not yet using the 24H2 version of Windows. Maybe you can't get sudo working with the applications you're trying. Or maybe you just want to quickly change your current session into an elevated session. If so, gsudo might work better for you. This open source tool is recommended in Microsoft's documentation as offering features more similar to the Linux version of sudo and can quickly be installed using the winget package manager.
Read More Details
Finally We wish PressBee provided you with enough information of ( Windows Finally Has a 'Sudo'-Style Command Too )
Also on site :