<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>操作系统 on Allens' Blog</title><link>https://allens.tech/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/</link><description>Recent content from Allens' Blog</description><generator>Hugo</generator><language>en-us</language><managingEditor>allens.leng@gmail.com (Allens)</managingEditor><webMaster>allens.leng@gmail.com (Allens)</webMaster><copyright>All articles on this blog are licensed under the BY-NC-SA license agreement unless otherwise stated. Please indicate the source when reprinting!</copyright><lastBuildDate>Fri, 25 Feb 2022 18:00:00 +0800</lastBuildDate><atom:link href="https://allens.tech/tags/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/index.xml" rel="self" type="application/rss+xml"/><item><title>打造 Windows 下的开发环境</title><link>https://allens.tech/post/202202251800/</link><pubDate>Fri, 25 Feb 2022 18:00:00 +0800</pubDate><author>allens.leng@gmail.com (Allens)</author><guid>https://allens.tech/post/202202251800/</guid><description>
<![CDATA[<h1>打造 Windows 下的开发环境</h1><p>Author: Allens(allens.leng@gmail.com)</p>
        
          <h2 id="描述">
<a class="header-anchor" href="#%e6%8f%8f%e8%bf%b0"></a>
描述
</h2><p>说实话已经习惯了用 ** MAC OS ** 进行开发，但是家里目前并没有 <strong>MAC OS</strong>，也确实没有必要为了在家办公买一台，所以就搞起了开发环境，之前也用过 <strong>WSL</strong>，<strong>Arch Linux</strong>,说实话真的不好用，<strong>Arch Linux</strong> 双系统不方便，而且 <strong>VPN</strong> 处处是坑，<strong>WSL</strong>
就更差了，所以最终还是用了 <strong>Windows</strong> 本身进行开发。</p>
<h2 id="命令行工具-windows-terminal">
<a class="header-anchor" href="#%e5%91%bd%e4%bb%a4%e8%a1%8c%e5%b7%a5%e5%85%b7-windows-terminal"></a>
命令行工具 <strong>Windows Terminal</strong>
</h2><p>我是重度命令行使用者，参考了很多文章，觉得 <strong>Windows Terminal</strong> 还是普遍得到认可的，<strong>Windows</strong> 商店直接搜索安装就可以了。
<img src="/img/2022-02-25/1.jpg" alt=""></p>
<h2 id="包管理工具-scoop">
<a class="header-anchor" href="#%e5%8c%85%e7%ae%a1%e7%90%86%e5%b7%a5%e5%85%b7-scoop"></a>
包管理工具 <strong>Scoop</strong>
</h2><p>由于我从来不喜欢系统以外的东西占用<strong>C盘</strong>，所以我把 <strong>scoop</strong> 装在了 <strong>D盘</strong>。</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># 设置环境变量</span>
</span></span><span style="display:flex;"><span>$env:SCOOP<span style="color:#f92672">=</span><span style="color:#e6db74">&#39;D:\Applications\Scoop&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">[</span>environment<span style="color:#f92672">]</span>::setEnvironmentVariable<span style="color:#f92672">(</span><span style="color:#e6db74">&#39;SCOOP&#39;</span>,<span style="color:#e6db74">&#39;D:\Applications\Scoop&#39;</span>,<span style="color:#e6db74">&#39;User&#39;</span><span style="color:#f92672">)</span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># 安装 scoop</span>
</span></span><span style="display:flex;"><span>iwr -useb get.scoop.sh | iex
</span></span></code></pre></div><p>安装一些开发工具</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># vim</span>
</span></span><span style="display:flex;"><span>scoop install vim
</span></span></code></pre></div><h2 id="安装-node">
<a class="header-anchor" href="#%e5%ae%89%e8%a3%85-node"></a>
安装 Node
</h2><ul>
<li>安装 nvm</li>
</ul>
<blockquote>
<p>安装 nvm 会遇到 Windows 下缺少基础库的问题</p>
</blockquote>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># 查看一下都有哪些基础库</span>
</span></span><span style="display:flex;"><span>scoop bucket known
</span></span><span style="display:flex;"><span><span style="color:#75715e"># 我第一个是 main 添加 main</span>
</span></span><span style="display:flex;"><span>scoop bucket add main
</span></span><span style="display:flex;"><span><span style="color:#75715e"># node 版本管理</span>
</span></span><span style="display:flex;"><span>scoop install nvm
</span></span></code></pre></div><h2 id="命令行主题">
<a class="header-anchor" href="#%e5%91%bd%e4%bb%a4%e8%a1%8c%e4%b8%bb%e9%a2%98"></a>
命令行主题
</h2><p>我是一个颜控，所以要安装一个主题，找来找去感觉 <strong>oh-my-posh</strong> 比较适合我，当然用什么风格的可以自己看，通过如下方式可以挑选：</p>
        
        <hr><p>Published on 2022-02-25 at <a href='https://allens.tech/'>Allens' Blog</a>, last modified on 2022-02-25</p>]]></description><category>操作系统</category></item><item><title>Ventoy - 最简单的系统盘制作</title><link>https://allens.tech/post/202009231900/</link><pubDate>Wed, 23 Sep 2020 19:00:00 +0800</pubDate><author>allens.leng@gmail.com (Allens)</author><guid>https://allens.tech/post/202009231900/</guid><description>
<![CDATA[<h1>Ventoy - 最简单的系统盘制作</h1><p>Author: Allens(allens.leng@gmail.com)</p>
        
          <h2 id="描述">
<a class="header-anchor" href="#%e6%8f%8f%e8%bf%b0"></a>
描述
</h2><p>折腾 <strong>Ubuntu</strong>、<strong>Arch</strong>、<strong>Windows</strong> 也来来回回换了 N 次系统了，经历了<a href="https://cn.ultraiso.net/xiazai.html">软碟通</a>、<a href="https://rufus.ie/en/">Rufus</a> 做系统盘的过程，最终还是选择了个人认为最简单的多启制作工具：<strong>Ventoy</strong></p>
<h2 id="综合评估">
<a class="header-anchor" href="#%e7%bb%bc%e5%90%88%e8%af%84%e4%bc%b0"></a>
综合评估
</h2><h3 id="优势">
<a class="header-anchor" href="#%e4%bc%98%e5%8a%bf"></a>
优势
</h3><ul>
<li>制作简单</li>
<li>支持多启（多镜像启动盘）</li>
</ul>
<h3 id="劣势">
<a class="header-anchor" href="#%e5%8a%a3%e5%8a%bf"></a>
劣势
</h3><ul>
<li>没有 <strong>MacOS</strong> 的软件支持</li>
<li>因为没有刻录过程，所以安装的时候需要解压镜像，会稍微慢点（可以忽略不计）</li>
<li>做系统的时候偶尔会有不出现鼠标的问题</li>
</ul>
<h2 id="使用">
<a class="header-anchor" href="#%e4%bd%bf%e7%94%a8"></a>
使用
</h2><ul>
<li>下载官方<a href="https://www.ventoy.net/cn/download.html">安装包</a></li>
<li>插入 U 盘</li>
<li>点击安装</li>
<li>去下载自己想做的系统的镜像</li>
<li>COPY 到做好的 U 盘</li>
</ul>
<blockquote>
<p>多启的话下载多个镜像直接 <code>COPY</code> 到 U 盘就可以了</p>
</blockquote>
<ul>
<li>开机进入 <code>BIOS</code>
<img src="/img/2020-09-23/1.jpeg" alt=""></li>
</ul>
<h2 id="参考">
<a class="header-anchor" href="#%e5%8f%82%e8%80%83"></a>
参考
</h2><ul>
<li><a href="https://www.ventoy.net/cn/index.html">Ventoy 官网</a></li>
</ul>
        
        <hr><p>Published on 2020-09-23 at <a href='https://allens.tech/'>Allens' Blog</a>, last modified on 2020-09-23</p>]]></description><category>操作系统</category></item><item><title>一次 Win7 做系统纪实</title><link>https://allens.tech/post/202009141800/</link><pubDate>Mon, 14 Sep 2020 18:00:00 +0800</pubDate><author>allens.leng@gmail.com (Allens)</author><guid>https://allens.tech/post/202009141800/</guid><description>
<![CDATA[<h1>一次 Win7 做系统纪实</h1><p>Author: Allens(allens.leng@gmail.com)</p>
        
          <h2 id="描述">
<a class="header-anchor" href="#%e6%8f%8f%e8%bf%b0"></a>
描述
</h2><p>很久没有做过 Win 7 系统了，最近亲戚家的哥哥要做个 Win 7 系统玩火线，记录下做系统的过程。</p>
<h2 id="制作启动盘">
<a class="header-anchor" href="#%e5%88%b6%e4%bd%9c%e5%90%af%e5%8a%a8%e7%9b%98"></a>
制作启动盘
</h2><ul>
<li>下载一个<a href="https://www.microsoft.com/zh-hk/software-download/windows7">官方镜像</a></li>
</ul>
<blockquote>
<p>也可以去 <a href="https://msdn.itellyou.cn/">MSDN</a> 下载</p>
</blockquote>
<ul>
<li>下载一个启动盘制作工具：<a href="https://cn.ultraiso.net/xiazai.html">软碟通</a></li>
<li>插入 U 盘</li>
<li>打开软碟通：选择下载好的镜像</li>
<li>依次点击<strong>启动</strong>-&gt;<strong>写入硬盘映像</strong></li>
<li>检查是否是你的U盘盘符，然后依次点击<strong>格式化</strong>-&gt;<strong>写入</strong>
<img src="/img/2020-09-14/1.jpeg" alt=""></li>
<li>格式化完成后点击写入，会弹窗提示是否确认清空 U 盘数据，点击<strong>是</strong></li>
<li>等待完成
<img src="/img/2020-09-14/2.jpeg" alt=""></li>
<li>出现刻录成功，启动盘完成
<img src="/img/2020-09-14/3.jpeg" alt=""></li>
</ul>
<h2 id="重装系统">
<a class="header-anchor" href="#%e9%87%8d%e8%a3%85%e7%b3%bb%e7%bb%9f"></a>
重装系统
</h2><ul>
<li>开机进入 Boot ，不同机型快捷键不同 F8 到 F12 不等，有的开机就会提示，不提示的自己查一下就可以了。</li>
<li>选择从 U 盘启动，接下来大家都懂的。</li>
</ul>
<h2 id="参考">
<a class="header-anchor" href="#%e5%8f%82%e8%80%83"></a>
参考
</h2><ul>
<li><a href="https://www.jianshu.com/p/9be26ad465e6">简书</a></li>
</ul>
        
        <hr><p>Published on 2020-09-14 at <a href='https://allens.tech/'>Allens' Blog</a>, last modified on 2020-09-14</p>]]></description><category>操作系统</category></item><item><title>初入 Arch Linux</title><link>https://allens.tech/post/202008231700/</link><pubDate>Sun, 23 Aug 2020 17:00:00 +0800</pubDate><author>allens.leng@gmail.com (Allens)</author><guid>https://allens.tech/post/202008231700/</guid><description>
<![CDATA[<h1>初入 Arch Linux</h1><p>Author: Allens(allens.leng@gmail.com)</p>
        
          <h2 id="描述">
<a class="header-anchor" href="#%e6%8f%8f%e8%bf%b0"></a>
描述
</h2><p>说实话，工作总是带着笔记本在公司和家里来回对肩膀的负担还是挺大的，之前也尝试过 <strong>WSL</strong> ，但是实测并不能当做生产力工具，体验还是差很多的，所以最近在家里把电脑做成了 <strong>Win10</strong> 和 <strong>Arch</strong> 双系统，以前工作也使用过 <strong>GNOME Ubuntu</strong> 但是感觉 <strong>Diy</strong> 成 <strong>Mac</strong> 风格以后总有点怪怪的，然后尝试了 <strong>Manjaro</strong> 除了和 <strong>Arch</strong> 同样蛋疼的 <strong>VPN</strong> 以外，还有显卡驱动的问题，装了两次还是黑屏之后果断放弃了，最终还是选择了 <strong>Arch</strong> + <strong>KDE</strong> ，颜值与实用性并存。</p>
<h2 id="制作启动盘">
<a class="header-anchor" href="#%e5%88%b6%e4%bd%9c%e5%90%af%e5%8a%a8%e7%9b%98"></a>
制作启动盘
</h2><ol>
<li><strong>Arch</strong> 官网下载<a href="https://archlinux.org/download/">官方镜像</a>（只能通过磁力链或者 BT 种子下载）</li>
<li>下载启动盘制作工具：<a href="https://rufus.ie/en/">rufus</a></li>
<li>点击<strong>选择</strong>下载的镜像直接点击 <strong>开始</strong> ,选择<strong>以 DD 模式写入</strong> 等待完成就可以了。</li>
</ol>
<h2 id="arch-安装">
<a class="header-anchor" href="#arch-%e5%ae%89%e8%a3%85"></a>
Arch 安装
</h2><ul>
<li>在 <strong>Windows</strong> 上创建 <strong>Linux</strong> 磁盘空间，右键<strong>此电脑</strong> =&gt; <strong>管理</strong> =&gt; <strong>计算机管理</strong> =&gt; <strong>磁盘管理</strong> ，压缩出要给 <strong>Linux</strong> 的空间，我压缩了 <strong>150G</strong>。</li>
<li>开机进入 <strong>BIOS</strong> 选择<strong>从 U 盘启动</strong>，选择 <strong>Install x86_64</strong>。</li>
<li>联网：<strong>dhcpcd</strong></li>
</ul>
<blockquote>
<p>如果是 Wifi 网络需要进行如下操作：</p>
        
        <hr><p>Published on 2020-08-23 at <a href='https://allens.tech/'>Allens' Blog</a>, last modified on 2020-08-23</p>]]></description><category>操作系统</category></item><item><title>初入 WSL</title><link>https://allens.tech/post/202005301700/</link><pubDate>Sat, 30 May 2020 17:00:00 +0800</pubDate><author>allens.leng@gmail.com (Allens)</author><guid>https://allens.tech/post/202005301700/</guid><description>
<![CDATA[<h1>初入 WSL</h1><p>Author: Allens(allens.leng@gmail.com)</p>
        
          <h2 id="描述">
<a class="header-anchor" href="#%e6%8f%8f%e8%bf%b0"></a>
描述
</h2><p>最近想给家里的电脑搞一套开发环境，由于虚拟机用的真的很难受，经同事强力推荐 <strong>WSL</strong> 轻便、速度快的特性，所以折腾了下，问题还是比较多的。</p>
<h2 id="一些问题">
<a class="header-anchor" href="#%e4%b8%80%e4%ba%9b%e9%97%ae%e9%a2%98"></a>
一些问题
</h2><h3 id="问题-1microsoft-store-无法打开">
<a class="header-anchor" href="#%e9%97%ae%e9%a2%98-1microsoft-store-%e6%97%a0%e6%b3%95%e6%89%93%e5%bc%80"></a>
问题 1：Microsoft Store 无法打开
</h3><p>解决方案 1：</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>netsh winsock reset
</span></span></code></pre></div><p>解决方案 2:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span><span style="color:#75715e"># 第一步</span>
</span></span><span style="display:flex;"><span>get-appxpackage *store* | remove-Appxpackage
</span></span><span style="display:flex;"><span><span style="color:#75715e"># 第二步</span>
</span></span><span style="display:flex;"><span>add-appxpackage -register <span style="color:#e6db74">&#34;C:\Program Files\WindowsApps\*Store*\AppxManifest.xml&#34;</span> -disabledevelopmentmode
</span></span></code></pre></div><p>解决方案 3：
<strong>系统</strong> -&gt; <strong>设置</strong> -&gt; <strong>系统</strong> -&gt; <strong>语言和位置</strong> -&gt; 更换区域为 <strong>加拿大</strong>
解决方案 4：
<strong>控制面板</strong> -&gt; <strong>网络和 Internet</strong> -&gt; <strong>Internet 选项</strong> -&gt; <strong>高级</strong> -&gt; 勾选 <strong>使用 TLS 1.1</strong>、<strong>使用 TLS 1.2</strong></p>
<h3 id="问题-2wsl-2-版本无法设置-set-version-命令不存在">
<a class="header-anchor" href="#%e9%97%ae%e9%a2%98-2wsl-2-%e7%89%88%e6%9c%ac%e6%97%a0%e6%b3%95%e8%ae%be%e7%bd%ae-set-version-%e5%91%bd%e4%bb%a4%e4%b8%8d%e5%ad%98%e5%9c%a8"></a>
问题 2：WSL 2 版本无法设置（ –set-version 命令不存在）
</h3><p>内核版本低于 <strong>18917</strong> 无法使用 <strong>WSL 2</strong>，查看<strong>Windows OS</strong> 内部版本的方式：</p>
        
        <hr><p>Published on 2020-05-30 at <a href='https://allens.tech/'>Allens' Blog</a>, last modified on 2020-05-30</p>]]></description><category>操作系统</category></item></channel></rss>