Change content of /usr/lib/binfmt.d/WSLInterop.conf from :WSLInterop:M::MZ::/init:F
to :WSLInterop:M::MZ::/init:PF
and restart sudo systemctl restart systemd-binfmt
listen EACCES: permission denied 0.0.0.0
When start some windows app, node for ex. you can see error like:
– listen EACCES: permission denied 0.0.0.0:5555
netsh int ipv4 show dynamicport tcp
verified that the range trampled commonly-used portsnetsh int ipv4 set dynamic tcp start=10000 num=20000
to reset it to something else (Change default port range)
How to delete a git tag locally and remote
# delete local tag ‘12345’
git tag -d 12345
# delete remote tag ‘12345’ (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push –delete origin tagName
git tag -d tagName
Disable beep sound in WSL terminal on Windows
- To disable the beep in bash you need to uncomment (or add if not already there) the line
set bell-style none
in your/etc/inputrc
file.Note: Since it is a protected file you need to be a privileged user to edit it (i.e. launch your text editor with something likesudo <editor> /etc/inputrc
). - To disable the beep also in vim you need to add
set visualbell
in your~/.vimrc
file. - To disable the beep also in less (i.e. also in man pages and when using “git diff”) you need to add
export LESS="$LESS -R -Q"
in your~/.profile
file.
Compact (release disk space) from wsl vhd image
wsl --shutdown diskpart # open window Diskpart select vdisk file="C:\WSL-Distros\…\ext4.vhdx" attach vdisk readonly compact vdisk detach vdisk exit this issue
PhpStorm (Idea) with Docker: BindException: Address already in use
Intellij Not starting and getting error (BindException: Address already in use) on system with Docker
Short resolution:
net stop winnat
net start winnat
Problem description:
This is /obviously/ not docker's problem (as best I can tell), it's probably not even hyperv's. Commenting here as this seems to be a frustrating and common end of journey for googlers. What follows is at least "one" of the resolutions/explanations.
On one of my machines the dynamic port range was not updated to the "new" start port, and I guess related to a resolved bug in windows has now "exposed" this as a serious problem (e.g.: I couldn't even bind to port 3000 for node dev -- access denied is I think a valid response, but it's not the typical "port in use" root cause).
Current dynamic port config:
> netsh int ipv[46] show dynamicport tcp
Unless you know you've mucked with these settings, and if it doesn't specify 49152 as "Start Port" and is set to 1025, it's not "current". I don't know if there is some kind of migration bug when they were patching this new value or what. Dynamic start port for udp was set correctly for example.
To set it to the current config:
> netsh int ipv[46] set dynamic tcp start=49152 num=16384
(Likely a reboot of your host is required.)
ref: https://support.microsoft.com/en-ca/help/929851/the-default-dynamic-port-range-for-tcp-ip-has-changed-in-windows-vista
While it's bizarre that I only just ran into this issue less than 4 hours ago -- been doing docker/node/go dev for the last few months straight, using docker edge, etc. This appears to have resolved my port exclusion issues (I have no large ranges of reserved ports below 50000 now, previously had 1000 port range exclusions all over the place.)
Install WSL on non-C drive
Open Powershell:
- Run
Set-Location DriveLetter:
whereDriveLetter
is the drive where WSL will be installed - Then create a directory for WSL with
New-Item WSL -Type Directory
- Now set location there with
Set-Location .\WSL
- Now download the appx package with
Invoke-WebRequest -Uri appx_package_url -OutFile Linux.appx -UseBasicParsing
- Now we will unpack appx with
Copy-Item .\Linux.appx .\Linux2.appx
and thenRename-Item .\Linux2.appx -Newname "Linux2.zip"
and thenExpand-Archive .\Linux2.zip
- Now
Get-Childitem -Filter *.exe
and you will find an .exe file named by the distro you downloaded. Run that to setup WSL you are done
List of links of wsl distros here
Share files from Windows 10 to Ubuntu
sudo apt install smbclient
edit /etc/samba/smb.conf
add
[global]
client use spnego = no
client NTLMv2 auth = no
https://itectec.com/ubuntu/ubuntu-access-windows-10-shared-folder-from-ubuntu-18-04/
Clean windows installer orphaned files
For removing orphaned files from c:\windows\installer you can use PatchCleaner.
There is two options: delete or move orphaned files to some directory.

*.lib from *.def
lib /def:some.def /out:some.lib
or in x64
lib /def:some.def /machine:x64 /out:some.lib