Useful Commands/Windows only: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
= List tcp ports blocked = | |||
<syntaxhighlight lang="bash"> | |||
netsh interface ipv4 show excludedportrange protocol=tcp | |||
net stop winnat | |||
net start winnat | |||
netsh int ipv4 add excludedportrange protocol=tcp startport=8080 numberofports=1 | |||
netsh int ipv4 set dynamicport tcp start=49152 num=16384 | |||
netsh int ipv4 set dynamicport udp start=49152 num=16384 | |||
</syntaxhighlight> | |||
= Install WSL utils = | |||
<syntaxhighlight lang="bash"> | |||
sudo apt install wslu -y | |||
</syntaxhighlight> | |||
= Run command inside WSL Ubuntu = | |||
<syntaxhighlight lang="text"> | |||
wsl -d Ubuntu bash -ic "..." | |||
</syntaxhighlight> | |||
= Fix WSL network = | |||
<syntaxhighlight lang="text"> | |||
wsl --shutdown | |||
netsh winsock reset | |||
netsh int ip reset | |||
</syntaxhighlight> | |||
= List ports listening = | = List ports listening = | ||
Latest revision as of 16:57, 17 August 2026
List tcp ports blocked
netsh interface ipv4 show excludedportrange protocol=tcp
net stop winnat
net start winnat
netsh int ipv4 add excludedportrange protocol=tcp startport=8080 numberofports=1
netsh int ipv4 set dynamicport tcp start=49152 num=16384
netsh int ipv4 set dynamicport udp start=49152 num=16384
Install WSL utils
sudo apt install wslu -y
Run command inside WSL Ubuntu
wsl -d Ubuntu bash -ic "..."
Fix WSL network
wsl --shutdown
netsh winsock reset
netsh int ip reset
List ports listening
netstat -an | findstr LISTENING
Create a Windows To Go for Mac
diskpart
DISKPART> list disk
DISKPART> select disk 0
DISKPART> convert gpt
DISKPART> create partition efi size=300
DISKPART> format quick fs=fat32
DISKPART> assign letter=s
DISKPART> create partition primary size=184320
DISKPART> format quick fs=ntfs
DISKPART> assign letter=t
DISKPART> create partition primary
DISKPART> format quick fs=ntfs
DISKPART> exit
dism /apply-image /imagefile:D:\sources\install.wim /index:1 /applydir:T:\
bcdboot T:\Windows /s S: /f UEFI
Problems
- VirtualBox USB 3.0 is not stable for External Disk
Make powershell output in English
chcp 437
chcp 65001
Shutdown
shutdown /s
shutdown /s /t 30