# exec
- [Command Function](#section4643204919313)
- [Syntax](#section6553153635)
- [Parameters](#section208971157532)
- [Usage](#section213115219413)
- [Example](#section13736564418)
- [Output](#section194005101413)
## Command Function
This command is a built-in shell command used to execute user-space programs.
## Syntax
exec <_executable-file_\>
## Parameters
**Table 1** Parameter description
Parameter
|
Description
|
Value Range
|
executable-file
|
Indicates a valid executable file.
|
N/A
|
## Usage
Currently, this command supports only valid binary programs. The programs are successfully executed and then run in the background by default. However, the programs share the same device with the shell. As a result, the output of the programs and the shell may be interlaced.
## Example
Example:
Run **exec helloworld**.
## Output
```
OHOS # exec helloworld
OHOS # hello world!
```
>![](../public_sys-resources/icon-note.gif) **NOTE:**
>After the executable file is executed, the prompt **OHOS \#** is printed first. The shell **exec** command is executed in the background, causing the prompt to be printed in advance.