如何轻松安装 Debian Linux 系统
Debian
![](/data/attachment/album/202109/16/123647x9uz7zjjqrq0qwkk.jpg)


安装 Debian 的轻松程度依赖于选择什么镜像。


如果你使用 Debain 官网的默认 ISO 镜像，安装 Debian 就比较费劲。你会卡在这种界面，让你从外部可移动介质上安装网络驱动。


![对于新用户来说，从默认的 ISO 中安装 Debian 是有问题的](/data/attachment/album/202109/16/123706khb2clqhh2bec26f.png)


当然你可以花时间去排除这个故障，但这让事情变得没有必要的复杂。


不用担心，让我来展示如何轻松地简单安装 Debian。


### 轻松安装 Debian 桌面系统的方法


在你查看这些步骤之前，请确认以下准备工作：


* 一个至少 4GB 大小的 USB 盘。
* 一个连接了互联网的系统（可以是要安装 Debian 的同一个机器）。
* 一个要安装的 Debian 的机器。它将会清理掉系统上所有数据，因此请复制重要数据到其他外部磁盘


你需要为 Debian 准备什么样配置的机器？这取决于你想用什么类型的 [桌面环境](https://itsfoss.com/what-is-desktop-environment/)。例如，GNOME 桌面系统可以在 4GB 内存上运行，但在 8GB 内存上更流畅一些。如果你只有 4GB 或更少的内存，还是建议尝试 KDE、Cinnamon 或 Xfce 桌面系统。


Debian 支持 [32 位和 64 位的指令架构](https://itsfoss.com/32-bit-64-bit-ubuntu/)。你需要根据你的 CPU 指令架构选择对应的 Debian ISO 镜像。


你的系统应该至少要有 25GB 可用的硬盘空间。越多越好。



> 
> **警告！**
> 
> 
> 这个方法会移除磁盘上所有其他操作系统及其数据。
> 
> 
> 你可以保存你后面还需要用的个人信息、文档、照片等到外部 USB 盘或云存储中。
> 
> 
> 


在这个教程中，我将展示安装带有 GNOME 桌面环境的 Debian 11 Bullseye 的步骤。即使你选择其他的桌面环境，步骤也应该是一样的。


这个教程是在 GPT 分区的 UEFI 系统上测试的。如果你的系统是 [MBR 而不是 GPT](https://itsfoss.com/check-mbr-or-gpt/)，或是 [传统的 BIOS 而不是 UEFI](https://itsfoss.com/check-uefi-or-bios/)，那么创建<ruby> 临场 <rt>  Live </rt></ruby> USB 盘的步骤有一点不同。


#### 步骤 1：获取正确的 Debian ISO 镜像


在安装 Debian 过程中，选择正确的 ISO 镜像就已经成功一半了。令人惊讶的是，对于一个新的 Debian 用户来说，要浏览 Debian 的网站并找到最轻松好用的 ISO 真的很困难。


如果你点击 Debian 官网的下载按钮，它会下载一个最小化的网络安装文件，这对普通用户来说是非常复杂的。请 **不要** 使用这个。


反而，你应该用<ruby> 临场 <rt>  Live </rt></ruby> ISO。但这里要注意，有一些单独的含有非自由软件（以包括网络硬件的驱动程序）的版本。


你应该下载这个非自由版的临场 ISO 镜像。不过另一个问题是，你不会在网站的显著位置注意到它，而且有各种架构的 BT 种子或直接下载的 URL。


让我把这些链接放在这里：


* [32 位和 64 位的主仓地址](https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/)
* [Debian 11 官方下载](https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/amd64/iso-hybrid/)
* [Debian 11 种子地址](https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/11.0.0-live+nonfree/amd64/bt-hybrid/)


你会看到几个文件，文件名中提到了桌面环境。选择一种你要的桌面环境。直接下载的话，直接点击 .iso 结尾的链接即可。


![下载非自由版的临场 Debian ISO](/data/attachment/album/202109/16/123707nu46mr2tlm2bk2s6.png)


一旦你有了对应的 ISO 下载包，剩下就是和其他 Linux 发行版一样的标准安装流程了。


#### 步骤 2: 创建一个 Debian 的临场 USB 盘


将 USB 盘插入你的系统。在用之前最好格式化一下，反正它最终也会被格式化的。


你可以根据你的选择使用任何临场 USB 创建工具。如果你使用 Windows，可以使用 Rufus。我们在这里使用 Etcher，因为这个工具在 Windows 和 Linux 都可以用。


从它的官网下载 Etcher。


* [下载 Etcher](https://www.balena.io/etcher/)


我专门写过一篇 [在 Linux 下使用 Etcher 的教程](https://itsfoss.com/install-etcher-linux/)，因此这里我就不深入介绍了。只要运行下载的可执行程序，浏览找到 Debian 的 ISO 镜像，确认选择正确的 USB 盘，然后点击 “Flash” 按钮即可。


![用 Etcher 创建 Debian 的临场 USB 盘](/data/attachment/album/202109/16/123710bajfvmfqf3qzgfyo.png)


不一会就创建好临场 USB 盘了。创建好之后，就可以开机引导了。


#### 步骤 3：从临场 USB 盘引导启动


重启你要安装 Debian 的机器。当显示制造商标识的时候，按下 `F2`、`F10` 或 `F12` 等键进入开机引导设置界面。你也可以从 Windows [进入到 UEFI 固件设置界面](https://itsfoss.com/access-uefi-settings-windows-10/)。


有些机器如果启用了<ruby> 安全启动 <rt>  secure boot </rt></ruby>功能，就不允许从临场 USB 盘引导。如果是这种情况，请 [从 BIOS 设置里禁用安全启动](https://itsfoss.com/disable-secure-boot-windows/)


不同的的制造商在界面上会有一些差异。


![](/data/attachment/album/202109/16/123710v7nj366aa1v6k7ea.jpg)


你在 BIOS 里做了修改之后，按下 `F10` 保存并退出。你的系统将会重新启动。


再一次，当看到制造商的标识后按下 `F2`、`F10` 或 `F12` 查看引导配置。你应该可以看到从 USB 引导的选项，然后选中它。


![](/data/attachment/album/202109/16/123712lc999hhhi6cwc96v.jpg)


一会儿就会看到如下图的显示界面，选择第一个选项。


![Debian 启动界面](/data/attachment/album/202109/16/123713bpqa13zkr144krvp.png)


#### 步骤 4: 开始安装 Debian


当你进入临场 Debian 会话，如果你使用 GNONE 桌面，它呈现一个欢迎界面，可以在此选择你的键盘和语言。当你看到这些界面时，只需要点击下一步。


![Debian 临场欢迎界面](/data/attachment/album/202109/16/123715zv1frff0nhrhwi88.png)


欢迎界面之后，按下 `Windows` / `Super` 键进入活动区。你应该可以看到 Debian 的安装按钮。


![开始安装 Debian](/data/attachment/album/202109/16/124105c3oobfpjf3ek3061.jpg)


它会打开一个友好的 [Calamares 图形安装器](https://calamares.io/)。从这里开始事情就比较简单了，


![Debian 11 Calamares 图形安装器](/data/attachment/album/202109/16/123717b44574nu75ewnuqs.png)


它会让你选择你的地理位置和时区。


![选择你的地理位置和时区](/data/attachment/album/202109/16/124139wonwbwqwyjyzp5wz.jpg)


下一个界面，会让你选择键盘类型。这儿请 **注意**。你的键盘会根据你所选的位置自动选择。例如，我的位置是印度，它会自动默认选择印度键盘和印地语。我需要将其改为印度英语。


![选择键盘类型](/data/attachment/album/202109/16/124153hjejgnapdhj8dl1l.jpg)


下一个界面是关于磁盘分区和要安装 Debian 的地方。在本文中，把 Debian 作为你电脑上唯一的操作系统来安装。


最简单的方法是直接选择 “<ruby> 擦除磁盘 <rt>  Erase Disk </rt></ruby>”。除了必须的 ESP 分区和交换分区外，Debian 会把其他所有东西都放在根挂载点（`/`）上。实际上，下面显示了你所选的安装方式后的磁盘布局。


![磁盘分区](/data/attachment/album/202109/16/123719okurr9u3orgsmmmm.png)


如果你想把事情掌握在自己手中，你也可以选择手动分区，选择分配给 `/`、`/home`、`/boot` 或交换分区的大小。只有在你知道自己在做什么时，才可以这样做。


下一界面，你需要提供用户名和密码。但它不会设置 root 的密码，并将其保持为空。


![设置用户名和密码](/data/attachment/album/202109/16/123720m9k8fcfeewwrlpfk.png)


这也意味着你可以用新创建的用户使用 `sudo` 。在“复杂的 Debian 安装”中，你也可以设置 root 密码，但这样你就必须手动将普通用户添加到 `sudoer` 列表。看看，这种安装过程是不是对新手来说很容易？


在继续实际安装之前，它会呈现你所做的选择的汇总信息。如果没有问题，就可以点击“<ruby> 安装 <rt>  Install </rt></ruby>”按钮。


![安装配置的汇总信息](/data/attachment/album/202109/16/124221muud66wxusuwtlmt.jpg)


现在只需要等待安装完成。


![安装 Debian](/data/attachment/album/202109/16/123723t0rhk7y800y0q8ru.png)


几分钟后就会完成安装。当安装完成，它会提示重启。


![完成 Debian 安装](/data/attachment/album/202109/16/123724o61b39xt9xel8t9j.png)


重启系统后如果一切顺利，你应该可以看到 Debian 的 GRUB 界面。


![Debian 启动画面](/data/attachment/album/202109/16/124247mlnxuus7xbvbnxsy.jpg)


### 疑难解答（如果系统没有启动到 Debian）


我遇到情况是，我的 Dell 系统不能识别任何要引导的操作系统。这很奇怪，我看见 Debian 经创建了一个 ESP 分区。


如果你也是同样的情况，进去 BIOS 配置里。检查<ruby> 启动顺序 <rt>  Boot Sequence </rt></ruby>，如果你看不到任何东西，就点击“<ruby> 新增引导选项 <rt>  Add Boot Option </rt></ruby>”。


![增加新的启动选项](/data/attachment/album/202109/16/124311tj8m2dzj7n5tjz4m.jpg)


它会提供一个增加 EFI 文件的选项。


![选择 EFI 文件](/data/attachment/album/202109/16/124446hnswvnia6fjakifv.jpg)


由于在安装过程中 Debian 创建了 ESP 分区，因此一个包含必要文件的 `EFI` 目录已经创建好了。


![选择 EFI 目录](/data/attachment/album/202109/16/124500cc3l97jaanjm7o0l.jpg)


它会显示一个 `Debian` 目录及其他目录。选择 `Debian` 目录。


![选择 Debian 目录](/data/attachment/album/202109/16/124520skpcestkstcezfub.jpg)


在 `Debian` 目录，你将看到 `grubx64.efi`、`shimx64.efi` 等文件。请选择 `shimx64.efi`。


![选择 shimx64.efi](/data/attachment/album/202109/16/124546q8p8lwphncau8iwz.jpg)


你需要给这个文件一个合适的名字。最后的界面应该如下:


![增加 efi 文件的新启动选项](/data/attachment/album/202109/16/124605eaxkochfcxq1hqax.jpg)


现在你应该有了这个启动选项。因为我命名为 `Debian`，它显示了两个 `Debian` 引导选项（我猜其中一个是从 efi 文件来的）。按下 `F10` 保存退出 BIOS 的配置。


![新增的启动选项](/data/attachment/album/202109/16/124807u87eyj54qrr8oyi4.jpg)


现在启动你的系统，你可以看到带有 Debian 启动选项的 GRUB 界面了。你现在可以体验 Debian 了。


![](/data/attachment/album/202109/16/124247mlnxuus7xbvbnxsy.jpg)


### 你能安装 Debian 吗？


我写这篇文章的目的是让事情变得轻松点。并不是说你不能从默认的网络安装程序 ISO 来安装，只是它需要花更多的精力。


这个教程对你安装 Debian 有帮助吗？你如果还是有问题，请在下面留言给我，我会尽力提供帮助。




---


via: <https://itsfoss.com/install-debian-easily/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[巴龙](https://github.com/guevaraya) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

Installing Debian could be easy or complicated depending upon the ISO you choose.

If you go with the default ISO provided by the Debian website, you’ll have a hard time installing Debian. You’ll be stuck at a screen that asks for network drivers to be installed from external removable media.

![debian firmware](https://itsfoss.com/content/images/wordpress/2021/08/Debian-firmware.png)

You may, of course, troubleshoot that, but it makes things unnecessarily complicated.

Don’t worry. Let me show the steps for installing Debian comfortably and easily.

## The easy way of installing Debian as a desktop

Before you see the steps, please have a look at the things you need.

- A USB key (pen drive) with at least 4 GB in size.
- A system with an active internet connection (could be the same system where it will be installed).
- A system where you’ll be installing Debian. It will wipe out everything on this system, so please copy your important data to some other external disk.

What kind of system specification you should have for Debian? It depends on the [desktop environment](https://itsfoss.com/what-is-desktop-environment/) you are going to use. For example, the GNOME desktop environment could work on 4 GB RAM but it will work a lot better on 8 GB RAM. If you have 4 GB or less, try using KDE, Cinnamon or Xfce desktops.

Debian also has both [32-bit and 64-bit architecture](https://itsfoss.com/32-bit-64-bit-ubuntu/) support. You’ll have to get the Debian ISO according to your processor architecture.

Your system should have at least 25 GB of disk space to function. The more, the merrier.

**This method removes all the other operating systems along with the data present on the disk. You may save your personal files, documents, pictures etc on an external USB disk or cloud storage if you want to use it later.**

**Warning!**In this tutorial, I am going to show the steps for installing Debian 11 Bullseye with GNOME desktop environment. The steps should be the same even if you choose some other desktop environment.

[MBR instead of GPT](https://itsfoss.com/check-mbr-or-gpt/)or

[legacy BIOS instead of UEFI](https://itsfoss.com/check-uefi-or-bios/), the live USB creation step will be different.

### Step 1: Getting the correct Debian ISO

Half of the battle in installing Debian is choosing the correct ISO. Surprisingly, it is really difficult to navigate through its website and find that ISO which is the easiest for a new Debian user.

If you click the Download button on the [homepage of Debian website](https://www.debian.org/?ref=itsfoss.com), it downloads a minimal net install file which will be super complicated for a regular user. Please DO NOT use this.

Instead, you should go for the live ISO. But here is a catch, there are separate live versions with non-free software (includes drivers for your networking hardware).

You should download this non-free live ISO. Another problem here is that you won’t get it mentioned prominently on the website and there are various URLs for torrents or direct downloads for various architecture.

Let me link them here.

[Main repo for 32 and 64 bit](https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/?ref=itsfoss.com)

[Debian 11 Direct](https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/iso-hybrid/?ref=itsfoss.com)


[Debian 11 Torrent](https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/current-live/amd64/bt-hybrid/?ref=itsfoss.com)

You’ll see several files with the of desktop environment mentioned in the filename. Choose the one with desktop environment of your choice. For direct downloads, click on the links that end with .iso.

![downloading debian live non free iso](https://itsfoss.com/content/images/wordpress/2021/08/downloading-Debian-live-non-free-iso.png)

Once you have the appropriate ISO downloaded, the rest is standard procedure that you may have experienced with other Linux distributions.

### Step 2: Creating live USB of Debian

Plug in the USB into your system. It will be wise to format it just for the sake of it. It will be formatted anyway.

You can use any live USB creation tool of your choice. If you are using Windows, go with Rufus. I am going to use Etcher here because it is available for both Windows and Linux.

Download Etcher from its website.

I have a dedicated [tutorial on using Etcher in Linux](https://itsfoss.com/install-etcher-linux/) and thus I am not going to go in detail here. Just run the downloaded executable file, browse to the Debian ISO, make sure that the correct USB is selected and then hit the Flash button.

![Creating Live Debian USB with Etcher](https://itsfoss.com/content/images/wordpress/2021/08/creating-live-debian-usb-with-etcher.png)

It may take a couple of minutes to create the live USB. Once that is ready, it is time to boot from it.

### Step 3: Boot from the live USB

Restart the system where you want to install Debian. When it is showing the manufacturer’s logo, press F2/F10 or F12 key to access the boot settings. You may also [access the UEFI firmware settings from Windows.](https://itsfoss.com/access-uefi-settings-windows-10/)

Some systems do not allow booting from live USB if secure boot is enabled. If that is the case, please [disable secure boot from the BIOS settings](https://itsfoss.com/disable-secure-boot-windows/).

The screen may look different for different manufacturers.

![disabling secure boot option in UEFI](https://itsfoss.com/content/images/wordpress/2014/05/Disable_Secure_Boot_Windows8.jpg)

Once you make the change, press F10 to save and exit. Your system will boot once again.

Again, press F2/F10 or F12 to access the boot settings when it shows the manufacturer’s logo. You should see the option to boot from the USB. Select it.

![boot from windows disk ventoy](https://itsfoss.com/content/images/wordpress/2021/04/boot-from-windows-disk-ventoy.jpg)

It takes a little bit of time and then you should see a screen like this. Go with the first option here.

![debian live boot screen](https://itsfoss.com/content/images/wordpress/2021/08/debian-live-boot-screen.png)

### Step 4: Start Debian installation

When you enter the live Debian session, it may show some welcome screen with option to choose your keyboard and language if you are using GNOME desktop. Just hit next when you see those screens.

![debian live welcome screen](https://itsfoss.com/content/images/wordpress/2021/08/debian-live-welcome-screen.png)

Once you are past the welcome screen, press the Windows/Super key to bring the activity area. You should see the Debian install button here.

![start debian installation](https://itsfoss.com/content/images/wordpress/2021/08/start-Debian-installation.webp)

It opens the friendly [Calamares graphical installer](https://calamares.io/?ref=itsfoss.com). Things are pretty straightforward from here.

![installing debian 1](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-1.png)

It asks you to select your geographical location and time zone.

![Select time zone and location during Debian installation](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-2.webp)

On the next screen, you’ll be asked to select the keyboard. Please **pay attention** here. Your keyboard is automatically selected based on your location. For example, I had used India as my location and it automatically set the default Indian keyboard with Hindi language. I had to change it to English India.

![Select keyboard layout while installing Debian](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-4.webp)

The next screen is about the disk partition and where you would like to install Debian. In this case, you are going to install Debian as the only operating system on your computer.

The easiest option would to go with ‘Erase disk’ option. Debian will put everything under root except the mandatory ESP partition and Swap space. In fact, it shows what your disk would like after your chosen installation method.

![Disk partitioning while installing Debian](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-5.png)

If you want to take matter in your hands, you may also opt for manual partitioning and choose how much you want to allot to root, home, boot or swap. Only do that when you know what you are doing.

On the next screen, you have to provide the username and password. It does not set root password and keeps it empty.

![Set username and password while installing Debian](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-6.png)

This also means that you can use sudo with the newly created user. In the ‘complicated Debian install’, you could also set root password but then you’ll have to add the normal user to sudoer list manually. See, this installation method is easier for beginners, right?

Before it goes on with the actual installation, it presents you with a summary of the choices you have made. If things look good, hit the install button.

![Debian installation summary](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-7.webp)

Now it is just a matter of waiting for the installation to finish.

![Installing Debian](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-8.png)

It takes a few minutes to complete the installation. When the installation finishes, it asks for a restart.

![Finished Debian installation](https://itsfoss.com/content/images/wordpress/2021/08/Installing-Debian-9.png)

Restart your system and if everything goes well, you should see the grub screen with Debian.

![debian boot screen](https://itsfoss.com/content/images/wordpress/2021/08/debian-boot-screen.webp)

## Troubleshooting tip (if your system does not boot into Debian)

In my case, my Dell system did not recognize any operating system to boot. This was weird because I had see Debian creating an ESP partition.

If it is the same case with you, go to BIOS settings. Check the boot sequence. If you do not see anything, click on the Add boot option.

![add new boot option](https://itsfoss.com/content/images/wordpress/2021/08/add-new-boot-option.webp)

It should give you an option to add an EFI file.

![add efi file for boot option](https://itsfoss.com/content/images/wordpress/2021/08/add-efi-file-for-boot-option.webp)

Since Debian created ESP partition during installation, there is an EFI directory created with necessary files.

![select efi file boot option](https://itsfoss.com/content/images/wordpress/2021/08/select-efi-file-boot-option.webp)

It should show a Debian folder along with some other folders. Select Debian folder.

![select debian folder for uefi](https://itsfoss.com/content/images/wordpress/2021/08/select-debian-folder-for-uefi.webp)

In this Debian folder, you’ll find files like grubx64.efi, shimx64.efi. Select shimx64.efi.

![select shim boot](https://itsfoss.com/content/images/wordpress/2021/08/select-shim-boot.webp)

You may give this file an appropriate name. The final screen may look like this.

![new boot option](https://itsfoss.com/content/images/wordpress/2021/08/new-boot-option.webp)

Now, you should have this boot option. Since I named it Debian, it shows two Debian boot options (one of them coming from the efi file I guess). Press F10 to save and exit the BIOS settings.

![new boot option added](https://itsfoss.com/content/images/wordpress/2021/08/new-boot-option-added.webp)

When your system boots now, you should see the grub screen with Debian boot option. You can start enjoying Debian now.

![Debian boot screen](https://itsfoss.com/content/images/wordpress/2021/08/debian-boot-screen.webp)

## Were you able to install Debian?

I hope I made things simpler here. It is not that you cannot install Debian from the default net installer ISO. It just takes (a lot) more effort.

Was this tutorial helpful for you in installing Debian? Are you still facing issues? Please let me know in the comment section and I’ll try to help you out.