1# exec<a name="EN-US_TOPIC_0000001179965833"></a> 2 3- [Command Function](#section4643204919313) 4- [Syntax](#section6553153635) 5- [Parameters](#section208971157532) 6- [Usage](#section213115219413) 7- [Example](#section13736564418) 8- [Output](#section194005101413) 9 10## Command Function<a name="section4643204919313"></a> 11 12This command is a built-in shell command used to execute user-space programs. 13 14## Syntax<a name="section6553153635"></a> 15 16exec <_executable-file_\> 17 18## Parameters<a name="section208971157532"></a> 19 20**Table 1** Parameter description 21 22<a name="table3900mcpsimp"></a> 23<table><thead align="left"><tr id="row3906mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p3908mcpsimp"><a name="p3908mcpsimp"></a><a name="p3908mcpsimp"></a>Parameter</p> 24</th> 25<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p3910mcpsimp"><a name="p3910mcpsimp"></a><a name="p3910mcpsimp"></a>Description</p> 26</th> 27<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p3912mcpsimp"><a name="p3912mcpsimp"></a><a name="p3912mcpsimp"></a>Value Range</p> 28</th> 29</tr> 30</thead> 31<tbody><tr id="row3913mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p3915mcpsimp"><a name="p3915mcpsimp"></a><a name="p3915mcpsimp"></a>executable-file</p> 32</td> 33<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p3917mcpsimp"><a name="p3917mcpsimp"></a><a name="p3917mcpsimp"></a>Indicates a valid executable file.</p> 34</td> 35<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p3919mcpsimp"><a name="p3919mcpsimp"></a><a name="p3919mcpsimp"></a>N/A</p> 36</td> 37</tr> 38</tbody> 39</table> 40 41## Usage<a name="section213115219413"></a> 42 43Currently, 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. 44 45## Example<a name="section13736564418"></a> 46 47Example: 48 49Run **exec helloworld**. 50 51## Output<a name="section194005101413"></a> 52 53``` 54OHOS # exec helloworld 55OHOS # hello world! 56``` 57 58> **NOTE:** 59>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. 60 61