How to Enable Bash in Windows 10 Developer Preview

How to enable Bash in Windows 10 developer preview?

To enable bash in Windows 10:

  1. Click the Start button , click Control Panel, click Programs, and then click Turn Windows features on or off.
  2. Enable Windows Subsystem for Linux
  3. To get Bash installed, open Command Prompt and type “bash”

Enable Windows Subsystem for Linux
Installing Ubuntu on Windows using windows store
Start Bash

For More Information visit :

  1. Announcing Windows 10 Insider Preview Build 14316
  2. Run Bash on Ubuntu on Windows

In some cases, attempting to turn on Developer Mode on may crash the Settings app. If this happens, the workaround is to use these steps here to enable Developer Mode

how to read sh files on Ubuntu built in Windows 10 developer mode

You home directory in bash is

c:\Users\<Windows User>\AppData\Local\lxss\home\<linux_username>\

UPDATE:

sorry, I misread your question, you have a problem seeing these files from bash, when they are saved by Windows. I'm not sure how exactly this works regarding home folder, but you can access any Windows files from bash using filesystem in /mnt/

So the above would be /mnt/c/Users/<Windows User>/AppData/.... etc

UPDATE 2:

Here is more information about the problem - https://superuser.com/questions/1083962/windows-linux-subsystem-accessing-files-outside-of-ubuntu
Basically, confirming what I said above - you have to use /mnt/

How can I use a Bash-like shell on Windows?

You could install Cygwin or MSYS/MinGW, or you could install a full Linux distribution in a virtual machine (for example, using VirtualBox).

Trying to use bash on Windows and got no installed distributions message

When the Windows Store opened, there was no Distro to choose, then I found this command lxrun /install and worked for me as well.

You will get something like this as an output:

C:\WINDOWS\system32>lxrun /install
Warning: lxrun.exe is only used to configure the legacy Windows Subsystem for Linux distribution.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore

This will install Ubuntu on Windows, distributed by Canonical and licensed under its terms available here:
https://aka.ms/uowterms

Type "y" to continue: y
Downloading from the Microsoft Store... 100%
Extracting filesystem, this will take a few minutes...
Would you like to set the Ubuntu locale to match the Windows locale (en-FI)?
The default locale is en_US.
Type "y" to continue: y
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: <you type your login here>
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!
Documentation is available at: https://aka.ms/wsldocs

Scheduling .sh on windows

As of Windows Insiders Build 17046 you are able to run cron jobs in the background even if the terminal is closed.

To make sure cron is actually running you can type service cron status. If it isn't currently running then type service cron start and you should be good to go.



Related Topics



Leave a reply



Submit