Door deze site te gebruiken, u gaat akkoord met de Privacybeleid.
Accepteren
OndernemingOndernemingOnderneming
  • THUIS
  • IT-PRO
  • Technisch
  • Microsoft
    • Azuur
    • Configmgr/sccm
    • DPM
    • Orkestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kantoor 365
    • Kantoor insider
    • PowerBI
    • Skypen
    • SQL-server
    • Teams
  • VENSTERS
    • Windows-beheercentrum
    • Windows-client
    • Windows-server
  • SCCM-queryverzamelingslijst
Lezing: Hoe u shell -scriptbestanden op Windows uitvoert 10 WSL gebruiken
Lettergrootte wijzigenAa
OndernemingOnderneming
Lettergrootte wijzigenAa
  • THUIS
  • IT-PRO
  • Technisch
  • Microsoft
  • VENSTERS
  • SCCM-queryverzamelingslijst
Zoekopdracht
  • THUIS
  • IT-PRO
  • Technisch
  • Microsoft
    • Azuur
    • Configmgr/sccm
    • DPM
    • Orkestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Kantoor 365
    • Kantoor insider
    • PowerBI
    • Skypen
    • SQL-server
    • Teams
  • VENSTERS
    • Windows-beheercentrum
    • Windows-client
    • Windows-server
  • SCCM-queryverzamelingslijst
Windows-client

Hoe u shell -scriptbestanden op Windows uitvoert 10 WSL gebruiken

Gepubliceerd: Februari 18, 2024
2 Min. gelezen
DEEL

Hoe u shell -scriptbestanden op Windows uitvoert 10 WSL gebruiken.

Inhoud
Execute Shell Script file using WSLInstall WSL or Windows Subsystem for LinuxExecute Shell Script FilesExecute Shell Script using Ubuntu in dual-boot

Bas is a Unix shell and command language which can run Shell Script files.

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

Execute Shell Script file using WSL

Install WSL or Windows Subsystem for Linux

1. Gaan naar Settings\Update & Security\For Developers. Check the Developer Mode;

2. Zoeken naar Windows Feature, en kies ervoor 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 Opdrachtprompt En PowerShell.

Execute Shell Script Files

1. Open Windows PowerShell and navigate to the folder where the script file is available;

2. Type:

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 C:\ drive is available at /mnt/C.

Now follow these steps:

  1. Type Bash in a run prompt, and it will launch the distro prompt.
  2. Navigate to the folder using the cd command to the folder where the scripts are available.
  3. Type sh script.sh and hit enter.
GETAGD:Opdrachtprompt (CMD)LinuxPowershellUbuntuRamenRamen 10WSL
Vorig artikel Hoe te repareren “Kan de runspace -pool niet openen” Fout in Server Manager WinRM-plug-in?
Volgend artikel Hoe u de virtuele geheugengrootte op Windows kunt wijzigen 10: Stapsgewijze gids
1 Opmerking 1 Opmerking
  • awda zegt:
    augustus 19, 2020 bij 1:36 p.m

    This is false, to use bash like this you NEED to have linux distribution installed

    Antwoord

Laat een antwoord achter Antwoord annuleren

Uw e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd *

Deze site gebruikt Akismet om spam te verminderen. Ontdek hoe uw reactiegegevens worden verwerkt.

Vertaling

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
door Transposh - Vertaalplugin voor Wordpress

Populaire berichten

Systeemvereisten voor Windows Server 2016
Windows-server
Configuration Manager Queryverzamelingslijst
Configuration Manager Queryverzamelingslijst
ConfiguratieMgr
Gestructureerde/beheerde navigatie ingeschakeld op moderne pagina's in klassieke teamsites
Technologie
SCCM Kan DP-locaties niet ophalen als de verwachte versie van MP
ConfiguratieMgr

Recente berichten

Fail2ban installeren en configureren voor SSH-bescherming op Ubuntu 24.04
Linux
FirewallD inschakelen en configureren op AlmaLinux
Linux
Gebruikers aanmaken en SSH-sleutel instellen in AlmaLinux
Linux
Hoe het wachtwoord op AlmaLinux opnieuw in te stellen
Linux

© 2023 Onderneming

Ga naar mobiele versie
Welkom terug!

Log in op uw account

Gebruikersnaam of e-mailadres
Wachtwoord

Wachtwoord vergeten?