-
Notifications
You must be signed in to change notification settings - Fork 854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Want to use previous installed wsl in new windows user. #4312
Comments
To clarify, when you say 'I cannot use wsl any more' do you mean that you can't access the same Linux files as you had in your other user account? When you open up your distro app or run If that is the case, then this is done by design. WSL stores Linux files on a per user basis. If that is not the case and you're running into a technical issue when running as a new Windows user could you explain the issue you're facing a little more? Like the error codes you see, etc. |
Yeah, it shows the new user creation screen correct. The problem is whether I can reuse the wsl files that have installed by another user. I tried move/copy the folder to the new user folder, but it didn't work. |
Can you log in that previous user? If yes then you can create a tarball from root folder and then install it in new user using wslapi. |
As @Biswa96 mentioned you can use As well, you can put any files that you would like shared in places on the Windows hard drive where both users can access them (like the C drive etc.) But for your specific ask, it's not possible to copy and paste the files in AppData and move them over, and in general Linux files in WSL from one user's account are inaccessible from another user's account. If I was trying to replicate setups, I would use |
That, or probably a more fluent solution (and I think what Biswa96 was suggesting), would be to
[Related: unfortunately there just isn't any supported way that I know of, if you go out and buy a shiny new SSD and migrate your Microsoft User to your new |
Thank you very much. @Biswa96 @mscraigloewen @therealkenc |
I've marked this as 'bydesign' and closed it out since WSL is designed such that different users can not access other user's Linux files. I'm sorry it didn't work out for you in this case, if you have any more WSL questions please feel free to follow up! |
I had the same issue due to company split and had to migrate portion of users from one company into new one. Even though I kept all the appdata, the WSL for some reason was reset and I guess I lost all the files saved in WSL, which is not great. If it is by design, then it is flawed design. It is for sure an edge-case, not a common thing to happen. But unfortunately it seems there is no way for me to export or import anything as wslconfig /l is empty while in Windows store I have Debian still installed. |
It's a shame that WSL is not pure file based. Like @WoeiSheu , I haven't access to the first user (it was a Domain migration). |
I know this is closed but the way I have been able to set myself up again after a forced migration is
|
I am in the same boat. Company split and the WSL install wasn't migrated to the new AzureAD account on my system. I get this is by design, but maybe use One Drive for Business like so many other aspects of Windows these days, and store the WSL image there, such that after a migration (and once One Drive is migrated), it is ready to go in the new account. |
In my case the wsl files are already outside the old user folder: |
One of the shortest way:
|
I had the issue that the default user was root, so I had to go to |
Here is what worked for me in 2024:
|
It's fine that WSLs are user specific. What's not fine is that when User 1 installs WSL+Ubuntu, User 2 (admin) can start wsl but they don't see Ubuntu and WS claims no distros are installed. When you then download and launch Ubuntu |
Please fill out the below information:
Your Windows build number: ver17763.615
What you're doing and what's happening:
I created a new user in windows, and i cannot use wsl any more, which requires wsl to be installed again. But the computer cannot connect to internet now, because it has been in the enterprise lan.
What's wrong / what should be happening instead:
I want to know how can I move the previous installed wsl to a new user folder. I tried just to copy and paste c:/users/username/appdata/local/packages/canonicalgrouplimited.ubuntu18.04… to new user folder, it seems no effect.
SO how need i do? i cannot find any instructions on google.
The text was updated successfully, but these errors were encountered: