su Verified for current stable LTS

Su Command: Execute Command As Another User

Use for execute command as another user with Su. Exact CLI syntax to execute command as another user using Su.

When to use this: Use for execute command as another user with Su.

Command Syntax

su - <username> -c "<command>"

Live Command Builder

Final Command

su - <username> -c "<command>"

Command Breakdown

-
Command Option
Tool-specific option used by this command invocation.
-c
Command Option
Tool-specific option used by this command invocation.

FAQ

Purpose: Exact syntax to execute command as another user using Su.

Test path: Replace placeholders and run destructive commands in a disposable workspace first.

Flag behavior: Tool version, platform, and shell can change behavior.

Improve This Command

Suggest a correction, safer default, or version-specific note for this entry.

Related Operations

Back to Su directory