En utilisant ce site, vous acceptez le politique de confidentialité.
Accepter
EntérinEntérinEntérin
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
    • Azuré
    • Configmgr / sccm
    • DPM
    • Orchestrateur
    • Hyper-v
    • Microsoft Edge Insider
    • MSI
    • Bureau 365
    • Bureau Insider
    • Power Bi
    • Skype
    • Serveur SQL
    • Équipes
  • FENÊTRES
    • Centre d'administration Windows
    • Client Windows
    • Serveur Windows
  • Liste de collecte de requêtes SCCM
En lisant: Comment exécuter des fichiers de script Shell sous Windows 10 Utiliser WSL
Redimensionneur de policeAA
EntérinEntérin
Redimensionneur de policeAA
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
  • FENÊTRES
  • Liste de collecte de requêtes SCCM
Recherche
  • MAISON
  • INFORMATIQUE PRO
  • TECHNOLOGIE
  • Microsoft
    • Azuré
    • Configmgr / sccm
    • DPM
    • Orchestrateur
    • Hyper-v
    • Microsoft Edge Insider
    • MSI
    • Bureau 365
    • Bureau Insider
    • Power Bi
    • Skype
    • Serveur SQL
    • Équipes
  • FENÊTRES
    • Centre d'administration Windows
    • Client Windows
    • Serveur Windows
  • Liste de collecte de requêtes SCCM
Client Windows

Comment exécuter des fichiers de script Shell sous Windows 10 Utiliser WSL

Publié: Février 18, 2024
2 Lecture minimale
PARTAGER

Comment exécuter des fichiers de script Shell sous Windows 10 Utiliser WSL.

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

Frapper 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. Aller à Settings\Update & Security\For Developers. Check the Developer Mode;

2. Rechercher Windows Feature, et choisir de 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 Invite de commande et PowerShell.

Execute Shell Script Files

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

2. Taper:

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. Taper sh script.sh and hit enter.
ÉTIQUETÉ:Invite de commande (CMD)LinuxPowershellUbuntuFenêtresFenêtres 10WSL
Article précédent Comment réparer “Échec de l'ouverture du pool Runspace” Erreur dans le plug-in WinRM du gestionnaire de serveur?
Article suivant Comment modifier la taille de la mémoire virtuelle sous Windows 10: Guide étape par étape
1 Commentaire 1 Commentaire
  • awda dit:
    Août 19, 2020 à 1:36 PM

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

    Répondre

Laisser une réponse Annuler la réponse

Votre adresse email ne sera pas publiée. Les champs obligatoires sont marqués *

Ce site utilise Akismet pour réduire le spam. Découvrez comment les données de vos commentaires sont traitées.

Traduction

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
par Transposh - translation plugin for wordpress

Articles populaires

Configuration système requise pour Windows Server 2016
Serveur Windows
Liste de collecte de requêtes Configuration Manager
Liste de collecte de requêtes Configuration Manager
Configmgr
Navigation structurée/gérée activée sur les pages modernes dans les sites d'équipe classiques
Technologie
SCCM n'a pas réussi à obtenir les emplacements DP comme version attendue de MP
Configmgr

Messages récents

Installation et configuration de Fail2ban pour la protection SSH sur Ubuntu 24.04
Linux
Activation et configuration de FirewallD sur AlmaLinux
Linux
Création d'utilisateur et configuration de la clé SSH dans AlmaLinux
Linux
Comment réinitialiser le mot de passe sur AlmaLinux
Linux

© 2023 Entérin

Aller à la version mobile
Content de te revoir!

Connectez-vous à votre compte

Nom d'utilisateur ou adresse e-mail
Mot de passe

Vous avez perdu votre mot de passe?