Al usar este sitio, estás de acuerdo con el política de privacidad.
Aceptar
EnterineEnterineEnterine
  • HOGAR
  • TI PRO
  • TECNOLOGÍA
  • Microsoft
    • Azur
    • Administrador de configuración/SCCM
    • Dpm
    • orquestador
    • Hiper-V
    • Información privilegiada de Microsoft Edge
    • MSI
    • Oficina 365
    • Información privilegiada de la oficina
    • Energía BI
    • Skype
    • Servidor SQL
    • equipos
  • VENTANAS
    • Centro de administración de Windows
    • Cliente de Windows
    • Servidor Windows
  • Lista de recopilación de consultas SCCM
Lectura: Cómo ejecutar archivos de script Shell en Windows 10 Usando WSL
Cambiar tamaño de fuenteAutomóvil club británico
EnterineEnterine
Cambiar tamaño de fuenteAutomóvil club británico
  • HOGAR
  • TI PRO
  • TECNOLOGÍA
  • Microsoft
  • VENTANAS
  • Lista de recopilación de consultas SCCM
Buscar
  • HOGAR
  • TI PRO
  • TECNOLOGÍA
  • Microsoft
    • Azur
    • Administrador de configuración/SCCM
    • Dpm
    • orquestador
    • Hiper-V
    • Información privilegiada de Microsoft Edge
    • MSI
    • Oficina 365
    • Información privilegiada de la oficina
    • Energía BI
    • Skype
    • Servidor SQL
    • equipos
  • VENTANAS
    • Centro de administración de Windows
    • Cliente de Windows
    • Servidor Windows
  • Lista de recopilación de consultas SCCM
Cliente de Windows

Cómo ejecutar archivos de script Shell en Windows 10 Usando WSL

Publicado: Febrero 18, 2024
2 Lectura mínima
COMPARTIR

Cómo ejecutar archivos de script Shell en Windows 10 Usando WSL.

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

Intento 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. Ir a Settings\Update & Security\For Developers. Revise el Developer Mode;

2. Buscar 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 Símbolo del sistema y PowerShell.

Execute Shell Script Files

1. Abierto WindowsPowerShell and navigate to the folder where the script file is available;

2. Tipo:

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 do:\ 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. Tipo sh script.sh and hit enter.
ETIQUETADO:Símbolo del sistema (CMD)linuxPowershellubuntuWindowsWindows 10WSL
Artículo anterior Cómo arreglar “No se pudo abrir el grupo Runspace” Error en el complemento WinRM del Administrador del servidor?
Artículo siguiente Cómo cambiar el tamaño de la memoria virtual en Windows 10: Guía paso a paso
1 Comentario 1 Comentario
  • awda dice:
    Agosto 19, 2020 en 1:36 p.m

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

    Responder

Deja una respuesta Cancelar respuesta

Su dirección de correo electrónico no será publicada. Los campos obligatorios están marcados *

Este sitio utiliza Akismet para reducir el spam.. Descubra cómo se procesan los datos de sus comentarios.

Traducción

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
por Transposh - Plugin de traducción para WordPress

Publicaciones populares

Requisitos del sistema para Windows Server 2016
Servidor Windows
Lista de recopilación de consultas del Administrador de configuración
Lista de recopilación de consultas del Administrador de configuración
ConfigMgr
Navegación estructurada/administrada habilitada en páginas modernas en sitios de equipo clásicos
Técnico
SCCM no pudo obtener las ubicaciones de DP como la versión esperada de MP
ConfigMgr

Publicaciones recientes

Instalación y configuración de Fail2ban para protección SSH en Ubuntu 24.04
linux
Habilitación y configuración de FirewallD en AlmaLinux
linux
Creación de usuarios y configuración de claves SSH en AlmaLinux
linux
Cómo restablecer la contraseña en AlmaLinux
linux

© 2023 Enterine

Ir a la versión móvil
Bienvenido de nuevo!

Inicia sesión en tu cuenta

Nombre de usuario o dirección de correo electrónico
Contraseña

Perdiste tu contraseña?