The Win10 version of the Linux Bash command uses the tutorial

  
Win10 version of the Linux Bash command to use the tutorial. Unknowingly, win10 has been launched for almost a year. The majority of users must have found out that Microsoft has added Ubuntu Bash command support in the Win10 first anniversary update preview. However, there are still users who are not likely to use it after opening. This time we will introduce the Win10 version of the Linux Bash command tutorial, the format is very simple, just apply.



Win10
The specific method is as follows:
1, users who have not installed Bash can follow the method introduced earlier, first in the setup → update and security & rarr; Mode & rdquo;, click to download "developer mode package", as shown below — —

Win10
but sometimes this package will be downloaded unsuccessfully, the following figure appears ——

2, don't worry at this time, if the previous step is not smooth, you can make up for it in the next steps. At this point, enter the control panel → program and function → enable or disable the Windows function, check the "Windows subsystem (Beta) for Linux", click "OK" after installation, as shown below ——

Win10
3, need to restart after installation, then open a command prompt, execute the following command to open (can directly enter the Bash command in administrator mode):
C:windowssystem32bash. Exe
4, if the first step of the installation is not smooth, you may need to download the required components from the store at this time, whether it depends on the network status, the IT home test encountered the following "Ghosts" situation :

Win10
5. As can be seen from the above figure, the user needs to create a Unix account during the download and installation process. Therefore, the account password must be set. In the process of entering the password, the password text is not visible and needs to be input. Two times, you have to have a number in your heart. After the setting is successful, you can use
6. The function command can be used to query bash --help. If you use it, you need to add “bash” in front, for example:
bash - -debug
bash --init-file
bash --v Ersion

Win10
7. If you want to run Linux commands, you can use the following format (note the space between c and the leading quotation marks, as shown above):
bash -c “linux command”< Br>Example:
bash -c “echo Hello from IThome”
bash -c “ls /mnt/c”
bash -c “lsb_release -a”

Copyright © Windows knowledge All Rights Reserved