<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on 清雨影的Blog</title><link>http://blog.tsingjyujing.com/tech/linux/</link><description>Recent content in Linux on 清雨影的Blog</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sat, 02 May 2026 00:00:00 +0900</lastBuildDate><atom:link href="http://blog.tsingjyujing.com/tech/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>修复Linux磁盘中的坏道</title><link>http://blog.tsingjyujing.com/tech/linux/20260315-fix-bad-blocks-in-linux/</link><pubDate>Sun, 15 Mar 2026 00:00:00 +0900</pubDate><guid>http://blog.tsingjyujing.com/tech/linux/20260315-fix-bad-blocks-in-linux/</guid><description>&lt;h1 id="修复linux磁盘中的坏道"&gt;修复Linux磁盘中的坏道&lt;a class="anchor" href="#%e4%bf%ae%e5%a4%8dlinux%e7%a3%81%e7%9b%98%e4%b8%ad%e7%9a%84%e5%9d%8f%e9%81%93"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="前言"&gt;前言&lt;a class="anchor" href="#%e5%89%8d%e8%a8%80"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;我之所以写这篇文章，是因为我最近在尝试修复一台十几年前的老笔记本（电脑的型号是联想的G470）。&#10;我用了一块，大概几年前买的1TB的西部数据的SMR烂磁盘，和我另一台坏电脑上拆下来的2x8G的内存条来修复它。&#10;老马拉破车，修复以后也不会让它跑太重的任务，可能也就跑一些爬虫或者定时任务的脚本，以Stateless的任务为主。再坏掉的话我可能会丢掉这台电脑，毕竟这玩意儿也就比树莓派强一些。&lt;/p&gt;</description></item><item><title>2026年3月15日 搭建Linux服务器时候的备忘录</title><link>http://blog.tsingjyujing.com/tech/linux/20260315-setup-linux-server/</link><pubDate>Sun, 15 Mar 2026 00:00:00 +0900</pubDate><guid>http://blog.tsingjyujing.com/tech/linux/20260315-setup-linux-server/</guid><description>&lt;h1 id="2026年3月15日-搭建linux服务器时候的备忘录"&gt;2026年3月15日 搭建Linux服务器时候的备忘录&lt;a class="anchor" href="#2026%e5%b9%b43%e6%9c%8815%e6%97%a5-%e6%90%ad%e5%bb%balinux%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%97%b6%e5%80%99%e7%9a%84%e5%a4%87%e5%bf%98%e5%bd%95"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;修复一台老电脑，使之能勉强使用的时候的一些碎碎念。&lt;/p&gt;&#10;&lt;h2 id="图形界面和cli"&gt;图形界面和CLI&lt;a class="anchor" href="#%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e5%92%8ccli"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;h3 id="启动的时候不要启动图形界面而是cli"&gt;启动的时候不要启动图形界面，而是CLI&lt;a class="anchor" href="#%e5%90%af%e5%8a%a8%e7%9a%84%e6%97%b6%e5%80%99%e4%b8%8d%e8%a6%81%e5%90%af%e5%8a%a8%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e8%80%8c%e6%98%afcli"&gt;&lt;/a&gt;&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl set-default multi-user.target&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="恢复图形界面的使用"&gt;恢复图形界面的使用&lt;a class="anchor" href="#%e6%81%a2%e5%a4%8d%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2%e7%9a%84%e4%bd%bf%e7%94%a8"&gt;&lt;/a&gt;&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl set-default graphical.target&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="手动临时启动图形界面"&gt;手动临时启动图形界面&lt;a class="anchor" href="#%e6%89%8b%e5%8a%a8%e4%b8%b4%e6%97%b6%e5%90%af%e5%8a%a8%e5%9b%be%e5%bd%a2%e7%95%8c%e9%9d%a2"&gt;&lt;/a&gt;&lt;/h3&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#d8dee9;background-color:#2e3440;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-shell" data-lang="shell"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo systemctl start display-manager&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;或者 &lt;code&gt;startx&lt;/code&gt; （我没试过）&lt;/p&gt;</description></item><item><title>在Linux读取并且监控APC UPS的状态</title><link>http://blog.tsingjyujing.com/tech/linux/20260501-apc-ups-linux/</link><pubDate>Sat, 02 May 2026 00:00:00 +0900</pubDate><guid>http://blog.tsingjyujing.com/tech/linux/20260501-apc-ups-linux/</guid><description>&lt;h1 id="在linux读取并且监控apc-ups的状态"&gt;在Linux读取并且监控APC UPS的状态&lt;a class="anchor" href="#%e5%9c%a8linux%e8%af%bb%e5%8f%96%e5%b9%b6%e4%b8%94%e7%9b%91%e6%8e%a7apc-ups%e7%9a%84%e7%8a%b6%e6%80%81"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;我买了一台&lt;a href="https://www.se.com/jp/ja/product/BE550M1-JP/apc-ups-es%E3%82%B7%E3%83%AA%E3%83%BC%E3%82%BA-%E5%8D%98%E7%9B%B8100v-550va-330w-%E5%B8%B8%E6%99%82%E5%95%86%E7%94%A8%E7%B5%A6%E9%9B%BB%E6%96%B9%E5%BC%8F-%E7%96%91%E4%BC%BC%E6%AD%A3%E5%BC%A6%E6%B3%A2-%E3%82%B5%E3%83%BC%E3%82%B8%E4%BF%9D%E8%AD%B7%E4%BB%98%E3%81%8D-3%E5%B9%B4%E4%BF%9D%E8%A8%BC/"&gt;APC 無停電電源装置 UPS 常時商用給電 550VA/330W BE550M1-JP 矩形波 家庭用&lt;/a&gt;。&lt;/p&gt;&#10;&lt;p&gt;这么几年我一直都是靠一台Windows上的软件监控的，但是这种每次都要通过眼睛去看的方案并不是特别方便。而且也没有办法查看历史数据。&#10;今天搜索了一下，其实是有linux的方案的。特别在此记录一下 。&lt;/p&gt;</description></item><item><title>Linux 下利用 `mdadm` 命令设置软件 RAID</title><link>http://blog.tsingjyujing.com/tech/linux/mdadm/</link><pubDate>Thu, 07 May 2020 00:00:00 +0900</pubDate><guid>http://blog.tsingjyujing.com/tech/linux/mdadm/</guid><description>&lt;h1 id="linux-下利用-mdadm-命令设置软件-raid"&gt;Linux 下利用 &lt;code&gt;mdadm&lt;/code&gt; 命令设置软件 RAID&lt;a class="anchor" href="#linux-%e4%b8%8b%e5%88%a9%e7%94%a8-mdadm-%e5%91%bd%e4%bb%a4%e8%ae%be%e7%bd%ae%e8%bd%af%e4%bb%b6-raid"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="前言"&gt;前言&lt;a class="anchor" href="#%e5%89%8d%e8%a8%80"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;RAID(Redundant Array of Independent Disk 独立冗余磁盘阵列)，可以用多个小硬盘组成大硬盘，也可以用来容错。&#10;由于机械硬盘的损坏存在相当大的不确定性，而两块硬盘一起损坏的概率不高，所以我们可以用MDADM做一个软件RAID。&#10;手上正好有两块1T的硬盘和一块3T的硬盘（不过都是移动硬盘），全部连接到主机上！&lt;/p&gt;</description></item><item><title>简易的Linux迁移指北</title><link>http://blog.tsingjyujing.com/tech/linux/move2linux/</link><pubDate>Tue, 05 Jan 2021 00:00:00 +0900</pubDate><guid>http://blog.tsingjyujing.com/tech/linux/move2linux/</guid><description>&lt;h1 id="简易的linux迁移指北"&gt;简易的Linux迁移指北&lt;a class="anchor" href="#%e7%ae%80%e6%98%93%e7%9a%84linux%e8%bf%81%e7%a7%bb%e6%8c%87%e5%8c%97"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;这篇文章写的比较简洁，如果有什么不能理解的，可以搜索一下（但是不要用百度，否则你的疑惑可能更深）。&lt;/p&gt;&#10;&lt;h2 id="不适宜使用linux的人群"&gt;不适宜使用Linux的人群&lt;a class="anchor" href="#%e4%b8%8d%e9%80%82%e5%ae%9c%e4%bd%bf%e7%94%a8linux%e7%9a%84%e4%ba%ba%e7%be%a4"&gt;&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;首先说说哪些人已经被绑死在了Mac/Win的船上下不去了，别的行业不了解，我说说工程师一类的：&lt;/p&gt;</description></item><item><title>记录一次`rsync`命令引起的异常</title><link>http://blog.tsingjyujing.com/tech/linux/rsync-caused-problem/</link><pubDate>Thu, 29 Apr 2021 00:00:00 +0900</pubDate><guid>http://blog.tsingjyujing.com/tech/linux/rsync-caused-problem/</guid><description>&lt;h1 id="记录一次rsync命令引起的异常"&gt;记录一次&lt;code&gt;rsync&lt;/code&gt;命令引起的异常&lt;a class="anchor" href="#%e8%ae%b0%e5%bd%95%e4%b8%80%e6%ac%a1rsync%e5%91%bd%e4%bb%a4%e5%bc%95%e8%b5%b7%e7%9a%84%e5%bc%82%e5%b8%b8"&gt;&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;在开发中，我使用 &lt;code&gt;rsync -avPz --delete ./ 目标机器:目标文件夹&lt;/code&gt;将我的源代码同步到目标机器上，达到本地IDE编辑，远程服务器运行的目的。&#10;源码不多，为了省去手动操作的麻烦，我干脆使用watch命令每两秒同步一次。&lt;/p&gt;</description></item></channel></rss>