• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# cd<a name="EN-US_TOPIC_0000001133846482"></a>
2
3-   [Command Function](#section11690184921316)
4-   [Syntax](#section75695409569)
5-   [Parameters](#section71961353181311)
6-   [Usage](#section3629759111317)
7-   [Example](#section211620301412)
8-   [Output](#section1968117214577)
9
10## Command Function<a name="section11690184921316"></a>
11
12This command is used to change the current working directory.
13
14## Syntax<a name="section75695409569"></a>
15
16cd \[_path_\]
17
18## Parameters<a name="section71961353181311"></a>
19
20**Table  1**  Parameter description
21
22<a name="table1087mcpsimp"></a>
23<table><thead align="left"><tr id="row1093mcpsimp"><th class="cellrowborder" valign="top" width="21%" id="mcps1.2.4.1.1"><p id="p1095mcpsimp"><a name="p1095mcpsimp"></a><a name="p1095mcpsimp"></a><strong id="b76096875111729"><a name="b76096875111729"></a><a name="b76096875111729"></a>Parameter</strong></p>
24</th>
25<th class="cellrowborder" valign="top" width="52%" id="mcps1.2.4.1.2"><p id="p1097mcpsimp"><a name="p1097mcpsimp"></a><a name="p1097mcpsimp"></a><strong id="b1343743615221"><a name="b1343743615221"></a><a name="b1343743615221"></a>Description</strong></p>
26</th>
27<th class="cellrowborder" valign="top" width="27%" id="mcps1.2.4.1.3"><p id="p1099mcpsimp"><a name="p1099mcpsimp"></a><a name="p1099mcpsimp"></a><strong id="b163024311311729"><a name="b163024311311729"></a><a name="b163024311311729"></a>Value Range</strong></p>
28</th>
29</tr>
30</thead>
31<tbody><tr id="row1100mcpsimp"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.2.4.1.1 "><p id="p1102mcpsimp"><a name="p1102mcpsimp"></a><a name="p1102mcpsimp"></a>path</p>
32</td>
33<td class="cellrowborder" valign="top" width="52%" headers="mcps1.2.4.1.2 "><p id="p1104mcpsimp"><a name="p1104mcpsimp"></a><a name="p1104mcpsimp"></a>Specifies the file path.</p>
34</td>
35<td class="cellrowborder" valign="top" width="27%" headers="mcps1.2.4.1.3 "><p id="p1106mcpsimp"><a name="p1106mcpsimp"></a><a name="p1106mcpsimp"></a>You must have the execution (search) permission for the specified directory.</p>
36</td>
37</tr>
38</tbody>
39</table>
40
41## Usage<a name="section3629759111317"></a>
42
43-   If the  **path**  parameter is not specified, the system switches to the root directory.
44-   If the  **path**  parameter is specified, the system switches to the specified path.
45-   The  **path**  value starting with a slash \(/\) represents the root directory.
46-   The  **path**  value starting with a dot \(.\) represents the current directory.
47-   The  **path**  value starting with two dots \(..\) represents the parent directory.
48
49## Example<a name="section211620301412"></a>
50
51Run  **cd**.
52
53## Output<a name="section1968117214577"></a>
54
55**Figure  1**  Changing the directory<a name="fig16500959144812"></a>
56![](figure/changing-the-directory.png "changing-the-directory")
57
58