There is now a "native" solution on Windows 10, after enabling Bash on Windows, you can enter Bash shell by typing bash
:
You can run Bash script like bash ./script.sh
, but keep in mind that C drive is located at /mnt/c
, and external hard drives are not mountable. So you might need to change your script a bit so it is compatible to Windows.
Also, even as root
, you can still get permission denied when moving files around in /mnt
, but you have your full root
power in the /
file system.
Also make sure your shell script is formatted with Unix style, or there can be errors.