exec for system
Execute a command, replacing or exiting the current process, depending on platform.
Signature
> exec {flags} ...rest
Parameters
-
...rest: External command to run, with arguments.
Input/output types:
| input | output |
|---|---|
| nothing | any |
Examples
Execute external 'ps aux' tool
> exec ps aux
Execute 'nautilus'
> exec nautilus
Notes
On Unix-based systems, the current process is replaced with the command. On Windows based systems, Nushell will wait for the command to finish and then exit with the command's exit code.
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/exec.html