<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/scripts/pretty-feed-v3.xsl" type="text/xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:h="http://www.w3.org/TR/html4/"><channel><title>Hack Your Heart</title><link>https://h4cker.zip/tags/ubuntu/</link><description>临渊羡鱼，不如退而结网</description><generator>Hugo 0.168.0</generator><language>en</language><atom:link href="https://h4cker.zip/tags/ubuntu/rss.xml" rel="self" type="application/rss+xml"/><lastBuildDate>Thu, 18 Sep 2025 10:39:55 +0800</lastBuildDate><item><title>Ubuntu 与 ICSim 安装二三事</title><link>https://h4cker.zip/vm/</link><pubDate>Thu, 18 Sep 2025 10:39:55 +0800</pubDate><guid isPermaLink="true">https://h4cker.zip/vm/</guid><description/><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>更新：我修复了画布两侧出现黑块和撕裂问题，<del>官方还没有merge，我建议使用我的版本：https://github.com/TajangSec/ICSim</del>，官方已 Merge 我的 PR，使用默认仓库即可</p>
<p>记录一下安装ICSim时候遇到的小问题，提供代码，以后安装Ubuntu也不用一个个字母手敲，主要因为vmware-tools也是未安装的，无法复制。</p>
<p>我在22年就做个ICSim的视频：<a
  href="https://www.bilibili.com/video/BV1GF411K7iY" rel="nofollow noopener noreferrer" target="_blank"
  >【车联网安全-把玩汽车安全模拟器ICSim】<span style="user-select:none"> ↗</span></a
