Even if the command does not support setting the needed variable via a command line argument, it's possible to do it using bash itself: # direct, command-dependent For this, there needs to be a way to pass these variables. For instance, DISPLAY, if set in the windows normal method, is not passed to WSL. One thing I've found is that environment variables are not available. If you go into Windows' Task Manager, it will show a Sleep or Python2 command running for 20 seconds, then self-clearing. Wsl python -c 'import time time.sleep(20) ' & You can append an ampersand to the command (normal shell behavior), which results in a momentary bash terminal which immediately disappears but the command continues.Įxamples, within Start » Run: wsl sleep 20 & A recent addition to WSL allows for starting wsl commands directly from the 'run' or Start menu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |