public static CommandResult Execute(string command, string password = "", string workingDirectory = "")
        {
            var bash = new Bash(command, password, workingDirectory);

            bash.Start();
            return(bash.WaitForExit());
        }
        public static async Task <CommandResult> ExecuteAsync(string command, string password = "", string workingDirectory = "")
        {
            var bash = new Bash(command, password, workingDirectory);

            bash.Start();
            return(await bash.WaitForExitAsync());
        }
        public static string WhoAmI()
        {
            var bash = new Bash("whoami");

            bash.Start();
            var result = bash.WaitForExit();

            return(result.LastOutput);
        }
        public static async Task <string> WhoAmIAsync()
        {
            var bash = new Bash("whoami");

            bash.Start();
            var result = await bash.WaitForExitAsync();

            return(result.LastOutput);
        }
        public static async Task <bool> IsSudoPasswordAsync(string password)
        {
            await ExecuteAsync("sudo -k");

            var bash = new Bash("whoami", password: password);

            bash.Start();
            var result = await bash.WaitForExitAsync();

            return(result.LastOutput == "root");
        }
        public static bool IsSudoPassword(string password)
        {
            Execute("sudo -k");

            var bash = new Bash("whoami", password: password);

            bash.Start();
            var result = bash.WaitForExit();

            return(result.LastOutput == "root");
        }