Skip to content

Windows

Win + R + winver:確認版本與組建號碼 Win + G: 開啟錄影工具,錄製當前程式畫面的操作 Win + .: 可以叫出表情符號

WSL

basic

config

wsl --export Ubuntu D:\Backup\wsl\ubuntu-20-dev.tar

docker

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo service docker start

systemd support

pycharm

vscode

ssh key

wsl use lot of disk size

https://claude.ai/share/19541b59-b792-4e90-934e-ba9536409b62

  • WSL2 and Docker Desktop store Linux files inside a single virtual hard disk file (ext4.vhdx).
  • Even after you delete containers, images, or files inside Linux, the .vhdx file does not shrink automatically — it stays huge (e.g., 80 GB even if you’re only using 15 GB now).
  • Optimize-VHD -Mode Full forces Windows to:
    • Fill all the “deleted” space with zeros
    • Tell your physical drive “this part is empty now” → Windows can finally shrink the file on disk.
# List VHDX paths
Get-ChildItem "$env:LOCALAPPDATA\Packages\" -Recurse -Include "*.vhdx" | Select FullName, @{Name="SizeGB";Expression={ "{0:N2}" -f ($_.Length/1GB) }}

# Then compact the big one, e.g.:
Optimize-VHD -Path "C:\Users\YourName\AppData\Local\Packages\CanonicalGroupLimited...\ext4.vhdx" -Mode Full

Hype-V

OpenVPN

vscode

ctrl + alt + 鍵盤上下: 同時編輯多游標 選取一段文字, shift + alt + I: 同時在行尾編輯多游標

ctrl + ` :terminal

ctrl + , (Control + comma): settings

SMB

工作檢視

Copilot

rsync

proxy

Server

DHCP server

003 Router 006 DNS Servers 015 DNS Domain Name 066 Boot Server Host Name => it seems like the next server(TFTP server) 067 Bootfile Name

Restart-Service -Name "DHCPServer"

Power shell

  • caculate the size about sub directory
    Get-ChildItem -Directory | ForEach-Object {
        $size = (Get-ChildItem $_.FullName -Recurse -File | Measure-Object -Property Length -Sum).Sum
        [PSCustomObject]@{
            Directory = $_.Name
            SizeMB = [math]::Round($size/1MB, 2)
            SizeGB = [math]::Round($size/1GB, 2)
        }
    } | Sort-Object SizeMB -Descending | Format-Table -AutoSize