cd

Command Function

This command is used to change the current working directory.

Syntax

cd [path]

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

path

Indicates the file path.

The user must have the execution (search) permission for the specified directory.

Usage

  • If the path parameter is not specified, the system switches to the root directory.
  • If the path parameter is specified, the system switches to the specified path.
  • The path value starting with a slash (/) represents the root directory.
  • The path value starting with a dot (.) represents the current directory.
  • The path value starting with two dots (..) represents the parent directory.

Example

Enter cd ...

Output

Figure 1 Directory switching result