docker:install-docker-for-windows-wsl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
docker:install-docker-for-windows-wsl [2024/09/07 01:42] – odefta | docker:install-docker-for-windows-wsl [2024/09/07 01: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 | + | @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.1725662536.txt.gz · Last modified: 2024/09/07 01:42 by odefta