commands.sh

gksudo

linux

Frontend for `sudo`. Allows you to run graphical commands which need root access without having to run an X terminal emulator. Note: This command is deprecated in favor of commands like `pkexec`, and is no longer maintained. See also: `gksu`.

More info →

Options (5)

-u, --userboolean

Run a command as a specific user

Example: gksudo {{[-u|--user]}} {{userid}} {{command}}
-k, --preserve-envboolean

Run the command while preserving the current environments

Example: gksudo {{[-u|--user]}} {{userid}} {{[-k|--preserve-env]}} {{command}}
-w, --su-modeboolean

Force `gksudo` to use `su` to run the command

Example: gksu {{[-u|--user]}} {{userid}} {{[-w|--su-mode]}} {{command}}
-S, --sudo-modeboolean

Force `gksudo` to use `sudo` to run the command

Example: gksudo {{[-u|--user]}} {{userid}} {{[-S|--sudo-mode]}} {{command}}
-d, --debugboolean

Output debug info for the given command

Example: gksudo {{[-u|--user]}} {{userid}} {{[-d|--debug]}} {{command}}

Examples (5)

Run a command as a specific user

gksudo [-u|--user] userid command

Run the command while preserving the current environments

gksudo [-u|--user] userid [-k|--preserve-env] command

Force `gksudo` to use `su` to run the command

gksu [-u|--user] userid [-w|--su-mode] command

Force `gksudo` to use `sudo` to run the command

gksudo [-u|--user] userid [-S|--sudo-mode] command

Output debug info for the given command

gksudo [-u|--user] userid [-d|--debug] command
made by @shridhargupta | data from tldr-pages