Comments (4)
Go to %appdata%\..\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\rootfs\etc\passwd
and change shell command for user to default /bin/bash
Also you can run wsl.exe --user root
if you already changed default-user
from wsl2-hacks.
@itsabadcode . Unfortunately I have tried that, and for me, ubuntu is mounted at wsl$, and when I go to edit passwd there and save like above, even with admin privileges it won't allow me to save with notepad.
The files in localstate are only
Mode LastWriteTime Length Name
d----- 6/5/2020 11:01 AM temp
-a---- 7/8/2020 3:19 AM 50345279488 ext4.vhdx
-a---l 6/5/2020 10:51 AM 0 fsserver
and I can't access them here.
The wsl command does not do anything for me.
from wsl2-hacks.
In theory, you could just uninstall the application, delete the package folder and then re-install the app for a clean install.
That is, if that is an option for you, of course.
from wsl2-hacks.
The default instructions are made for ubuntu1804, which corrupt bash for ubuntu2004
These are the instructions for ubuntu2004
https://github.com/chcoders/wsl2-hacks-ubunutu2004
I haven't been able to recover my ubuntu2004 after following the ubuntu1804 instructions, so had to do a clear reinstall.
I would like to discovery a way to enter some kind of "recovery mode" in WSL like common linux distros. I could not manage to undo changes via \$wsl\Ubuntu-20.04 since most files are write protected 👎
Essentially I was able to backup all the files I had in WSL via \$wsl but had to reinstall all the system from the beginning. I hope I find a way to access a full R/W mode with a recovery system in WSL in the future, because I tend to mess up with system files like these pretty frequently.
from wsl2-hacks.
Related Issues (20)
- Last line gives "Invalid argument" on Pengwin
- Systemd does not start despite the hack has been carefully applied as described in the instruction HOT 1
- failed to install wsl2host: The specified domain either does not exist or could not be contacted. HOT 1
- Too many levels of symbolic links when running ls -l /proc/sys/fs/binfmt_misc
- WSL2 and IPv6
- Create separate downloable files for `systemd-bash` and other utilities
- Broken with WSL + Ubuntu 20.10 HOT 1
- Windows Server 2022
- System has not been booted with systemd as init system (PID 1). Can't operate. HOT 1
- Put Windows IP in the hosts
- In Windows 11, init with an alternative
- fake-bash - ping no response
- Fork to wsl2-hacks-win11+ubuntu_22.04?
- Systemctl not active HOT 4
- Anyone tried this on Debian WSL Distro?
- How to run xfe and similar GUI apps under wsl2hack HOT 4
- the root user work around is not working
- A few suggestions to improve this HOT 16
- Update instructions for Ubuntu 20.04 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wsl2-hacks.