/rust-runas

Runs a command in an elevated context

Primary LanguageRustApache License 2.0Apache-2.0

runas

Build Status Crates.io License rustc 1.56.0 Documentation

A simple Rust library that can execute commands as root.

use runas::Command;

let status = Command::new("rm")
    .arg("/usr/local/my-app")
    .status()
    .unwrap();

License and Links