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 …


This content originally appeared on DEV Community and was authored by Aashutosh Poudel

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


This content originally appeared on DEV Community and was authored by Aashutosh Poudel


Print Share Comment Cite Upload Translate Updates
APA

Aashutosh Poudel | Sciencx (2022-05-04T21:41:44+00:00) Adding sudo to windows. Retrieved from https://www.scien.cx/2022/05/04/adding-sudo-to-windows/

MLA
" » Adding sudo to windows." Aashutosh Poudel | Sciencx - Wednesday May 4, 2022, https://www.scien.cx/2022/05/04/adding-sudo-to-windows/
HARVARD
Aashutosh Poudel | Sciencx Wednesday May 4, 2022 » Adding sudo to windows., viewed ,<https://www.scien.cx/2022/05/04/adding-sudo-to-windows/>
VANCOUVER
Aashutosh Poudel | Sciencx - » Adding sudo to windows. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/05/04/adding-sudo-to-windows/
CHICAGO
" » Adding sudo to windows." Aashutosh Poudel | Sciencx - Accessed . https://www.scien.cx/2022/05/04/adding-sudo-to-windows/
IEEE
" » Adding sudo to windows." Aashutosh Poudel | Sciencx [Online]. Available: https://www.scien.cx/2022/05/04/adding-sudo-to-windows/. [Accessed: ]
rf:citation
» Adding sudo to windows | Aashutosh Poudel | Sciencx | https://www.scien.cx/2022/05/04/adding-sudo-to-windows/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.