>
</p>
<p>现在看来做的很烂，没有字幕，BGM太吵等等，但是那个时候我是完美运行的。</p>
<p>ICSim 我当年用的 Ubuntu 18.04 进行的安装，画面正常，但是现在我用20.04、22.04、24.04、25.04全部出现画布闪烁，出现黑块等等问题。猜测是因为 sdl版本更新，ICSim 没有强制 SDL_RENDERER_PRESENTVSYNC导致</p>
<p>所以这里使用Ubuntu 18.04进行安装</p>
<p>这次遇到的问题一个个解决</p>
<p>第一次设置root密码命令是<code>sudo passwd</code></p>
<p>ubuntu自带nano编辑器，如果这也没有那就要会一点vi编辑：按下 ESC，输入 ggVG 就是全选，按 d 就是删除，按 y 就是复制，小写 p 是光标后粘贴，大写 P 是光标前粘贴，快捷键 Shift + Insert 是粘贴剪切板内容，o新开一行，dd删除空行。</p>
<h2 id="1配置dns">1、配置DNS<a class="anchor" href="#1配置dns">#</a></h2>
<p>很多时候配置了国内源，也报错：<code>Could not resolve mirror.ustc.edu.cn</code>，这个是因为DNS解析问题，所以需要多配置几个DNS</p>
<p>但是修改完，机器重启后会复原，所以需要断开<code>/etc/resolv.conf</code>与<code>/run/systemd/resolve/stub-resolv.conf</code> 或 <code>/run/systemd/resolve/resolv.conf</code>的链接，删掉这个配置文件就自动断开了。</p>
<p>先备份一下<code>/etc/resolv.conf</code></p>
<p>1、删除默认的DNS配置文件：<code>sudo rm -f /etc/resolv.conf</code></p>
<p>2、新建一个DNS配置文件：<code>nano /etc/resolv.conf</code></p>
<p>写入以下内容：</p>
<div class="code-block highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">nameserver 223.5.5.5
</span></span><span class="line"><span class="ln">2</span><span class="cl">nameserver 119.29.29.29
</span></span><span class="line"><span class="ln">3</span><span class="cl">nameserver 8.8.8.8</span></span></code></pre><span class="language ps-1 pe-3 text-sm bg-muted text-muted-foreground">text</span><button class="copy text-muted-foreground p-1 box-content border rounded-lg bg-card" aria-label="Copy code"><div class="ready"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M15 2c.683 0 1.287.343 1.647.866l.085.134H18a2 2 0 0 1 1.995 1.85L20 5v12a5 5 0 0 1-4.783 4.995L15 22H6a2 2 0 0 1-1.995-1.85L4 20V5a2 2 0 0 1 1.85-1.995L6 3h1.268a2 2 0 0 1 1.563-.993L9 2zM7 5H6v15h9a3 3 0 0 0 3-3V5h-1a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2m5 9a1 1 0 0 1 .117 1.993L12 16H9a1 1 0 0 1-.117-1.993L9 14zm3-4a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2zm0-6H9v1h6z"></path></g></svg>
</div><div class="success hidden"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M13.586 2A2 2 0 0 1 15 2.586L19.414 7A2 2 0 0 1 20 8.414V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zM12 4H6v16h12V10h-4.5A1.5 1.5 0 0 1 12 8.5zm1.59 8.657a1 1 0 0 1 1.415 1.414l-3.111 3.112a1.1 1.1 0 0 1-1.556 0l-1.343-1.344a1 1 0 0 1 1.414-1.414l.707.707ZM14 4.414V8h3.586z"></path></g></svg>
</div></button></div>
<p>3、然后用 <code>chattr +i</code> 锁死：</p>
<div class="code-block highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo chattr +i /etc/resolv.conf</span></span></code></pre><span class="language ps-1 pe-3 text-sm bg-muted text-muted-foreground">bash</span><button class="copy text-muted-foreground p-1 box-content border rounded-lg bg-card" aria-label="Copy code"><div class="ready"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M15 2c.683 0 1.287.343 1.647.866l.085.134H18a2 2 0 0 1 1.995 1.85L20 5v12a5 5 0 0 1-4.783 4.995L15 22H6a2 2 0 0 1-1.995-1.85L4 20V5a2 2 0 0 1 1.85-1.995L6 3h1.268a2 2 0 0 1 1.563-.993L9 2zM7 5H6v15h9a3 3 0 0 0 3-3V5h-1a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2m5 9a1 1 0 0 1 .117 1.993L12 16H9a1 1 0 0 1-.117-1.993L9 14zm3-4a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2zm0-6H9v1h6z"></path></g></svg>
</div><div class="success hidden"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M13.586 2A2 2 0 0 1 15 2.586L19.414 7A2 2 0 0 1 20 8.414V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zM12 4H6v16h12V10h-4.5A1.5 1.5 0 0 1 12 8.5zm1.59 8.657a1 1 0 0 1 1.415 1.414l-3.111 3.112a1.1 1.1 0 0 1-1.556 0l-1.343-1.344a1 1 0 0 1 1.414-1.414l.707.707ZM14 4.414V8h3.586z"></path></g></svg>
</div></button></div>
<h2 id="2ubuntu-1804-配置中科大镜像源">2、Ubuntu 18.04 配置中科大镜像源<a class="anchor" href="#2ubuntu-1804-配置中科大镜像源">#</a></h2>
<p>编辑下载源：<code>nano /etc/apt/sources.list</code></p>
<p>18.04 的科大源在：<a
  href="https://mirrors.ustc.edu.cn/help/ubuntu.html#__tabbed_4_4" rel="nofollow noopener noreferrer" target="_blank"
  >https://mirrors.ustc.edu.cn/help/ubuntu.html#__tabbed_4_4<span style="user-select:none"> ↗</span></a
