mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge pull request #21101 from wxy/20210216-How-to-install-Linux-in-3-steps
TSL:sources/tech/20210216 How to install Linux in 3 steps.md
This commit is contained in:
commit
6f20cee0cc
@ -1,146 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to install Linux in 3 steps)
|
||||
[#]: via: (https://opensource.com/article/21/2/linux-installation)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
How to install Linux in 3 steps
|
||||
======
|
||||
Operating system installations may seem mysterious, but they are
|
||||
actually pretty straight forward. Here are the steps for a successful
|
||||
Linux installation.
|
||||
![bash logo on green background][1]
|
||||
|
||||
In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Here's how to install Linux.
|
||||
|
||||
Installing an operating system (OS) is always daunting. It's something of a puzzle to most people: Installing an OS can't happen from inside the OS because it either hasn't been installed, or it's about to be replaced by a different one, so how does it happen? And worse yet, it usually involves confusing questions about hard drive formats, install destinations, time zones, user names, passwords, and a bunch of other stuff that you just don't normally think about. Linux distributions know this, and so they've worked diligently over the years to reduce the time you spend in the OS installer down to the absolute minimum.
|
||||
|
||||
### What happens when you install
|
||||
|
||||
Whether you're installing just an application or a whole operating system, the process of _installation_ is just a fancy way to copy files from one medium to another. Regardless of any user interface or animations used to disguise the procedure as something highly specialized, it all amounts to the same thing in the end: Files that were once stored on a disc or drive are copied to specific locations on your hard drive.
|
||||
|
||||
When it's an application being installed, the valid locations for those files are highly restricted to your _file system_ or the part of your hard drive that your operating system knows it can use. This is significant because it's possible to partition a hard drive into separate spaces (Apple used this trick back in the early '00s for what they called "Bootcamp", allowing users to install both macOS and Windows onto a drive, but as separate entities). When you install an operating system, some special files are installed into places on your drive that are normally off-limits. More importantly, all existing data on your drive is, at least by default, erased to make room for the new system, so creating a backup is _essential_.
|
||||
|
||||
### Installers
|
||||
|
||||
Technically speaking, you don't actually _need_ an installer to install applications or even operating systems. Believe it or not, some people install Linux manually, by mounting a blank hard drive, compiling code, and copying files. This is accomplished with the help of a project called [Linux From Scratch (LFS)][2]. This project aims to help enthusiasts, students, and future OS designers to learn more about how computers work and what function each component performs. This isn't the recommended method of installing Linux, but you'll find that in open source, it's usually true that _if_ something can be done, then somebody's doing it. And it's a good thing, too, because these niche interests very often lead to surprisingly useful innovations.
|
||||
|
||||
Assuming you're not trying to reverse engineer Linux, though, the normal way to install it is with an install disc or install image.
|
||||
|
||||
### 3 easy steps to install Linux
|
||||
|
||||
When you boot from a Linux install DVD or thumb drive, you're placed into a minimal operating environment designed to run one or more useful applications. The installer is the primary application, but because Linux is such a flexible system, you can usually also run standard desktop applications to get a feel for what the OS is like before you commit to installing it.
|
||||
|
||||
Different Linux distributions have different installer interfaces. Here are two examples:
|
||||
|
||||
Fedora Linux has a flexible installer (called **Anaconda**) capable of complex system configuration.
|
||||
|
||||
![Anaconda installer screen on Fedora][3]
|
||||
|
||||
The Anaconda installer on Fedora
|
||||
|
||||
Elementary OS has a simple installer designed primarily for an install on a personal computer:
|
||||
|
||||
![Elementary OS installer][4]
|
||||
|
||||
Elementary OS installer
|
||||
|
||||
#### 1\. Get an installer
|
||||
|
||||
The first step toward installing Linux is to download an installer. You obtain a Linux install image from the distribution you've chosen to try.
|
||||
|
||||
* [Fedora][5] is famous for being the first to update its software
|
||||
* [Linux Mint][6] provides easy options to install missing drivers
|
||||
* [Elementary][7] provides a beautiful desktop experience and several special, custom-built applications
|
||||
|
||||
|
||||
|
||||
Linux installers are `.iso` files, which are "blueprints" for DVD media. You can burn the `.iso` file to a DVD-R if you still use optical media, or you can _flash_ it to a USB drive (make sure it's an empty USB drive, as all of its contents are erased when the image is flashed onto it). To flash an image to a USB drive, you can [use the open source Etcher application][8].
|
||||
|
||||
![Etcher used to flash a USB thumb drive][9]
|
||||
|
||||
Etcher application can flash a USB thumb drive
|
||||
|
||||
You're now ready to install Linux.
|
||||
|
||||
#### 2\. Boot order
|
||||
|
||||
To install an OS onto a computer, you must boot to the OS installer. This is not common behavior for a computer because it's so rarely done. In theory, you install an OS once, and then you update it. When you opt to install a different operating system onto a computer, you're interrupting that normal lifecycle. That's not a bad thing. It's your computer, so you have the authority to do re-image it. However, it's different from the default behavior of a computer, which is to boot to whatever operating system it finds on the hard drive immediately after being powered on.
|
||||
|
||||
Before installing Linux, you must back up any data you have on your target computer because it will all be erased upon installation.
|
||||
|
||||
Assuming you've saved your data to an external hard drive, which you've then secreted away to somewhere safe (and not attached to your computer), then you're ready to proceed.
|
||||
|
||||
First, attach the USB drive containing your Linux installer to your computer. Power on the computer and watch the screen for some indication of how to interrupt its default boot sequence. This is usually a key like **F2**, **F8**, **Esc**, or even **Del**, but it varies depending on your motherboard manufacturer. If you miss your window of opportunity, just wait for the default OS to load, and then reboot and try again.
|
||||
|
||||
When you interrupt the boot sequence, your computer prompts you for boot instructions. Specifically, the firmware embedded into the motherboard needs to know what drive to look to for an operating system it can load. In this case, you want the computer to boot from the USB drive containing the Linux image. How you're prompted for this information varies, depending on the motherboard manufacturer. Sometimes, it's a very direct question complete with a menu:
|
||||
|
||||
![Boot device menu][10]
|
||||
|
||||
The boot device selection menu
|
||||
|
||||
Other times, you're taken into a rudimentary interface you can use to set the boot order. Computers are usually set by default to look to the internal hard drive first. Failing that, it moves on to a USB drive, a network drive, or an optical drive. You need to tell your computer to look for a USB drive _first_ so that it bypasses its own internal hard drive and instead boots the Linux image on your USB drive.
|
||||
|
||||
![BIOS selection screen][11]
|
||||
|
||||
BIOS selection screen
|
||||
|
||||
This may seem daunting at first, but once you get familiar with the interface, it's a quick and easy task. You won't have to do this once Linux is installed because, after that, you'll want your computer to boot off the internal hard drive again. This is a great trick to get comfortable with, though, because it's the key to using Linux off of a thumb drive, testing a computer for Linux compatibility before installing, and general troubleshooting regardless of what OS is involved.
|
||||
|
||||
Once you've selected your USB drive as the boot device, save your settings, let the computer reset, and boot to the Linux image.
|
||||
|
||||
#### 3\. Install Linux
|
||||
|
||||
Once you've booted into the Linux installer, it's just a matter of stepping through prompts.
|
||||
|
||||
The Fedora installer, Anaconda, presents you a "menu" of all the things you can customize prior to installation. Most are set to sensible defaults and probably require no interaction from you, but others are marked with alert symbols to indicate that your configurations can't safely be guessed and so need to be set. These include the location of the hard drive you want the OS installed onto and the user name you want to use for your account. Until you resolve these issues, you can't proceed with the installation.
|
||||
|
||||
For the hard drive location, you must know which drive you want to erase and re-image with your Linux distribution of choice. This might be an obvious choice on a laptop that has only one drive, to begin with:
|
||||
|
||||
![Screen to select the installation drive][12]
|
||||
|
||||
Select the drive to install the OS to (there's only one drive in this example)
|
||||
|
||||
If you've got more than one drive in your computer, and you only want Linux on one of them, or else you want to treat both drives as one, then you must help the installer understand your goal. It's easiest to assign just one drive to Linux, letting the installer perform automatic partitioning and formatting, but there are plenty of other options for advanced users.
|
||||
|
||||
Your computer must have at least one user, so create a user account for yourself. Once that's done, you can click the **Done** button at last and install Linux.
|
||||
|
||||
![Anaconda options complete and ready for installation][13]
|
||||
|
||||
Anaconda options are complete and you're ready to install
|
||||
|
||||
Other installers can be even simpler, believe it or not, so your experience may differ from the images in this article. No matter what, the install process is one of the easiest operating system installations available outside of getting something pre-installed for you, so don't let the idea of installing an OS intimidate you. This is your computer. You can and should install an OS in which you have ownership.
|
||||
|
||||
### Own your computer
|
||||
|
||||
Ultimately, Linux is your OS. It's an operating system developed by people from all over the world, with one interest at heart: Create a computing culture of participation, mutual ownership, and co-operative stewardship. If you're interested in getting to know open source better, then take the step to know one of its shining examples and install Linux.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/2/linux-installation
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
|
||||
[2]: http://www.linuxfromscratch.org
|
||||
[3]: https://opensource.com/sites/default/files/anaconda-installer.png
|
||||
[4]: https://opensource.com/sites/default/files/elementary-installer.png
|
||||
[5]: http://getfedora.org
|
||||
[6]: http://linuxmint.com
|
||||
[7]: http://elementary.io
|
||||
[8]: https://opensource.com/article/18/7/getting-started-etcherio
|
||||
[9]: https://opensource.com/sites/default/files/etcher_0.png
|
||||
[10]: https://opensource.com/sites/default/files/boot-menu.jpg
|
||||
[11]: https://opensource.com/sites/default/files/bios_1.jpg
|
||||
[12]: https://opensource.com/sites/default/files/install-harddrive-chooser.png
|
||||
[13]: https://opensource.com/sites/default/files/anaconda-done.png
|
145
translated/tech/20210216 How to install Linux in 3 steps.md
Normal file
145
translated/tech/20210216 How to install Linux in 3 steps.md
Normal file
@ -0,0 +1,145 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (wxy)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to install Linux in 3 steps)
|
||||
[#]: via: (https://opensource.com/article/21/2/linux-installation)
|
||||
[#]: author: (Seth Kenlon https://opensource.com/users/seth)
|
||||
|
||||
安装 Linux,只需三步
|
||||
======
|
||||
|
||||
> 操作系统的安装看似神秘,但其实很简单。以下是成功安装 Linux 的步骤。
|
||||
|
||||
![绿色背景的bash标志][1]
|
||||
|
||||
在 2021 年,有更多让人们喜欢 Linux 的理由。在这个系列中,我将分享 21 种使用 Linux 的不同理由。下面是如何安装 Linux。
|
||||
|
||||
安装一个操作系统(OS)总是令人生畏。对大多数人来说,这是一个难题。安装操作系统不能从操作系统内部进行,因为它要么没有被安装,要么即将被另一个操作系统取代,那么它是如何发生的呢?更糟糕的是,它通常会涉及到硬盘格式、安装目的地、时区、用户名、密码等一系列你通常不会想到的混乱问题。Linux 发行版知道这一点,所以它们多年来一直在努力将你在操作系统安装程序中花费的时间减少到最低限度。
|
||||
|
||||
### 安装时发生了什么
|
||||
|
||||
无论你安装的是一个应用程序还是整个操作系统,*安装*的过程只是将文件从一种媒介复制到另一种媒介的一种花哨方式。不管是什么用户界面,还是用动画将安装过程伪装成多么高度专业化的东西,最终都是一回事:曾经存储在光盘或驱动器上的文件被复制到硬盘上的特定位置。
|
||||
|
||||
当安装的是一个应用程序时,放置这些文件的有效位置被高度限制在你的*文件系统*或你的操作系统知道它可以使用的硬盘驱动器的部分。这一点很重要,因为它可以将硬盘分割成不同的空间(苹果公司在世纪初的 Bootcamp 中使用了这一技巧,允许用户将 macOS 和 Windows 安装到一个硬盘上,但作为单独的实体)。当你安装一个操作系统时,一些特殊的文件会被安装到硬盘上通常是禁区的地方。更重要的是,至少在默认情况下,你的硬盘上的所有现有数据都会被擦除,以便为新系统腾出空间,所以创建一个备份是*必要的*。
|
||||
|
||||
### 安装程序
|
||||
|
||||
从技术上讲,你实际上不需要安装程序来安装应用程序甚至操作系统。不管你信不信,有些人通过挂载一块空白硬盘、编译代码并复制文件来手动安装 Linux。这是在一个名为 [Linux From Scratch(LFS)][2] 的项目的帮助下完成的。这个项目旨在帮助爱好者、学生和未来的操作系统设计者更多地了解计算机的工作原理以及每个组件执行的功能。这并不是推荐的安装 Linux 的方法,但你会发现,在开源中,通常是这样的:*如果*有些事情可以做,那么就有人在做。而这也是一件好事,因为这些小众的兴趣往往会带来令人惊讶的有用的创新。
|
||||
|
||||
假设你不是想对 Linux 进行逆向工程,那么正常的安装方式是使用安装光盘或安装镜像。
|
||||
|
||||
### 3 个简单的步骤来安装 Linux
|
||||
|
||||
当你从一个 Linux 安装 DVD 或 U 盘启动时,你会置身于一个最小化的操作环境中,这个环境是为了运行一个或多个有用的应用程序。安装程序是最主要的应用程序,但由于 Linux 是一个如此灵活的系统,你通常也可以运行标准的桌面应用程序,以在你决定安装它之前感受一下这个操作系统是什么样子的。
|
||||
|
||||
不同的 Linux 发行版有不同的安装程序界面。下面是两个例子。
|
||||
|
||||
Fedora Linux 有一个灵活的安装程序(称为 Anaconda),能够进行复杂的系统配置:
|
||||
|
||||
![Fedora 上的 Anaconda 安装界面][3]
|
||||
|
||||
*Fedora 上的 Anaconda 安装程序*
|
||||
|
||||
Elementary OS 有一个简单的安装程序,主要是为了在个人电脑上安装而设计的:
|
||||
|
||||
![Elementary OS 安装程序][4]
|
||||
|
||||
*Elementary OS 安装程序*
|
||||
|
||||
#### 1、获取安装程序
|
||||
|
||||
安装 Linux 的第一步是下载一个安装程序。你可以从你选择尝试的发行版中获得一个 Linux 安装镜像。
|
||||
|
||||
* [Fedora][5] 以率先更新软件而闻名。
|
||||
* [Linux Mint][6] 提供了安装缺失驱动程序的简易选项。
|
||||
* [Elementary][7] 提供了一个美丽的桌面体验和几个特殊的、定制的应用程序。
|
||||
|
||||
Linux 安装程序是 `.iso` 文件,是 DVD 介质的“蓝图”。如果你还在使用光学介质,你可以把 `.iso` 文件刻录到 DVD-R 上,或者你可以把它烧录到 USB 驱动器上(确保它是一个空的 USB 驱动器,因为当镜像被烧录到它上时,它的所有内容都会被删除)。要将镜像烧录到 USB 驱动器上,你可以 [使用开源的 Etcher 应用程序][8]。
|
||||
|
||||
![Etcher 用于烧录 USB 驱动器][9]
|
||||
|
||||
*Etcher 应用程序可以烧录 USB 驱动器。*
|
||||
|
||||
现在你可以安装 Linux 了。
|
||||
|
||||
#### 2、引导顺序
|
||||
|
||||
要在电脑上安装操作系统,你必须引导到操作系统安装程序。这对于一台电脑来说并不是常见的行为,因为很少有人这样做。理论上,你只需要安装一次操作系统,然后你就会不断更新它。当你选择在电脑上安装不同的操作系统时,你就中断了这个正常的生命周期。这不是一件坏事。这是你的电脑,所以你有权力对它进行重新规划。然而,这与电脑的默认行为不同,它的默认行为是开机后立即启动到硬盘上找到的任何操作系统。
|
||||
|
||||
在安装 Linux 之前,你必须备份你在目标计算机上的任何数据,因为这些数据在安装时都会被清除。
|
||||
|
||||
假设你已经将数据保存到了一个外部硬盘上,然后你将它秘密地存放在安全的地方(而不是连接到你的电脑上),那么你就可以继续了。
|
||||
|
||||
首先,将装有 Linux 安装程序的 USB 驱动器连接到电脑上。打开电脑电源,观察屏幕上是否有一些如何中断其默认启动序列的指示。这通常是像 `F2`、`F8`、`Esc` 甚至 `Del` 这样的键,但根据你的主板制造商的不同而不同。如果你错过了这个时间窗口,只需等待默认操作系统加载,然后重新启动并再次尝试。
|
||||
|
||||
当你中断启动序列时,电脑会提示你引导指令。具体来说,嵌入主板的固件需要知道该到哪个驱动器寻找可以加载的操作系统。在这种情况下,你希望计算机从包含 Linux 镜像的 USB 驱动器启动。如何提示你这些信息取决于主板制造商。有时,它会直接问你,并配有一个菜单:
|
||||
|
||||
![引导设备菜单][10]
|
||||
|
||||
*启动设备选择菜单*
|
||||
|
||||
其他时候,你会被带入一个简陋的界面,你可以用来设置启动顺序。计算机通常默认设置为先查看内部硬盘。如果引导失败,它就会移动到 USB 驱动器、网络驱动器或光驱。你需要告诉你的计算机先寻找一个 USB 驱动器,这样它就会绕过自己的内部硬盘驱动器,而引导 USB 驱动器上的 Linux 镜像。
|
||||
|
||||
![BIOS 选择屏幕][11]
|
||||
|
||||
*BIOS 选择屏幕*
|
||||
|
||||
起初,这可能会让人望而生畏,但一旦你熟悉了界面,这就是一个快速而简单的任务。一旦安装了Linux,你就不必这样做了,因为,在这之后,你会希望你的电脑再次从内部硬盘启动。这是一个很好的技巧,因为它是在 USB 驱动器上使用 Linux 的关键,在安装前测试计算机的 Linux 兼容性,以及无论涉及什么操作系统的一般性故障排除。
|
||||
|
||||
一旦你选择了你的 USB 驱动器作为引导设备,保存你的设置,让电脑复位,然后启动到 Linux 镜像。
|
||||
|
||||
#### 3、安装 Linux
|
||||
|
||||
一旦你启动进入 Linux 安装程序,就只需通过提示进行操作。
|
||||
|
||||
Fedora 安装程序 Anaconda 为你提供了一个“菜单”,上面有你在安装前可以自定义的所有事项。大多数设置为合理的默认值,可能不需要你的互动,但有些则用警示符号标记,表示你的配置不能被安全地猜测,因此需要设置。这些配置包括你想安装操作系统的硬盘位置,以及你想为账户使用的用户名。在你解决这些问题之前,你不能继续安装。
|
||||
|
||||
对于硬盘的位置,你必须知道你要擦除哪个硬盘,然后用你选择的 Linux 发行版重新写入。对于只有一个硬盘的笔记本来说,这可能是一个显而易见的选择。
|
||||
|
||||
![选择安装驱动器的屏幕][12]
|
||||
|
||||
*选择要安装操作系统的硬盘(本例中只有一个硬盘)。*
|
||||
|
||||
如果你的电脑里有不止一个硬盘,而你只想在其中一个硬盘上安装 Linux,或者你想把两个硬盘当作一个硬盘,那么你必须帮助安装程序了解你的目标。最简单的方法是只给 Linux 分配一个硬盘,让安装程序执行自动分区和格式化,但对于高级用户来说,还有很多其他的选择。
|
||||
|
||||
你的电脑必须至少有一个用户,所以要为自己创建一个用户账户。完成后,你可以最后点击 **Done** 按钮,安装 Linux。
|
||||
|
||||
![Anaconda 选项完成并准备安装][13]
|
||||
|
||||
*Anaconda 选项已经完成,可以安装了*
|
||||
|
||||
其他的安装程序可能会更简单,不管你信不信,所以你看到的可能与本文中的图片不同。无论怎样,除了预装的操作系统之外,这个安装过程都是最简单的操作系统安装之一,所以不要让安装操作系统的想法吓到你。这是你的电脑。你可以也应该安装一个你拥有所有权的操作系统。
|
||||
|
||||
### 拥有你的电脑
|
||||
|
||||
最终,Linux 是你的操作系统。它是一个由来自世界各地的人们开发的操作系统,其核心是一个:创造一种参与、共同拥有、合作管理的计算文化。如果你有兴趣更好地了解开源,那么就请你迈出一步,了解它的一个光辉典范,并安装 Linux。
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/2/linux-installation
|
||||
|
||||
作者:[Seth Kenlon][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/seth
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background)
|
||||
[2]: http://www.linuxfromscratch.org
|
||||
[3]: https://opensource.com/sites/default/files/anaconda-installer.png
|
||||
[4]: https://opensource.com/sites/default/files/elementary-installer.png
|
||||
[5]: http://getfedora.org
|
||||
[6]: http://linuxmint.com
|
||||
[7]: http://elementary.io
|
||||
[8]: https://opensource.com/article/18/7/getting-started-etcherio
|
||||
[9]: https://opensource.com/sites/default/files/etcher_0.png
|
||||
[10]: https://opensource.com/sites/default/files/boot-menu.jpg
|
||||
[11]: https://opensource.com/sites/default/files/bios_1.jpg
|
||||
[12]: https://opensource.com/sites/default/files/install-harddrive-chooser.png
|
||||
[13]: https://opensource.com/sites/default/files/anaconda-done.png
|
Loading…
Reference in New Issue
Block a user