Run a read-only service status check with elevated privileges.
sudo systemctl status sshRun an approved command with elevated privileges. Check the command before confirming.
sudo [OPTION]... COMMAND [ARGUMENT...]Run a read-only service status check with elevated privileges.
sudo systemctl status sshRun id as the www-data account.
sudo -u www-data id| Option / clause | Description |
|---|---|
-u USER, --user=USER | Run the command as USER. |
-g GROUP, --group=GROUP | Run the command with GROUP as the primary group. |
-i, --login | Start a login shell as the target user. |
-s, --shell | Run the configured shell as the target user. |
-l, --list | List allowed commands or privileges. |
-k | Invalidate cached credentials. |
-v | Refresh the credential timestamp without running a command. |
Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.