>
：</p>
<div class="code-block highlight collapsed"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl"><span class="c1"># 默认注释了源码仓库，如有需要可自行取消注释</span>
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
</span></span><span class="line"><span class="ln"> 3</span><span class="cl"><span class="c1"># deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse</span>
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
</span></span><span class="line"><span class="ln"> 6</span><span class="cl"><span class="c1"># deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse</span>
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
</span></span><span class="line"><span class="ln"> 9</span><span class="cl"><span class="c1"># deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse</span>
</span></span><span class="line"><span class="ln">10</span><span class="cl">
</span></span><span class="line"><span class="ln">11</span><span class="cl">deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
</span></span><span class="line"><span class="ln">12</span><span class="cl"><span class="c1"># deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse</span>
</span></span><span class="line"><span class="ln">13</span><span class="cl">
</span></span><span class="line"><span class="ln">14</span><span class="cl"><span class="c1"># 预发布软件源，不建议启用</span>
</span></span><span class="line"><span class="ln">15</span><span class="cl"><span class="c1"># deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</span>
</span></span><span class="line"><span class="ln">16</span><span class="cl"><span class="c1"># deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</span></span></span></code></pre><span class="language ps-1 pe-3 text-sm bg-muted text-muted-foreground">bash</span><button class="copy text-muted-foreground p-1 box-content border rounded-lg bg-card" aria-label="Copy code"><div class="ready"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M15 2c.683 0 1.287.343 1.647.866l.085.134H18a2 2 0 0 1 1.995 1.85L20 5v12a5 5 0 0 1-4.783 4.995L15 22H6a2 2 0 0 1-1.995-1.85L4 20V5a2 2 0 0 1 1.85-1.995L6 3h1.268a2 2 0 0 1 1.563-.993L9 2zM7 5H6v15h9a3 3 0 0 0 3-3V5h-1a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2m5 9a1 1 0 0 1 .117 1.993L12 16H9a1 1 0 0 1-.117-1.993L9 14zm3-4a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2zm0-6H9v1h6z"></path></g></svg>
</div><div class="success hidden"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M13.586 2A2 2 0 0 1 15 2.586L19.414 7A2 2 0 0 1 20 8.414V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zM12 4H6v16h12V10h-4.5A1.5 1.5 0 0 1 12 8.5zm1.59 8.657a1 1 0 0 1 1.415 1.414l-3.111 3.112a1.1 1.1 0 0 1-1.556 0l-1.343-1.344a1 1 0 0 1 1.414-1.414l.707.707ZM14 4.414V8h3.586z"></path></g></svg>
</div></button><button class="collapse-toggle bg-card text-muted-foreground rounded-lg m-2" aria-label="Toggle collapse code block"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.019-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="m11 17.243l-3.95-3.95a1 1 0 1 0-1.414 1.414l5.657 5.657a1 1 0 0 0 1.414 0l5.657-5.657a1 1 0 0 0-1.414-1.414L13 17.243V4a1 1 0 1 0-2 0z"></path></g></svg>
<span class="desc"> code</span></button><div class="collapse-fade"></div></div>
<p>需要其他版本可以切换tab</p>
<p>写完必须更新一下：<code>sudo apt-get update</code></p>
<p>注：有的新版本在文件里只有一句“Ubuntu sources have moved to /etc/apt/sources.list.d/ubuntu.sources”，打开指定的文件发现是格式是另一种，这其实是 DEB822格式，两个文件任写一个都行的，这里贴一个 Ubuntu 24.04的DEB822格式源：</p>
<div class="code-block highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln"> 1</span><span class="cl">Types: deb
</span></span><span class="line"><span class="ln"> 2</span><span class="cl">URIs: https://mirrors.ustc.edu.cn/ubuntu
</span></span><span class="line"><span class="ln"> 3</span><span class="cl">Suites: noble noble-updates noble-backports
</span></span><span class="line"><span class="ln"> 4</span><span class="cl">Components: main restricted universe multiverse
</span></span><span class="line"><span class="ln"> 5</span><span class="cl">Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
</span></span><span class="line"><span class="ln"> 6</span><span class="cl">
</span></span><span class="line"><span class="ln"> 7</span><span class="cl">Types: deb
</span></span><span class="line"><span class="ln"> 8</span><span class="cl">URIs: https://mirrors.ustc.edu.cn/ubuntu
</span></span><span class="line"><span class="ln"> 9</span><span class="cl">Suites: noble-security
</span></span><span class="line"><span class="ln">10</span><span class="cl">Components: main restricted universe multiverse
</span></span><span class="line"><span class="ln">11</span><span class="cl">Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg</span></span></code></pre><span class="language ps-1 pe-3 text-sm bg-muted text-muted-foreground">bash</span><button class="copy text-muted-foreground p-1 box-content border rounded-lg bg-card" aria-label="Copy code"><div class="ready"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M15 2c.683 0 1.287.343 1.647.866l.085.134H18a2 2 0 0 1 1.995 1.85L20 5v12a5 5 0 0 1-4.783 4.995L15 22H6a2 2 0 0 1-1.995-1.85L4 20V5a2 2 0 0 1 1.85-1.995L6 3h1.268a2 2 0 0 1 1.563-.993L9 2zM7 5H6v15h9a3 3 0 0 0 3-3V5h-1a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2m5 9a1 1 0 0 1 .117 1.993L12 16H9a1 1 0 0 1-.117-1.993L9 14zm3-4a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2zm0-6H9v1h6z"></path></g></svg>
</div><div class="success hidden"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M13.586 2A2 2 0 0 1 15 2.586L19.414 7A2 2 0 0 1 20 8.414V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zM12 4H6v16h12V10h-4.5A1.5 1.5 0 0 1 12 8.5zm1.59 8.657a1 1 0 0 1 1.415 1.414l-3.111 3.112a1.1 1.1 0 0 1-1.556 0l-1.343-1.344a1 1 0 0 1 1.414-1.414l.707.707ZM14 4.414V8h3.586z"></path></g></svg>
</div></button></div>
<p>注：截止至本文发布日，科大还没有25.04的源，清华镜像站有，需要可以去清华复制一下</p>
<h2 id="3安装-vmware-tools">3、安装 VMware-tools<a class="anchor" href="#3安装-vmware-tools">#</a></h2>
<p>经常安装后，不能复制，不能随意拉伸窗口，无法全屏虚拟机。原因挺多，还是手动安装吧，很好用</p>
<div class="code-block highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="ln">1</span><span class="cl">sudo apt upgrade
</span></span><span class="line"><span class="ln">2</span><span class="cl">sudo apt install open-vm-tools-desktop -y
</span></span><span class="line"><span class="ln">3</span><span class="cl">sudo reboot</span></span></code></pre><span class="language ps-1 pe-3 text-sm bg-muted text-muted-foreground">bash</span><button class="copy text-muted-foreground p-1 box-content border rounded-lg bg-card" aria-label="Copy code"><div class="ready"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M15 2c.683 0 1.287.343 1.647.866l.085.134H18a2 2 0 0 1 1.995 1.85L20 5v12a5 5 0 0 1-4.783 4.995L15 22H6a2 2 0 0 1-1.995-1.85L4 20V5a2 2 0 0 1 1.85-1.995L6 3h1.268a2 2 0 0 1 1.563-.993L9 2zM7 5H6v15h9a3 3 0 0 0 3-3V5h-1a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2m5 9a1 1 0 0 1 .117 1.993L12 16H9a1 1 0 0 1-.117-1.993L9 14zm3-4a1 1 0 1 1 0 2H9a1 1 0 1 1 0-2zm0-6H9v1h6z"></path></g></svg>
</div><div class="success hidden"><svg
  aria-hidden="true"
  class="pure-icon size-5"
  width="22"
  height="22"
  viewBox="0 0 24 24"
  fill="currentColor"><g fill="none"><path d="m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"></path><path fill="currentColor" d="M13.586 2A2 2 0 0 1 15 2.586L19.414 7A2 2 0 0 1 20 8.414V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zM12 4H6v16h12V10h-4.5A1.5 1.5 0 0 1 12 8.5zm1.59 8.657a1 1 0 0 1 1.415 1.414l-3.111 3.112a1.1 1.1 0 0 1-1.556 0l-1.343-1.344a1 1 0 0 1 1.414-1.414l.707.707ZM14 4.414V8h3.586z"></path></g></svg>
