விண்டோஸில் ஷெல் ஸ்கிரிப்ட் கோப்புகளை எவ்வாறு இயக்குவது 10 WSL ஐப் பயன்படுத்துதல்.
பேஷ் is a Unix shell and command language which can run Shell Script files.
- Execute Shell Script file using WSL
- Execute Shell Script using Ubuntu on Windows 10
Execute Shell Script file using WSL
Install WSL or Windows Subsystem for Linux
1. செல்கSettings\Update & Security\For Developers. Check theDeveloper Mode;
2. தேடுங்கள் Windows Feature, and choose to Turn Windows features on or off;
3. Scroll to find WSL, check the box, and then install it;
4. Reboot to finish installing the requested changes;
5. BASH will be available in the கட்டளை வரியில் மற்றும் PowerShell.
Execute Shell Script Files
1. திற விண்டோஸ் பவர்ஷெல் and navigate to the folder where the script file is available;
2. வகை:
Bash script-filename.sh
It will execute the script, and depending on the file, you should see an output.
On a Linux platform, you usually use SH, but here you need to use BASH.
Execute Shell Script using Ubuntu in dual-boot
Make sure you have Ubuntu or any other Linux distros installed on the target PC in dual-boot with Windows 10. Ubuntu will mount or make all your Windows directories available under/mnt. So the சி:\ drive is available at /mnt/C.
Now follow these steps:
- Type Bash in a run prompt, and it will launch the distro prompt.
- Navigate to the folder using the cd command to the folder where the scripts are available.
- வகை sh script.sh and hit enter.
This is false, to use bash like this you NEED to have linux distribution installed