> 双十二没忍住买了一台天钡迷你主机,这里记录一下一系列环境配置总结 # 驱动下载 [免费不限速的驱动工具_驱动总裁_【官网】](https://www.sysceo.com/dc.html) # 右键修改脚本 CMD(不是powershell)管理员运行 ``` reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d “” /f taskkill /f /im explorer.exe start explorer.exe ``` # 其他软件 ## 天钡驱动 [GEM12 PRO MAX 屏幕指纹2.0 | 天钡云盘](http://pan.sztbkj.com:5244/GEM12%20PRO%20MAX%20%E5%B1%8F%E5%B9%95%E6%8C%87%E7%BA%B92.0) ## zotero7 https://www.zotero.org/download/ ## obsidian [Download - Obsidian](https://obsidian.md/download) ## 腾讯系 腾讯管家 桌面整理 微信 QQ [一键杀毒_盗号保护_垃圾清理_软件管理_远程控制-腾讯电脑管家官网](https://guanjia.qq.com/page/product_download.html) 微信输入法 [微信输入法-简洁好用打字快](https://z.weixin.qq.com/) 桌面整理 [DeskGo v3.3 腾讯桌面整理工具独立版 - 果核剥壳](https://www.ghxi.com/deskgo.html) 微信 https://pc.weixin.qq.com/?lang=zh-cn QQ https://im.qq.com/pcqq/index.shtml ## 飞书 https://www.feishu.cn/download?from=download_content_recommend_bottom_free_register ## 360压缩 [360压缩_360推出的免费解压缩软件_360安全中心](https://yasuo.360.cn/) ## karing 科学 [下载Karing | Karing - Clash compatible & Powerful proxy utility](https://karing.app/download/) ## win11优化工具 [https://wwi.lanzoue.com/i6K4Z2hfuc3a](https://wwi.lanzoue.com/i6K4Z2hfuc3a) ## RUSTDESK [Release 1.3.5 · rustdesk/rustdesk](https://github.com/rustdesk/rustdesk/releases/tag/1.3.5) ## OCR扫描pdf [Release Umi-OCR v2.1.4 · hiroi-sora/Umi-OCR](https://github.com/hiroi-sora/Umi-OCR/releases/tag/v2.1.4) ## 截图 [PixPin 截图/贴图/长截图/文字识别/标注 | PixPin 截图/贴图/长截图/文字识别/标注](https://pixpinapp.com/) ## ssh [Xterminal - 更好用的开发工具,但不止于(SSH/控制台/More)](https://www.xterminal.cn/) # IDE ## 紫色 vs 安装 c++环境(cuda 会用到) [下载 Visual Studio Tools - 免费安装 Windows、Mac、Linux](https://visualstudio.microsoft.com/zh-hans/downloads/) ## 蓝色vs 选择system版本 [Download Visual Studio Code - Mac, Linux, Windows](https://code.visualstudio.com/Download) # 环境 ## git [Git - Downloading Package](https://git-scm.com/downloads/win) ## powershell 7 https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-x64.msi ## nvm [Releases · coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows/releases) ## uv 默认安装路径是`$HOME\.local\bin` 我自己安装在`C:\Env\pyuv` ``` $env:UV_INSTALL_DIR = "C:\Env\pyuv" irm https://astral.sh/uv/install.ps1 | iex ``` 会自动添加环境变量 ``` Downloading uv 0.7.5 (x86_64-pc-windows-msvc) Installing to C:\Env\pyuv uv.exe uvx.exe everything's installed! To add C:\Env\pyuv to your PATH, either restart your shell or run: set Path=C:\Env\pyuv;%Path% (cmd) $env:Path = "C:\Env\pyuv;$env:Path" (powershell) ``` https://docs.astral.sh/uv/#python-versions 自定义路径安装python ``` $env:UV_PYTHON_INSTALL_DIR = "C:\Env\pyuv\pythons" uv python install 3.12 ``` ## miniforge [Index of /github-release/conda-forge/miniforge/LatestRelease/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror](https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease/) https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease/Miniforge3-Windows-x86_64.exe  ``` C:\Env\miniforge3;C:\Env\miniforge3\condabin;C:\Env\miniforge3\Scripts;C:\Env\miniforge3\Library\bin ``` 设置文件夹权限给当前用户  初始化 ```bash mamba init --all ``` 使用管理员打开powershell执行,允许mamba修改powershell ``` Set-ExecutionPolicy RemoteSigned ``` 换源 ``` pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ ``` 重启电脑 ## cuda driver [CUDA Toolkit 12.6 Update 3 Downloads | NVIDIA Developer](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local) CUDNN [cuDNN 9.6.0 Downloads | NVIDIA Developer](https://developer.nvidia.com/cudnn-downloads?target_os=Windows&target_arch=x86_64&target_version=Agnostic&cuda_version=12) # 系统还原点 [系统还原:Windows最好用的功能之一 - 知乎](https://zhuanlan.zhihu.com/p/600012479) [云里黑白第十二回——我想开启系统保护,创建还原点 - 哔哩哔哩](https://www.bilibili.com/opus/615277545743659372/?from=readlist) # wsl2 ## 安装 启动虚拟化 ``` Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux ``` 安装内核更新包 https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi 改为wsl2 ```bash wsl —set-default-version 2 ``` 在微软商店下载Debian **迁移WSL** 1、查看已安装的WSL状态:wsl -l -v 2、中止WSL运行:wsl --shutdown 3、导出:wsl --export Debian c:\Debian.tar 4、注销原系统:wsl --unregister Debian 5、导入:wsl --import Debian C:\wsl\debian c:\Debian.tar 6、删除导出的文件:del c:\Debian.tar 设置默认root用户 ``` Debian config --default-user root ``` ## 换源 先安装证书 ``` apt update apt -y install ca-certificates ``` `/etc/apt/sources.list` ``` # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware ``` ``` apt update ``` ## systemd开启&禁用windows环境变量 编辑`/etc/wsl.conf`,输入: ``` [boot] systemd=true [interop] enabled = false appendWindowsPath = false ``` ## 修改host模式 在`%USERPROFILE%`目录下的`.wslconfig`文件中添加如下配置 ``` [experimental] autoMemoryReclaim=gradual # 开启自动回收内存,可在 gradual, dropcache, disabled 之间选择 networkingMode=mirrored # 开启镜像网络 dnsTunneling=true # 开启 DNS Tunneling firewall=true # 开启 Windows 防火墙 autoProxy=true # 开启自动同步代理 sparseVhd=true # 开启自动释放 WSL2 虚拟硬盘空间 hostAddressLoopback=true #确保外部也能访问该wsl ``` Loading... > 双十二没忍住买了一台天钡迷你主机,这里记录一下一系列环境配置总结 # 驱动下载 [免费不限速的驱动工具_驱动总裁_【官网】](https://www.sysceo.com/dc.html) # 右键修改脚本 CMD(不是powershell)管理员运行 ``` reg add HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32 /ve /d “” /f taskkill /f /im explorer.exe start explorer.exe ``` # 其他软件 ## 天钡驱动 [GEM12 PRO MAX 屏幕指纹2.0 | 天钡云盘](http://pan.sztbkj.com:5244/GEM12%20PRO%20MAX%20%E5%B1%8F%E5%B9%95%E6%8C%87%E7%BA%B92.0) ## zotero7 https://www.zotero.org/download/ ## obsidian [Download - Obsidian](https://obsidian.md/download) ## 腾讯系 腾讯管家 桌面整理 微信 QQ [一键杀毒_盗号保护_垃圾清理_软件管理_远程控制-腾讯电脑管家官网](https://guanjia.qq.com/page/product_download.html) 微信输入法 [微信输入法-简洁好用打字快](https://z.weixin.qq.com/) 桌面整理 [DeskGo v3.3 腾讯桌面整理工具独立版 - 果核剥壳](https://www.ghxi.com/deskgo.html) 微信 https://pc.weixin.qq.com/?lang=zh-cn QQ https://im.qq.com/pcqq/index.shtml ## 飞书 https://www.feishu.cn/download?from=download_content_recommend_bottom_free_register ## 360压缩 [360压缩_360推出的免费解压缩软件_360安全中心](https://yasuo.360.cn/) ## karing 科学 [下载Karing | Karing - Clash compatible & Powerful proxy utility](https://karing.app/download/) ## win11优化工具 [https://wwi.lanzoue.com/i6K4Z2hfuc3a](https://wwi.lanzoue.com/i6K4Z2hfuc3a) ## RUSTDESK [Release 1.3.5 · rustdesk/rustdesk](https://github.com/rustdesk/rustdesk/releases/tag/1.3.5) ## OCR扫描pdf [Release Umi-OCR v2.1.4 · hiroi-sora/Umi-OCR](https://github.com/hiroi-sora/Umi-OCR/releases/tag/v2.1.4) ## 截图 [PixPin 截图/贴图/长截图/文字识别/标注 | PixPin 截图/贴图/长截图/文字识别/标注](https://pixpinapp.com/) ## ssh [Xterminal - 更好用的开发工具,但不止于(SSH/控制台/More)](https://www.xterminal.cn/) # IDE ## 紫色 vs 安装 c++环境(cuda 会用到) [下载 Visual Studio Tools - 免费安装 Windows、Mac、Linux](https://visualstudio.microsoft.com/zh-hans/downloads/) ## 蓝色vs 选择system版本 [Download Visual Studio Code - Mac, Linux, Windows](https://code.visualstudio.com/Download) # 环境 ## git [Git - Downloading Package](https://git-scm.com/downloads/win) ## powershell 7 https://github.com/PowerShell/PowerShell/releases/download/v7.4.6/PowerShell-7.4.6-win-x64.msi ## nvm [Releases · coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows/releases) ## uv 默认安装路径是`$HOME\.local\bin` 我自己安装在`C:\Env\pyuv` ``` $env:UV_INSTALL_DIR = "C:\Env\pyuv" irm https://astral.sh/uv/install.ps1 | iex ``` 会自动添加环境变量 ``` Downloading uv 0.7.5 (x86_64-pc-windows-msvc) Installing to C:\Env\pyuv uv.exe uvx.exe everything's installed! To add C:\Env\pyuv to your PATH, either restart your shell or run: set Path=C:\Env\pyuv;%Path% (cmd) $env:Path = "C:\Env\pyuv;$env:Path" (powershell) ``` https://docs.astral.sh/uv/#python-versions 自定义路径安装python ``` $env:UV_PYTHON_INSTALL_DIR = "C:\Env\pyuv\pythons" uv python install 3.12 ``` ## miniforge [Index of /github-release/conda-forge/miniforge/LatestRelease/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror](https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease/) https://mirrors.tuna.tsinghua.edu.cn/github-release/conda-forge/miniforge/LatestRelease/Miniforge3-Windows-x86_64.exe  ``` C:\Env\miniforge3;C:\Env\miniforge3\condabin;C:\Env\miniforge3\Scripts;C:\Env\miniforge3\Library\bin ``` 设置文件夹权限给当前用户  初始化 ```bash mamba init --all ``` 使用管理员打开powershell执行,允许mamba修改powershell ``` Set-ExecutionPolicy RemoteSigned ``` 换源 ``` pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2 conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/ ``` 重启电脑 ## cuda driver [CUDA Toolkit 12.6 Update 3 Downloads | NVIDIA Developer](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local) CUDNN [cuDNN 9.6.0 Downloads | NVIDIA Developer](https://developer.nvidia.com/cudnn-downloads?target_os=Windows&target_arch=x86_64&target_version=Agnostic&cuda_version=12) # 系统还原点 [系统还原:Windows最好用的功能之一 - 知乎](https://zhuanlan.zhihu.com/p/600012479) [云里黑白第十二回——我想开启系统保护,创建还原点 - 哔哩哔哩](https://www.bilibili.com/opus/615277545743659372/?from=readlist) # wsl2 ## 安装 启动虚拟化 ``` Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux ``` 安装内核更新包 https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi 改为wsl2 ```bash wsl —set-default-version 2 ``` 在微软商店下载Debian **迁移WSL** 1、查看已安装的WSL状态:wsl -l -v 2、中止WSL运行:wsl --shutdown 3、导出:wsl --export Debian c:\Debian.tar 4、注销原系统:wsl --unregister Debian 5、导入:wsl --import Debian C:\wsl\debian c:\Debian.tar 6、删除导出的文件:del c:\Debian.tar 设置默认root用户 ``` Debian config --default-user root ``` ## 换源 先安装证书 ``` apt update apt -y install ca-certificates ``` `/etc/apt/sources.list` ``` # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware # 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换 deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware ``` ``` apt update ``` ## systemd开启&禁用windows环境变量 编辑`/etc/wsl.conf`,输入: ``` [boot] systemd=true [interop] enabled = false appendWindowsPath = false ``` ## 修改host模式 在`%USERPROFILE%`目录下的`.wslconfig`文件中添加如下配置 ``` [experimental] autoMemoryReclaim=gradual # 开启自动回收内存,可在 gradual, dropcache, disabled 之间选择 networkingMode=mirrored # 开启镜像网络 dnsTunneling=true # 开启 DNS Tunneling firewall=true # 开启 Windows 防火墙 autoProxy=true # 开启自动同步代理 sparseVhd=true # 开启自动释放 WSL2 虚拟硬盘空间 hostAddressLoopback=true #确保外部也能访问该wsl ``` Last modification:June 1, 2025 © Allow specification reprint Like 如果觉得我的文章对你有用,请随意赞赏
One comment
OωO nice