All Projects → imachug → win-sudo

imachug / win-sudo

Licence: MIT license
Add `sudo` command to Git Bash

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to win-sudo

Suda.vim
🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows
Stars: ✭ 247 (+70.34%)
Mutual labels:  sudo
please
please, a sudo clone
Stars: ✭ 40 (-72.41%)
Mutual labels:  sudo
go-gtfo
gtfo, now with the speed of golang
Stars: ✭ 59 (-59.31%)
Mutual labels:  sudo
fakesudo
sudo almost as fake as your ma
Stars: ✭ 15 (-89.66%)
Mutual labels:  sudo
Mis-Comandos-Linux
📋 Lista descrita de mis 💯 comandos favoritos ⭐ en GNU/Linux 💻
Stars: ✭ 28 (-80.69%)
Mutual labels:  sudo
fdk-aac-win32-builder
libfdk-aac for Windows binary builder
Stars: ✭ 25 (-82.76%)
Mutual labels:  mingw
Sudo
Development repository for sudo cookbook
Stars: ✭ 113 (-22.07%)
Mutual labels:  sudo
dotfiles
Cross platform home directory settings
Stars: ✭ 17 (-88.28%)
Mutual labels:  sudo
paternoster
Paternoster allows you to run Ansible playbooks like ordinary Python or Bash scripts.
Stars: ✭ 121 (-16.55%)
Mutual labels:  sudo
build-scripts
Utility scripts for building of 3rd-party libraries
Stars: ✭ 33 (-77.24%)
Mutual labels:  mingw
ssu
Extremely simple su utility
Stars: ✭ 56 (-61.38%)
Mutual labels:  sudo
getroot
🛠️ Tool to bypass my school's security system to get sudo privileges on MacOS
Stars: ✭ 34 (-76.55%)
Mutual labels:  sudo
docker-go-mingw
Docker image for building Go binaries with MinGW toolchain
Stars: ✭ 33 (-77.24%)
Mutual labels:  mingw
sudosh
Shell wrapper to run a login shell with `sudo` as the current user for the purpose of audit logging
Stars: ✭ 87 (-40%)
Mutual labels:  sudo
ubuntu-vnc-xfce-g3
Headless Ubuntu/Xfce containers with VNC/noVNC (Generation 3)
Stars: ✭ 83 (-42.76%)
Mutual labels:  sudo
Sudo
Order bash to do things by shouting.
Stars: ✭ 155 (+6.9%)
Mutual labels:  sudo
ansible-role-admin-users
Ansible role to manage admin users, authorized keys and sudo access.
Stars: ✭ 18 (-87.59%)
Mutual labels:  sudo
pam pwnd
A PAM module to test passwords against previous leaks at haveibeenpwned.com
Stars: ✭ 33 (-77.24%)
Mutual labels:  sudo
suex
execute commands as another user
Stars: ✭ 39 (-73.1%)
Mutual labels:  sudo
become-root
minimal tool for creating a new user namespace with multiple UIDs/GIDs mapped inside
Stars: ✭ 33 (-77.24%)
Mutual labels:  sudo

win-sudo

If we open msysgit as administrator, we can use it as if we were root. However, it is often easier to open without administrator privileges.

Well, Git comes with Bash emulator and you can use *nix commands. "sudo" and "apt-get" are not such - there are tools, programs if you like which obviously you don't have.

Say no to these problems! Install win-sudo and use sudo and su as on Linux.

No more "Why must I open context menu and use a separate window?" questions.

screenshot

(disclaimer: the video is a bit outdated. You should include s/ subdirectory of the repo to PATH instead of repo root. But you better check Installation section)

Installation

curl -s https://raw.githubusercontent.com/imachug/win-sudo/master/install.sh | sh

Usage

sudo

sudo command accepts path to program and then argument list.

$ sudo pip install gevent
Collecting gevent...

You will be prompted for UAC acception (if enabled) and then a new session will be spawned as a sub-shell.

su

su accepts no arguments and runs bash shell. You can exit by typing exit.

$ su
# exit
$

Why win-sudo?

  1. No need for installation: download and use.
  2. Native: no Go, Python, etc.
  3. Open-source: no viruses.
  4. Small: easy to contribute and understand.

Known issues

winpty

Some windows commands (such as cmd) don't work fine. So:

$ sudo cmd
Microsoft Windows [Version 10.0.15036]
(c) Microsoft Corporation, 2017. All right reserved.

C:\Users\Ivanq>echo 1 <--
echo 1 <--
1

C:\Users\Ivanq>

The command is prompted twice. Though the same happens when calling just cmd, not sudo cmd.

To fix this, run sudo winpty cmd instead. (but you will have to run sudo winpty cmd //c "echo 1" instead of sudo cmd /c "echo 1")

Job support

win-sudo doesn't support jobs, so when running su or sudo bash you may get:

bash: cannot set terminal process group (7152): Operation not permitted
bash: no job control in this shell

This is harmless, so you can ignore this warning.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].