-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
1 lines (1 loc) · 138 KB
/
index.html
1
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.3.0"><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png"><link rel="mask-icon" href="/images/logo.svg" color="#222"><link rel="stylesheet" href="/css/main.css"><link rel="stylesheet" href="/lib/font-awesome/css/all.min.css"><script id="hexo-configurations">var NexT=window.NexT||{},CONFIG={hostname:"jarod.vip",root:"/",scheme:"Gemini",version:"7.8.0",exturl:!1,sidebar:{position:"left",display:"always",padding:18,offset:12,onmobile:!1},copycode:{enable:!1,show_result:!1,style:null},back2top:{enable:!0,sidebar:!1,scrollpercent:!1},bookmark:{enable:!1,color:"#222",save:"auto"},fancybox:!1,mediumzoom:!1,lazyload:!1,pangu:!1,comments:{style:"tabs",active:null,storage:!0,lazyload:!1,nav:null},algolia:{hits:{per_page:10},labels:{input_placeholder:"Search for Posts",hits_empty:"We didn't find any results for the search: ${query}",hits_stats:"${hits} results found in ${time} ms"}},localsearch:{enable:!0,trigger:"auto",top_n_per_article:1,unescape:!1,preload:!1},motion:{enable:!0,async:!1,transition:{post_block:"fadeIn",post_header:"slideDownIn",post_body:"slideDownIn",coll_header:"slideLeftIn",sidebar:"slideUpIn"}},path:"search.xml"}</script><meta name="description" content="记录生活中的点点滴滴"><meta property="og:type" content="website"><meta property="og:title" content="Jarod's Blog"><meta property="og:url" content="https://jarod.vip/index.html"><meta property="og:site_name" content="Jarod's Blog"><meta property="og:description" content="记录生活中的点点滴滴"><meta property="og:locale" content="zh_CN"><meta property="article:author" content="Jarod"><meta property="article:tag" content="VPS,hexo,linux,debian,windows,macos"><meta name="twitter:card" content="summary"><link rel="canonical" href="https://jarod.vip/"><script id="page-configurations">CONFIG.page={sidebar:"",isHome:!0,isPost:!1,lang:"zh-CN"}</script><title>Jarod's Blog</title><script async src="https://www.googletagmanager.com/gtag/js?id=G-R131WF8QZC"></script><script>function gtag(){dataLayer.push(arguments)}CONFIG.hostname===location.hostname&&(window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-R131WF8QZC"))</script><script>var _hmt=_hmt||[];!function(){var e=document.createElement("script"),t=(e.src="https://hm.baidu.com/hm.js?e67344a16e268228733f496a595ecb7a",document.getElementsByTagName("script")[0]);t.parentNode.insertBefore(e,t)}()</script><noscript><style>.sidebar-inner,.use-motion .brand,.use-motion .collection-header,.use-motion .comments,.use-motion .menu-item,.use-motion .pagination,.use-motion .post-block,.use-motion .post-body,.use-motion .post-header{opacity:initial}.use-motion .site-subtitle,.use-motion .site-title{opacity:initial;top:initial}.use-motion .logo-line-before i{left:initial}.use-motion .logo-line-after i{right:initial}</style></noscript><link rel="alternate" href="/atom.xml" title="Jarod's Blog" type="application/atom+xml"></head><body itemscope itemtype="http://schema.org/WebPage"><div class="container use-motion"><div class="headband"></div><header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="header-inner"><div class="site-brand-container"><div class="site-nav-toggle"><div class="toggle" aria-label="切换导航栏"><span class="toggle-line toggle-line-first"></span> <span class="toggle-line toggle-line-middle"></span> <span class="toggle-line toggle-line-last"></span></div></div><div class="site-meta"><a href="/" class="brand" rel="start"><span class="logo-line-before"><i></i></span><h1 class="site-title">Jarod's Blog</h1><span class="logo-line-after"><i></i></span></a></div><div class="site-nav-right"><div class="toggle popup-trigger"><i class="fa fa-search fa-fw fa-lg"></i></div></div></div><nav class="site-nav"><ul id="menu" class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li><li class="menu-item menu-item-sitemap"><a href="/sitemap.xml" rel="section"><i class="fa fa-sitemap fa-fw"></i>站点地图</a></li><li class="menu-item menu-item-search"><a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索</a></li></ul></nav><div class="search-pop-overlay"><div class="popup search-popup"><div class="search-header"><span class="search-icon"><i class="fa fa-search"></i></span><div class="search-input-container"><input autocomplete="off" autocapitalize="off" placeholder="搜索..." spellcheck="false" type="search" class="search-input"></div><span class="popup-btn-close"><i class="fa fa-times-circle"></i></span></div><div id="search-result"><div id="no-result"><i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i></div></div></div></div></div></header><div class="back-to-top"><i class="fa fa-arrow-up"></i> <span>0%</span></div><main class="main"><div class="main-inner"><div class="content-wrap"><div class="content index posts-expand"><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/29/MacBook-Pro-%E5%A4%96%E6%8E%A5%E6%98%BE%E7%A4%BA%E5%B1%8F%E5%BC%80%E5%90%AF-HiDPI/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/29/MacBook-Pro-%E5%A4%96%E6%8E%A5%E6%98%BE%E7%A4%BA%E5%B1%8F%E5%BC%80%E5%90%AF-HiDPI/" class="post-title-link" itemprop="url">MacBook Pro 外接显示屏开启 HiDPI</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-29 21:27:45" itemprop="dateCreated datePublished" datetime="2022-09-29T21:27:45+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/uncategorized/" itemprop="url" rel="index"><span itemprop="name">uncategorized</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>1.6k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>1 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><h2 id="HiDPI"><a href="#HiDPI" class="headerlink" title="HiDPI"></a>HiDPI</h2><p>本质上是用软件的方式实现单位面积内的高密度像素。用四个像素点来表现一个像素,因此能够更加清晰细腻</p><p>高 PPI(硬件) + HiDPI 渲染(软件) = 更细腻的显示效果(Retina)</p><p><a target="_blank" rel="noopener" href="https://user-images.githubusercontent.com/16217324/123499689-13fb1980-d66b-11eb-8f33-b473d58ef351.png"><img src="https://user-images.githubusercontent.com/16217324/123499689-13fb1980-d66b-11eb-8f33-b473d58ef351.png" alt="WechatIMG2168"></a></p><h2 id="获取外接显示器-DisplayVendorID-和-DisplayProductID"><a href="#获取外接显示器-DisplayVendorID-和-DisplayProductID" class="headerlink" title="获取外接显示器 DisplayVendorID 和 DisplayProductID"></a>获取外接显示器 DisplayVendorID 和 DisplayProductID</h2><p>在终端输入以下命令:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ ioreg -l grep "DisplayVendorID"</span><br><span class="line"></span><br></pre></td></tr></table></figure><p>如果获得两个,那说明的你的 Macbook 还在亮着,可以合盖来排除掉</p><h2 id="制作外接显示屏系统配置文件"><a href="#制作外接显示屏系统配置文件" class="headerlink" title="制作外接显示屏系统配置文件"></a>制作外接显示屏系统配置文件</h2><h3 id="转换-16-进制"><a href="#转换-16-进制" class="headerlink" title="转换 16 进制"></a>转换 16 进制</h3><p>将 DisplayVendorID 和 DisplayProductID 的数值,转换为 16 进制,<a target="_blank" rel="noopener" href="https://tool.lu/hexconvert/">在线转换工具</a></p><h3 id="创建显示器配置文件夹"><a href="#创建显示器配置文件夹" class="headerlink" title="创建显示器配置文件夹"></a>创建显示器配置文件夹</h3><p>新建文件夹,命名为:DisplayVendorID-XXXX,其中 XXXX 是刚才转换的 DisplayVendorID 的 16 进制值小写</p><h3 id="创建显示器配置内容"><a href="#创建显示器配置内容" class="headerlink" title="创建显示器配置内容"></a>创建显示器配置内容</h3><p>这里需要借助工具来生成,<a target="_blank" rel="noopener" href="https://codeclou.github.io/Display-Override-PropertyList-File-Parser-and-Generator-with-HiDPI-Support-For-Scaled-Resolutions/">在线生成工具</a>,将显示器的名称、DisplayVendorID(16 进制) 和 DisplayProductID(16 进制) 对应填写进去,即可获得配置文件,下载文件到刚创建的 DisplayVendorID-XXXX 文件夹内,将 plist 的后缀去掉</p><p><a target="_blank" rel="noopener" href="https://user-images.githubusercontent.com/16217324/123499686-0c3b7500-d66b-11eb-96be-234022b2c651.png"><img src="https://user-images.githubusercontent.com/16217324/123499686-0c3b7500-d66b-11eb-96be-234022b2c651.png" alt="WechatIMG2169"></a></p><p>然后需要将文件放到系统的 <code>/System/Library/Displays/Contents/Resources/Overrides/</code> 文件夹中</p><p>如果 <code>Overrides</code> 没有权限操作,在终端中输入</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ csrutil status</span><br></pre></td></tr></table></figure><p><a target="_blank" rel="noopener" href="https://user-images.githubusercontent.com/16217324/123499683-05acfd80-d66b-11eb-843e-a70b6fc736f8.png"><img src="https://user-images.githubusercontent.com/16217324/123499683-05acfd80-d66b-11eb-843e-a70b6fc736f8.png" alt="WechatIMG2170"></a></p><p>如果是关闭状态,则需要开启</p><h3 id="开启-rootless"><a href="#开启-rootless" class="headerlink" title="开启 rootless"></a>开启 rootless</h3><ol><li><p>重启 MacBook,按住 command + R 直到屏幕上出现苹果的标志和进度条,进入 Recovery 模式</p></li><li><p>在屏幕左上方的工具栏找到实用工具(左数第 3 个),打开终端</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ csrutil disable</span><br></pre></td></tr></table></figure></li><li><p>重启 MacBook</p></li></ol><h3 id="关闭-rootless"><a href="#关闭-rootless" class="headerlink" title="关闭 rootless"></a>关闭 rootless</h3><ol><li><p>重启 MacBook,按住 command + R 直到屏幕上出现苹果的标志和进度条,进入 Recovery 模式</p></li><li><p>在屏幕左上方的工具栏找到实用工具(左数第 3 个),打开终端</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ csrutil disable</span><br></pre></td></tr></table></figure></li><li><p>重启 MacBook</p></li></ol><p>如果已关闭 rootless,还是不行,那么需要在终端输入以下命令:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ sudo mount -rw /</span><br></pre></td></tr></table></figure><p>Tips:</p><ol><li><p>10.15 之后,系统的目录除了几个 rootless 可以修改的,都是只读的,所有对系统的修改都不支持,你的那个目录是在只读分区内的。要是写机器域的文件,在/Library 目录中操作。</p></li><li><p>macOS 有个内核保护机制 rootless,有时候你需要装什么软件时,需要一些 root 权限,但是在 macOS 上 root 虽然权力是最大的,但是苹果还是限制了它一下。</p></li></ol><h2 id="开启-HiDPI"><a href="#开启-HiDPI" class="headerlink" title="开启 HiDPI"></a>开启 HiDPI</h2><p><a target="_blank" rel="noopener" href="https://github.com/xzhih/one-key-hidpi/blob/master/README-zh.md">one-key-hidpi</a></p><p>此脚本的目的是为中低分辨率的屏幕开启 HiDPI 选项,并且具有原生的 HiDPI 设置,不需要 RDM 软件即可在系统显示器设置中设置</p><p>macOS 的 DPI 机制和 Windows 下不一样,比如 1080p 的屏幕在 Windows 下有 125%、150% 这样的缩放选项,而同样的屏幕在 macOS 下,缩放选项里只是单纯的调节分辨率,这就使得在默认分辨率下字体和 UI 看起来很小,降低分辨率又显得模糊</p><p>同时,此脚本也可以通过注入修补后的 EDID 修复闪屏,或者睡眠唤醒后的闪屏问题,当然这个修复因人而异</p><p>开机的第二阶段 logo 总是会稍微放大,因为分辨率是仿冒的</p><h3 id="使用方法"><a href="#使用方法" class="headerlink" title="使用方法"></a>使用方法</h3><ol><li>远程模式: 在终端输入以下命令回车即可</li></ol><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ bash -c "$(curl -fsSL https://raw.githubusercontent.com/xzhih/one-key-hidpi/master/hidpi.sh)"</span><br></pre></td></tr></table></figure><ol start="2"><li>本地模式: 下载项目解压,双击 <code>hidpi.command</code> 运行</li></ol><p><a target="_blank" rel="noopener" href="https://user-images.githubusercontent.com/16217324/123499664-ec0bb600-d66a-11eb-85cb-524aff4757ef.jpeg"><img src="https://user-images.githubusercontent.com/16217324/123499664-ec0bb600-d66a-11eb-85cb-524aff4757ef.jpeg" alt="WechatIMG2171"></a></p><p><a target="_blank" rel="noopener" href="https://user-images.githubusercontent.com/16217324/123499670-f5951e00-d66a-11eb-9a74-99e150806caa.jpeg"><img src="https://user-images.githubusercontent.com/16217324/123499670-f5951e00-d66a-11eb-9a74-99e150806caa.jpeg" alt="WechatIMG2172"></a></p><h2 id="RDM"><a href="#RDM" class="headerlink" title="RDM"></a>RDM</h2><p>RDM 全称为 Retina Display Manage,<a target="_blank" rel="noopener" href="http://avi.alkalay.net/software/RDM">安装地址</a></p><p>重启后打开 RDM,选取带雷电符号的 1920x1080,即可开启 HiDPI。</p><p><a target="_blank" rel="noopener" href="https://user-images.githubusercontent.com/16217324/123499675-fc239580-d66a-11eb-8731-5fe3a320558f.png"><img src="https://user-images.githubusercontent.com/16217324/123499675-fc239580-d66a-11eb-8731-5fe3a320558f.png" alt="WechatIMG2173"></a></p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/29/macOS-%E5%8D%87%E7%BA%A7%E5%90%8E%E5%BC%80%E6%9C%BA%E5%8D%A1%E5%9C%A8%E8%BF%9B%E5%BA%A6%E6%9D%A1%E5%92%8C%E5%94%A4%E9%86%92%E6%97%B6%E9%BB%91%E5%B1%8F%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/29/macOS-%E5%8D%87%E7%BA%A7%E5%90%8E%E5%BC%80%E6%9C%BA%E5%8D%A1%E5%9C%A8%E8%BF%9B%E5%BA%A6%E6%9D%A1%E5%92%8C%E5%94%A4%E9%86%92%E6%97%B6%E9%BB%91%E5%B1%8F%E7%9A%84%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95/" class="post-title-link" itemprop="url">macOS 升级后开机卡在进度条和唤醒时黑屏的解决方法</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-29 21:27:45" itemprop="dateCreated datePublished" datetime="2022-09-29T21:27:45+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Mac/" itemprop="url" rel="index"><span itemprop="name">Mac</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>5.6k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>5 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p><a target="_blank" rel="noopener" href="https://raw.githubusercontent.com/wsgzao/storage-public/master/img/20190822151646.gif"><img src="https://raw.githubusercontent.com/wsgzao/storage-public/master/img/20190822151646.gif"></a></p><h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>第一次升级 macOS 在抱着对 Apple 高质量软硬件的幻想中破灭,从 macOS High Sierra 手贱升级到 macOS Mojave (version 10.14),各种字体发虚,Kernel Panic(六国语言重启),系统卡顿,耗电快等问题接踵而至。本来寄希望于升级 macOS Mojave (version 10.14.1-10.14.6)可以解决部分稳定性和兼容性问题,但是 MacBook 居然开机卡在进度条,然后我等了一上午都没有完成,差点以为要悲剧的重装系统丢失数据了。所以很有必要给大伙提个醒,无论是 Windows 还是 macOS 在新版本推送的早期都不要点击更新,升级到高版本后如果不选择 erase 擦除数据是无法降级至低版本的,比如从 Catalina 降级至 Mojave 或 High Sierra。抑制住你体内的洪荒之力和强迫症,不要手贱,不要手贱,不要手贱。实在手痒的厉害,千万记住先备份后折腾。</p><blockquote><p>拒绝重装!教你如何拯救开机失败的 Mac 电脑</p></blockquote><hr><h2 id="更新记录"><a href="#更新记录" class="headerlink" title="更新记录"></a>更新记录</h2><p>2021 年 10 月 10 日 - 增加 macOS Catalina 升级至 Big Sur 遇到问题的解决方案 2019 年 08 月 22 日 - 更新解决问题的常见套路,可修复截止至 10.14.6 之前的大多数问题,对 Catalina 不抱有 Bug 变少希望 2019 年 01 月 30 日 - 更新解决唤醒时黑屏只看见鼠标的问题 2018 年 11 月 01 日 - 初稿</p><p>阅读原文 - <a target="_blank" rel="noopener" href="https://wsgzao.github.io/post/macos/">https://wsgzao.github.io/post/macos/</a></p><p><strong>扩展阅读</strong></p><p>Upgrade to macOS Mojave - <a target="_blank" rel="noopener" href="https://www.apple.com/macos/how-to-upgrade/">https://www.apple.com/macos/how-to-upgrade/</a> 如何升级到 macOS Mojave - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201475">https://support.apple.com/zh-cn/HT201475</a> 如何通过 macOS 恢复功能重新安装 macOS - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT204904">https://support.apple.com/zh-cn/HT204904</a> 如何创建可引导的 macOS 安装器 - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201372">https://support.apple.com/zh-cn/HT201372</a> 使用 “时间机器” 备份您的 Mac - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201250">https://support.apple.com/zh-cn/HT201250</a></p><hr><h2 id="macOS-history"><a href="#macOS-history" class="headerlink" title="macOS history"></a>macOS history</h2><blockquote><p>第一次体验苹果虚拟机和黑苹果记得还是 Tiger 和 Leopard 的时候</p></blockquote><p>Version</p><p>Codename</p><p>Most recent version</p><p>Mac OS X 10.0</p><p>Cheetah</p><p>10.0.4 (June 22, 2001)</p><p>Mac OS X 10.1</p><p>Puma</p><p>10.1.5 (June 6, 2002)</p><p>Mac OS X 10.2</p><p>Jaguar</p><p>10.2.8 (October 3, 2003)</p><p>Mac OS X 10.3</p><p>Panther</p><p>10.3.9 (April 15, 2005)</p><p>Mac OS X 10.4</p><p>Tiger</p><p>10.4.11 (November 14, 2007)</p><p>Mac OS X 10.5</p><p>Leopard</p><p>10.5.8 (August 5, 2009)</p><p>Mac OS X 10.6</p><p>Snow Leopard</p><p>10.6.8 v1.1 (July 25, 2011)</p><p>Mac OS X 10.7</p><p>Lion</p><p>10.7.5 (September 19, 2012)</p><p>OS X 10.8</p><p>Mountain Lion</p><p>10.8.5 (12F45) (October 3, 2013)</p><p>OS X 10.9</p><p>Mavericks</p><p>10.9.5 (13F1112) (September 18, 2014)[170]</p><p>OS X 10.10</p><p>Yosemite</p><p>10.10.5 (14F27) (August 13, 2015)</p><p>OS X 10.11</p><p>El Capitan</p><p>10.11.6 (15G22010) (July 9, 2018)</p><p>macOS 10.12</p><p>Sierra</p><p>10.12.6 (16G2136) (September 26, 2019)</p><p>macOS 10.13</p><p>High Sierra</p><p>10.13.6 (17G14042) (November 12, 2020)</p><p>macOS 10.14</p><p>Mojave</p><p>10.14.6 (18G9323) (July 21, 2021)</p><p>macOS 10.15</p><p>Catalina</p><p>10.15.7 (19H1419) (September 23, 2021)</p><p>macOS 11</p><p>Big Sur</p><p>11.6 (20G165) (September 13, 2021)</p><p>macOS release history - <a target="_blank" rel="noopener" href="https://en.wikipedia.org/wiki/MacOS">https://en.wikipedia.org/wiki/MacOS</a></p><h2 id="macOS-最新稳定版常见问题"><a href="#macOS-最新稳定版常见问题" class="headerlink" title="macOS 最新稳定版常见问题"></a>macOS 最新稳定版常见问题</h2><blockquote><p>macOS Catalina 升级至 Big Sur 遇到问题的解决方案</p></blockquote><p>问题描述: Mac 不能打开软件,提示检查为恶意软件 can’t be opened because Apple cannot check it for malicious software. App can’t be opened because it is from an unidentified developer</p><p>解决方法:</p><p>1<br>2</p><p># 打开 Terminal, 运行命令解决<br>sudo spctl –master-disable</p><p> </p><p>Mac > System Preferences > Security & Privacy 多了一个选项 Anywhere</p><h2 id="常见的拯救方法"><a href="#常见的拯救方法" class="headerlink" title="常见的拯救方法"></a>常见的拯救方法</h2><blockquote><p>苹果官方客服的标准答复三板斧,有一定道理但不一定可以解决你的问题,属于玄学。重点还是要掌握正确的分析思路,检查日志和启动项,通过安全模式做对比交叉分析寻找蛛丝马迹</p></blockquote><ol><li>Reset NVRAM</li><li>Rest SMC</li><li>Use safe mode to isolate issues</li></ol><h3 id="重置-SMC"><a href="#重置-SMC" class="headerlink" title="重置 SMC"></a>重置 SMC</h3><p>先关机,然后断开电源,拔掉所有 USB 的连接,然后同时按住键盘左下角的 Shift,Control,Option 和开机键 15 秒。全过程 Mac 不会开机。15 秒后松手插上电源开机。</p><p>如何重置 Mac 上的系统管理控制器 (SMC) - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201295">https://support.apple.com/zh-cn/HT201295</a></p><h3 id="重置-NVRAM"><a href="#重置-NVRAM" class="headerlink" title="重置 NVRAM"></a>重置 NVRAM</h3><p>将 Mac 关机,然后开机并立即同时按住以下四个按键:Option、Command、P 和 R。您可以在大约 20 秒后松开这些按键,在此期间您的 Mac 可能看似在重新启动。</p><p>重置 Mac 上的 NVRAM 或 PRAM - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT204063">https://support.apple.com/zh-cn/HT204063</a></p><h3 id="使用安全模式"><a href="#使用安全模式" class="headerlink" title="使用安全模式"></a>使用安全模式</h3><p>要以安全模式启动,请按照以下步骤操作:</p><ol><li>启动或重新启动 Mac,然后立即按住 Shift 键。显示屏上将出现 Apple 标志。如果没有看到 Apple 标志,请了解该如何操作。</li><li>看到登录窗口时,松开 Shift 键。如果启动磁盘使用 FileVault 进行了加密,系统可能会两次提示登录:第一次为解锁启动磁盘,第二次则为登录 Finder。</li></ol><p>使用安全模式查明 Mac 的相关问题 - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201262">https://support.apple.com/zh-cn/HT201262</a></p><h3 id="重装系统"><a href="#重装系统" class="headerlink" title="重装系统"></a>重装系统</h3><p>如果以上都不能解决你的问题,且系统是最新的,硬件是没问题的,那么重装系统吧。哈哈,重装系统总是这么简单霸气的解决一些问题。</p><p>前提:</p><ol><li>保证你能连到 wifi 或者有线,因为重装系统需要连接远程服务器</li><li>保证有足够的电源,最好是附件有插板可以充电的情况下重装系统,这个过程还是比较久的,50 分钟左右。</li></ol><p>步骤如下:</p><ol><li>开机按住 Command (⌘)-R</li><li>出现的四个选项的界面选择第二个重装系统(Reinstall macOS)</li><li>等待重装系统完成即可</li></ol><p>如何通过 macOS 恢复功能重新安装 macOS - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT204904">https://support.apple.com/zh-cn/HT204904</a></p><h3 id="TimeMachine-恢复"><a href="#TimeMachine-恢复" class="headerlink" title="TimeMachine 恢复"></a>TimeMachine 恢复</h3><blockquote><p>TimeMachine 数据恢复的成本太高,需要先 Reinstall macOS 然后使用 TimeMacthine 恢复,再重新配置软件,不到万不得已之时不推荐</p></blockquote><ol><li>制作 U 盘启动</li><li>TimeMachine 恢复</li></ol><p>如何创建可引导的 macOS 安装器 - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201372">https://support.apple.com/zh-cn/HT201372</a></p><p>使用 “时间机器” 备份您的 Mac - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201250">https://support.apple.com/zh-cn/HT201250</a></p><h2 id="Mac-的启动组合键"><a href="#Mac-的启动组合键" class="headerlink" title="Mac 的启动组合键"></a>Mac 的启动组合键</h2><p>若要使用这些组合键中的任何一个,请在按下电源按钮以开启 Mac 后或在 Mac 开始重新启动后,立即按住相应按键。请一直按住,直至电脑出现对应的行为。</p><p>Command (⌘)-R:从内建的 macOS 恢复系统启动。或者,您也可以使用 Option-Command-R 或 Shift-Option-Command-R 以通过互联网从 macOS 恢复功能启动。macOS 恢复功能可以安装不同版本的 macOS,具体取决于您在电脑启动时使用的组合键。如果您的 Mac 使用了固件密码,系统将要求您输入这个密码。</p><p>Option (⌥):启动进入“启动管理器”,您可以从中选取其他启动磁盘或宗卷(若可用)。如果您的 Mac 使用了固件密码,系统将要求您输入这个密码。</p><p>Option-Command-P-R:重置 NVRAM 或 PRAM。如果您的 Mac 使用了固件密码,它会忽略这个组合键或从 macOS 恢复功能启动。</p><p>Shift (⇧):以安全模式启动。</p><p>D:从内建的 Apple Hardware Test 或 Apple Diagnostics 实用工具启动,具体取决于您的 Mac 机型。或者,您也可以使用 Option-D 通过互联网从这个实用工具启动。</p><p>N:从兼容的 NetBoot 服务器启动(若可用)。要使用 NetBoot 服务器上默认的引导映像,则请按住 Option-N。配备 Apple T2 芯片的电脑不支持这个启动键。</p><p>Command-S:以单用户模式启动。这个组合键要求使用 macOS High Sierra 或更早版本。</p><p>T:以目标磁盘模式启动。</p><p>Command-V:以详细模式启动。</p><p>Mac 的启动组合键 - <a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT201255">https://support.apple.com/zh-cn/HT201255</a></p><h2 id="有效的解决方法"><a href="#有效的解决方法" class="headerlink" title="有效的解决方法"></a>有效的解决方法</h2><blockquote><p>如果你遇到和我类似的问题,不妨尝试寻找下具体的错误日志,然后向 Google 或者咨询苹果客服求助</p></blockquote><ol><li>command + v 进入代码界面,等出现不停的输出 Too many corpses being created 这段代码的时候,说明是缓存太多造成的</li><li>command + R 进入 macOS 使用工具页面,左上角找到终端工具</li><li>输入以下代码,重命名数据库缓存就行了</li><li>然后再重新启动电脑,耐心等待一会儿就可以重新进入桌面</li></ol><p>1<br>2</p><p>cd /Volumes/Macintosh\ HD/var/db/caches/opendirectory/<br>mv ./mbr_cache ./mbr_cache-old</p><h2 id="解决唤醒时黑屏只看见鼠标的问题"><a href="#解决唤醒时黑屏只看见鼠标的问题" class="headerlink" title="解决唤醒时黑屏只看见鼠标的问题"></a>解决唤醒时黑屏只看见鼠标的问题</h2><p>先关机,然后开机快速同时点击 Command + S 按键进入 single-user 单用户模式</p><p>1<br>2<br>3<br>4<br>5</p><p>/sbin/fsck -fy<br>/sbin/mount -uw /<br>rm -f /Library/Preferences/com.apple.loginwindow.plist<br>rm -f /var/db/.AppleUpgrade<br>reboot</p><h2 id="其它异常"><a href="#其它异常" class="headerlink" title="其它异常"></a>其它异常</h2><blockquote><p>最直接的方法莫过于检查日志文件</p></blockquote><p>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br>11<br>12<br>13<br>14<br>15<br>16<br>17<br>18<br>19<br>20<br>21<br>22<br>23<br>24<br>25<br>26</p><p># 如果非意外重启报错可以打开 console 控制台查看<br>pmset -g log</p><p># 常见的手动清理步骤<br>brew list<br>brew uninstall<br>brew uninstall v2ray-core</p><p>brew cask list<br>brew cask uninstall<br>brew cask v2rayu</p><p>brew services list<br>brew services stop<br>brew services stop v2rayu</p><p># 如果 system.log 有已删除但没有清理干净的自启动服务<br>launchctl unload -w ~/Library/LaunchAgents/yanue.v2rayu.v2ray-core.plist</p><p># open(/var/db/DetachedSignatures) - No such file or directory<br>sudo touch /var/db/DetachedSignatures</p><p># 检查启动项清理脏数据<br>cd /Library/LaunchAgents<br>cd /Library/LaunchDaemons<br>sudo rm</p><p>Name</p><p>Path</p><p>系统日志文件夹</p><p>/var/log</p><p>系统日志文件</p><p>/var/log/system.log</p><p>Mac 分析数据</p><p>/var/log/DiagnosticMessages</p><p>系统应用程序日志</p><p>/Library/Logs</p><p>系统报告</p><p>/Library/Logs/DiagnosticReports</p><p>用户应用程序日志</p><p>~/Library/Logs</p><p>用户报告</p><p>~/Library/Logs/DiagnosticReports</p><p><a target="_blank" rel="noopener" href="https://support.apple.com/zh-cn/HT200553">如果 Mac 因为出现问题而重新启动</a></p><p><a target="_blank" rel="noopener" href="https://zxtechart.com/2017/05/10/mac-finder-stuck/">排查 Mac 中的 Finder 无限卡住的问题</a></p><p><a target="_blank" rel="noopener" href="https://blog.macsales.com/45586-how-to-use-the-mac-console-app-to-diagnose-a-crash/">How to Use the Mac Console App to Diagnose a Crash</a></p><p><a target="_blank" rel="noopener" href="https://blog.macsales.com/46475-macos-reversion-how-to-downgrade-from-mojave/">macOS Reversion: How to Downgrade from Mojave</a></p><p>如果遇到频繁卡死并黑屏无法唤醒,最后经常自动重启,我的解决步骤是</p><ol><li>移除了一些比较旧的应用</li><li>关闭了蓝牙等不需要使用的服务</li><li>清理了自启动的脏数据</li><li>最后 Reset NVRAM 和 SMC</li><li>如果电脑目前非常稳定,请不要考虑升级,一个从坑里爬出来的肺腑之言</li></ol><h2 id="不着急的解决方案"><a href="#不着急的解决方案" class="headerlink" title="不着急的解决方案"></a>不着急的解决方案</h2><p>联系 Apple 支持 - <a target="_blank" rel="noopener" href="https://getsupport.apple.com/">https://getsupport.apple.com/</a></p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/29/Windows-10-Enterprise-LTSC-2019-x64%E6%9E%81%E5%BA%A6%E7%B2%BE%E7%AE%80%E8%B6%85%E8%AF%A6%E7%BB%86ES5%E5%B0%81%E8%A3%85%E8%BF%87%E7%A8%8B%EF%BC%88%E4%B8%80%E3%80%81%E7%B3%BB%E7%BB%9F%E7%B2%BE%E7%AE%80%EF%BC%89/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/29/Windows-10-Enterprise-LTSC-2019-x64%E6%9E%81%E5%BA%A6%E7%B2%BE%E7%AE%80%E8%B6%85%E8%AF%A6%E7%BB%86ES5%E5%B0%81%E8%A3%85%E8%BF%87%E7%A8%8B%EF%BC%88%E4%B8%80%E3%80%81%E7%B3%BB%E7%BB%9F%E7%B2%BE%E7%AE%80%EF%BC%89/" class="post-title-link" itemprop="url">Windows 10 Enterprise LTSC 2019_x64极度精简超详细ES5封装过程(一、系统精简)</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-29 21:27:45" itemprop="dateCreated datePublished" datetime="2022-09-29T21:27:45+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Win/" itemprop="url" rel="index"><span itemprop="name">Win</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>1.6k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>1 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p><strong>1. 用到的软件</strong></p><p>1)Windows 10 Enterprise LTSC 2019 (x64)镜像:</p><p>2)NTlite 1.8:</p><p>3)Dism++:</p><p><strong>2. NTLite精简优化</strong> <strong>1)精简优化选项</strong></p><h4 id="本帖隐藏的内容"><a href="#本帖隐藏的内容" class="headerlink" title="本帖隐藏的内容"></a>本帖隐藏的内容</h4><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/100407o1gzgfbfafb2ag1i.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/100431noa9cl3ipacabbwh.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/100443bcymu1epyinzf0z0.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/100459mk9nykj3sii697sp.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/100510fzzneyt4zgv435rt.png"></p><p>这里我诚恳的告诉大家千万不要移除本地化组件的内容,不要问为什么不能精简本地化,除非你想遇到重装系统后键盘不能用,输入法设置出问题以及各种Unknown Hard Error等错误</p><h4 id="本帖隐藏的内容-1"><a href="#本帖隐藏的内容-1" class="headerlink" title="本帖隐藏的内容"></a>本帖隐藏的内容</h4><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/101354z2e4gieh85lg1218.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/101406vg7no0oybnq7fbos.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/101416s7tlczecs5swkjw7.png"></p><p><strong>2)精简优化过程</strong> 解压镜像cn_windows_10_enterprise_ltsc_2019_x64_dvd_9c09ff24.iso得到cn_windows_10_enterprise_ltsc_2019_x64_dvd_9c09ff24文件夹</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/093759b9szmgtuuu4x3kix.png"></p><p>打开NTLite软件,在映像菜单栏下点击添加按钮,选择映像文件(ISO,WIM,ESD,SWM) 选项</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/093827ilgfnr3wo21a1a3x.png"></p><p>在 cn_windows_10_enterprise_ltsc_2019_x64_dvd_9c09ff24/sources/ 目录下打开install.wim系统映像文件</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/093912pinilvwv7x679xzo.png"></p><p>双击加载系统映像文件</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/093933aukvus3ewv536hgg.png"></p><p>选择组件移除</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/093948trz6fkteatg1f64g.png"></p><p>出现Windows组件移除警告窗口,点击确定</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094002e9my4gs6kmk2iufs.png"></p><p>点击展开全部,去掉组件前的勾选,即可移除想要删除的组件,移除的组件就是上面1)精简优化选项章节的精简选项表中的选项,这里为了方便大家寻找移除的组件,精简选项表是按照NTLite顺序进行排列的,你可以根据自己的需求进行自定义</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094017yrvo878szirv72z1.png"></p><p>选择配置栏的功能设置,勾选SMB 1.0/CIFS File Sharing Support,以保证Windows XP可以正常访问Windows 10的共享文件和打印机等</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094044xfpraiw6a6ugp6fi.png"></p><p>选择配置栏的设置选项,按上面1)精简优化选项章节中的设置表进行如下配置,设置表中的优化选项同样是按照顺序排列的,其中加粗的选项是我更改后的</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094102r6v07mv3omr4aoo2.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094116qtxd1hvobbbyzyvx.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094127stz2f32wqw8qkp88.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094144lbvsfjhc7kx6xz60.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094201e1i0oaa6ng4g81az.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094214djo9444exlxhh2xp.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094228nc1an314xsw0qpnq.png"></p><p>选择配置栏的服务选项,禁用SysMain服务(超级预读服务很占内存,并且对固态硬盘几乎是负优化,如果你使用的是固态硬盘那么建议禁用)</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094243c6sfcl9ws1bz9slm.png"></p><p>选择整合栏中更新整合选项,点击左上角的添加,选择最新的在线更新补丁选项,将补丁下载下来后,选择将下载好补丁加入到更新队列中</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094309wl0zpp4fv2zhqq74.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094323vqm6yjqycqy8z6qq.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094336oqhnr8hn9x79xx9o.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094410e911zsyss4sk1bbf.png"></p><p>选择整合栏的更新整合选项,点击添加更新包</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094522gm44ph0ydn34n3ji.png"></p><p>在弹出窗口中选择cn_windows_10_enterprise_ltsc_2019_x64_dvd_9c09ff24\sources\sxs路径下的microsoft-windows-netfx3-ondemand-package<del>31bf3856ad364e35</del>amd64~~.cab文件,将.Net Framework 3.5集成到系统中</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094535m9rsjjybryoibf99.png"></p><p>选择自动栏的后期任务选项,添加禁用休眠和禁用用户密码过期模版</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094553kgbjsp1jj6ow6ong.png"></p><p>选择结束栏中的应用,点击开始按钮进行处理</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094605cbuqcw2f5rrcchcb.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094615jhiidzrii466dgpd.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094628nbufcp391bq413g8.png"></p><p>将精简后的映像install.wim从 cn_windows_10_enterprise_ltsc_2019_x64_dvd_9c09ff24/sources/ 目录中剪切出来保存好,接下来的过程会用到它, 原版映像大约3.39G,精简后大约3.43G,因为添加了很多补丁,所以精简后的系统映像反而变大了一点</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094643qz393z3zxs9u1cl4.png"></p><p>可以直接在NTLite的预设中导入会话,将之前的保存的会话设置应用到新解压后的系统映像来节省精简的时间</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094654rz52ccmq92k2m5ym.png"></p><p>点击确定</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094707e7re77cwyagpc7qp.png"></p><p>右键NTLite右侧窗口里导入的预设文件,选择加载的覆盖选项即可将预设应用于当前的系统映像</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094724v44qnq4z559j09qq.png"></p><p>当导入的预设前的圆点变成绿色,则说明预设已经导入成功</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/094736xg97vh3tzv72nh99.png"> </p><p><strong>3. Dism++精简优化</strong></p><p><strong>1)精简优化过程</strong> 打开Dism++,点击文件栏选择挂载映像选项</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092555bf8fxjm3atf8745x.png"></p><p>在弹出的挂载映像窗口中填入使用NTLite精简优化好的install.wim系统映像所在目录,以及它的挂载目录</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092611gbe3wgtgg29g3ekj.png"></p><p>当系统映像挂载好并准备就绪后,点击窗口中央的打开会话四个字,即可打开Dism软件针对当前系统映像的设置优化界面</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092622v9c4lni9cyccilry.png"></p><p>选择系统优化,然后在右侧进行相关的设置</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092637aoo5tojlqnsmstut.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092650bmckbcvl6xyhlyql.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092702ixr4q4lz8q0azxml.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092719n5c5stt5yy1q1cny.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092733oej24242mvtzz2jl.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092745gn6xz6c0zajd6bab.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092758bcdzz2i4vez22zet.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092809efjtjtcifsgs3fcg.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092820crnc5qqncrkxvn2q.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092834w9vv5rris7srb7za.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092850bpxe0aduauan8jp4.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092918bxs022oyd1ruy401.png"></p><p>选择文件栏的保存映像选项,并在弹出窗口中选择直接保存映像</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092931gmdxfnbfv5rbhh2m.png"></p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092947zo3o4em17c139ccf.png"></p><p>最后卸载映像</p><p><img src="https://img.itsk.com/itkdx/attachment/forum/202006/03/092958ybomo5rq6y3q6h3o.png"></p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/29/%E7%BC%96%E8%AF%91Google-BBR-v2-Alpha/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/29/%E7%BC%96%E8%AF%91Google-BBR-v2-Alpha/" class="post-title-link" itemprop="url">编译Google BBR v2 Alpha</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-29 21:27:45" itemprop="dateCreated datePublished" datetime="2022-09-29T21:27:45+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Linux%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">Linux教程</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>1.5k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>1 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>我大概几个月前编译过一个旧版本的,最近又更新了,不过还是预览版,没有正式发布。</p><p>上次那个版本的kernel已经飙到5.2了,这次的更是直接到5.4了,要是正式版放出来我估摸着怎么着也得上5.0。。</p><p>上次是随便撸了个脚本没把编译步骤写出来,这次想到如果大家都在自己的机器上编译的话,就可以用自己机器旧内核的配置,这样炸的概率会小很多,当然编译kernel对机器硬件配置要求较高,一般的VPS就别费劲了,浪费时间。。</p><p>另外这次的版本编译起来有几个坑。。第一次编译几分钟报了个错,解决了再来跑一遍竟然后面又报个缺少rsync。。我寻思你要rsync干啥??</p><p>以下步骤在Debian10上测试通过。</p><p>apt -y install build-essential libncurses-dev libssl-dev libelf-dev bison bc flex rsync git screen</p><p>编译要花很长时间,建议开个screen守护一下:</p><p>screen -S kernel</p><p>下载源码:</p><p>git clone -b v2alpha <a target="_blank" rel="noopener" href="https://github.com/google/bbr.git">https://github.com/google/bbr.git</a> cd bbr</p><p>使用当前机器的旧内核配置,并自动帮你把新内核上的新功能选项以默认值进行配置:</p><p>make olddefconfig</p><p>打开图形化菜单:</p><p>make menuconfig</p><p>选择Networking support:</p><p><a target="_blank" rel="noopener" href="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-33-14.png"><img src="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-33-14.png"></a></p><p>选择Networking options:</p><p><a target="_blank" rel="noopener" href="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-33-38.png"><img src="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-33-38.png"></a></p><p>选择TCP: advanced…:</p><p><a target="_blank" rel="noopener" href="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-34-59.png"><img src="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-34-59.png"></a></p><p>然后在里面你可以看到BBR2的新选项,这里有两种编译方式,M是构建为模块,*是直接构建到内核:</p><p><a target="_blank" rel="noopener" href="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-36-19.png"><img src="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-36-19.png"></a></p><p>如果这里选为*的话,你可以在下面的Default TCP…内把默认的拥塞控制协议直接设置为BBR2:</p><p><a target="_blank" rel="noopener" href="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-36-32.png"><img src="https://lala.im/wp-content/uploads/2019/11/lala.im_2019-11-21_13-36-32.png"></a></p><p>这样安装好这个内核后就不需要去动sysctl.conf了,默认就开启BBR2。</p><p>当然你用模块也可以,就是需要自己加载模块罢了。设置好了后SAVE一下退出这个界面即可。</p><p>下面是我踩过的坑,解决办法,手动编辑.config:</p><p>nano .config</p><p>把里面的这一行注释掉或者留空里面的值:</p><p>CONFIG_SYSTEM_TRUSTED_KEYS=“debian/certs/debian-uefi-certs.pem”</p><p>为节省编译时间,关闭DEBUG:</p><p>CONFIG_DEBUG_INFO=n</p><p>做好上面这些后,现在就可以开始编译了:</p><p>make deb-pkg LOCALVERSION=-imlala -j$(nproc)</p><p>编译时间视你的机器性能而定,看看片锻炼下身体,回来应该就编译好了,在上级目录有可用的deb包,使用dpkg安装然后重启:</p><p>cd .. dpkg -i linux-image-5.4.0-rc6-imlala_5.4.0-rc6-imlala-1_amd64.deb<br>dpkg -i linux-headers-5.4.0-rc6-imlala_5.4.0-rc6-imlala-1_amd64.deb<br>reboot</p><p>直接编译到内核的使用下面的方法查看BBR2算法是否已经生效:</p><p>sysctl net.ipv4.tcp_congestion_control</p><p>正常的话会回显:</p><p>net.ipv4.tcp_congestion_control = bbr2</p><p>编译为模块的需要自己手动加载模块再配置sysctl.conf使其生效:</p><p>modprobe tcp_bbr2<br>echo “tcp_bbr2” >> /etc/modules<br>echo “net.ipv4.tcp_congestion_control = bbr2” >> /etc/sysctl.conf<br>sysctl -p</p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/27/hello-world/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/27/hello-world/" class="post-title-link" itemprop="url">Hello World</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-27 00:42:10" itemprop="dateCreated datePublished" datetime="2022-09-27T00:42:10+08:00">2022-09-27</time></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>367</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>1 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>Welcome to <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a target="_blank" rel="noopener" href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a target="_blank" rel="noopener" href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a target="_blank" rel="noopener" href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a target="_blank" rel="noopener" href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/19/%E4%BD%BF%E7%94%A8-archinstall-%E5%AE%89%E8%A3%85-arch-linux-%E5%92%8C-kde-%E6%A1%8C%E9%9D%A2%E7%8E%AF%E5%A2%83/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/19/%E4%BD%BF%E7%94%A8-archinstall-%E5%AE%89%E8%A3%85-arch-linux-%E5%92%8C-kde-%E6%A1%8C%E9%9D%A2%E7%8E%AF%E5%A2%83/" class="post-title-link" itemprop="url">使用 archinstall 安装 Arch Linux 和 KDE 桌面环境</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-19 01:02:46" itemprop="dateCreated datePublished" datetime="2022-09-19T01:02:46+08:00">2022-09-19</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar-check"></i> </span><span class="post-meta-item-text">更新于</span> <time title="修改时间:2022-09-29 21:27:46" itemprop="dateModified" datetime="2022-09-29T21:27:46+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Linux%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">Linux教程</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>9.6k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>9 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>本文将指导使用 archinstall 安装 Arch Linux 和 KDE 桌面环境。</p><h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>众所周知,<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Installation_guide_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">安装 Arch Linux</a> 是一件非常复杂并痛苦的事情,您需要一定的 Linux 基础,然后使用命令行进行硬盘分区,安装自己需要的软件,Arch Linux 官方也并未提供 GUI 安装程序,所以很多想尝试 Arch Linux 的用户都会被劝退在安装这一步骤上。</p><p><a target="_blank" rel="noopener" href="https://github.com/archlinux/archinstall">archinstall</a> 是一个 Python 写的 Arch Linux <a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Archinstall">安装向导程序</a>,我们可以很方便地使用 <code>archinstall</code> 安装 Arch Linux。</p><p>Arch Linux 发布 2022.05.01 的 iso 后,已经默认集成了 <code>archinstall</code>,于是您可以参考本教程无痛安装 Arch Linux,为了方便期间,本教程的安装是基于 <code>VMware Workstation</code>,理论上和你本地挂载 ISO 安装并无区别。</p><h2 id="准备工作"><a href="#准备工作" class="headerlink" title="准备工作"></a>准备工作</h2><p>首先,获取安装映像,您可以在<a target="_blank" rel="noopener" href="https://archlinux.org/download/">下载页面</a>下载最新的 iso 镜像文件,您可以选择速度最快的 mirror 进行下载,这里推荐两个下载链接</p><p>国外用户,使用官方的镜像:</p><p><a target="_blank" rel="noopener" href="https://mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso">https://mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso</a></p><p>国内用户,使用清华大学的镜像:</p><p><a target="_blank" rel="noopener" href="https://mirrors.tuna.tsinghua.edu.cn/archlinux/iso/latest/archlinux-x86_64.iso">https://mirrors.tuna.tsinghua.edu.cn/archlinux/iso/latest/archlinux-x86_64.iso</a></p><p>下载后您需要准备个 U 盘或移动硬盘,然后使用一些工具,比如 <a target="_blank" rel="noopener" href="https://rufus.ie/zh/">Rufus</a>,这里不再阐述,其他方法请参考<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/USB_flash_installation_medium_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">这里</a>。</p><p><em>另外,您需要确认主板 BIOS 里没有奇奇怪怪的设置,比如某些针对 Windows 系统的设置,比如快速启动、CSM 安全启动、TPM 模块等都设置需要自己调整,否则默认配置可能会导致安装完 Arch Linux 后无法进入系统引导。</em></p><h2 id="安装-Arch-Linux-系统"><a href="#安装-Arch-Linux-系统" class="headerlink" title="安装 Arch Linux 系统"></a>安装 Arch Linux 系统</h2><p>启动进入引导后,我们会看到熟悉的 Arch Linux 界面:</p><p><img src="/2022/09/1-1.png"></p><p>默认进入后即可看到 Live CD 已经正常工作:</p><p><img src="/2022/09/2-1.png"></p><p>我们可以运行 <code>installation_guide</code> 命令查看安装文档,当然都是英文的,对英语不好的朋友也可以直接参考<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Installation_guide_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">中文的文档说明</a>:</p><p><img src="/2022/09/3-1.png"></p><p><img src="/2022/09/4-1.png"></p><p>按 <code>Q</code> 退出,我们可以直接运行 <code>archinstall</code> 进行图形化安装向导:</p><p><img src="/2022/09/5-1.png"></p><p>然后我们会看到 <code>archinstall</code> 的向导界面:</p><p><img src="/2022/09/6-1.png"></p><p>目前我们能看到的选项有:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">Select Archinstall language</span><br><span class="line">Select keyboard layout</span><br><span class="line">Select mirror region</span><br><span class="line">Select harddrives</span><br><span class="line">Select bootloader</span><br><span class="line">Use swap</span><br><span class="line">Specify hostname</span><br><span class="line">Set root password</span><br><span class="line">Specify superuser account</span><br><span class="line">Specify user account</span><br><span class="line">Specify profile</span><br><span class="line">Select audio</span><br><span class="line">Select kernels</span><br><span class="line">Additional packages to install</span><br><span class="line">Configure network</span><br><span class="line">Select timezone</span><br><span class="line">Set automatic time <span class="built_in">sync</span> (NTP)</span><br><span class="line">Additional repositories to <span class="built_in">enable</span></span><br></pre></td></tr></table></figure><p>然后我们就一步一步来安装:</p><p><code>Select Archinstall language</code> 这里可以选择 <code>archinstall</code> 的界面语言,很可惜,截止本文发布,并没有中文。</p><p><code>Select keyboard layout</code> 选择键盘布局,默认情况你的键盘布局应该都是 <code>us</code>,除非你是德国等国家的用户,那么请自行选择。</p><p><code>Select mirror region</code> 可以选择最合适的镜像,建议选择和您当前网络一致的国家或地区:</p><p><img src="/2022/09/7-1.png"></p><p>记得按空格选择,然后按回车继续。</p><p><code>Select harddrives</code> 可以选择安装的硬盘,请自行选择需要安装的硬盘,切记看清楚硬盘大小,不要装错了硬盘最后拍大腿:</p><p><img src="/2022/09/8-1.png"></p><p>选择硬盘后会让您选择如何分区,如果没有特殊需求,直接选择 <code>Wipe all selected drives and use a best-effort default partition layout</code>,这样会把你的硬盘全部格式化,切记备份重要数据,不然安装了以后拍大腿:</p><p><img src="/2022/09/9-1.png"></p><p>然后会询问您硬盘分区格式,可选 <code>btrfs</code>,<code>ext4</code>,<code>f2fs</code> 或 <code>xfs</code>,如果没有特殊需求,可以选最常用的 <code>ext4</code>:</p><p><img src="/2022/09/10-1.png"></p><p>然后会询问您是否要对 <code>/home</code> 目录单独分区,这里主要存放用户的数据,默认建议单独分区,实际操作中会分配大概 80% 的硬盘空间给 <code>/home</code> 目录,你也可以一股脑都分给 <code>/</code>,请自行决定:</p><p><img src="/2022/09/11-1.png"></p><p>完成后会多出一个 <code>Set encryption password</code> 选项,如果您需要对硬盘加密,可以选择,如果没需要可以跳过。</p><p><img src="/2022/09/12-1.png"></p><p>然后我们直接跳过 <code>Select bootloader</code> 和 <code>Use swap</code>,因为他已经自动给您设置好了,然后如果您喜欢的话,可以给您的机器设置一个 <code>hostname</code> 和 <code>root</code> 密码,如果没有特殊需求,也可以跳过 <code>Specify hostname</code> 和 <code>Set root password</code>,我们直接来到 <code>Specify superuser account</code>,设置一个拥有 <code>sudo</code> 权限的超级用户,这个用户是日常登录和操作使用,请务牢记用户名和密码:</p><p><img src="/2022/09/13-1.png"></p><p>输入用户名:</p><p><img src="/2022/09/14-1.png"></p><p>输入密码,Linux 终端下输入密码是不显示的,不要以为自己产生幻觉输错了:</p><p><img src="/2022/09/15-1.png"></p><p>可能会提示您的密码太弱,自行斟酌是否需要修改:</p><p><img src="/2022/09/16-1.png"></p><p>然后再输入一次密码进行验证:</p><p><img src="/2022/09/17-1.png"></p><p>成功后选择 <code>Confirm and exit</code> 即可:</p><p><img src="/2022/09/18-1.png"></p><p>然后我们也可以跳过其他选项,直接来到 <code>Configure network</code>:</p><p><img src="/2022/09/19-1.png"></p><p>因为我们希望安装 KDE 桌面环境,所以选择 <code>Use NetworkManager</code>:</p><p><img src="/2022/09/20-1.png"></p><p>如果是服务器环境,可以选择 <code>Manual configuration</code> 手工配置网络。</p><p>然后我们选择时区,进入 <code>Select timezone</code>:</p><p><img src="/2022/09/21-1.png"></p><p>按照您本地的时区来选择,可以使用 <code>/</code> 然后输入前几个字符快速搜索,比如 <code>/shanghai</code>:</p><p><img src="/2022/09/22-1.png"></p><p>一切准备就绪,我们可以选择 <code>Save configuration</code> 来保存配置,也可以直接选 <code>Install</code> 进行安装:</p><p><img src="/2022/09/23-1.png"></p><p><img src="/2022/09/24-1.png"></p><p><img src="/2022/09/25-1.png"></p><p>系统会提示 <code>Would you like to chroot into the newly created installation and perform post-installation configuration?</code>,这里我们直接选择 <code>Yes</code>,然后进入安装:</p><p><img src="/2022/09/26-1.png"></p><p>霹雳哗啦安装完毕后,我们可以安装一些常用的软件,比如 <code>KDE</code> 桌面环境:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pacman -S plasma-meta plasma packagekit-qt5</span><br></pre></td></tr></table></figure><p>没有特殊需求都选择默认一路回车即可:</p><p><img src="/2022/09/27-1.png"></p><p><img src="/2022/09/28-1.png"></p><p>安装 KDE 比较慢,因为软件包较大,请耐心等待安装完成。</p><p>安装完成后开启 <code>sddm</code>:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl <span class="built_in">enable</span> sddm</span><br></pre></td></tr></table></figure><p>然后我们使用 <code>exit</code> 命令退出并使用 <code>reboot</code> 命令重启:</p><p><img src="/2022/09/29-1.png"></p><h2 id="安装并配置-Arch-Linux-的软件"><a href="#安装并配置-Arch-Linux-的软件" class="headerlink" title="安装并配置 Arch Linux 的软件"></a>安装并配置 Arch Linux 的软件</h2><p>重启后我们就可以看到熟悉的登录界面啦:</p><p><img src="/2022/09/30-1.png"></p><p>登录后会发现除了个桌面啥东西都没有,此时我们可以按键盘 <code>CTRL</code> + <code>ALT</code> + <code>F2</code> 进入 <code>tty2</code> 终端:</p><p><img src="/2022/09/31-1.png"></p><p>输入用户名和密码登录:</p><p><img src="/2022/09/32-1.png"></p><p>然后开始安装一些常用软件,比如 KDE 的终端软件 Konsole 和文本编辑器 Kate:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S konsole kate</span><br></pre></td></tr></table></figure><p><img src="/2022/09/33-1.png"></p><p>安装完成后,我们可以按键盘 <code>CTRL</code> + <code>ALT</code> + <code>F1</code> 重新进入 KDE 桌面环境,然后按 <code>Win</code> 键搜索 <code>konsole</code> 进入终端:</p><p><img src="/2022/09/34-1.png"></p><p>这里推荐一些常规和必要的软件包:</p><p>如果您是 Intel 的 CPU:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S intel-ucode</span><br></pre></td></tr></table></figure><p>如果您是 AMD 的 CPU:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S amd-ucode</span><br></pre></td></tr></table></figure><p>如果您是 AMD 的 GPU:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S xf86-video-amdgpu mesa</span><br></pre></td></tr></table></figure><p>如果您是 NVIDIA 的 GPU:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S nvidia mesa</span><br></pre></td></tr></table></figure><p>如果您是 Intel 的 GPU:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S xf86-video-intel mesa</span><br></pre></td></tr></table></figure><p>关于 Arch Linux 下 GPU 配置可以参考<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Xorg#Driver_installation">这里</a>和<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/AMDGPU">这里</a>。</p><p>然后安装一些常见的工具包:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S inetutils iproute2 iputils procps-ng psmisc sysfsutils <span class="built_in">which</span> wget nano vim sudo unzip mtr traceroute dnsutils lsb-release ca-certificates bash-completion logrotate openssh less rsync</span><br></pre></td></tr></table></figure><p>部分软件是需要自行开启并设置开机自启动的,比如 <code>OpenSSH</code>:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">systemctl <span class="built_in">enable</span> --now sshd</span><br></pre></td></tr></table></figure><p>然后安装个浏览器,Linux 下还是推荐用 <code>Firefox</code>:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S firefox</span><br></pre></td></tr></table></figure><p>安装完成后可以然后按 <code>Win</code> 键搜索 <code>firefox</code> 并右键图标使用 <code>Add to Desktop</code> 创建桌面快捷方式:</p><p><img src="/2022/09/35-1.png"></p><p>此时桌面上就有 <code>Firefox</code> 的图标啦:</p><p><img src="/2022/09/36-1.png"></p><h2 id="解决中文显示乱码问题"><a href="#解决中文显示乱码问题" class="headerlink" title="解决中文显示乱码问题"></a>解决中文显示乱码问题</h2><p>我们会遇到一个问题,此时打开中文网页都是乱码:</p><p><img src="/2022/09/37-1.png"></p><p>而且网页里包含的 Emoji 🤣也是一个个方框哦,所以我们参考<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Localization_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)/Simplified_Chinese_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">这里</a>和<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/fonts#Emoji_and_symbols">这里</a>,首先安装字体包:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S noto-fonts noto-fonts-cjk noto-fonts-emoji</span><br></pre></td></tr></table></figure><p>然后使用 <code>Konsole</code> 创建一个 <code>.config/fontconfig/fonts.conf</code> 文件</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> ~</span><br><span class="line"><span class="built_in">mkdir</span> -p .config/fontconfig</span><br><span class="line">vim .config/fontconfig/fonts.conf</span><br></pre></td></tr></table></figure><p>复制以下内容,使用 <code>vim</code> 编辑文件,按 <code>i</code> 开始编辑,按 <code>Ctrl + Shift + V</code> 或 <code>Shift + Insert</code> 或直接在 Konsole 里右键 <code>Paste</code>,然后粘贴以下内容后,完成后按 <code>ESC</code> 键,然后输入 <code>:wq</code> 完成编辑:</p><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta"><?xml version='1.0' encoding='UTF-8'?></span></span><br><span class="line"><span class="meta"><!DOCTYPE <span class="keyword">fontconfig</span> <span class="keyword">SYSTEM</span> <span class="string">'urn:fontconfig:fonts.dtd'</span>></span></span><br><span class="line"><span class="comment"><!-- ${XDG_CONFIG_HOME}/fontconfig/fonts.conf</span></span><br><span class="line"><span class="comment"> - vim:ft=xml:fenc=utf-8:noet:ts=3:sw=3:</span></span><br><span class="line"><span class="comment"> --></span></span><br><span class="line"><span class="tag"><<span class="name">fontconfig</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">alias</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>serif<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">prefer</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Serif<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Color Emoji<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans CJK SC<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans CJK TC<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans CJK JP<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">prefer</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">alias</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">alias</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>sans-serif<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">prefer</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Color Emoji<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans CJK SC<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans CJK TC<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans CJK JP<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">prefer</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">alias</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">alias</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>monospace<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">prefer</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans Mono<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Color Emoji<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans Mono CJK SC<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans Mono CJK TC<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">family</span>></span>Noto Sans Mono CJK JP<span class="tag"></<span class="name">family</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">prefer</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">alias</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">match</span> <span class="attr">target</span>=<span class="string">"font"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"antialias"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">bool</span>></span>true<span class="tag"></<span class="name">bool</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"autohint"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">bool</span>></span>true<span class="tag"></<span class="name">bool</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"dpi"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">double</span>></span>96<span class="tag"></<span class="name">double</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"hinting"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">bool</span>></span>true<span class="tag"></<span class="name">bool</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"hintstyle"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">const</span>></span>hintslight<span class="tag"></<span class="name">const</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"lcdfilter"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">const</span>></span>lcdlight<span class="tag"></<span class="name">const</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"rgba"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">const</span>></span>rgb<span class="tag"></<span class="name">const</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">edit</span> <span class="attr">mode</span>=<span class="string">"assign"</span> <span class="attr">name</span>=<span class="string">"size"</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">int</span>></span>15<span class="tag"></<span class="name">int</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">edit</span>></span></span><br><span class="line"> <span class="tag"></<span class="name">match</span>></span></span><br><span class="line"> <span class="tag"><<span class="name">dir</span>></span>~/.fonts<span class="tag"></<span class="name">dir</span>></span></span><br><span class="line"><span class="tag"></<span class="name">fontconfig</span>></span></span><br></pre></td></tr></table></figure><p>然后清理字体缓存:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">fc-cache -fv</span><br></pre></td></tr></table></figure><p>清理完事后会提示 <code>fc-cache: succeeded</code>,然后我们使用 <code>fc-match -s grep 'Noto Sans CJK'</code> 命令查看中文字体是否生效:</p><p><img src="/2022/09/38-1.png"></p><p>然后重新登录用户,或者直接 <code>sudo reboot</code> 重启电脑,再次打开 <code>Firefox</code> 即可看到中文字体完美显示:</p><p><img src="/2022/09/39-1.png"></p><h2 id="安装中文输入法"><a href="#安装中文输入法" class="headerlink" title="安装中文输入法"></a>安装中文输入法</h2><p>参考<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Fcitx5_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87)">这里</a>,我们直接安装 <code>fcitx5</code>:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S fcitx5-im fcitx5-qt fcitx5-gtk fcitx5-chinese-addons fcitx5-pinyin-zhwiki</span><br></pre></td></tr></table></figure><p>然后修改全局变量环境文件</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo vim /etc/environment</span><br></pre></td></tr></table></figure><p>加入以下内容:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">GTK_IM_MODULE=fcitx</span><br><span class="line">QT_IM_MODULE=fcitx</span><br><span class="line">XMODIFIERS=@im=fcitx</span><br><span class="line">INPUT_METHOD=fcitx</span><br><span class="line">SDL_IM_MODULE=fcitx</span><br><span class="line">GLFW_IM_MODULE=ibus</span><br></pre></td></tr></table></figure><p>重启后即可生效,在 KDE 里按 <code>Win</code> 键搜索 <code>Input Method</code> 后进入 <code>Input Method</code> 即可配置输入法:</p><p><img src="/2022/09/40-1.png"></p><p>选择 <code>Input Method</code>,然后点击 <code>Add Input Method...</code>:</p><p><img src="/2022/09/41-1.png"></p><p>搜索 <code>pinyin</code> 然后添加<code>简体中文</code>下的 <code>Pinyin</code>:</p><p><img src="/2022/09/42-1.png"></p><p>点击 <code>Add</code> 后记得点击 <code>Apply</code> 生效,然后我们可以看到任务栏右下角的键盘图标,右键即可看到 <code>Pinyin</code> 输入法,可以点击 <code>restart</code> 生效任何修改的配置:</p><p><img src="/2022/09/43-1.png"></p><p>第一次打开拼音输入法会提示你是否需要开启云拼音预测,可以按照自己的喜好选择:</p><p><img src="/2022/09/44-1.png"></p><p>然后我们随便打开一个文本编辑器,按 <code>Ctrl</code> + <code>空格</code> 即可开启拼音输入法:</p><p><img src="/2022/09/45-1.png"></p><h2 id="配置第三方源"><a href="#配置第三方源" class="headerlink" title="配置第三方源"></a>配置第三方源</h2><p>Arch Linux 官方提供了一些第三方源,这里我们推荐 <a target="_blank" rel="noopener" href="https://aur.archlinux.org/">AUR</a> 和 <a target="_blank" rel="noopener" href="https://www.archlinuxcn.org/">Archlinuxcn</a></p><p>安装 AUR 的包管理助手 <a target="_blank" rel="noopener" href="https://github.com/Jguer/yay">yay</a> :</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S base-devel git</span><br><span class="line"><span class="built_in">cd</span> ~</span><br><span class="line"><span class="built_in">mkdir</span> -p .<span class="built_in">local</span></span><br><span class="line"><span class="built_in">mkdir</span> -p .<span class="built_in">local</span>/opt</span><br><span class="line"><span class="built_in">cd</span> .<span class="built_in">local</span>/opt</span><br><span class="line">git <span class="built_in">clone</span> https://aur.archlinux.org/yay.git</span><br><span class="line"><span class="built_in">cd</span> yay</span><br><span class="line">makepkg -si</span><br></pre></td></tr></table></figure><p><em>国内网络的用户可能无法流畅安装编译 yay,需要一些魔法操作,请自行解决。</em></p><p>也可以直接安装打包好的二进制包:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -S git base-devel</span><br><span class="line"><span class="built_in">cd</span> ~</span><br><span class="line"><span class="built_in">mkdir</span> -p .<span class="built_in">local</span></span><br><span class="line"><span class="built_in">mkdir</span> -p .<span class="built_in">local</span>/opt</span><br><span class="line"><span class="built_in">cd</span> .<span class="built_in">local</span>/opt</span><br><span class="line">git <span class="built_in">clone</span> https://aur.archlinux.org/yay-bin.git</span><br><span class="line"><span class="built_in">cd</span> yay-bin</span><br><span class="line">makepkg -si</span><br></pre></td></tr></table></figure><p>然后即可使用 <code>yay -S</code> 来安装 <code>AUR</code> 中的软件,比如安装 <code>Microsoft Edge</code> 浏览器:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yay -S microsoft-edge-stable-bin</span><br></pre></td></tr></table></figure><p>没有特殊需求的话一路回车即可安装。</p><p>也可以使用 <code>yay -Syu</code> 直接更新系统和 AUR 仓库里的软件:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">yay -Syu</span><br></pre></td></tr></table></figure><p>添加 <code>Archlinuxcn</code> 源:</p><p>修改 <code>/etc/pacman.conf</code> 文件,加入:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[archlinuxcn]</span><br><span class="line">Server = https://repo.archlinuxcn.org/<span class="variable">$arch</span></span><br></pre></td></tr></table></figure><p>国内网络用户可以使用清华大学的源:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">[archlinuxcn]</span><br><span class="line">Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/<span class="variable">$arch</span></span><br></pre></td></tr></table></figure><p>然后更新系统并安装 <code>archlinuxcn-keyring</code> 包:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo pacman -Syu</span><br><span class="line">sudo pacman -S archlinuxcn-keyring</span><br></pre></td></tr></table></figure><p>如果遇到类似这样的错误提示:</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">gpg: key B3D53065DB03D61E was created 10631 seconds in the future (time warp or clock problem)</span><br><span class="line">==> Appending keys from archlinuxcn.gpg...</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10631 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10631 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10631 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10631 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10631 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br><span class="line">gpg: key B3D53065DB03D61E was created 10630 seconds in the future (time warp or clock problem)</span><br></pre></td></tr></table></figure><p>说明你本地的系统时间没有和 NTP 服务器同步,我们可以手工打开:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo timedatectl set-ntp 1</span><br><span class="line">sudo timedatectl status</span><br></pre></td></tr></table></figure><p>然后删除旧的 GPG Key 缓存文件并重新生成:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo <span class="built_in">rm</span> -fr /etc/pacman.d/gnupg</span><br><span class="line">sudo pacman-key --init</span><br><span class="line">sudo pacman-key --populate</span><br></pre></td></tr></table></figure><p>然后重新安装 <code>archlinuxcn-keyring</code> 即可正常工作。</p><p><em>请注意 AUR 里的很多软件分两种发布形式,一种是带 -bin 结尾的二进制包,安装后直接可用,一种是不带的,就是从源码编译安装,本地不一定能装的上,请自行选择。</em></p><h2 id="参考教程"><a href="#参考教程" class="headerlink" title="参考教程"></a>参考教程</h2><p>本教程仅适合有一定 Linux 基础和动手能力的小伙伴,如果您想从头开始学习安装一个 Arch Linux,那么这两个教程一定很适合您学习</p><ul><li><a target="_blank" rel="noopener" href="https://www.viseator.com/2017/05/17/arch_install/">以官方 Wiki 的方式安装 ArchLinux</a></li><li><a target="_blank" rel="noopener" href="https://archlinuxstudio.github.io/ArchLinuxTutorial/">Arch Linux 安装使用教程 - ArchTutorial - Arch Linux Studio</a></li></ul><h2 id="推荐软件"><a href="#推荐软件" class="headerlink" title="推荐软件"></a>推荐软件</h2><ul><li><a target="_blank" rel="noopener" href="https://archlinux.org/packages/extra/x86_64/firefox/">Firefox</a></li><li><a target="_blank" rel="noopener" href="https://archlinux.org/packages/extra/x86_64/thunderbird/">Thunderbird</a></li><li><a target="_blank" rel="noopener" href="https://aur.archlinux.org/packages/vscodium-bin">VSCodium</a></li><li><a target="_blank" rel="noopener" href="https://github.com/archlinuxcn/repo/tree/master/archlinuxcn/typora">Typora</a></li><li><a target="_blank" rel="noopener" href="https://aur.archlinux.org/packages/github-desktop-bin">Github Desktop</a></li><li><a target="_blank" rel="noopener" href="https://aur.archlinux.org/packages/1password">1Password</a></li><li><a target="_blank" rel="noopener" href="https://aur.archlinux.org/packages/microsoft-edge-stable-bin">Microsoft Edge</a></li><li><a target="_blank" rel="noopener" href="https://archlinux.org/packages/extra/x86_64/chromium/">Chromium</a></li></ul><p>最后秀一下我的 Arch Linux:</p><p><img src="/2022/09/tqA6ZHukDrvi9cg-1.png" alt="image.png"></p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/02/adguard-home-%E8%87%AA%E5%BB%BA-dns-%E9%98%B2%E6%B1%A1%E6%9F%93%E3%80%81%E5%8E%BB%E5%B9%BF%E5%91%8A%E6%95%99%E7%A8%8B-2-%E4%BC%98%E5%8C%96%E5%A2%9E%E5%BC%BA%E8%AE%BE%E7%BD%AE%E8%AF%A6%E8%A7%A3/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/02/adguard-home-%E8%87%AA%E5%BB%BA-dns-%E9%98%B2%E6%B1%A1%E6%9F%93%E3%80%81%E5%8E%BB%E5%B9%BF%E5%91%8A%E6%95%99%E7%A8%8B-2-%E4%BC%98%E5%8C%96%E5%A2%9E%E5%BC%BA%E8%AE%BE%E7%BD%AE%E8%AF%A6%E8%A7%A3/" class="post-title-link" itemprop="url">AdGuard Home 自建 DNS 防污染、去广告教程</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-02 23:06:02" itemprop="dateCreated datePublished" datetime="2022-09-02T23:06:02+08:00">2022-09-02</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar-check"></i> </span><span class="post-meta-item-text">更新于</span> <time title="修改时间:2022-09-29 21:27:46" itemprop="dateModified" datetime="2022-09-29T21:27:46+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Linux%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">Linux教程</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>4.8k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>4 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><h2 id="前言"><a href="#前言" class="headerlink" title="前言"></a>前言</h2><p>这篇教程来详细讲解如何正确的设置 AdGuard Home ,来更有效的防止 DNS 污染以及去广告。与其它 AdGuard Home 教程的只讲方法、不讲逻辑的胡乱设置不同,认真看完这篇教程你会收获大量的知识和启发。</p><h2 id="设置"><a href="#设置" class="headerlink" title="设置"></a>设置</h2><h3 id="常规设置"><a href="#常规设置" class="headerlink" title="常规设置"></a>常规设置</h3><p>文字介绍已经很好理解了,按需设置即可。重点是以下几个,如果你尚处于单身状态,那么就不要开启,否则会影响生理卫生知识的学习。</p><ul><li><strong>使用 AdGuard【家长控制】服务</strong>:如果家中有尚未成年的孩子,建议开启,屏蔽成人内容。</li><li><strong>强制安全搜索</strong>:在 Bing、Google、Yandex、YouTube 等网站上强制使用安全搜索,屏蔽 NSFW 内容。</li></ul><p> </p><p><img src="/2022/09/20201021160826.png"></p><p> </p><h3 id="DNS-设置"><a href="#DNS-设置" class="headerlink" title="DNS 设置"></a>DNS 设置</h3><p> </p><p><img src="/2022/09/20201020032250.png"></p><p> </p><h4 id="上游-DNS-服务器"><a href="#上游-DNS-服务器" class="headerlink" title="上游 DNS 服务器"></a>上游 DNS 服务器</h4><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9rYi5hZGd1YXJkLmNvbS96aC9nZW5lcmFsL2Rucy1wcm92aWRlcnM">AdGuard 文档</a>中给出了一些知名的 DNS 服务器供选择。</p><p>根据所在网络环境的不同推荐以下两组支持 ECS 功能的 DNS 服务器。如果有科学魔法爱国上网需求,你应该部署两个 AdGuard Home ,通过 DNS 分流才能达到较为理想的防污染和去广告效果。</p><ul><li><p>中国大陆网络环境推荐选择<a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cDovL3BkbnMuZG5zcG9kLmNuLw">腾讯 (DNSPod)</a> 和<a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly93d3cuYWxpZG5zLmNvbS8">阿里云</a>的公共 DNS 。使用它们你会惊奇的发现偶尔某些不存在的网站都是能正常解析的,只不过解析的结果并不是离你的代理服务器最近的 IP ,所以效果并不理想,而且非常不稳定。</p><blockquote><p><strong>TIPS:</strong> 中国大陆不推荐使用任何海外的 DNS ,因为延迟很高且都受到了不同程度的干扰,可用性不高,强行设置只会得到减速效果或者报错。</p></blockquote><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">tls://dns.pub</span><br><span class="line">https://dns.pub/dns-query</span><br><span class="line">tls://dns.alidns.com</span><br><span class="line">https://dns.alidns.com/dns-query</span><br></pre></td></tr></table></figure></li><li><p>国际网络环境,比如海外的 VPS 或者给科学魔法爱国上网软件做 DNS ,则推荐使用 <a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9kbnMuZ29vZ2xlLw">Google</a> 和 <a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly93d3cucXVhZDkubmV0Lw">Quad9</a> 的公共 DNS。给科学魔法爱国上网软件使用的前提是它们必须在魔法名单中。</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">tls://dns.google</span><br><span class="line">https://dns.google/dns-query</span><br><span class="line">tls://dns11.quad9.net</span><br><span class="line">https://dns11.quad9.net/dns-query</span><br></pre></td></tr></table></figure></li></ul><p>如果你看过《<a target="_blank" rel="noopener" href="https://p3terx.com/archives/use-adguard-home-to-build-dns-to-prevent-pollution-and-remove-ads-0.html">AdGuard Home 是什么?为什么无法去广告?</a>》那篇文章,那么你一定还记得 DoT/DoH 技术。所以这里的上游 DNS 自然是要选择 DoT/DoH 加密技术的服务器的,可以防止 DNS 解析记录被劫持、篡改以及跟踪。缺点是可能对解析速度会有些许影响,毕竟 TCP 协议不如 UDP 来得有效率,且加解密需要一点时间,不过在机器性能不错且网络通畅的情况下其实是可以忽略的,都是毫秒级别的差距。</p><p><strong>上游 DNS 服务器</strong>输入框下面有几个单选项,字面理解应该是解析策略、模式之类的选项,官方暂时没有给出详细介绍,所以博主根据字面含义和自身实际体验总结如下:</p><ul><li><strong>负载均衡</strong>:使用加权随机算法来选择最快的服务器。用到了算法,这就很玄学了。实际其实就是随机选择一个上游 DNS 服务器中的一个进行解析请求,哪个延迟低就更偏向于用哪一个。</li><li><strong>并行请求</strong>:同时请求所有上游 DNS 服务器,取最快给出的响应结果,所以解析速度很快。在上游 DNS 服务器设置合理的情况下属于万金油方案,解析速度和访问速度都很快。所以也非常适合上游 DNS 服务器连接延迟大和不稳定的情况,就比如科学魔法爱国上网使用场景。</li><li><strong>最快的 IP 地址</strong>:同时请求所有上游 DNS 服务器,在所有响应结果中选出延迟最低且可用的 IP。因为要等待所有上游 DNS 服务器响应结果,而且还要测试 IP 延迟及可用性,所以解析速度会很慢。只适合上游 DNS 服务器延迟特别低且网络非常稳定的场景,否则实际使用中可能会遇到首次打开网页非常慢,甚至可能打不开,要多刷新几次。再者低延迟 IP 不一定速度就快,还要看实际负载情况,所以这个方案的实际可用性是最差的。</li></ul><h4 id="Bootstrap-DNS-服务器"><a href="#Bootstrap-DNS-服务器" class="headerlink" title="Bootstrap DNS 服务器"></a>Bootstrap DNS 服务器</h4><p>Bootstrap DNS 服务器(引导 DNS 服务器)的作用只是解析上游 DoT/DoH 技术 DNS 服务器的域名,所以这里需要填写使用 UDP 协议的传统 DNS 服务器 IP 地址。</p><p><img src="/2022/09/20201020032251.png"></p><p> </p><p>同样的这里根据网络环境的不同推荐两组:</p><ul><li><p>中国大陆</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">119.29.29.29</span><br><span class="line">119.28.28.28</span><br><span class="line">223.5.5.5</span><br><span class="line">223.6.6.6</span><br></pre></td></tr></table></figure></li><li><p>国际</p><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">8.8.8.8</span><br><span class="line">8.8.4.4</span><br><span class="line">9.9.9.11</span><br><span class="line">149.112.112.11</span><br></pre></td></tr></table></figure></li></ul><p>设置完点击<strong>测试上游服务器</strong>,没有问题点<strong>保存</strong>即可。</p><blockquote><p><strong>TIPS:</strong> 这里也可以留空,使用后面将要提到的 <strong>DNS 重写</strong>功能把 DoT/DoH DNS 服务器的域名直接指向它的 IP 是一种更优雅的使用方式。</p></blockquote><h4 id="DNS-服务设定"><a href="#DNS-服务设定" class="headerlink" title="DNS 服务设定"></a>DNS 服务设定</h4><ul><li><strong>速度限制</strong>:<code>0</code></li><li><strong>使用 EDNS</strong> :前面提及的上游 DNS 服务器都是支持 EDNS (ECS) 的,它有助于获取到更合适的 CDN 节点,建议勾选。</li><li><strong>使用 DNSSEC</strong> : 用于效验 DNS 记录的签名,防止 DNS 缓存被投毒,建议勾选。勾选后会在日志页面请求列显示小绿锁图标。</li><li><strong>禁用 IPv6</strong> :丢弃 IPv6 的 DNS 查询。在本地网络和网站都支持 IPv6 会优先使用 IPv6 去访问网站,但目前 IPv6 的建设还处于初级阶段,大多数地区的 IPv6 网络体验都一般。还有一些代理软件对 IPv6 支持不佳,开启后可能会影响国际互联网的访问。如果对此没有特殊需求,那么直勾选即可,这样既不影响 BT 软件连接 IPv6 网络,又可以优先使用 IPv4 来上网。如果只有 IPv4 ,那么是否勾选没有区别。</li></ul><p> </p><p><img src="/2022/09/20201020032252.png"></p><p> </p><h4 id="DNS-缓存配置"><a href="#DNS-缓存配置" class="headerlink" title="DNS 缓存配置"></a>DNS 缓存配置</h4><p>先简单科普一下 TTL ,它是英语 Time To Live 的简称,中文翻译为 “存活时间”。放在 DNS 解析中意为一条域名解析记录在 DNS 服务器中的存留时间,单位是秒。</p><p>正常情况下 TTL 默认 <code>0</code> 即可,即从上游 DNS 服务器获取 TTL 值。如果你所部署的网络环境到上游 DNS 服务器的延迟比较高,那么可以适当增加 TTL 值,让缓存更持久,短时间内请求同样域名的解析会直接从缓存中读取,实现秒解析。不过 TTL 值不宜过大,不然会导致记录不能及时更新,结果是网站无法正常打开。据博主观察目前多数域名的 TTL 值普遍在 300 以内,所以给出以下设置参考值:</p><ul><li>覆盖最小 TTL 值:<code>600</code></li><li>覆盖最大 TTL 值:<code>3600</code></li></ul><p> </p><p><img src="/2022/09/20201020032253.png"></p><p> </p><h3 id="加密设置"><a href="#加密设置" class="headerlink" title="加密设置"></a>加密设置</h3><p>设置管理页面使用 HTTPS 加密以及 AdGuard Home 自身的 DoH/DoT 功能,如果不对外开放服务,只是在本地局域网使用是用不到的。对外开放 DNS 服务在中国大陆可能会有 “法律” 风险,而部署在国外网络速度缓慢,所以对于普通用户而言加密设置就成了摆设。</p><p><img src="/2022/09/20201021160403.png"></p><p> </p><h3 id="客户端设置"><a href="#客户端设置" class="headerlink" title="客户端设置"></a>客户端设置</h3><p>在这里可以单独设置每个设备单独使用的上游 DNS 及过滤规则,需要将设备 DNS 设置为 AdGuard Home 服务器的在 IP ,或者使用下面将要提到的 DHCP 设置。每个人的需求不一样,所以这个部分就不详细说明了。</p><p><img src="/2022/09/20201021160404.png"></p><p> </p><h3 id="DHCP-设置"><a href="#DHCP-设置" class="headerlink" title="DHCP 设置"></a>DHCP 设置</h3><p>使用 AdGuard Home 作为 DHCP 服务器去代替路由器上的 DHCP 服务器,这个功能的主要作用是自动分配 AdGuard Home 的 DNS 给到设备,然后配合<strong>客户端设置</strong>去做精细化 DNS 和过滤规则设置。除非是你的路由设备的 DHCP 功能缺斤少两,否则一般是用不到的。目前这个功能处于实验阶段,稳定性还有待考证。有兴趣的小伙伴可以自己去深入研究,这里不做过多赘述。</p><p><img src="/2022/09/20201021160405.png"></p><p> </p><h2 id="过滤器"><a href="#过滤器" class="headerlink" title="过滤器"></a>过滤器</h2><h3 id="DNS-封锁清单"><a href="#DNS-封锁清单" class="headerlink" title="DNS 封锁清单"></a>DNS 封锁清单</h3><p>这里是人民群众喜闻乐见的去广告环节。</p><p><img src="/2022/09/20201020033102.png"></p><p> </p><blockquote><p><strong>吐槽:</strong><code>封锁清单</code>这个词严重怀疑是机翻,而下面的绿色按钮是<code>添加阻止列表</code>。博主在查看 AdGuard Home 的源码后发现简体中文的翻译有很多不统一的地方,然后花了几个小时帮助他们改进了大量的翻译,可能在后续的版本中就不再叫<code>封锁清单</code>了。</p></blockquote><p>使用官方默认的 <strong>AdGuard DNS filter</strong> 规则的效果对于中国大陆的网络而言属于聊胜于无,所以需要添加一些其它的规则。然而规则并不是越多越好,多了会影解析速度,真正需要的是高质量。博主个人比较推荐 <strong>anti-AD</strong> 和 <strong>halflife</strong> 这两个规则。</p><p>规则列表 点击查看</p><p>名称</p><p>简介</p><p>地址</p><p>AdGuard DNS Filter</p><p>AdGuard 官方维护的广告规则,涵盖多种过滤规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9hZGd1YXJkdGVhbS5naXRodWIuaW8vQWRHdWFyZFNETlNGaWx0ZXIvRmlsdGVycy9maWx0ZXIudHh0">https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9hZGF3YXkub3JnLw">AdAway</a></p><p>AdAway 官方的去广告 Host 规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9hZGF3YXkub3JnL2hvc3RzLnR4dA">https://adaway.org/hosts.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9naXRodWIuY29tL2JhbmJlbmRhbGFvL0FEZ2s">ADgk</a></p><p>适用于 AdGuard for Android 的去广告规则,去视频 APP 广告、开屏广告</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9iYW5iZW5kYWxhby5jb2RpbmcubmV0L3AvYWRnay9kL0FEZ2svZ2l0L3Jhdy9tYXN0ZXIvQURnay50eHQ">https://banbendalao.coding.net/p/adgk/d/ADgk/git/raw/master/ADgk.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9naXRodWIuY29tL3ByaXZhY3ktcHJvdGVjdGlvbi10b29scy9hbnRpLUFE">anti-AD</a></p><p>命中率高、兼容性强</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9hbnRpLWFkLm5ldC9lYXN5bGlzdC50eHQ">https://anti-ad.net/easylist.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9hZGYubWluZ2dvLmV1Lm9yZy8">halflife</a></p><p>涵盖了 EasyList China、EasyList Lite、CJX ‘s Annoyance、乘风视频过滤规则,以及补充的其它规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9jZG4uanNkZWxpdnIubmV0L2doL28wSGFsZkxpZmUwby9saXN0QG1hc3Rlci9hZC50eHQ">https://cdn.jsdelivr.net/gh/o0HalfLife0o/list@master/ad.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9lYXN5bGlzdC50by8">EasyList</a></p><p>Adblock Plus 官方维护的广告规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9lYXN5bGlzdC1kb3dubG9hZHMuYWRibG9ja3BsdXMub3JnL2Vhc3lsaXN0LnR4dA">https://easylist-downloads.adblockplus.org/easylist.txt</a></p><p>EasyList China</p><p>面向中文用户的 EasyList 去广告规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9lYXN5bGlzdC1kb3dubG9hZHMuYWRibG9ja3BsdXMub3JnL2Vhc3lsaXN0Y2hpbmEudHh0">https://easylist-downloads.adblockplus.org/easylistchina.txt</a></p><p>EasyPrivacy</p><p>反隐私跟踪、挖矿规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9lYXN5bGlzdC1kb3dubG9hZHMuYWRibG9ja3BsdXMub3JnL2Vhc3lwcml2YWN5LnR4dA">https://easylist-downloads.adblockplus.org/easyprivacy.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9naXRlZS5jb20veGluZ2dzZi9BZGJsb2NrLVJ1bGUv">Xinggsf 乘风通用</a></p><p>国内网站广告过滤规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9naXRlZS5jb20veGluZ2dzZi9BZGJsb2NrLVJ1bGUvcmF3L21hc3Rlci9ydWxlLnR4dA">https://gitee.com/xinggsf/Adblock-Rule/raw/master/rule.txt</a></p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9naXRlZS5jb20veGluZ2dzZi9BZGJsb2NrLVJ1bGUv">Xinggsf 乘风视频</a></p><p>视频网站广告过滤规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9naXRlZS5jb20veGluZ2dzZi9BZGJsb2NrLVJ1bGUvcmF3L21hc3Rlci9tdi50eHQ">https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt</a></p><p>MalwareDomainList</p><p>恶意软件过滤规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly93d3cubWFsd2FyZWRvbWFpbmxpc3QuY29tL2hvc3RzbGlzdC9ob3N0cy50eHQ">https://www.malwaredomainlist.com/hostslist/hosts.txt</a></p><p>Adblock Warning Removal List</p><p>去除禁止广告拦截提示规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9lYXN5bGlzdC1kb3dubG9hZHMuYWRibG9ja3BsdXMub3JnL2FudGlhZGJsb2NrZmlsdGVycy50eHQ">https://easylist-downloads.adblockplus.org/antiadblockfilters.txt</a></p><p>Fanboy’s Annoyances List</p><p>去除页面弹窗广告规则</p><p><a target="_blank" rel="noopener" href="https://p3terx.com/go/aHR0cHM6Ly9lYXN5bGlzdC1kb3dubG9hZHMuYWRibG9ja3BsdXMub3JnL2ZhbmJveS1hbm5veWFuY2UudHh0">https://easylist-downloads.adblockplus.org/fanboy-annoyance.txt</a></p><p> </p><h3 id="DNS-允许清单"><a href="#DNS-允许清单" class="headerlink" title="DNS 允许清单"></a>DNS 允许清单</h3><p>在这里你可以设置排除封锁清单中的被屏蔽的域名。比如做淘宝客、广告联盟之类的人群可能会用得到,毕竟封锁清单基本涵盖了他们的业务范围。</p><p><img src="/2022/09/20201021161521.png"></p><p> </p><h3 id="DNS-重写"><a href="#DNS-重写" class="headerlink" title="DNS 重写"></a>DNS 重写</h3><p>在这里你可以方便的把一个域名指向一个 IP ,简单来说这个功能相当于 hosts 。</p><p>最典型的一个使用场景是把 DoH/DoT DNS 服务器的域名直接指向它们的 IP ,这样就不再需要进行我查我自己这样浪费时间的迷惑操作了,可进一步加快解析的速度。一般来说 DoT/DoH DNS 服务器的 IP 是固定的,而且 IP 地址和它们自家的传统 DNS 服务器的 IP 是一致的。这里需要注意的是处在公测阶段的 DNSPod 是个例外 (难怪腾讯云做不过阿里云,这种细节上的东西很能体现出是否专业)。</p><p><img src="/2022/09/20210423045545.png"></p><p> </p><h3 id="已阻止服务"><a href="#已阻止服务" class="headerlink" title="已阻止服务"></a>已阻止服务</h3><p>在这里你可以一键禁止访问一些热门网站和服务,比如 Facebook 、Twitter 。</p><p><img src="/2022/09/20201021161524.png"></p><p> </p><h3 id="自定义过滤规则"><a href="#自定义过滤规则" class="headerlink" title="自定义过滤规则"></a>自定义过滤规则</h3><p>在这里你可以自定义符合 adblock 语法或 Hosts 语法的规则,以及检查过滤域名是否被过滤。具体如何使用可以参考页面上的示例和官方文档。</p><p><img src="/2022/09/20201021161523.png"></p><p> </p><h2 id="尾巴"><a href="#尾巴" class="headerlink" title="尾巴"></a>尾巴</h2><p>到这里 AdGuard Home 的设置就算是介绍完了,有简体中文,而且 UI 逻辑很清晰,很容易上手。</p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/01/wordpress%E5%A4%84%E7%90%86cdnjs%E5%8A%A0%E8%BD%BD%E6%85%A2%E7%9A%84%E9%97%AE%E9%A2%98/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/01/wordpress%E5%A4%84%E7%90%86cdnjs%E5%8A%A0%E8%BD%BD%E6%85%A2%E7%9A%84%E9%97%AE%E9%A2%98/" class="post-title-link" itemprop="url">wordpress处理cdnjs加载慢的问题</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-01 00:54:23" itemprop="dateCreated datePublished" datetime="2022-09-01T00:54:23+08:00">2022-09-01</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar-check"></i> </span><span class="post-meta-item-text">更新于</span> <time title="修改时间:2022-09-29 21:27:46" itemprop="dateModified" datetime="2022-09-29T21:27:46+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Linux%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">Linux教程</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>277</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>1 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>我这里用的是nginx替代字符串的方法,在appnode下仅供参考</p><p>location ~ ^/.+\.php(/$) { sub_filter ‘//cdnjs.cloudflare.com/ajax/libs’ ‘//cdn.staticfile.org’; sub_filter ‘//cdn.datatables.net’ ‘//cdn.staticfile.org/datatables’; sub_filter_once off;<br>……..</p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/01/%E7%94%A8alpine%E5%9F%BA%E4%BA%8Esmartdns%E5%BB%BA%E7%AB%8B%E6%9C%AC%E5%9C%B0dns%E6%9C%8D%E5%8A%A1%E5%99%A8-2/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/01/%E7%94%A8alpine%E5%9F%BA%E4%BA%8Esmartdns%E5%BB%BA%E7%AB%8B%E6%9C%AC%E5%9C%B0dns%E6%9C%8D%E5%8A%A1%E5%99%A8-2/" class="post-title-link" itemprop="url">用alpine基于smartdns建立本地DNS服务器</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-01 00:53:49" itemprop="dateCreated datePublished" datetime="2022-09-01T00:53:49+08:00">2022-09-01</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar-check"></i> </span><span class="post-meta-item-text">更新于</span> <time title="修改时间:2022-09-29 21:27:46" itemprop="dateModified" datetime="2022-09-29T21:27:46+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Linux%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">Linux教程</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>2.6k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>2 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>因为是虚拟机下使用,下载虚拟机专用的镜像</p><p><a target="_blank" rel="noopener" href="https://alpinelinux.org/downloads/">https://alpinelinux.org/downloads/</a> Virtual板块下载86_64镜像</p><p>当前 <a target="_blank" rel="noopener" href="http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86/_64/alpine-virt-3.12.1-x86/_64.iso">http://dl-cdn.alpinelinux.org/alpine/v3.12/releases/x86\_64/alpine-virt-3.12.1-x86\_64.iso</a></p><p>创建虚拟机 当前alpine内核是5.4,虚拟机创建及初始化过程略过</p><p>apk update && apk upgrade && apk add sudo nano</p><p>下载并安装smartdns from <a target="_blank" rel="noopener" href="https://github.com/pymumu/smartdns">https://github.com/pymumu/smartdns</a></p><p>wget <a target="_blank" rel="noopener" href="https://github.com/pymumu/smartdns/releases/download/Release33/smartdns.1.2020.09.08/-2235.x86/_64/-linux/-all.tar.gz">https://github.com/pymumu/smartdns/releases/download/Release33/smartdns.1.2020.09.08\-2235.x86\_64\-linux\-all.tar.gz</a><br>tar xvf smartdns.1.2020.09.08-2235.x86_64-linux-all.tar.gz && cd smartdns && chmod +x ./install && mkdir mkdir /etc/default && ./install -i</p><p>rc-service smartdns stop</p><p>mv /etc/smartdns/smartdns.conf /etc/smartdns/smartdns.conf.bak<br>nano /etc/smartdns/smartdns.conf<br>server-name smartdns<br>bind :53 bind-tcp :53 cache-size 1536 prefetch-domain yes<br>serve-expired yes<br>log-level info<br>server-tls 208.67.222.222:853<br>#server-https <a target="_blank" rel="noopener" href="https://dns.twnic.tw/dns-query">https://dns.twnic.tw/dns-query</a><br>server-tls 45.32.55.94:853 server-https <a target="_blank" rel="noopener" href="https://cloudflare/-dns.com/dns/-query">https://cloudflare\-dns.com/dns\-query</a><br>server-https <a target="_blank" rel="noopener" href="https://neatdns.ustclug.org/resolve">https://neatdns.ustclug.org/resolve</a><br>server-https <a target="_blank" rel="noopener" href="https://doh.dns.sb/dns/-query">https://doh.dns.sb/dns\-query</a><br>server-https <a target="_blank" rel="noopener" href="https://public.dns.iij.jp/dns/-query">https://public.dns.iij.jp/dns\-query</a><br>server-https <a target="_blank" rel="noopener" href="https://dns.rubyfish.cn/dns/-query">https://dns.rubyfish.cn/dns\-query</a><br>server-https <a target="_blank" rel="noopener" href="https://dns.dns/-over/-https.com/dns/-query">https://dns.dns\-over\-https.com/dns\-query</a><br>server-https <a target="_blank" rel="noopener" href="https://jp.tiar.app/dns/-query">https://jp.tiar.app/dns\-query</a><br>server-https <a target="_blank" rel="noopener" href="https://i.233py.com/dns/-query">https://i.233py.com/dns\-query</a><br>server 223.5.5.5:53 server 114.114.114.114:53 conf-file /tmp/whitelist.conf<br>conf-file /tmp/blacklist.conf<br>ipset /tracker.publicbt.com/block<br>ipset /tracker.publicbt.com/b- address /tracker.publicbt.com/- address /publicbt.com/- address /<a target="_blank" rel="noopener" href="http://www.publicbt.com/-">www.publicbt.com/-</a> address /*.publicbt.com/-</p><p>取消DHCP DNS自动覆盖</p><p>nano /usr/share/udhcpc/default.script 用#注释RESOLV_CONF=“/etc/resolv.conf”</p><p>修改本地DNS为127.0.0.1</p><p>nano /etc/resolv.conf<br>nameserver 127.0.0.1</p><p>启动smartdns并测试</p><p>/usr/sbin/smartdns 测试 nslookup -querytype=ptr smartdns</p><p>开机启动,默认的服务没法启动,未知</p><p>/usr/sbin/smartdns</p><p>nano /etc/local.d/init_nextcloud.start #!/bin/sh<br>/usr/sbin/smartdns<br>chmod +x /etc/local.d/init_nextcloud.start</p><p>rc-update add local</p><p>添加守护</p><p>apk add monit<br>mv /etc/monitrc /etc/monitrc.bak<br>nano /etc/monitrc set daemon 10 #10s循环监控<br>set logfile syslog<br>check process smartdns with pidfile /var/run/smartdns.pid<br>start program = “/usr/sbin/smartdns” with timeout 10 seconds<br>stop program = “/usr/bin/killall smartdns” with timeout 10 seconds<br>chmod 0700 /etc/monitrc 测试守护配置 monit -t 启动 rc-service monit start<br>monit start all #忽略有个报错<br>添加启动 rc-update add monit</p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://jarod.vip/2022/09/01/adguard-home%E6%90%AD%E5%BB%BAdoh/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.gif"><meta itemprop="name" content="Jarod"><meta itemprop="description" content="记录生活中的点点滴滴"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="Jarod's Blog"></span><header class="post-header"><h2 class="post-title" itemprop="name headline"><a href="/2022/09/01/adguard-home%E6%90%AD%E5%BB%BAdoh/" class="post-title-link" itemprop="url">AdGuard Home搭建DOH</a></h2><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间:2022-09-01 00:52:25" itemprop="dateCreated datePublished" datetime="2022-09-01T00:52:25+08:00">2022-09-01</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar-check"></i> </span><span class="post-meta-item-text">更新于</span> <time title="修改时间:2022-09-29 21:27:46" itemprop="dateModified" datetime="2022-09-29T21:27:46+08:00">2022-09-29</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Linux%E6%95%99%E7%A8%8B/" itemprop="url" rel="index"><span itemprop="name">Linux教程</span></a></span></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数:</span> <span>932</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 ≈</span> <span>1 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>一键安装docker</p><p>curl -fsSL <a target="_blank" rel="noopener" href="https://get.docker.com/">https://get.docker.com</a> -o get-docker.sh && sh get-docker.sh<br>#创建docker #<a target="_blank" rel="noopener" href="https://hub.docker.com/r/adguard/adguardhome">https://hub.docker.com/r/adguard/adguardhome</a></p><p>docker pull adguard/adguardhome</p><p>docker run --name adguardhome\<br> --restart unless-stopped\<br> -v /root/adguardhome/workdir:/opt/adguardhome/work\<br> -v /root/adguardhome/confdir:/opt/adguardhome/conf\<br> -p 3000:3000/tcp\<br> -p 36886:36886/tcp\<br> -d adguard/adguardhome</p><p>#3000为管理端口 第一setup 管理端口80改3000<br>#36886为https端口 默认443 需修改</p><p>设置参考# <a target="_blank" rel="noopener" href="https://www.nange.cn/dns-over-https-for-adguard.html">https://www.nange.cn/dns-over-https-for-adguard.html</a></p><p>appnode为例<br>反代后端路径 /dns-query<br>如果填/会暴露 /dns-query<br>请求路径 自己生成一个随机数 如 /oOnZY74WyMWFuM34sgCDv2V2LB 这个就是藏起来的</p><p>appnode let’s生成证书 把证书复制到ahm</p><p>验证工具<br>wget <a target="_blank" rel="noopener" href="https://github.com/ameshkov/dnslookup/releases/download/v1.4.8/dnslookup-linux-amd64-v1.6.0.tar.gz">https://github.com/ameshkov/dnslookup/releases/download/v1.4.8/dnslookup-linux-amd64-v1.6.0.tar.gz</a><br>tar zxf dnslookup-linux-amd64-v1.4.8.tar.gz && cd linux-amd64<br>dnslookup <a target="_blank" rel="noopener" href="http://www.google.com/">www.google.com</a> <a target="_blank" rel="noopener" href="https://dns.123.com/oOnZY74WyMWFuM34sgCDv2V2LB">https://dns.123.com/oOnZY74WyMWFuM34sgCDv2V2LB</a></p></div><footer class="post-footer"><div class="post-eof"></div></footer></article><nav class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><span class="space">…</span><a class="page-number" href="/page/27/">27</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right" aria-label="下一页"></i></a></nav></div><script>window.addEventListener("tabs:register",()=>{let t=CONFIG.comments["activeClass"];var e;(t=CONFIG.comments.storage?localStorage.getItem("comments_active")||t:t)&&(e=document.querySelector(`a[href="#comment-${t}"]`))&&e.click()}),CONFIG.comments.storage&&window.addEventListener("tabs:click",t=>{t.target.matches(".tabs-comment .tab-content .tab-pane")&&(t=t.target.classList[1],localStorage.setItem("comments_active",t))})</script></div><div class="toggle sidebar-toggle"><span class="toggle-line toggle-line-first"></span> <span class="toggle-line toggle-line-middle"></span> <span class="toggle-line toggle-line-last"></span></div><aside class="sidebar"><div class="sidebar-inner"><ul class="sidebar-nav motion-element"><li class="sidebar-nav-toc">文章目录</li><li class="sidebar-nav-overview">站点概览</li></ul><div class="post-toc-wrap sidebar-panel"></div><div class="site-overview-wrap sidebar-panel"><div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"><p class="site-author-name" itemprop="name">Jarod</p><div class="site-description" itemprop="description">记录生活中的点点滴滴</div></div><div class="site-state-wrap motion-element"><nav class="site-state"><div class="site-state-item site-state-posts"><a href="/archives/"><span class="site-state-item-count">262</span> <span class="site-state-item-name">日志</span></a></div><div class="site-state-item site-state-categories"><a href="/categories/"><span class="site-state-item-count">6</span> <span class="site-state-item-name">分类</span></a></div><div class="site-state-item site-state-tags"><a href="/tags/"><span class="site-state-item-count">306</span> <span class="site-state-item-name">标签</span></a></div></nav></div><div class="links-of-author motion-element"><span class="links-of-author-item"><a href="https://github.com/jarodvip" title="GitHub → https://github.com/jarodvip" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a></span></div></div></div></aside><div id="sidebar-dimmer"></div></div></main><footer class="footer"><div class="footer-inner"><div class="copyright">© 2010 – <span itemprop="copyrightYear">2022</span> <span class="with-love"><i class="fa fa-heart"></i> </span><span class="author" itemprop="copyrightHolder">Jarod</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-chart-area"></i> </span><span title="站点总字数">658k</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-coffee"></i> </span><span title="站点阅读时长">9:58</span></div><div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动</div></div></footer></div><script src="/lib/anime.min.js"></script><script src="/lib/velocity/velocity.min.js"></script><script src="/lib/velocity/velocity.ui.min.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/pisces.js"></script><script src="/js/next-boot.js"></script><script src="/js/local-search.js"></script></body></html>