</div></button></div>
<p>主要就是这些问题，然后就可以安装 git、curl之类的命令了</p>
<h2 id="4安装常用工具">4、安装常用工具<a class="anchor" href="#4安装常用工具">#</a></h2>
<p><code>sudo apt install 包名</code> 就行</p>
<p>net-tools、git、gedit、build-essential（后面编译ICSim用的）</p>
<h2 id="5安装-icsim">5、安装 ICSim<a class="anchor" href="#5安装-icsim">#</a></h2>
<p>1、拉取仓库并进入目录：<code>git clone https://github.com/zombieCraig/ICSim.git &amp;&amp; cd ICSim</code></p>
<p>1、安装环境：  <code>sudo apt-get install libsdl2-dev libsdl2-image-dev can-utils</code></p>
<p>2、编译项目：<code>make</code></p>
<p>3、设置虚拟网卡：<code>./setup_vcan.sh</code></p>
<p>4、启动仪表盘：<code>./icsim vcan0</code></p>
<p>5、启动控制器：<code>./controls vcan0</code></p>
<p>然后就可以快乐的玩耍了</p>
<p>放一些ICSim的操作按键：</p>
<table>
	<thead>
			<tr>
					<th style="text-align: center">功能</th>
					<th style="text-align: center">按键</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td style="text-align: center">加速</td>
					<td style="text-align: center">上方向键</td>
			</tr>
			<tr>
					<td style="text-align: center">左转向</td>
					<td style="text-align: center">左方向键</td>
			</tr>
			<tr>
					<td style="text-align: center">右转向</td>
					<td style="text-align: center">右方向键</td>
			</tr>
			<tr>
					<td style="text-align: center">开/关左车门（前）锁</td>
					<td style="text-align: center">右/左shift+A</td>
			</tr>
			<tr>
					<td style="text-align: center">开/关右车门（前）锁</td>
					<td style="text-align: center">右/左shift+B</td>
			</tr>
			<tr>
					<td style="text-align: center">开/关左车门（后）锁</td>
					<td style="text-align: center">右/左shift+X</td>
			</tr>
			<tr>
					<td style="text-align: center">开/关右车门（后）锁</td>
					<td style="text-align: center">右/左shift+Y</td>
			</tr>
			<tr>
					<td style="text-align: center">开启所有车门锁</td>
					<td style="text-align: center">右shift+左shift</td>
			</tr>
			<tr>
					<td style="text-align: center">关闭所有车门锁</td>
					<td style="text-align: center">左shift+右shift</td>
			</tr>
	</tbody>
</table>
<p>SavvyCAN、caringCaribou之类的工具就不多说了，网上都是的</p>
<hr>
<p>参考文章：</p>
<ol>
<li><a
  href="https://blog.csdn.net/danielpei1222/article/details/65452451" rel="nofollow noopener noreferrer" target="_blank"
  >Ubuntu 无法解析域名<span style="user-select:none"> ↗</span></a
>
</li>
<li><a
  href="https://blog.csdn.net/dengjin20104042056/article/details/106396644/" rel="nofollow noopener noreferrer" target="_blank"
  >Ubuntu20.04安装VMware Tools详解<span style="user-select:none"> ↗</span></a
>
</li>
<li><a
  href="https://blog.csdn.net/weixin_66578482/article/details/139398209" rel="nofollow noopener noreferrer" target="_blank"
  >车联网安全入门——ICSim模拟器使用<span style="user-select:none"> ↗</span></a
>
</li>
</ol>
]]></content:encoded><h:img src="https://h4cker.zip/vm/ubuntu_icsim_things.webp"/><enclosure url="https://h4cker.zip/vm/ubuntu_icsim_things.webp"/><atom:updated>2025-09-23T08:47:42+08:00</atom:updated><category>Ubuntu</category><category>ICSim</category></item></channel></rss>