Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tenzan's avatar
Level 3

Sail on Windows: sudo password prompt

Hi,

I'm trying to follow docs at https://laravel.com/docs/11.x#sail-on-windows . I have all prerequisites installed. Sudo password on Ubuntu side has been set.

The doc mentions to run curl -s https://laravel.build/example-app | bash on Windows Terminal, which opens PowerShell for me (using Win11), so I tried on Command Prompt and it prompted for WSL sudo password. Entering password not giving any effect. How to fix this?

 => [laravel.test  9/11] COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf                                                                                                                       0.0s
 => [laravel.test 10/11] COPY php.ini /etc/php/8.3/cli/conf.d/99-sail.ini                                                                                                                                    0.0s
 => [laravel.test 11/11] RUN chmod +x /usr/local/bin/start-container                                                                                                                                         0.4s
 => [laravel.test] exporting to image                                                                                                                                                                        6.5s
 => => exporting layers                                                                                                                                                                                      6.5s
 => => writing image sha256:682c04df34c5a295e0b56cec53ac509bb882d4c0f780eb4a3d0e7840eb1663a2                                                                                                                 0.0s
 => => naming to sail-8.3/app                                                                                                                                                                                0.0s

Please provide your password so we can make some final adjustments to your application's permissions.

[sudo] password for askar:
0 likes
3 replies
LaryAI's avatar
Level 58

To address the issue of the sudo password prompt when running Laravel Sail on Windows, you need to ensure that you are correctly entering the password for your WSL (Windows Subsystem for Linux) user. Here are the steps to resolve this:

  1. Verify WSL Installation: Ensure that WSL is properly installed and configured on your Windows system. You can do this by running the following command in PowerShell or Command Prompt:

    wsl --list --verbose
    

    This should list your installed WSL distributions and their statuses.

  2. Set WSL Default User Password: If you haven't set a password for your WSL user, you need to do so. Open your WSL terminal (e.g., Ubuntu) and set a password for your user:

    sudo passwd
    

    Follow the prompts to set a new password.

  3. Run the Command in WSL: Instead of running the curl command directly in PowerShell or Command Prompt, you should run it within your WSL terminal. Open your WSL terminal (e.g., Ubuntu) and execute the command:

    curl -s https://laravel.build/example-app | bash
    

    This ensures that the command runs in the correct environment and can properly handle the sudo password prompt.

  4. Enter the Password: When prompted for the sudo password, enter the password you set for your WSL user. This should allow the process to continue and complete the setup.

If you still encounter issues, you can try the following additional steps:

  • Check WSL Version: Ensure you are using WSL 2, as it provides better performance and compatibility. You can set WSL 2 as the default version by running:

    wsl --set-default-version 2
    
  • Update WSL: Make sure your WSL is up to date. You can update it by running:

    wsl --update
    

By following these steps, you should be able to resolve the sudo password prompt issue and successfully set up Laravel Sail on your Windows system.

tenzan's avatar
Level 3
C:\Users\askar>wsl --list --verbose
  NAME                   STATE           VERSION
* Ubuntu-24.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2
puklipo's avatar
puklipo
Best Answer
Level 9

Use Ubuntu in Terminal. Not PowerShell.

Windows Terminal - Settings - Startup - Default profile Select Ubuntu.

1 like

Please or to participate in this conversation.