Windows11 + Linux (Ubuntu22.04)双系统最简安装详细避坑版
<div id="navCategory"><h5 class="catalogue">目录</h5><ul class="first_class_ul"><li> 准备工作(非常重要!!!一步一个坑!<ul class="second_class_ul"><li>1. 首先</li><li>2. 查看/更改引导方式</li><li>3. 查看/更改磁盘的分区格式</li><li>4. 关闭BitLocker加密</li><li>5. 压缩分区</li><li>6. 关闭独显直连</li><li>7. 制作Ubuntu安装盘 (划重点!内容很多要有耐心哦~</li></ul></li><li>安装程序<ul class="second_class_ul"></ul></li><li>简单配置<ul class="second_class_ul"><li>BIOS</li><li>WIFI</li><li>时间</li><li>引导菜单默认启动系统</li></ul></li><li>Ubuntu 22.04 如何关闭防火墙<ul class="second_class_ul"></ul></li></ul></div><p class="maodian"></p><h2> 准备工作(非常重要!!!一步一个坑!</h2><p class="maodian"></p><h3>1. 首先</h3>
<p>我们有一个安装了Windows11系统的电脑,准备一个8G以上的U盘(或者移动硬盘)</p>
<p class="maodian"></p><h3>2. 查看/更改引导方式</h3>
<p>确保双系统安装完成后可以有双系统菜单:</p>
<p>--Win+R呼出运行界面,输入:msinfo32,确定,会弹出一个系统信息的面板(或者直接搜索系统信息)。</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-25051912015W29.png" /></p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-25051912015Wa.png" /></p>
<p>--在项目栏找到BIOS模式,看对应的值,是否为UEFI,如果是就OK!跳到准备工作第三点~</p>
<p>--如果BIOS模式的值不是UEFI,而是显示传统(Legacy),那么就要改成UEFI,重启电脑狂按对应按键进入BIOS模式(如果不知道按哪个可以看看下面这个表,一般电脑开机的时候也会很快闪过按什么键的提示)</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-25051912015Q11.png" /></p>
<p>--比如鱼鱼用的Thinkbook16+是要在启动的时候狂按回车,然后出现一个Startup Interrupt Menu,再按F1就可以进入BIOS启动设置界面了。</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-25051912015bY.png" /></p>
<p>--进入BIOS后开启UEFI,不同的电脑可能操作方法不同,下面的操作有对应的就按着修改没有就换一个:</p>
<ul><li>Boot,选择UEFI Boot回车选择Enabled;</li><li>Startup,Boot,UEFI/Legacy Boot旁边的选项选择修改为UEFI Only;</li><li>Boot mode select选择修改为UEFI;</li><li>Boot Type选择修改为UEFI Boot Type;</li><li>Launch CSM选择修改为Disabled。</li></ul>
<p><strong>改完了记得保存并退出!不要忘记保存!!!</strong></p>
<p class="maodian"></p><h3>3. 查看/更改磁盘的分区格式</h3>
<p>避免安装Ubuntu到最后了却因为引导器安装失败功亏一篑:</p>
<p>--右键开始按钮选择磁盘管理</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191201595J.png" /></p>
<p>--在Windows所在的磁盘(图中的磁盘0)左边灰色块右键,选择属性</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120200K6.png" /></p>
<p>--在卷这栏可以看到磁盘分区形式,是否为GPT格式,如果是就OK!跳到准备工作第四点~</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202005J.png" /></p>
<p>--如果磁盘分区形式显示的是:主启动记录(MBR),那么就要修改为GPT格式:</p>
<ul><li>Win+R呼出运行界面,输入cmd确认打开命令行,输入命令:diskpart,回车,允许此应用对设备进行更改选择是,弹出这个界面:</li></ul>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202003a.png" /></p>
<ul><li>在这个界面输入命令:</li></ul>
<div class="dxycode"><pre class="brush:bash;">list disk</pre></div>
<ul><li>选择要转换的Windows所在的磁盘(比如上面磁盘管理中,如果和鱼鱼一样是磁盘0就选择磁盘0,核对上一条命令显示的磁盘大小):</li></ul>
<div class="dxycode"><pre class="brush:bash;">select disk=0</pre></div>
<ul><li>最后转换为GPT格式: </li></ul>
<div class="dxycode"><pre class="brush:bash;">convert gpt</pre></div>
<ul><li>确认一下:</li></ul>
<div class="dxycode"><pre class="brush:bash;">list disk</pre></div>
<ul><li>如果显示出想要转化的磁盘在Gpt有了*标识那么就大功告成啦!然后接下来再去磁盘管理看就是GUID分区表(GPT)格式!</li></ul>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120200c0.png" /></p>
<p class="maodian"></p><h3>4. 关闭BitLocker加密</h3>
<p>避免装双系统过程中进入烦人的BitLocker恢复模式:</p>
<p>--如果在上面的操作中打开磁盘管理后,像鱼鱼一样C盘D盘没有写着:(BitLocker 已加密)这些字就OK!跳到准备工作第五点~</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202011F.png" /></p>
<p>--如果有BitLocker加密,在设置-隐私和安全性里找到设备加密(或者直接搜索bitlocker打开设备加密设置),把设备加密的开关关闭就好。(不过,磁盘已存储的数据越多,关闭设备加密耗时越长,如果电脑里面东西比较多的话最好合理安排一段空闲时间并接通电源再进行哦!)</p>
<p>--关闭后再进入磁盘管理就会发现没有 (BitLocker 已加密) 这行信息了。</p>
<p class="maodian"></p><h3>5. 压缩分区</h3>
<p>在磁盘管理中挑选一个分区压缩给Ubuntu,右键选择压缩卷,如果发现可以输入的可压缩空间大小远小于磁盘剩余空间,可以使用DiskGenius工具先进行分区压缩。鱼鱼压缩了200000MB,压缩后会发现多出来一个不到200GB的未分配分区。</p>
<p class="maodian"></p><h3>6. 关闭独显直连</h3>
<p>如果电脑有配备独立显卡并且有独显直连的功能,最好先关闭,以避免安装Ubuntu系统时遇到显卡驱动问题,安装好双系统再启用独显直连功能。鱼鱼没有这样的电脑,如果有这个问腿可以搜一搜如何关闭独显直连功能。</p>
<p class="maodian"></p><h3>7. 制作Ubuntu安装盘 (划重点!内容很多要有耐心哦~</h3>
<p>--首先下载Ubuntu的映像文件,可以在官网下载(真的很慢)也可以下载国内源的镜像文件,小编用的清华镜像站的,点这个链接</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120201216.png" /></p>
<p>--然后点进一个镜像站</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120201939.png" /></p>
<p>--选择对应版本,鱼鱼用的是22.04版本的,要选择这个desktop-amd64.iso版本(server版本不带有图形桌面)点击下载</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120201316.png" /></p>
<p>--下载过程中可以一起下载制作安装盘的工具,比如ventoy,rufus,imgburn等等,鱼鱼用的ventoy,安装系统的时候有个界面还蛮方便的,这里是ventoy下载链接,划到下面选择这个Windows版本的压缩包</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120202548.png" /></p>
<p>--下载完后打开所在的文件位置解压,然后插上U盘,打开解压后的文件夹,运行Ventoy2Disk</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120202C6.png" /></p>
<p>--确认一下盘符容量大小显示的是要用到的U盘,在配置选项中选择分区类型,改为GPT</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202022P.png" /></p>
<p>--弄好后就可以开始安装啦,会弹出两次格式化提示,都选择是,绿条加载完成弹出安装成功的提示框就完成了,接下来打开把下载好的Ubuntu映像文件粘贴到这个U盘里(如果U盘剩余空间够多,还可以放进去一些其他的系统安装映像文件,当然,放进去其他的文件当作正常U盘使用也是可以的。</p>
<p>--接着重启电脑(U盘不要拔下来哦)狂按对应按键进入BIOS模式(如果不知道按哪个可以看看下面这个表,一般电脑开机的时候也会很快闪过按什么键的提示)</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120203H1.png" /></p>
<p>--比如鱼鱼用的Thinkbook16+是要在启动的时候狂按回车,然后出现一个Startup Interrupt Menu,再按F1就可以进入BIOS启动设置界面了。</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120203M7.png" /></p>
<p>--先关闭安全启动(Secure Boot),避免启动安装盘时出现Verification failed错误,在鱼鱼电脑的BIOS设置界面中安全启动的设置在这个位置,其他电脑基本也会在类似security,boot,startup这类菜单里找到,然后选择关闭</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120203435.png" /></p>
<p>--接下来关闭Intel RST,避免Ubuntu安装过程出现Turn off RST的问题,找一找SATA Controller Mode这个磁盘的SATA管理器选项,选择设置为AHCI就可以了,有些电脑比如鱼鱼的没有这个选项就没有问题不用管啦</p>
<p>--最后把U盘设置为最优先引导项,避免要进入U盘的Ubuntu安装程序时,电脑自动返回到Windows系统启动。在BIOS设置界面找到Boot启动顺序列表,把要用的U盘设备按提示移到最前面,鱼鱼的电脑是F6上移,有些电脑可以直接鼠标拖动的</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202045W.png" /></p>
<p>--最重要的!<strong>做完所有修改后记得保存再退出!!!</strong></p>
<p>--接下来就会U盘启动,出现这个Ventoy映像文件列表,选择Ubuntu22.04,启动(Boot in normal mode),进入Ubuntu映像文件的引导菜单</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120205I1.png" /></p>
<p>--选择Try or Install Ubuntu,就进入Ubuntu的安装程序了,没有问题的话就OK!跳到安装程序第一点~</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202054R.jpg" /></p>
<p>--如果确定BIOS设置里启动顺序保存成功后,还是会直接进入Windows系统,不从U盘启动无法进入Ventoy映像文件列表的话,在设置->系统->恢复里,找到恢复选项的高级启动,选择立即重新启动</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120205Z1.png" /></p>
<p>--这样启动可以有机会从U盘启动</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-2505191202064C.png" /></p>
<p>--选择要使用的U盘</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120206344.png" /></p>
<p>--如果这样还不行,那可能是电脑与Ventoy的启动方式不兼容,可以更换一个安装盘制作工具重新制作安装盘。</p>
<p class="maodian"></p><h2>安装程序</h2>
<p>选择Try or Install Ubuntu后等待进入Ubuntu界面,弹出安装程序。</p>
<p>此时如果无法使用键鼠功能可以尝试有线外接鼠标键盘,等之后各类驱动安装完毕就可以用了。</p>
<p>根据需要可以选择切换语言为简体中文,点击安装Ubuntu。</p>
<p>默认正常安装,其他选项中建议取消选择“安装Ubuntu时下载更新”,减少耗时;可以勾上“为图形或无线硬件,以及其他媒体格式安装第三方软件”。</p>
<p>选择继续,安装类型选择其他选项,选择继续,出现一个磁盘列表,找到设备为空闲且大小较我们之前磁盘分区大小稍大的那条,选中,点左下角的‘+’号,挂载点选择‘/’,点击‘OK’;再找到类型为efi分区的设备那条,看对应的设备号,在下面‘安装启动引导器的设备’下拉找到并选中(一般是Windows Boot Manager)。</p>
<p>最后点击现在安装,继续,选时区选择Shanghai,继续。</p>
<p>接下来设置姓名,计算机名,用户名和密码。名字建议简短一点的英文,登录时是否需要密码按自己需要选择。继续。</p>
<p>等待安装完毕,出现安装完成的提示框后点击现在重启。重启时会看到‘Please remove the installation medium then press ENTER',这时把U盘拔掉,然后敲回车。按回车电脑如果没反应直接按电源强制重启也可以。</p>
<p class="maodian"></p><h2>简单配置</h2>
<p class="maodian"></p><h3>BIOS</h3>
<p>重启电脑后可能直接进入的还是Windows系统,接下来还要进入一次BIOS启动设置界面,然后将启动顺序里的Ubuntu移动到第一个,还是要记得保存并退出!(有的电脑硬盘引导项有独立子菜单,配置的优先项如果没有找到Ubuntu,先选包括Windows的选项,再找有没有类似UEFI硬盘BBS优先权选项的二级菜单,能够切换成Ubuntu)</p>
<p class="maodian"></p><h3>WIFI</h3>
<p>进入Ubuntu系统,点击右上角音量电源那里,可以弹出一个菜单,在这里选择EWIFI连接。</p>
<p class="maodian"></p><h3>时间</h3>
<p>Ubuntu系统打开终端(Ctrl+Alt+T,或者鼠标右键选择Terminal),更新软件源列表:</p>
<div class="dxycode"><pre class="brush:bash;">sudo apt update</pre></div>
<p>输入密码回车(密码输入时不会显示)</p>
<p>安装时间同步软件:</p>
<div class="dxycode"><pre class="brush:bash;">sudo apt install ntpdate</pre></div>
<p>时间同步:</p>
<div class="dxycode"><pre class="brush:bash;">sudo ntpdate time.windows.com</pre></div>
<p>更改Ubuntu时间机制:</p>
<div class="dxycode"><pre class="brush:bash;">sudo hwclock --localtime --systohc</pre></div>
<p class="maodian"></p><h3>引导菜单默认启动系统</h3>
<p>此时每次开机,引导菜单默认项为Ubuntu,也就是说如果等到倒计时结束没有操作,就会自动进入Ubuntu系统。如果一般用Windows较多,希望默认项修改为Windows请看下面操作(如果不需要可以跳过这点):</p>
<p>打开终端,</p>
<div class="dxycode"><pre class="brush:bash;">sudo gedit /etc/default/grub</pre></div>
<p>输入密码回车</p>
<p>弹出grub文件,找到GRUB_DEFAULT=0,修改为2。</p>
<p style="text-align:center"><img style="max-width:100%!important;height:auto!important;"alt="" src="https://zhuji.jb51.net/uploads/allimg/20250519/2-250519120206312.png" /></p>
<p>引导菜单中按0为Ubuntu的顺序,2为Windows。</p>
<p class="maodian"></p><h2>Ubuntu 22.04 如何关闭防火墙</h2>
<p>在Ubuntu 22.04中,默认的防火墙管理工具仍然是<code>ufw</code>(Uncomplicated Firewall)。您可以使用以下命令来关闭防火墙:</p>
<p><strong>关闭防火墙</strong>:</p>
<div class="dxycode"><pre class="brush:bash;">sudo ufw disable</pre></div>
<p><strong>查看防火墙状态</strong>:</p>
<div class="dxycode"><pre class="brush:bash;">sudo ufw status</pre></div>
<p><strong>如果需要重新开启防火墙</strong>:</p>
<div class="dxycode"><pre class="brush:bash;">sudo ufw enable</pre></div>
<p>如果您使用的是其他防火墙管理工具(例如<code>iptables</code>),可以使用以下命令来清除所有规则并关闭防火墙:</p>
<p><strong>清除所有<code>iptables</code>规则</strong>:</p>
<div class="dxycode"><pre class="brush:bash;">sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
sudo iptables -t mangle -X
sudo iptables -P INPUT ACCEPT
sudo iptables -P FORWARD ACCEPT
sudo iptables -P OUTPUT ACCEPT</pre></div>
<p><strong>保存<code>iptables</code>规则</strong>(确保重启后规则仍然清除):</p>
<div class="dxycode"><pre class="brush:bash;">sudo iptables-save | sudo tee /etc/iptables/rules.v4</pre></div>
頁:
[1]