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

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

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

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay