Get the App
SLTechnology News&Howtos  ›  Development  › 

How the Windows10 system uses the linux bash command

Shulou Source: shulou.com Published: 2022-06-01 22:34:27 09月17日 Update

Today I will show you how to use the linux bash command on the Windows10 system. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.

How does win10 use the Linux system bash command? Now the win10 system supports the Linux system bash command, but there are many partners who don't know how to use it. The specific methods are as follows:

1. Users who do not install Bash can first select "developer Mode" in setting → updates and secure → for developers, and download the "developer Mode package" after clicking.

2. There is no need to worry at this time. If the previous step does not go well, you can make up for it in the following steps. Enter the control panel → programs and functions → to enable or disable the Windows function, check "Windows Subsystem for Linux (Beta)", click "OK" and install it.

3. Restart after installation, then open the command prompt and execute the following command to enable it (you can directly enter the Bash command in administrator mode to enable it):

C:\ windows\ system32\ bash.exe4. If the installation in the first step is not smooth, you may need to download the required components from the store. Whether it is smooth or not depends on the network condition. The editor encounters the following "ghosts" in the test:

5. As can be seen from the above picture, the user is required to create a Unix account during the download and installation process, so to set the account password, the password text is not visible in the process of entering the password, and you need to enter it twice. You need to have a number in mind, and you can use it after the setting is successful.

6. The function command can be queried with bash-help. If you use it, add "bash" before it, for example:

Bash-debug

Bash-init-file

Bash-version

7. If you want to run the Linux command, you can use the following format (note the space between c and quotation marks):

Bash-c "linux command" for example:

Bash-c "echo Hello from xitongzhijia"

Bash-c "ls / mnt/c"

Bash-c "lsb_release-a"

This is all about how the Windows10 system uses the linux bash command. For more information about how the Windows10 system uses the linux bash command, you can search the previous articles or browse the following articles to learn! I believe the editor will add more knowledge to you. I hope you can support it!

Tags: Commands systems people content functions passwords articles patterns development input methods more users accounts processes support yes count success above Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Xiaomi macOS MariaDB vpn