1# mount 2 3 4## Command Function<a name="section11631837182"></a> 5 6This command is used to mount a device to a specified directory. 7 8## Syntax<a name="section1697638111820"></a> 9 10mount \[_-f_\] \[_-t TYPE_\] \[_-o OPTION,_\] \[\[_DEVICE_\] _DIR_\] 11 12## Parameters<a name="section1650151221819"></a> 13 14**Table 1** Parameter description 15 16<a name="table1338mcpsimp"></a> 17<table><thead align="left"><tr id="row1344mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p1346mcpsimp"><a name="p1346mcpsimp"></a><a name="p1346mcpsimp"></a><strong id="b84913249612"><a name="b84913249612"></a><a name="b84913249612"></a>Parameter</strong></p> 18</th> 19<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p1348mcpsimp"><a name="p1348mcpsimp"></a><a name="p1348mcpsimp"></a><strong id="b1136292612616"><a name="b1136292612616"></a><a name="b1136292612616"></a>Description</strong></p> 20</th> 21<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p1350mcpsimp"><a name="p1350mcpsimp"></a><a name="p1350mcpsimp"></a><strong id="b4385271067"><a name="b4385271067"></a><a name="b4385271067"></a>Value Range</strong></p> 22</th> 23</tr> 24</thead> 25<tbody><tr id="row081413014400"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p080318303407"><a name="p080318303407"></a><a name="p080318303407"></a>--help</p> 26</td> 27<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p8804113024018"><a name="p8804113024018"></a><a name="p8804113024018"></a>Displays the parameters supported by the <strong id="b07421044122514"><a name="b07421044122514"></a><a name="b07421044122514"></a>mount</strong> command.</p> 28</td> 29<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p280418307406"><a name="p280418307406"></a><a name="p280418307406"></a>N/A</p> 30</td> 31</tr> 32<tr id="row1781443044019"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p1580410305409"><a name="p1580410305409"></a><a name="p1580410305409"></a>-f</p> 33</td> 34<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p1980419305409"><a name="p1980419305409"></a><a name="p1980419305409"></a>Fakes mounting the file system (no mounting is actually performed).</p> 35</td> 36<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p58041230114019"><a name="p58041230114019"></a><a name="p58041230114019"></a>N/A</p> 37</td> 38</tr> 39<tr id="row1981411307404"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p11804143024013"><a name="p11804143024013"></a><a name="p11804143024013"></a>-t</p> 40</td> 41<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p680443010409"><a name="p680443010409"></a><a name="p680443010409"></a>Specifies the file system type.</p> 42</td> 43<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p13804193034020"><a name="p13804193034020"></a><a name="p13804193034020"></a>vfat, yaffs, jffs, ramfs, nfs, procfs, romfs</p> 44</td> 45</tr> 46<tr id="row20813330184020"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p168041330194012"><a name="p168041330194012"></a><a name="p168041330194012"></a>-o</p> 47</td> 48<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p280473015402"><a name="p280473015402"></a><a name="p280473015402"></a>Specifies the mount options.</p> 49</td> 50<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p4804193020407"><a name="p4804193020407"></a><a name="p4804193020407"></a>N/A</p> 51</td> 52</tr> 53<tr id="row0813730134015"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p38041030124019"><a name="p38041030124019"></a><a name="p38041030124019"></a>DEVICE</p> 54</td> 55<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p28045303401"><a name="p28045303401"></a><a name="p28045303401"></a>Specifies the device to mount (in the format of the device directory).</p> 56</td> 57<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p8804113084010"><a name="p8804113084010"></a><a name="p8804113084010"></a>A device in the system</p> 58</td> 59</tr> 60<tr id="row1381383044011"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p7804133012406"><a name="p7804133012406"></a><a name="p7804133012406"></a>DIR</p> 61</td> 62<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p1380419308409"><a name="p1380419308409"></a><a name="p1380419308409"></a>Specifies the directory.</p> 63<p id="p14804153014011"><a name="p14804153014011"></a><a name="p14804153014011"></a>You must have the execution (search) permission on the specified directory.</p> 64</td> 65<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p1780403094017"><a name="p1780403094017"></a><a name="p1780403094017"></a>N/A</p> 66</td> 67</tr> 68</tbody> 69</table> 70 71## Usage<a name="section124541520171912"></a> 72 73By specifying the device to mount, directory, and file system format in the **mount** command, you can successfully mount the file system to the specified directory. 74 75## Example<a name="section7424625171917"></a> 76 77Run **mount -t nfs 192.168.1.3:/nfs nfs**. 78 79## Output<a name="section14757018116"></a> 80 81Mounting the **nfs** directory on the server with IP address of **192.168.1.3** to the newly created **/nfs** directory in the current system 82 83``` 84OHOS:/$ mkdir nfs 85OHOS:/$ mount -t nfs 192.168.1.3:/nfs nfs 86Mount nfs on 192.168.1.3:/nfs, uid:0, gid:0 87Mount nfs finished. 88OHOS:/$ ls nfs/ 8916d.xml gpio_test ohos_test.txt userfs_vfat.img 90OHOS_Image.bin hello rootfs_vfat.img 91dev_tools mksh_rootfs_vfat.img test_demo 92``` 93 94