1e41f4b71Sopenharmony_ci# Shell
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ciThe shell provided by the OpenHarmony kernel supports commonly used debugging commands. You can also add and customize commands to the shell of the OpenHarmony kernel to address your service needs. The common debugging commands include the following:
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ci- System commands: commands used to query information, such as system tasks, semaphores, system software timers, CPU usage, and interrupts.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci- File commands: commands used to manage files and directories, such as **ls** and **cd**.
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ci- Network commands: commands used to query the IP addresses of other devices connected to the development board, querying the IP address of the local device, testing network connectivity, and setting the access point (AP) and station (STA) modes of the development board.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci  For details about the process of adding commands, see [Shell Command Development](../kernel/kernel-small-debug-shell-guide.md) and [Shell Command Programming Example](../kernel/kernel-small-debug-shell-build.md).
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci **Precautions**
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ciNote the following when using shell:
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci- You can use the **exec** command to run executable files.
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci- The shell supports English input by default. To delete the Chinese characters entered in UTF-8 format, press the backspace key for three times.
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci- When entering shell commands, file names, and directory names, you can press **Tab** to enable automatic completion. If there are multiple completions, multiple items are printed based on the same characters they have. If more than 24 lines of completions are available, the system displays the message "Display all num possibilities?(y/n)", asking you to determine whether to print all items. You can enter **y** to print all items or enter **n** to exit the printing. If more than 24 lines are printed after your selection, the system displays "--More--". In this case, you can press **Enter** to continue the printing or press **q** (or **Ctrl+c**) to exit.
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci- The shell working directory is separated from the system working directory. You can run commands such as **cd** and **pwd** on the shell to perform operations on the shell working directory, and run commands such as **chdir** and **getcwd** to perform operations on the system working directory. Pay special attention when an input parameter in a file system operation command is a relative path.
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci- Before using network shell commands, you need to call the **tcpip_init** function to initialize the network and set up the Telnet connection. By default, the kernel does not call **tcpip_init**.
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ci- You are not advised to run shell commands to perform operations on device files in the **/dev** directory, which may cause unexpected results.
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci- The shell functions do not comply with the POSIX standards and are used only for debugging.
33e41f4b71Sopenharmony_ci  > ![icon-notice.gif](public_sys-resources/icon-notice.gif) **NOTICE**<br>
34e41f4b71Sopenharmony_ci  > The shell functions are used for debugging only and can be enabled only in the Debug version (by enabling  **LOSCFG_DEBUG_VERSION** using **menuconfig**).
35