banner



How To Run .sh File In Windows

Download PC Repair Tool to rapidly find & fix Windows errors automatically

Vanquish Scripts or .SH files are like batch files of Windows which tin be executed in Linux or Unix. It is possible to run .sh or Shell Script file in Windows ten using Windows Subsystem for Linux. In this post, nosotros will show you how to run a Beat Script file in Windows 11/10.

How to run .sh or Shell Script file in Windows 11/x

Bash is a Unix beat and command language which can run Shell Script files. You exercise non need to install Ubuntu or whatever other Linux Distros unless your scripts demand the back up of the existent Linux kernel. We will share both the methods.

  1. Execute Shell Script file using WSL
  2. Execute Trounce Script using Ubuntu on Windows 10

i] Execute Trounce Script file using WSL

Install WSL or Windows Subsystem for Linux

Go to Settings > Update & Security > For Developers. Check theDeveloper Mode radio push. And search for "Windows Features", choose "Plough Windows features on or off".

Scroll to notice WSL, check the box, and then install it. Once done, one has to reboot to end installing the requested changes. Press Restart now.  BASH will be available in the Control Prompt and PowerShell.

Execute Shell Script Files

  1. Open Command Prompt and navigate to the folder where the script file is bachelor.
  2. Type Fustigate script-filename.sh and striking the enter key.
  3. It volition execute the script, and depending on the file, you lot should see an output.

Run Shell script files from Command Prompt

On a Linux platform, y'all usually use SH, simply hither you need to apply Fustigate. That said, Bash in Windows has its limitations, so if you want to execute in a Linux surroundings, you demand to install Ubuntu or anything similar.

two] Execute Shell Script using Ubuntu on Windows ten

Make sure you lot have Ubuntu or any other Linux distros installed.  Ubuntu will mount or make all your Windows directories available under /mnt. So the C drive is available at /mnt/C.  So if the desktop will exist available at /mnt/c/users/<username>/desktop.

Run Script files in Windows via Ubuntu

Now follow these steps

  1. Type Fustigate in run prompt, and it will launch the distro prompt.
  2. Navigate to the folder using "cd" control to the folder where the scripts are available.
  3. Type "sh script.sh" and hit enter.

It will execute the script, and if they have a dependency on any of core Linux features.

Since Linux is now available in Windows, you need not use whatsoever tertiary party applications like Cygwin. WSL should exist enough for most of the scenarios to assist y'all run a shell script in Windows x.

Run Shell script files from Command Prompt

Ashish is a veteran Windows, and Xbox user who excels in writing tips, tricks, and features on it to improve your solar day to 24-hour interval experience with your devices.

How To Run .sh File In Windows,

Source: https://www.thewindowsclub.com/how-to-run-sh-or-shell-script-file-in-windows-10

Posted by: mooreadezvot.blogspot.com

0 Response to "How To Run .sh File In Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel