1e41f4b71Sopenharmony_ci# Setting Up the Ubuntu Environment
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ciIn embedded development, Windows-based tools, such as Visual Studio Code, are widely used in code editing. Yet, because the source code of most development boards, such as Hi3861 and Hi3516, cannot be built in Windows, these development boards require the Ubuntu build environment.
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ciIn the Windows+Ubuntu hybrid build environment, you can enjoy the benefits of both DevEco Device Tool for Windows and DevEco Device Tool for Ubuntu (where Visual Studio Code is optional).
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciThe following describes how to set up the Ubuntu environment.
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
10e41f4b71Sopenharmony_ci>
11e41f4b71Sopenharmony_ci> If the Ubuntu system has not been set up yet, set it up on a virtual machine running Windows. For details, see [Ubuntu Installation Guide](https://developer.huawei.com/consumer/cn/training/course/video/C101639987816176315). Then, [configure the Ubuntu basic environment](https://developer.huawei.com/consumer/cn/training/course/video/C101639988048536240).
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci## System Requirements
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci- Ubuntu: Ubuntu 18.04 to 21.10; version 20.04 with 16 GB or larger memory and a 100 GB or larger hard disk is recommended
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci- User name (Ubuntu): cannot contain Chinese characters
19e41f4b71Sopenharmony_ci
20e41f4b71Sopenharmony_ci- DevEco Device Tool: latest and same version installed on both Ubuntu and Windows
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci  > ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE**
23e41f4b71Sopenharmony_ci  >
24e41f4b71Sopenharmony_ci  > The following uses DevEco Device Tool of the 3.1 Release version as an example. The supported features and operations vary according to the DevEco Device Tool version. For details, see the [User Guide](https://device.harmonyos.com/en/docs/documentation/guide/service_introduction-0000001050166905).
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ci## Procedure
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci1. Make sure the Ubuntu shell environment is **bash**.
30e41f4b71Sopenharmony_ci   1. Run the following command and check whether the command output is **bash**. If the command output is not **bash**, go to step 2.
31e41f4b71Sopenharmony_ci      
32e41f4b71Sopenharmony_ci       ```shell
33e41f4b71Sopenharmony_ci       ls -l /bin/sh
34e41f4b71Sopenharmony_ci       ```
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci       ![en-us_image_0000001226764302](figures/en-us_image_0000001226764302.png)
37e41f4b71Sopenharmony_ci
38e41f4b71Sopenharmony_ci   2. Start the command-line tool, run the following command, enter your password, and select **No** to set **Ubuntu shell** to **bash**.
39e41f4b71Sopenharmony_ci      
40e41f4b71Sopenharmony_ci       ```shell
41e41f4b71Sopenharmony_ci       sudo dpkg-reconfigure dash
42e41f4b71Sopenharmony_ci       ```
43e41f4b71Sopenharmony_ci
44e41f4b71Sopenharmony_ci       ![ubuntu-dash-to-bash](figures/ubuntu-dash-to-bash.png)
45e41f4b71Sopenharmony_ci
46e41f4b71Sopenharmony_ci2. Download the latest version of [DevEco Device Tool](https://device.harmonyos.com/cn/ide#download) for Linux.
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci3. Decompress the DevEco Device Tool software package and assign permission on the folder obtained from the decompression.
49e41f4b71Sopenharmony_ci   1. Go to the directory where the DevEco Device Tool software package is stored and run the following command to decompress the software package. In the command, **devicetool-linux-tool-{Version}.zip** indicates the software package name.
50e41f4b71Sopenharmony_ci      
51e41f4b71Sopenharmony_ci       ```shell
52e41f4b71Sopenharmony_ci       unzip devicetool-linux-tool-{Version}.zip
53e41f4b71Sopenharmony_ci       ```
54e41f4b71Sopenharmony_ci   2. Open the folder of the decompressed software package and run the following command to grant the execute permission on the installation file. In the command, **devicetool-linux-tool-{Version}.sh** indicates the installation file name.
55e41f4b71Sopenharmony_ci      
56e41f4b71Sopenharmony_ci       ```shell
57e41f4b71Sopenharmony_ci       chmod u+x devicetool-linux-tool-{Version}.sh
58e41f4b71Sopenharmony_ci       ```
59e41f4b71Sopenharmony_ci
60e41f4b71Sopenharmony_ci4. Run the following command to install DevEco Device Tool, where **devicetool-linux-tool-{Version}.sh** indicates the installation file name.
61e41f4b71Sopenharmony_ci   
62e41f4b71Sopenharmony_ci   ```shell
63e41f4b71Sopenharmony_ci   sudo ./devicetool-linux-tool-{Version}.sh
64e41f4b71Sopenharmony_ci   ```
65e41f4b71Sopenharmony_ci
66e41f4b71Sopenharmony_ci5. On the page for agreeing to the user agreement and privacy statement, read and agree to the user agreement and privacy statement. You can scroll through the options by pressing the up and down arrow keys on the keyboard.
67e41f4b71Sopenharmony_ci
68e41f4b71Sopenharmony_ci   ![en-us_image_0000001340557741](figures/en-us_image_0000001340557741.png)
69e41f4b71Sopenharmony_ci
70e41f4b71Sopenharmony_ci   Wait until the "DevEco Device Tool successfully installed." message is displayed.
71e41f4b71Sopenharmony_ci
72e41f4b71Sopenharmony_ci   ![en-us_image_0000001338201457](figures/en-us_image_0000001338201457.png)
73