How to delete a folder I accidentally created in Win10 Ubuntu? - windows-subsystem-for-linux

I accidentally created a "test" folder in the Win 10 Ubuntu directory, using the Win method instead of the command line. Then I deleted it, still using the Win method. The "test" folder can no longer be seen from the Win Explorer. However, it can still be seen from the Ubuntu terminal, though without access permission.
I tried to use rmdir test and sudo rm -r test but both could not work.

Solved! Just restart the Win10!

Related

Direnv not allowing me to allow

I've installed direnv (v2.18.2) onto my Ubuntu 16.04 machine using:
sudo snap install direnv
as per the website, and added the line:
eval "$(direnv hook bash)"
to my ~/.bashrc file as per the instructions. When I navigate into the directory with my .envrc file, the following message shown:
direnv: error .envrc is blocked. Run `direnv allow` to approve its content.
Sweet. So I run direnv allow, and I'm immediately hit with exactly the same error. I've also tried using direnv allow . but that doesn't seem to help. Also, completely restarting my laptop hasn't helped either.
All the advice I've seen is for direnv not finding the .envrc file, but here it is finding it, it's just not allowing me to allow it.
I know this is not a propper solution, but I encountered this aftering installing from a snap on Linux Mint.
After I uninstalled the snap and installed it from aptitude I did not have any issues.
While the OP is on Ubuntu I ran into the same problem with the snap installed binary on CentOS 7.7.
I worked around the problem by installing a go binary and then building direnv from source: git clone https://github.com/direnv/direnv.git; cd direnv; make; make install which got me direnv 2.21.2 in /usr/local/bin

Permission Denied while installing Node on WSL using NVM

I tried to install Node LTS on WSL using NVM.
While I successfully installed nvm, Node installation using nvm install --lts made some errors:
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/bin' to '/home/anesin1109/.nvm/versions/node/v10.15.3/bin': Permission denied
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/include' to '/home/anesin1109/.nvm/versions/node/v10.15.3/include': Permission denied
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/lib' to '/home/anesin1109/.nvm/versions/node/v10.15.3/lib': Permission denied
mv: cannot move '/home/anesin1109/.nvm/.cache/bin/node-v10.15.3-linux-x64/files/share' to '/home/anesin1109/.nvm/versions/node/v10.15.3/share': Permission denied
I tried to move these files manually, but it also ended with those errors.
Try making sure nothing is accessing the directory. I had this exact issue. I figured out that my VisualStudio Code had the directory open in the WSL which prevented NVM from doing its thing. After closing VS Code nvm install 12 worked fine. Hope that helps.
Please check if your user owns all files in .nvm. You can take ownership recursively with chown -R <user> .nvm. Delete all node versions recursively with rm -rf .nvm/versions/node. Then try again; this process worked for me at least.
problem solved with me when i upgrade the WSL distribution from WSL1 to wsl 2
wsl --set-version Ubuntu 2

Vagrant 1.9.6 hangs on command "vagrant ssh"

I have vagrant 1.9.6 and oracle virtual box 5.1.22 installed on my system. when I ran vagrant up and tried to switch into vagrant ssh on GIT bash it hangs there and nothing get it to work on me.
screenshot:
I solved mine by adding this line export VAGRANT_PREFER_SYSTEM_BIN=1 in my .bash_profile file. You can manually create this file on windows and place it on your home directory.
Take a look at this thread

dpkg sent over SSH on Mac App not working

So I am facing a very strange peculiarity. I am trying to run dpkg on a remote server via SSH. My code works perfectly if I click Run through Xcode, but if I click Build > Archive then Export as a Mac Application, all SSH commands sent to the server work, other than "dpkg". Any ideas why this might happen?
Apparently, after many days of facing that issue, I tried installing via dpkg a Deb that was already located on my server and it worked. What's even more strange is that while scp would transfer the file, dpkg would just not use it! What made the trick was getting the file via curl and then running dpkg normally. No idea why that's the case though, as both Deb files had the same owner, group and permissions. And both were running by root, so it wasn't a permission error.

Installing KVM for Asp.Net VNext

I want to play with the new aspnet vnext, but it needs kvm to be installed.
Here they say that i need to clone the repo and run kvmsetup.cmd. BUT there is no such file when i clone the repo.
So i went back to their home page, i cloned the repo (home), now i can see a kvmsetup.cmd file. when i run it in the powershell it doesnt install KVM !!
Thanks for your help.
UPDATE:
i had this problem :
I resolved this problem by opening the powershell as an administrator with the following command : Set-ExecutionPolicy RemoteSigned.
It did work, but it didn't add KVM to the path :
Try executing kvm outside of the cloned directory.
This has changed now. Just open command prompt with admin rights and run this to install KVM.
#powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
That will download KVM and set all the corrects paths. Unrestricted wont work if you don't run CMD with Admin rights.
Close the command prompt and reopen command prompt to start using KVM