When opening my WSL2 Ubuntu profile, there is a 1-2 second delay if I haven't used bash for a little bit. Looking for a way to keep bash active in the background for a longer period of time. #23403

Closed
opened 2026-01-31 08:41:12 +00:00 by claunia · 1 comment
Owner

Originally created by @futuremotiondev on GitHub (Jul 1, 2025).

Windows Terminal version

1.22.11751.0

Windows build number

10.0.19045.0

Other Software

WSL version: 2.4.4.0
Kernel version: 5.15.167.4-1
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.6036

Steps to reproduce

  1. Open Windows Terminal.
  2. Select the WSL2 Profile. In my case I have two:

Command Line for "Ubuntu-22.04" Profile: C:\Windows\system32\wsl.exe -d Ubuntu-22.04
Command Line for "WSL Ubuntu 22.04.5" Profile: ubuntu2204.exe

  1. Wait as WSL spins up, taking ~1-3 seconds.
  2. Finally I get a prompt.

You can also reproduce by just running this command:

wt.exe -p "Ubuntu-22.04"

(Replace "Ubuntu-22.04" with your actual WSL2 profile name in WT)

Expected Behavior

I expected the prompt to appear faster. It's fairly annoying when you're using it a lot.

Actual Behavior

Again, it takes anywhere from one to three seconds for a prompt to appear. Once the prompt has appeared, if I open additional bash windows in terminal it's instantaneous.

I suspect that there is some kind of timeout where WSL goes in to some kind of dormant state after non-usage.

I am hoping to find a way to modify WSL's behavior so the prompt loads faster from a cold start, either by editing .wslconfig or using the new "WSL Settings" app. Is there a setting or option that would help my use-case here?

Thanks for any sort of recommendations.

Originally created by @futuremotiondev on GitHub (Jul 1, 2025). ### Windows Terminal version 1.22.11751.0 ### Windows build number 10.0.19045.0 ### Other Software ``` WSL version: 2.4.4.0 Kernel version: 5.15.167.4-1 WSLg version: 1.0.65 MSRDC version: 1.2.5620 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.26100.1-240331-1435.ge-release Windows version: 10.0.19045.6036 ``` ### Steps to reproduce 1. Open Windows Terminal. 2. Select the WSL2 Profile. In my case I have two: Command Line for "**Ubuntu-22.04**" Profile: `C:\Windows\system32\wsl.exe -d Ubuntu-22.04` Command Line for "**WSL Ubuntu 22.04.5**" Profile: `ubuntu2204.exe` 3. Wait as WSL spins up, taking ~1-3 seconds. 4. Finally I get a prompt. You can also reproduce by just running this command: ``` wt.exe -p "Ubuntu-22.04" ``` (Replace "Ubuntu-22.04" with your actual WSL2 profile name in WT) ### Expected Behavior I expected the prompt to appear faster. It's fairly annoying when you're using it a lot. ### Actual Behavior Again, it takes anywhere from one to three seconds for a prompt to appear. Once the prompt has appeared, if I open additional bash windows in terminal it's instantaneous. I suspect that there is some kind of timeout where WSL goes in to some kind of dormant state after non-usage. I am hoping to find a way to modify WSL's behavior so the prompt loads faster from a cold start, either by editing `.wslconfig` or using the new "WSL Settings" app. Is there a setting or option that would help my use-case here? Thanks for any sort of recommendations.
claunia added the Issue-QuestionResolution-ExternalNeeds-Tag-Fix labels 2026-01-31 08:41:13 +00:00
Author
Owner

@DHowett commented on GitHub (Jul 1, 2025):

Hey there! This is more of a WSL question than a Terminal one, but I think I can still help.

If you launch "WSL Settings", you should be able to find an option in "Optional Features" that controls how long the VM is kept warm before being paused.

Image

It is also documented for inclusion in .wslconfig if you'd prefer something less GUI-driven. See vmIdleTimeout.

@DHowett commented on GitHub (Jul 1, 2025): Hey there! This is more of a WSL question than a Terminal one, _but_ I think I can still help. If you launch "WSL Settings", you should be able to find an option in "Optional Features" that controls how long the VM is kept warm before being paused. ![Image](https://github.com/user-attachments/assets/07be4a7f-d5c0-4eb3-ad55-02af35c14527) It is also documented for [inclusion in .wslconfig](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconfig) if you'd prefer something less GUI-driven. See `vmIdleTimeout`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23403