Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5962

Bash/WSL - How to run command as root?

$
0
0
>ubuntu1804.exe -c "echo $USER"mpen  

That runs the command as me, how do I run it as root?

The help page doesn't even mention -c

>ubuntu1804.exe helpLaunches or configures a Linux distribution.Usage:<no args>        Launches the user's default shell in the user's home directory.    install [--root]        Install the distribuiton and do not launch the shell when complete.          --root              Do not create a user account and leave the default user set to root.    run <command line>        Run the provided command line in the current working directory. If no        command line is provided, the default shell is launched.    config [setting [value]]        Configure settings for this distribution.        Settings:          --default-user <username>              Sets the default user to <username>. This must be an existing user.    help        Print usage information.

Viewing all articles
Browse latest Browse all 5962

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>