DEV Community

Aashutosh Poudel
Aashutosh Poudel

Posted on

4 2

Adding sudo to windows

It is sometimes annoying to open a terminal in windows with elevated privileges as you have to rely on some form of GUI to select the option Run as Admin. In Linux we can just open the terminal with a hotkey and then get root access straight with sudo from the same terminal.

In windows, there's a tool called gsudo that allows us to turn our normal cmd or powershell terminal into an administrative terminal just like sudo does in Linux. So, we just prepend whatever command we like to run with gsudo and it will show us a User Access Control(UAC) pop-up where we can insert our username and password. Usage

To make gsudo work more like sudo in linux, we can enable credentials cache that will show less UAC popups just like in Linux where sudo remembers your password for 15 minutes by default.

gsudo config CacheMode Auto
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay