# execCmdAsRoot method

Future<String> execCmdAsRoot(

1. String distribution,
2. String cmd

)

Executes a command in a WSL distro and returns the output

## Implementation

    Future<String> execCmdAsRoot(String distribution, String cmd) async {
      List<String> args = ['--distribution', distribution, '-u', 'root'];
      for (var arg in cmd.split(' ')) {
        args.add(arg);
      }
      ProcessResult results = await Process.run('wsl', args,
          runInShell: true, stdoutEncoding: utf8, stderrEncoding: utf8);
      return results.stdout;
    }