Shell in Windows

Command Prompt

Windows settings (Win key + i) > search Windows Features > Enable (and install) Windows Subsystem for Linux

To install distro,

Pick one from list

wsl --list --online

Install

wsl -d --install <distroname>

In cmd: Bash <*.sh filename>

WSL

Run PowerShell as administrator

wsl --install

Windows files are located in the mnt folder that’s located in the / root.

The Ubuntu’s root is located here in Windows:

C:\Users\<username>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc

To run *.sh files, use: sh <filename>

As wsl is installed as an app, access it as how you access apps.


Reference

  1. The Windows Club. 2021. How to run .sh or Shell Script file in Windows 11/10. [online] Available at: <https://www.thewindowsclub.com/how-to-run-sh-or-shell-script-file-in-windows-10> [Accessed 26 October 2021].
  2. Hoffman, C., 2021. Everything You Can Do With Windows 10’s New Bash Shell. [online] How-To Geek. Available at: <https://www.howtogeek.com/265900/everything-you-can-do-with-windows-10s-new-bash-shell/> [Accessed 26 October 2021].


--- :: Skyferia Tech's Related Posts :: ---