Powershell中 wsl -l 命令展示所有wsl里安装的发行版
wsl –unregister 发行版名称 如 wsl –unregister Ubuntu

个人使用请勿留言
Powershell中 wsl -l 命令展示所有wsl里安装的发行版
wsl –unregister 发行版名称 如 wsl –unregister Ubuntu

certbot certonly -d www.5iaws.com -d 5iaws.com
certbot certonly -d www.5iaws.com -d 5iaws.com --key-type rsa --rsa-key-size 2048 --cert-name 5iaws-rsa.com
Powershell
$roots = @(
"D:\oldfile",
"D:\Private",
"D:\Public"
)
$roots | ForEach-Object {
Get-ChildItem $_ -Directory -ErrorAction SilentlyContinue
} | ForEach-Object {
$size = (Get-ChildItem $_.FullName -Recurse -File -ErrorAction SilentlyContinue |
Measure-Object Length -Sum).Sum
[PSCustomObject]@{
Name = $_.Name
SizeGB = "{0:N2}" -f ($size / 1GB)
Path = $_.FullName
}
} | Sort-Object {[double]$_.SizeGB} -Descending
查询可读写dc
nltest /dsgetdc:AD.CXXXCXXXX.COM /WRITABLE /FORCE
Powershell 加域,指定DC,指定OU
$cred = Get-Credential "AD.XXXXCOXXXX.COM\zxxx.qxx.a"
Add-Computer `
-DomainName "AD.XXXXCOXXXX.COM" `
-OUPath "OU=PRD,OU=POB,OU=Servers,OU=Computers,OU=CN,OU=APAC,OU=Cxxxx Cxxxx,DC=AD,DC=XXXXCOXXXX,DC=COM"`
-Credential $cred `
-Server "EASxxxxDCX1.AD.XXXXCOXXXX.COM" `
-Restart `
-Verbose
Jason Nano 使用zram管理Swap
/etc/systemd/nvzramconfig.sh
中间有一行
mem=$(((“${totalmem}” / 2 / “${NRDEVICES}”) * 1024))/2 就是整体缩小一半,意思是总 zram = RAM 的 50%,仍然平均分到每个 zram 设备
改为 mem=$(((“${totalmem}” / “${NRDEVICES}”) * 1024)) 就是保持Swap容量与内存大小一致
Jason Nano 也是使用LVM管理磁盘
https://nginx.org/en/linux_packages.html#Ubuntu
Install the prerequisites:
sudo apt install curl gnupg2 ca-certificates lsb-release ubuntu-keyring
Import an official nginx signing key so apt could verify the packages authenticity. Fetch the key:
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
Verify that the downloaded file contains the proper key:
gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg
To set up the apt repository for stable nginx packages, run the following command:
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
https://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
If you would like to use mainline nginx packages, run the following command instead:
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
https://nginx.org/packages/mainline/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list
Set up repository pinning to prefer our packages over distribution-provided ones:
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \
| sudo tee /etc/apt/preferences.d/99nginx
To install nginx, run the following commands:
sudo apt update sudo apt install nginx
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash
apt list nodejs
apt install -y nodejs
node -v
npm -v
npm install -g openclaw@latest
openclaw onboard –install-daemon
The fastest way to install. It detects your OS, installs Node if needed, installs OpenClaw, and launches onboarding.
bashCopy code
curl -fsSL https://openclaw.ai/install.sh | bash
powershellCopy code
iwr -useb https://openclaw.ai/install.ps1 | iex
To install without running onboarding:
bashCopy code
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
powershellCopy code
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
当 docker-compose.yml 没变,但镜像有新版本:
docker-compose pull
docker-compose up -d
👉 等价于:
比如改了端口、环境变量、volume:
docker-compose up -d
如果你想强制重建(推荐在不确定时用):
docker-compose up -d --build
比如只更新 web:
docker-compose pull web
docker-compose up -d web
防止磁盘越用越满 🧹
docker-compose down
docker-compose up -d
或只清理不用的镜像:
docker image prune
Rocm7.2已经出了但是不兼容AI-MAX 395,下面是安装Rocm7.1.1和对应的rocm/pytorch
apt update
apt install vim wget gpg curl git -y
apt upgrade -y
wget https://repo.radeon.com/amdgpu-install/7.1.1/ubuntu/noble/amdgpu-install_7.1.1.70101-1_all.deb
apt install ./amdgpu-install_7.1.1.70101-1_all.deb
apt update
apt install python3-setuptools python3-wheel libjpeg-dev python3-dev python3-pip
groupadd render
usermod -a -G render,video ubuntu
apt install rocm
apt update
apt install “linux-headers-$(uname -r)” “linux-modules-extra-$(uname -r)”
apt install amdgpu-dkms
docker pull rocm/pytorch:rocm7.1.1_ubuntu24.04_py3.12_pytorch_release_2.9.1
https://docs.docker.com/engine/install/ubuntu
Run the following command to uninstall all conflicting packages:
sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo “${UBUNTU_CODENAME:-$VERSION_CODENAME}”)
Components: stable
Architectures: $(dpkg –print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin