This is a memo for resolving the issue when Windows Linux WSL Bash fails to launch.
When I executed the following command on WSL Bash in Conemu, some incomprehensible output appeared, and then the cursor in the bash window in conemu completely stopped moving. Since powershell in conemu was working, it didn’t seem to be a conemu issue, so I tried to launch bash alone from win-r, but the window crashed before the bash login shell started.
output(){
gen_data_by_regex_in_bulk | out | google
: <<<'
stdout output to file utility.
e.g.
echo hoge | tee >( output ) | ag .
gen_data_by_regex_in_bulk | out | clip
gen_data_by_regex_in_bulk | out | google
outputg | wc
outputg | ...
'
output="$( python3 -c "import sys; print( sys.stdin.read() )" )"
# echo "${output}" > "${1:-"${HOME}/output.txt"}"
echo "${output}" > "${1:-"${OUTPUT_FILE}"}"
}
out(){
: abbreviation of output
tee >( output )
}
echo hogehoge | tee>(output) | tee
I just realized, but the gen_data_by_regex_in_bulk | out | google statement right below output() is unintended. I only noticed it now when I copied and pasted it here. I thought I had written the code correctly but wondered what was wrong - it seems this might have caused a loop and triggered something like a memory leak. I can only hope that Bash itself isn’t dead.
In this situation, I might have to reinstall WSL, but my gut feeling told me a simple OS restart wouldn’t solve it. When I was looking for some method, I found information saying changing memory-related settings like the following might work. It’s not exactly the same situation, but it’s similar, so I’ll try it.

Run windows + R type SystemPropertiesAdvanced click settings in performance group In advanced tab, click Change under Virtual Memory and deselect the automatically manage paging file size for all drives Select custom size and enter 800 for initial size, 1024 for maximum size. Apply changes and restart.
windows 10 - WSL Bash doesn’t start - Super User Bash not starting · Issue #849 · microsoft/WSL
…
After restarting as expected, it was fixed. What a relief.