Open sirredbeard opened 5 years ago
I second this with my point being that it would be cool for users to change the distro names to something more console friendly. Having to type wsl -d Ubuntu-18.04
when I want to switch quickly is annoying. Maybe smething like wsl --rename-distribution Ubuntu-18.04 ubuntu
.
[DISCLAIMER: Do not mess with your registry if you don't know what you're doing, it might break your Windows installation! Treat the Registry Editor like sudo: "With great power, comes great responsibility" ]
Having said that, this is an easy (and as far as I can see harmless) hack using the Registry editor: I renamed the distro by changing the following key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss{xxxxxxxxx-YOUR-GUID-HERE-xxxxxxxx}\DistributionName
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
DistributionName
DistributionName
to the desired value\\wsl$
to find your renamed distro, or execute wsl.exe -v -l
I put this here for those who cannot wait any longer and have to flinch every time they see distro Ubuntu-18.04 or WLinux listed when they are in fact running Ubuntu 20.04 or Pengwin.
@gcalis It helps to rename distro in wsl list, but doesn't change installed app, so application won't start from the Start menu after registry change.
@gcalis It helps to rename distro in wsl list, but doesn't change installed app, so application won't start from the Start menu after registry change.
is there any way to fix this issue?
I can imagine instead of replacing the actual value, you could create a new registry entry with the desired name? That leaves you with 2 entries per distro, but may work for both entrypoints then (not tested!). This is a hack either way.
This would be really nice, as people who update their distros with do-release-upgrade
-route get an updated distro that is listed by their previous version in wsl -l
and have their start menu executables by their old name which can get pretty confusing.
Arse. And I thought this would be an easy fix.
Hey, I just had the same issue and I found the solution
Step 1: Enter settings by pressing "Ctrl + ," Step 2: Modify the name from distro's profile
{
"guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"hidden": false,
"name": "Ubuntu (RENAME HERE)",
"source": "Windows.Terminal.Wsl",
"useAcrylic": true,
"acrylicOpacity": 0.9,
"fontFace": "CodeNewRoman Nerd Font"
}
Step 3: Save the change Step 4: Restart Terminal and see the result
🚀🚀🚀
@nguyentamgm That doesn't solve the problem. What you've done is changing the tab name within Windows Terminal. But the issue here is that the listing under wsl -l
is still unchanged.
I have had success renaming a WSL2 distribution by exporting the image as a .tar file to another location, then reimporting it with the new name. This sets up everything appropriately from what I can tell, except the Start Menu short-cuts to open the distro terminal. If anyone finds out how to get those sorted, I'd love to know.
However, no problems remoting into them with VS Code + extension, or via Windows Terminal(s), etc.
Any update on when this will be possible?
I have had success renaming a WSL2 distribution by exporting the image as a .tar file to another location, then reimporting it with the new name. This sets up everything appropriately from what I can tell, except the Start Menu short-cuts to open the distro terminal.
Has anyone tried this wsl --export
/--import
trick on a distro from the MS store? If so, were app updates broken afterwards?
Would love to see this too. All my distros now have ancient names that no longer reflect what's running in them.
Is there any update or a schedule on this feature?
I would be delighted to observe this as well. All the operating systems I use now have old-fashioned labels that don't accurately reflect what is running on them.
I'd like this feature please, we are running scripts to set WSL up for developers and it would be important to set the name of the distro as seen in the wsl -l
list so it reflects what it is accurately. This will greatly help us with troubleshooting too.
As an example, at the moment the distro just gets imported as "Ubuntu" but it might be 18.04 or 20.04 or 22.04
I think this should be an easy Quality of Life improvement.
Can this issue be more prioritized because it is a "quick win" ? (if it is)
I would love to have this feature rather than having to do one of the workarounds
Hm, having custom name for each WSL instance is required if we want multiple instances from the same distro. Currently, this is the workaround for both issues: https://endjin.com/blog/2021/11/setting-up-multiple-wsl-distribution-instances
upping on the wsl --rename-distribution proposal. a real Quick-Win: it would not cost much to implement, but would definitely make our developers' life easier ;)
Any update on this?
bump
4 years... Typical Microsoft response time, right?
Would be great to see this happen !
We rebranded WLinux to Pengwin.
We maintained the WLinux name in the WSL API 1 in order to avoid breakage 2.
However this means Pengwin still appears as
\WSL$\WLinux
in Explorer.It also means Pengwin appears as WLinux in the new Terminal application.
We could issue a new package of Pengwin in the Store with the new name in the API, offering it for free to everyone who has bought the old Pengwin, but it would mean a lot of links to the old package would break and would cause user confusion.
If down the line it becomes possible to rename WSL distros or identify them with a specific UUID and string that can change, it would be much appreciated.
Thank you.