Skip to main content
added 1607 characters in body
Source Link
NotTheDr01ds
  • 23.4k
  • 6
  • 69
  • 109

Short answer:

From CMD or PowerShell:

start ubuntu.exe

If start isn't aliased under PowerShell, try:

start-process ubuntu.exe

More detail:

(incoming via editubuntu.exe is the "App Execution Alias" for the "Ubuntu" app installed from the Microsoft Store, but let me know ifalthough it's possible that it could also be:

  • ubuntu2004.exe: If you installed the "versioned" "Ubuntu 20.04" from the Store
  • ubuntu1804.exe: If you installed the "versioned" "Ubuntu 18.04"
  • And I'll assume that you don't still have the deprecated 16.04 version around.

You can see this by going to Manage app execution aliases in Windows Settings. Many Store apps include a "fake .exe" that is whatdesigned to launch the Store app. You can disable this, but I'm assuming it's enabled. If not, enable it, of course.

When you are looking for whilerun Ubuntu from the Start Menu, it is, of course, running the Store app. This app runs WSL in the legacy Windows Console, and does a couple of additional things such as set the application icon and font. That's pretty much the only difference than I addcan find from running it from the explanationcommand-line.

When you run ubuntu.exe (or one of the other WSL app execution aliases) from the command-line, it is started in the current terminal. It's the same as typing ipconfig.exe, for instance. It retains the current characteristics of the "owning" terminal (started by CMD or PowerShell) -- Same app icon, same fonts, etc.

When run with the start (CMD) or Start-Process (PowerShell) command, it starts a separate process in Windows (rather than as a subprocess of the current shell). Windows launches it in a new terminal (Windows Console by default), and presumably, WSL does some magic to say "if I'm the owner of the terminal, then set the icon and font".

Short answer:

From CMD or PowerShell:

start ubuntu.exe

More detail:

(incoming via edit, but let me know if that is what you are looking for while I add the explanation)

Short answer:

From CMD or PowerShell:

start ubuntu.exe

If start isn't aliased under PowerShell, try:

start-process ubuntu.exe

More detail:

ubuntu.exe is the "App Execution Alias" for the "Ubuntu" app installed from the Microsoft Store, although it's possible that it could also be:

  • ubuntu2004.exe: If you installed the "versioned" "Ubuntu 20.04" from the Store
  • ubuntu1804.exe: If you installed the "versioned" "Ubuntu 18.04"
  • And I'll assume that you don't still have the deprecated 16.04 version around.

You can see this by going to Manage app execution aliases in Windows Settings. Many Store apps include a "fake .exe" that is designed to launch the Store app. You can disable this, but I'm assuming it's enabled. If not, enable it, of course.

When you run Ubuntu from the Start Menu, it is, of course, running the Store app. This app runs WSL in the legacy Windows Console, and does a couple of additional things such as set the application icon and font. That's pretty much the only difference than I can find from running it from the command-line.

When you run ubuntu.exe (or one of the other WSL app execution aliases) from the command-line, it is started in the current terminal. It's the same as typing ipconfig.exe, for instance. It retains the current characteristics of the "owning" terminal (started by CMD or PowerShell) -- Same app icon, same fonts, etc.

When run with the start (CMD) or Start-Process (PowerShell) command, it starts a separate process in Windows (rather than as a subprocess of the current shell). Windows launches it in a new terminal (Windows Console by default), and presumably, WSL does some magic to say "if I'm the owner of the terminal, then set the icon and font".

Source Link
NotTheDr01ds
  • 23.4k
  • 6
  • 69
  • 109

Short answer:

From CMD or PowerShell:

start ubuntu.exe

More detail:

(incoming via edit, but let me know if that is what you are looking for while I add the explanation)