docker:install-docker-for-windows-wsl
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| docker:install-docker-for-windows-wsl [2024/09/06 22:41] – odefta | docker:install-docker-for-windows-wsl [2024/09/06 22:44] (current) – [Automatically Start Ubuntu WSL at Startup without Showing CMD] odefta | ||
|---|---|---|---|
| Line 60: | Line 60: | ||
| ==== Automatically Start Ubuntu WSL at Startup without Showing CMD ==== | ==== Automatically Start Ubuntu WSL at Startup without Showing CMD ==== | ||
| - | To automatically start WSL (specifically | + | Open **Notepad** and create a batch script with the following command: |
| - | - Open **Notepad** and create a batch script with the following command: | + | < |
| - | ``` | + | @echo off |
| - | | + | wsl -d Ubuntu |
| - | wsl -d Ubuntu | + | </ |
| - | ``` | + | |
| - | - This command launches the **Ubuntu** distribution in WSL. Replace `Ubuntu` with your distribution name if necessary. | + | |
| - | - Save the file as `start_wsl.bat` in the `C: | + | Save the file as `start_wsl.bat` in the `C: |
| - | - In **Notepad**, | + | |
| - | - Choose **C: | + | |
| - | - Name the file `start_wsl.bat`. | + | |
| - | - In the **Save as type** dropdown, select **All Files** (important!). | + | |
| | | ||
| - | - Create a shortcut to the batch file: | + | Create a shortcut to the batch file. |
| - | | + | Right-click on the `start_wsl.bat` file, and choose **Create Shortcut**. |
| - | + | Next, set the shortcut to run minimized: | |
| - | - Set the shortcut to run minimized: | + | |
| - Right-click the newly created shortcut, and select **Properties**. | - Right-click the newly created shortcut, and select **Properties**. | ||
| - In the **Shortcut** tab, set **Run** to **Minimized**. | - In the **Shortcut** tab, set **Run** to **Minimized**. | ||
| - Click **OK** to save the settings. | - Click **OK** to save the settings. | ||
| - | - Move the shortcut to the Windows **Startup** folder: | + | Then, move the shortcut to the Windows **Startup** folder: |
| - Press *Win + R*, and type `shell: | - Press *Win + R*, and type `shell: | ||
| - Move the shortcut you created into this folder. | - Move the shortcut you created into this folder. | ||
docker/install-docker-for-windows-wsl.1725662505.txt.gz · Last modified: by odefta
