Post

Corrigindo o lançador do WSL quando quebra

Corrigindo o lançador do WSL quando quebra

Corrigindo o lançador do WSL quando quebra

Às vezes uma atualização apaga o comando do lançador do WSL e a aba deixa de iniciar a distro. O conserto é só restaurar o comando.

Se o campo Command Line estiver vazio ou errado, você ainda pode iniciar manualmente:

1
wsl -d Ubuntu-24.04

Mas o ideal é voltar a funcionar pelo clique. Ajuste o lançador com o comando correto.

Step 1: Access the WSL Tab Settings

Open your terminal and go to the Settings. Locate your WSL distribution (for example, Ubuntu-24.04) and click on it to open its settings.

Step 2: Fix the Command Line Parameter

In the settings for your WSL distribution, look for the Command Line field. If it’s missing or incorrect, you need to update it with the correct launcher for WSL.

In the Command Line field, set the value to:

1
C:\Windows\System32\wsl.exe -d Ubuntu-24.04

Make sure to replace Ubuntu-24.04 with the exact name of your distribution.

Step 3: Set the Initial Directory (Optional)

If you want WSL to start in a specific directory, you can configure the Starting Directory. To set it to your WSL user’s home directory, add the following in the Starting Directory field:

1
/home/jcottobboni

Make sure to replace jcottobboni with your actual WSL username.

Step 4: Save Your Changes

Once you’ve updated the Command Line and Starting Directory fields, click Save. Now, when you click the WSL tab in your terminal, it should start the correct WSL distribution without any issues.

Conclusion

By following these simple steps, you can restore the functionality of your WSL launcher and make sure your distributions start correctly from the terminal tabs. This ensures you can continue using WSL without having to manually enter commands each time.


References:

Esta postagem está licenciada sob CC BY 4.0 pelo autor.