https://github.com/coalaura/sudo
sudo for windows
https://github.com/coalaura/sudo
elevate sudo windows
Last synced: about 1 month ago
JSON representation
sudo for windows
- Host: GitHub
- URL: https://github.com/coalaura/sudo
- Owner: coalaura
- Created: 2024-11-01T15:16:01.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-07-09T23:19:19.000Z (11 months ago)
- Last Synced: 2025-07-10T09:19:59.422Z (11 months ago)
- Topics: elevate, sudo, windows
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sudo For Windows
Ever wanted to `sudo` on Windows? Now you can! This tool, simply called sudo, brings the familiar `sudo` functionality to Windows, allowing you to run any command with elevated privileges—no more fiddling with right-click menus or navigating through the UAC dialog manually. Just type `sudo ` in your terminal, and it takes care of the rest.
## Features
- **Runs Commands as Admin:** Just like `sudo` on Linux, this tool checks if the current terminal session is elevated. If not, it prompts for admin privileges and runs your command in the specified directory.
- **Session Persistence:** Already elevated? `sudo` detects it and skips the re-elevation step, running your command directly.
- **Seamless Directory Management:** `sudo` ensures your commands execute in the current working directory, whether you’re elevated or not.
- **`su` Mode:** For those who just want an admin shell, running `sudo su` gives you an elevated terminal window without extra commands.
## Usage
To run a command in an elevated context (*automatically appends `&& pause && exit`*):
```bash
sudo [arguments...]
```
You can also chain commands with `;`:
```bash
# Runs `echo "hello" && echo "world"` in elevated context
sudo echo "hello"; echo "world"
```
Or to just get an admin shell:
```bash
sudo su
```