Wsl distro Installation issue:
I was able to run wsl --install and go through the installation process. That went pretty smooth. After installing I restarted my computer. And this is where I'm stuck. I have ran wsl --install -d in windows powershell. What I get back in "the requested operation requires elevation" guessing I need to run it as admin. But when I do, I get this message: No actions was taken as a system reboot is required. I had restarted my computer 2 more times afterwards and it's still the same. I'm lost now. I tried looking for answers on GitHub before coming here.
37 Replies
you have to actually reboot the pc
as in, a reboot, not turn off and then on
or disable fast boot on windows
also, make sure you have virtualization enabled on the bios
Alright. I'll figure out how to do that. Didn't know restarting and rebooting was to different things
well, it depends
if you mean a restart as "shutdown and turn on", it isn't the same as a reboot if windows fast boot is enabled
from my understanding, fast boot saves the kernel and hardware configurations (and drivers) in the hybernation file, so it doesn't have to re-configure the hardware everytime it boots
now, you added components to windows, so, the kernel needs to re-initialize
a reboot - using the "restart" option in the start menu, will do that re-initialization
a shutdown and turning on will keep reading from the saved stuff in the hybernation file
Yeah I did do the "restart" option. Both times. So the shut down and turn on is basically close the laptop, open it?
no, it isn't
that suspends the laptop, but may or may not write to the hybernation file as well, in case the battery dies
I'll second this. Not having hypervisor running can cause lots of weird errors. From the FAQ:
Run βbcdedit /enum | findstr -i hypervisorlaunchtype
β in an elevated PowerShell & if you seehypervisorlaunchtype Off
, run βbcdedit /set hypervisorlaunchtype Auto
β & then βRestart-Computer
β (also in PowerShell).
the easiest way to see how to enable it is via google
Success!!
what was it?
what fixed the issue?
I did an update to the computer
that can cause it too
Then I ran the command wsl --install --d Ubuntu. Worked perfectly
you dont need to specify ubuntu, as it is the default
As you're beginning to program, I recommend knowing the
code .
command typed in the terminal. I use it pretty much every day.
This will open the directory you're currently in in VS code. (In *nix, .
means βthe current directoryβ & ..
means βthe parent directoryβ.)that means the same on windows
but you can just open vscode from vscode using the remote extension
Yup! I love this feature. Did that on my Chromebook before vs code started to become unstable π
no need to install or anything
Yeah it's super nice and handy
it is amazing
I hate asking for help for a third time but I can't figure this out. Shits going smoothly. I ran code . to open vc code. But when it comes time to adding files or folders, I don't have permission.. what's going on there?
Figured it out! Solution:
So by default, for me at least, root had ownership. Me, being a user, I'm 1 or 2 steps below root therefore I didn't have permission. I found this out by running
ls -l
which brought up some information for the files and folders. For me, it came back as drwxr-xr-x 2 root root 4096
. What I needed to do was change "root root" into my username. sudo chown -R your_username:yourusername directory
. (User:group).
This is for anyone else who might have the same issueyou actually should also do
sudo chmod -R 0777 ./dir
or use find to do it
this is because root may need access to it, besides your user and www-data (depending on the project)root should still have access regardless of access rights, though www-data could be an issue in the future... but only if you actually use apache or nginx to serve anything, which is unlikely to ever happen on WSL.
also changing everything to 777 is bad practice, even if it works. Filesystem permissions should be as restrictive as possible, and files should never have the executable flag set unnecessarily
it doesn't matter as much on WSL tbh, cause it's just going to be accessible on your own PC, so I'm just adding this as general info about best practices
i agree with you
0644 for files and 0755 for folder (or the opposite) is whats usually used
i know it is bad, but, i just nuke it all to 0777 as i really need it to be accessible to those 3 users
oh, same, just don't do it on a production server.
I mean, first thing I do installing windows is turn UAC off
OH, no! not in production!
specially in a shared environment
Do I change dir to a specific director or type it as is?
do you need that command?
Probably not. I'm not familiar with what it does
it changes the permissions of all files and folders to allow all users to do anything in all files inside the folder
Sounds like I should do it
i do it, but i know what im doing
welp, then I do it becase i now what ur doing
i know, and i do it for my situations
just dont do this in production
alright
if it is working the way you need, dont do it
alright. Thx for the extra bit of info
you're welcome