mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
97fa9bb336
@ -1,28 +1,27 @@
|
||||
|
||||
如何在 VirtualBox 上安装并使用 FreeDOS?
|
||||
======
|
||||
这份指南将带你如何一步一步在 Linux 平台下利用 VirtualBox 安装 FreeDOS。
|
||||
|
||||
> 这份指南将带你如何一步一步在 Linux 平台下利用 VirtualBox 安装 FreeDOS。
|
||||
|
||||
### Linux 下借助 VirtualBox 安装 FreeDOS
|
||||
|
||||
<https://www.youtube.com/embed/p1MegqzFAqA?enablejsapi=1&autoplay=0&cc_load_policy=0&iv_load_policy=1&loop=0&modestbranding=1&rel=0&showinfo=0&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=2&>
|
||||
- [How to Install FreeDOS in Linux using Virtual Box](https://www.youtube.com/p1MegqzFAqA)
|
||||
|
||||
2017 年的 11 月份,我[采访了 Jim Hall][1] 关于 [FreeDOS project][2] 背后的历史故事。今天,我将告诉你如何安装并使用 FreeDOS。需要注意到是:我将在 [Solus][4](一种针对家庭用户的 Linux 桌面发行版)下使用 5.2.14 版本的 [VirtualBox][3] 来完成这些操作。
|
||||
|
||||
注意:在本教程我将使用 Solus 作为主机系统因为它很容易设置。另一个你需要注意的事情是 Solus 的软件中心有两个版本的 VirtualBox:`virtualbox` 和 `virtualbox-current`。Solus 会让你选择是使用 linux-lts 内核还是 linux-current 内核。最终区别就是,`virtualbox` 适用于 linux-lts 而 `virtualbx-current` 适用于 linux-current。
|
||||
2017 年的 11 月份,我[采访了 Jim Hall][1] 关于 [FreeDOS 项目][2] 背后的历史故事。今天,我将告诉你如何安装并使用 FreeDOS。需要注意到是:我将在 [Solus][4](一种针对家庭用户的 Linux 桌面发行版)下使用 5.2.14 版本的 [VirtualBox][3] 来完成这些操作。
|
||||
|
||||
> 注意:在本教程我将使用 Solus 作为主机系统因为它很容易设置。另一个你需要注意的事情是 Solus 的软件中心有两个版本的 VirtualBox:`virtualbox` 和 `virtualbox-current`。Solus 会让你选择是使用 linux-lts 内核还是 linux-current 内核。最终区别就是,`virtualbox` 适用于 linux-lts 而 `virtualbx-current` 适用于 linux-current。
|
||||
|
||||
#### 第一步 – 创建新的虚拟机
|
||||
|
||||
![][5]
|
||||
|
||||
当你打开 VirtualBox,点击 "New" 按钮来新建一个虚拟机。你可以自定义这台虚拟机的名字,我将它命名为 “FreeDOS”。你也可以在标注栏内指明你正在安装的 FreeDOS 的版本。你还需要选择你将要安装的操作系统的类型和版本。选择 “Other” 下的 “DOS”。
|
||||
当你打开 VirtualBox,点击 “New” 按钮来新建一个虚拟机。你可以自定义这台虚拟机的名字,我将它命名为 “FreeDOS”。你也可以在标注栏内指明你正在安装的 FreeDOS 的版本。你还需要选择你将要安装的操作系统的类型和版本。选择 “Other” 下的 “DOS”。
|
||||
|
||||
#### 第二步 – 设置内存大小
|
||||
|
||||
![][6]
|
||||
|
||||
下一个对话框会问你要给 FreeDOS 主机分配多少可用的内存空间。默认分配 32 MB。不必更改它。在 DOS 系统盛行的年代,32 MB 大小的内存对于一台搭载 FreeDOS 的机器已经很足够了。如果你有需要,你可以通过对你针对 FreeDOS 新建的虚拟机右键并选择 Setting -> Symtem 来增加内存。
|
||||
下一个对话框会问你要给 FreeDOS 主机分配多少可用的内存空间。默认分配 32 MB。不必更改它。在 DOS 系统盛行的年代,32 MB 大小的内存对于一台搭载 FreeDOS 的机器已经很足够了。如果你有需要,你可以通过对你针对 FreeDOS 新建的虚拟机右键并选择 “Setting -> Symtem” 来增加内存。
|
||||
|
||||
![][7]
|
||||
|
||||
@ -38,8 +37,7 @@
|
||||
|
||||
![][9]
|
||||
|
||||
现在,你可以选择虚拟磁盘的大小和位置。500 MB 已经很足够了。需要注意的是很多你之后用到的程序都是基于文本的,这意味着它们占据的空间非常小。在你做好这些调整后,点击 Creat。
|
||||
|
||||
现在,你可以选择虚拟磁盘的大小和位置。500 MB 已经很足够了。需要注意的是很多你之后用到的程序都是基于文本的,这意味着它们占据的空间非常小。在你做好这些调整后,点击 “Create”。
|
||||
|
||||
#### 第四步 – 关联 .iso 文件
|
||||
|
||||
@ -47,12 +45,11 @@
|
||||
|
||||
![][11]
|
||||
|
||||
当文件下载完毕后,返回到 VirtualBox。选中你的虚拟机并打开设置。你可以通过对虚拟机右键并选中 “Setting” 或者 选中虚拟机并点击 “Setting” 按钮。
|
||||
当文件下载完毕后,返回到 VirtualBox。选中你的虚拟机并打开设置。你可以通过对虚拟机右键并选中 “Setting” 或者选中虚拟机并点击 “Setting” 按钮。
|
||||
|
||||
接下来,点击 “Storage” 选项卡。在 “Storage Devices” 下面,选中 CD 图标。(它应该会在图标旁边显示 “Empty”。) 在右边的 “Attribute” 面板,点中 CD 图标然后在对应路径选中你刚下载的 .iso 文件。
|
||||
|
||||
提示:通常,在你通过 VirtualBox 安装完一个操作系统后你就可以删除对应的 .iso 文件了。但这并不适合 FreeDOS 。如果你想通过 FreeDOS 的包管理器来安装应用程序,你需要这个 .iso 文件。我通常会让这个 .iso 文件连接到虚拟机以便我安装一些程序。如果你也这么做了,你必须要确认下你让 FreeDOS 虚拟机每次启动的时候是从硬盘启动因为虚拟机的默认设置是从已关联的 .iso 文件启动。如果你忘了关联 .iso 文件,也不用担心。你可以通过选择 FreeDOS 虚拟机窗口上方的 “Devices” 来关联。然后就会发现 .iso 文件列在 “Optical Drives”。
|
||||
|
||||
> 提示:通常,在你通过 VirtualBox 安装完一个操作系统后你就可以删除对应的 .iso 文件了。但这并不适合 FreeDOS 。如果你想通过 FreeDOS 的包管理器来安装应用程序,你需要这个 .iso 文件。我通常会让这个 .iso 文件连接到虚拟机以便我安装一些程序。如果你也这么做了,你必须要确认下你让 FreeDOS 虚拟机每次启动的时候是从硬盘启动因为虚拟机的默认设置是从已关联的 .iso 文件启动。如果你忘了关联 .iso 文件,也不用担心。你可以通过选择 FreeDOS 虚拟机窗口上方的 “Devices” 来关联。然后就会发现 .iso 文件列在 “Optical Drives”。
|
||||
|
||||
#### 第五步 – 安装 FreeDOS
|
||||
|
||||
@ -62,11 +59,11 @@
|
||||
|
||||
首先,你需要知道关于最新版本的 VirtualBox 的一个 bug。当我们创建好虚拟硬盘然后选中 “Install to harddisk” 后,如果你开启虚拟机你会发现在 FreeDOS 的欢迎界面出现过后就是不断滚动无群无尽的机器代码。我最近就遇到过这个问题而且不管是 Linux 还是 Windows 平台的 VirtualBox 都会碰到这个问题。(我知道解决办法。)
|
||||
|
||||
为了避开这个问题,你需要做一个简单的修改。当你看到 FreeDOS 的欢迎界面的时候,按下 Tab 键。(确认 “Install to harddrive” 已经选中。)在 “fdboot.img” 之后输入 `raw` 然后按下 Enter 键。接下来就会启动 FreeDOS 的安装程序。
|
||||
为了避开这个问题,你需要做一个简单的修改。当你看到 FreeDOS 的欢迎界面的时候,按下 Tab 键。(确认 “Install to harddrive” 已经选中。)在 “fdboot.img” 之后输入 `raw` 然后按下回车键。接下来就会启动 FreeDOS 的安装程序。
|
||||
|
||||
![][13]
|
||||
|
||||
安装程序会首先处理你的虚拟磁盘的格式化。当格式化完成后,安装程序会重启。当 FreeDOS 的欢迎界面再次出现的时候,你不得不重新输入 `raw` 就像你之前输入的内容那样。
|
||||
安装程序会首先处理你的虚拟磁盘的格式化。当格式化完成后,安装程序会重启。当 FreeDOS 的欢迎界面再次出现的时候,你必须重新输入 `raw` 就像你之前输入的内容那样。
|
||||
|
||||
要确保在安装过程中你遇到的所有问题你选的都是 “Yes”。但也要注意有一个很重要的问题:“What FreeDOS packages do you want to install?” 的答案并不是 “Yes” 或者 “No”。答案有两个选择分别是 “Base packages” 和 “Full installation”。“Base packages” 针对的是想体验类似原始的 MS-DOS 环境的人群。“Full installation” 则包括了一系列工具和实用的程序来提升 DOS。
|
||||
|
||||
@ -82,15 +79,14 @@
|
||||
|
||||
![][15]
|
||||
|
||||
现在,你可以通过输入 `fdimples` 来访问 FreeDOS 的软件包管理工具。你也可以借助方向键来浏览软件包管理器然后用空格键选择类别或者软件包。在 “Networking” 类别中,你需要选中 `fdnet`。FreeDOS project 推荐也安装 `mtcp` 和 `wget`。多次点击 “Tab” 键直到选中 “OK” 然后在按下 “Enter” 键。安装完成后,输入 `reboot` 并按下 “Enter” 键确认执行。系统重启后,引导你的系统驱动。如果网络安装成功的话,你会在终端看到一些关于你的网络信息的新消息。
|
||||
现在,你可以通过输入 `fdimples` 来访问 FreeDOS 的软件包管理工具。你也可以借助方向键来浏览软件包管理器,然后用空格键选择类别或者软件包。在 “Networking” 类别中,你需要选中 `fdnet`。FreeDOS project 推荐也安装 `mtcp` 和 `wget`。多次点击 Tab 键直到选中 “OK” 然后在按下回车键。安装完成后,输入 `reboot` 并按下回车键确认执行。系统重启后,引导你的系统驱动。如果网络安装成功的话,你会在终端看到一些关于你的网络信息的新消息。
|
||||
|
||||
![][16]
|
||||
|
||||
##### 注意
|
||||
注意:
|
||||
|
||||
有时候 VirtualBox 的默认设置并没有生效。如果遇到这种情况,先关闭你的 FreeDOS 虚拟机窗口。在 VirtualBox 主界面右键你的虚拟机并选中 “Setting”。VirtualBox 默认的网络设置是 “NAT”。将它改为 “Bridged Adapter” 后再尝试安装 FreeDOS 的软件包。现在就应该能正常运作了。
|
||||
|
||||
|
||||
#### 第七步 – FreeDOS 的基本使用
|
||||
|
||||
##### 常见命令
|
||||
@ -107,7 +103,7 @@
|
||||
* `MKDIR NEWDIR` – 创建一个新目录
|
||||
* `CLS` – 清除屏幕
|
||||
|
||||
你可以借助互联网或者 Jim Hall 所创建的 [handy cheat sheet][17] 来找到更多基本的 DOS 命令。
|
||||
你可以借助互联网或者 Jim Hall 所创建的 [方便的速查表][17] 来找到更多基本的 DOS 命令。
|
||||
|
||||
##### 运行一个程序
|
||||
|
||||
@ -119,7 +115,7 @@
|
||||
|
||||
对于游戏通常会有一个或者两个 .EXE 程序,你玩游戏之前不得不先运行它们。这些设置文件通常能够修复你遇到的声音,视频,或者控制问题。
|
||||
|
||||
如果你遇到一些本教程中没指出的问题,别忘记访问 [home of FreeDOS][2] 来寻求解决办法。他们有一个 wiki 和一些其他的支持选项。
|
||||
如果你遇到一些本教程中没指出的问题,别忘记访问 [FreeDOS 主站][2] 来寻求解决办法。他们有一个 wiki 和一些其他的支持选项。
|
||||
|
||||
你使用过 FreeDOS 吗?你还想看关于 FreeDOS 哪些方面的教程?请在下面的评论区告诉我们。
|
||||
|
||||
@ -132,7 +128,7 @@ via: https://itsfoss.com/install-freedos/
|
||||
作者:[John Paul][a]
|
||||
选题:[lujun9972](https://github.com/lujun9972)
|
||||
译者:[WangYueScream](https://github.com/WangYueScream)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -1,8 +1,8 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: (wxy)
|
||||
[#]: publisher: (wxy)
|
||||
[#]: url: (https://linux.cn/article-10384-1.html)
|
||||
[#]: subject: (Play Tetris at your Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-tetris)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
@ -10,25 +10,25 @@
|
||||
在 Linux 终端上玩俄罗斯方块
|
||||
======
|
||||
|
||||
用每个人最喜欢的砖块配对游戏俄罗斯方块重新创造 20 世纪 80 年代的魔力。
|
||||
> 用每个人最喜欢的砖块配对游戏“俄罗斯方块”重新创造 20 世纪 80 年代的魔力。
|
||||
|
||||

|
||||
|
||||
感谢你来浏览我们今天的 Linux 命令行玩具日历。如果这是你第一次访问该系列,你可能会问自己,什么是命令行玩具。即使我不太确定,但一般来说,它可能是一个游戏或任何消遣,可以帮助你在终端获得乐趣。
|
||||
|
||||
很可能你们中的一些人之前会看到过我们日历中的各种选择,但我们希望每个人至少遇到一件新事物。
|
||||
很可能你们中的一些人之前会看到过我们日历中的各种推荐,但我们希望每个人至少遇到一件新事物。
|
||||
|
||||
我承诺在我开始这个系列时,我会介绍游戏,但到目前为止,我忽略了它,所以我们今天的选择就是游戏:俄罗斯方块。
|
||||
|
||||
俄罗斯方块和我差不多年纪,都在 1984 年夏天来到世界。不过,俄罗斯方块不是来自北卡罗来纳州的农村地区,而是来自当时苏联的莫斯科。。
|
||||
俄罗斯方块和我差不多年纪,都在 1984 年夏天来到世界。不过,俄罗斯方块不是来自北卡罗来纳州的农村地区,而是来自当时苏联的莫斯科。
|
||||
|
||||
在风靡世界之后,俄罗斯方块被克隆过很多次。我怀疑你可以找到任何你想找的任何语言、操作系统的俄罗斯方块的克隆。说真的,去看看吧。会有一些有趣的。
|
||||
|
||||
我今天带来的命令行[版本][1]是[用 Haskell 编写]的,它是我见过的做得更好的版本之一,有屏幕预览、得分、帮助、干净的外观。
|
||||
我今天带来的命令行[版本][1]是[用 Haskell 编写][1]的,它是我见过的做得更好的版本之一,有屏幕预览、得分、帮助、干净的外观。
|
||||
|
||||
如果你愿意从不受信任的来源运行已编译的二进制文件(我不推荐它),你可以直接获取它,但有个更安全的方法,使用 [dex][2] 的容器化版本也很容易,或者使用 [stack][3] 从源代码安装。
|
||||
|
||||
这个俄罗斯方块克隆版是由 Sam Tay 编写的,并且在 BSD 许可证下。[请看这里][1]!
|
||||
这个俄罗斯方块克隆版是由 Sam Tay 编写的,并且在 BSD 许可证下发布。[请看这里获取][1]!
|
||||
|
||||

|
||||
|
||||
@ -44,8 +44,8 @@ via: https://opensource.com/article/18/12/linux-toy-tetris
|
||||
|
||||
作者:[Jason Baker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
@ -54,4 +54,4 @@ via: https://opensource.com/article/18/12/linux-toy-tetris
|
||||
[1]: https://github.com/samtay/tetris
|
||||
[2]: https://github.com/dockerland/dex
|
||||
[3]: https://docs.haskellstack.org/en/stable/README/#how-to-install
|
||||
[4]: https://opensource.com/article/18/12/linux-toy-cal
|
||||
[4]: https://opensource.com/article/18/12/linux-toy-cal
|
@ -1,3 +1,4 @@
|
||||
Translating by robsean
|
||||
Best Websites to Download Linux Games
|
||||
======
|
||||
Brief: New to Linux gaming and wondering where to **download Linux games** from? We list the best resources from where you can **download free Linux games** as well as buy premium Linux games.
|
||||
|
@ -1,3 +1,5 @@
|
||||
ScarboroughCoral translating!
|
||||
|
||||
How to use Fedora Server to create a router / gateway
|
||||
======
|
||||
|
||||
|
@ -1,106 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04)
|
||||
[#]: via: (https://www.ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04
|
||||
======
|
||||

|
||||
|
||||
As you might already know, **Runlevels** are replaced with **Systemd targets** in many recent Linux distributions like RHEL 7 and Ubuntu 16.04 LTS. For more details about runlevels and systemd target, refer [**this guide**][1]. In this brief tutorial, we are going to see how to boot into **rescue mode** and/or **emergency mode**. This guide is tested in Ubuntu 18.04 LTS, however the steps given below would work on most Linux distributions that uses Systemd as default service manager. Before going further, let me clarify what is rescue mode and emergency mode and what is the purpose of the both modes.
|
||||
|
||||
### What is Rescue mode?
|
||||
|
||||
The **rescue mode** is equivalent to **single user mode** in Linux distributions that uses **SysV** as the default service manager. In rescue mode, all local filesystems will be mounted, only some important services will be started. However, no normal services (E.g network services) won’t be started. The rescue mode is helpful in situations where the system can’t boot normally. Also, we can perform some important rescue operations, such as [**reset root password**][2], in rescue mode.
|
||||
|
||||
### What is Emergency mode?
|
||||
|
||||
In contrast to the rescue mode, nothing is started in the **emergency mode**. No services are started, no mount points mounted, no sockets established, nothing. All you will have is just a **raw shell**. Emergency mode is suitable for debugging purposes.
|
||||
|
||||
### Boot Into Rescue Mode In Ubuntu 18.04 LTS
|
||||
|
||||
Boot your Ubuntu system. When Grub menu appears, choose the first entry and press **e** to edit.
|
||||
|
||||

|
||||
|
||||
If you don’t see the Grub menu, just hit ESC key right after the BIOS logo disappears.
|
||||
|
||||
Find the line that starts with word **“linux”** and add the following line at the end of that line (To reach the end, just press **CTRL+e** or use END key or LEFT/RIGHT arrows in your keyboard):
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||

|
||||
|
||||
Once you added the above line, just press **CTRL+x** or **F10** to continue to boot into rescue mode. After a few seconds, you will be ended up in the rescue mode (single user mode) as root user. Here is how rescue mode looks like in Ubuntu 18.04 LTS server:
|
||||
|
||||

|
||||
|
||||
Next, type the following command to mount root (/) file system into read/write mode.
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### Boot Into Emergency Mode
|
||||
|
||||
Booting your Ubuntu into emergency is as same as above method. All you have to do is replace “systemd.unit=rescue.target” with “systemd.unit=emergency.target” when editing grub menu.
|
||||
|
||||
[![emergency mode][3]][4]
|
||||
|
||||
Once you added “systemd.unit=emergency.target”, press **Ctrl+x** or **F10** to continue booting into emergency mode.
|
||||
|
||||

|
||||
|
||||
Finally, you can mount root filesystem into read/write mode with command:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### Switch between Rescue to Emergency mode and vice versa
|
||||
|
||||
If you are in rescue mode, you don’t have to edit the grub boot entry as I mentioned above. Instead, just type the following command to switch to emergency mode instantly:
|
||||
|
||||
```
|
||||
systemctl emergency
|
||||
```
|
||||
|
||||
Similarly, to switch from emergency to rescue mode, type:
|
||||
|
||||
```
|
||||
systemctl rescue
|
||||
```
|
||||
|
||||
You know now what is rescue and emergency modes and how to boot into those modes in Ubuntu 18.04. Like I already mentioned, the steps provided here will work on many recent Linux versions that uses Systemd.
|
||||
|
||||
And, that’s all for now. Hope this was useful.
|
||||
|
||||
More good stuffs to come. Stay tuned!
|
||||
|
||||
Cheers!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||
|
||||
作者:[SK][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://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/check-runlevel-linux/
|
||||
[2]: https://www.ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||
[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[4]: http://www.ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
@ -1,175 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (LazyWolfLin)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Update Ubuntu [Terminal & GUI Methods] It's FOSS)
|
||||
[#]: via: (https://itsfoss.com/update-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
Translating by LazyWolfLin
|
||||
|
||||
How to Update Ubuntu [Terminal & GUI Methods] It's FOSS
|
||||
======
|
||||
|
||||
**This tutorial shows you how to update Ubuntu for both server and desktop versions. It also explains the difference between update and upgrade along with a few other things you should know about updates in Ubuntu Linux.**
|
||||
|
||||
If you are a new user and have been using Ubuntu for a few days or weeks, you might be wondering how to update your [Ubuntu][1] system for security patches, bug fixes and application upgrades.
|
||||
|
||||
Updating Ubuntu is absolutely simple. I am not exaggerating. It’s as simple as running two commands. Let me give you more details on it.
|
||||
|
||||
Please note that the tutorial is valid for Ubuntu 18.04, 16.04 or any other version. The command line way is also valid for Ubuntu-based distributions like Linux Mint, Linux Lite, elementary OS etc.
|
||||
|
||||
### Update Ubuntu via Command Line
|
||||
|
||||
![How to Update Ubuntu][2]
|
||||
|
||||
On the desktop, open the terminal. You can find it in the menu or use the Ctrl+Alt+T [keyboard shortcut][3]. If you are logged on to an [Ubuntu server][4], you already have access to a terminal.
|
||||
|
||||
In the terminal, you just have to use the following command:
|
||||
|
||||
```
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
```
|
||||
|
||||
It will ask for password and you can use your account’s password. You won’t see the anything on the screen while typing so keep on typing your password and hit enter.
|
||||
|
||||
Now let me explain the above command.
|
||||
|
||||
Actually, it’s not a single command. It’s a combination of two commands. The && is a way to combine two commands in a way that the second command runs only when the previous command ran successfully.
|
||||
|
||||
The ‘-y’ in the end automatically enters yes when the command ‘apt upgrade’ ask for your confirmation before installing the updates.
|
||||
|
||||
Note that you can also use the two commands separately, one by one:
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
It will take a little longer because you have to wait for one command to finish and then enter the second command.
|
||||
|
||||
#### Explanation: sudo apt update
|
||||
|
||||
This command updates the local database of available packages. If you won’t run this command, the local database won’t be updated and your system will not know if there are any new versions available.
|
||||
|
||||
This is why when you run the sudo apt update, you’ll see lots of URLs in the output. The command fetches the package information from the respective repositories (the URLs you see in the output).
|
||||
|
||||
![Updating Ubuntu Linux][5]
|
||||
|
||||
At the end of the command, it tells you how many packages can be upgraded. You can see these packages by running the following command:
|
||||
|
||||
```
|
||||
apt list --upgradable
|
||||
```
|
||||
|
||||
**Additional Reading:** Read this article to learn [what is Ign, Hit and Get in the apt update command output][6].
|
||||
|
||||
#### Explanation: sudo apt upgrade
|
||||
|
||||
This command matches the versions of installed packages with the local database. It collects all of them and then it will list all of the packages that have a newer version available. At this point, it will ask if you want to upgrade (the installed packages to the newer version).
|
||||
|
||||
![Update Ubuntu Linux via Command Line][7]
|
||||
|
||||
You can type ‘yes’, ‘y’ or just press enter to confirm the installation of updates.
|
||||
|
||||
So the bottom line is that the sudo apt update checks for the availability of new versions while as the sudo apt upgrade actually performs the update.
|
||||
|
||||
The term update might be confusing as you might expect the apt update command to update the system by installing the updates but that doesn’t happen.
|
||||
|
||||
### Update Ubuntu via GUI [For Desktop Users]
|
||||
|
||||
If you are using Ubuntu as a desktop, you don’t have to go to terminal just for updating the system. You can still use the command line but it’s optional for you.
|
||||
|
||||
In the menu, look for ‘Software Updater’ and run it.
|
||||
|
||||
![Run Software Updater in Ubuntu][8]
|
||||
|
||||
It will check if there are updates available for your system.
|
||||
|
||||
![Checking if updates are available for Ubuntu][9]
|
||||
|
||||
If there are updates available, it will give provide you with options to install the updates.
|
||||
|
||||
![Install Updates via Update Manager in Ubuntu][10]
|
||||
|
||||
Click on Install Now, it may ask for your password.
|
||||
|
||||
![Installing Updates in Ubuntu Linux via GUI][11]
|
||||
|
||||
Once you enter your password, it will start installing the updates.
|
||||
|
||||
![Updating Ubuntu via GUI][12]
|
||||
|
||||
In some cases, you may need to reboot the system for the installed updates to work properly. You’ll be notified at the end of the update if you need to restart the system.
|
||||
|
||||
![Updating Ubuntu via GUI][12]
|
||||
|
||||
You can choose to restart later if you don’t want to reboot your system straightaway.
|
||||
|
||||
![Installing updates via GUI in Ubuntu][13]
|
||||
|
||||
Tip: If the software updater returns an error, you should use the command ‘sudo apt update’ in the terminal. The last few lines of the output will contain the actual error message. You can search on the internet for that error and fix the problem.
|
||||
|
||||
### Few things to keep in mind abou updating Ubuntu
|
||||
|
||||
You just learned how to update your Ubuntu system. If you are interested, you should also know these few things around Ubuntu updates.
|
||||
|
||||
#### Clean up after an update
|
||||
|
||||
Your system will have some unnecessary packages that won’t be required after the updates. You can remove such packages and [free up some space][14] using this command:
|
||||
|
||||
```
|
||||
sudo apt autoremove
|
||||
```
|
||||
|
||||
#### Live patching kernel in Ubuntu Server to avoid rebooting
|
||||
|
||||
In case of a Linux kernel updates, you’ll have to restart the system after the update. This is an issue when you don’t want downtime for your server.
|
||||
|
||||
[Live patching][15] feature allows the patching of Linux kernel while the kernel is still running. In other words, you don’t have to reboot your system.
|
||||
|
||||
If you manage servers, you may want to [enable live patching in Ubuntu][16].
|
||||
|
||||
#### Version upgrades are different
|
||||
|
||||
The updates discussed here is to keep your Ubuntu install fresh and updated. It doesn’t cover the [version upgrades][17] (for example upgrading Ubuntu 16.04 to 18.04).
|
||||
|
||||
[Ubuntu version][18] upgrades are entirely a different thing. It updates the entire operating system core. You need to make proper backups before starting this lengthy process.
|
||||
|
||||
### Conclusion
|
||||
|
||||
I hope you liked this tutorial on updating the Ubuntu system and you learned a few new things.
|
||||
|
||||
If you have any questions, please fee free to ask. If you are an experienced Linux users and have some tip that can make this tutorial more useful, please share it with the rest of us.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/update-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ubuntu.com/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/how-to-update-ubuntu.png?resize=800%2C450&ssl=1
|
||||
[3]: https://itsfoss.com/ubuntu-shortcuts/
|
||||
[4]: https://www.ubuntu.com/download/server
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubunt-1.jpeg?resize=800%2C357&ssl=1
|
||||
[6]: https://itsfoss.com/apt-get-linux-guide/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubunt-2.jpeg?ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubuntu-via-GUI-1.jpeg?resize=800%2C250&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubuntu-via-GUI-2.jpeg?resize=800%2C250&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubuntu-GUI-3.jpeg?resize=800%2C365&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/install-update-ubuntu-1.jpg?resize=800%2C450&ssl=1
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/installing-updates-ubuntu.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/installing-updates-ubuntu-2.jpeg?ssl=1
|
||||
[14]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||
[15]: https://www.ubuntu.com/livepatch
|
||||
[16]: https://www.cyberciti.biz/faq/howto-live-patch-ubuntu-linux-server-kernel-without-rebooting/
|
||||
[17]: https://itsfoss.com/upgrade-ubuntu-version/
|
||||
[18]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
@ -1,59 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (zhs852)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Relax by the fire at your Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-aafire)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
zhs852 is translating.
|
||||
|
||||
Relax by the fire at your Linux terminal
|
||||
======
|
||||
Chestnuts roasting on an open command prompt? Why not, with this fun Linux toy.
|
||||
|
||||

|
||||
|
||||
Welcome back. Here we are, just past the halfway mark at day 13 of our 24 days of Linux command-line toys. If this is your first visit to the series, see the link to the previous article at the bottom of this one, and take a look back to learn what it's all about. In short, our command-line toys are anything that's a fun diversion at the terminal.
|
||||
|
||||
Maybe some are familiar, and some aren't. Either way, we hope you have fun.
|
||||
|
||||
If you're in the northern hemisphere outside of the tropics, perhaps winter is starting to rear its frigid face outside. At least it is where I live. And some I'd love nothing more than to curl up by the fire with a cup of tea and my favorite book (or a digital equivalent).
|
||||
|
||||
The bad news is my house lacks a fireplace. The good news is that I can still pretend, thanks to the Linux terminal and today's command-line toy, **aafire**.
|
||||
|
||||
On my system, I found **aafire** packed with **aalib** , a delightful library for converting visual images into the style of ASCII art and making it available at your terminal (or elsewhere). **aalib** enables all sorts of fun graphics at the Linux terminal, so we may revisit a toy or two that make use of it before the end of our series. On Fedora, this meant installation was as simple as:
|
||||
|
||||
```
|
||||
$ sudo dnf install aalib
|
||||
```
|
||||
|
||||
Then, it was simple to launch with the **aafire** command. By default, **aalib** attempted to draw to my GUI, so I had to manually override it to keep my fire in the terminal (this is a command-line series, after all). Fortunately, it comes with a [curses][1] driver, so this meant I just had to run the following to get my fire going:
|
||||
|
||||
```
|
||||
$ aafire -driver curses
|
||||
```
|
||||

|
||||
You can find out more about the **aa-lib** library and download the source on [Sourceforge][2], under an LGPLv2 license.
|
||||
|
||||
Do you have a favorite command-line toy that you think I ought to include? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end.
|
||||
|
||||
Check out yesterday's toy, [Patch into The Matrix at the Linux command line][3] , and check back tomorrow for another!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/linux-toy-aafire
|
||||
|
||||
作者:[Jason Baker][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/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Curses_(programming_library)
|
||||
[2]: http://aa-project.sourceforge.net/aalib/
|
||||
[3]: https://opensource.com/article/18/12/linux-toy-cmatrix
|
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -0,0 +1,106 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 18.04)
|
||||
[#]: via: (https://www.ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/)
|
||||
[#]: author: (SK https://www.ostechnix.com/author/sk/)
|
||||
|
||||
如何在 Ubuntu 18.04 中启动到救援模式或紧急模式
|
||||
======
|
||||

|
||||
|
||||
正如你可能已经知道的那样,**runlevel** 在许多最近的 Linux 发行版(如 RHEL 7 和 Ubuntu 16.04 LTS)中被 **systemd target** 替换。有关 runlevel 和 systemd target 的更多详细信息,请参阅[**本指南**][1]。在这个简短的教程中,我们将看到如何启动**救援模式**以及**紧急模式**。本指南在 Ubuntu 18.04 LTS 中进行了测试,但是下面给出的步骤适用于大多数使用 systemd 作为默认服务管理器的 Linux 发行版。在进一步讨论之前,让我澄清什么是救援模式和紧急模式以及这两种模式的目的是什么。
|
||||
|
||||
### 什么是救援模式?
|
||||
|
||||
**救援模式**相当于使用 **SysV** 作为默认服务管理器的 Linux 发行版中的 **单用户模式**。在救援模式下,将挂载所有本地文件系统,仅启动一些重要服务。但是,不会启动正常服务(例如网络服务)。救援模式在系统无法正常启动的情况下很有用。此外,我们可以在救援模式下执行一些重要的救援操作,例如[**重置 root 密码**][2]。
|
||||
|
||||
### 什么是紧急模式?
|
||||
|
||||
与救援模式相比,在**紧急模式**中不启动任何东西。没有服务启动、没有挂载点、没有建立套接字,什么也没有。你所拥有的只是一个**原始的 shell**。紧急模式适用于调试目的。
|
||||
|
||||
### 在 Ubuntu 18.04 LTS 中进入救援模式
|
||||
|
||||
启动你的 Ubuntu 系统。出现 Grub 菜单时,选择第一条并按下 **e** 进行编辑。
|
||||
|
||||

|
||||
|
||||
如果你没有看到 Grub 菜单,只需在 BIOS logo 消失后立即按下 ESC 键。
|
||||
|
||||
找到以单词 **“linux”** 开头的行,并在该行的末尾添加以下行(要到达末尾,只需按下 **CTRL+e** 或使用 END 键或左右箭头键):
|
||||
|
||||
```
|
||||
systemd.unit=rescue.target
|
||||
```
|
||||
|
||||

|
||||
|
||||
添加完成后,只需按下 **CTRL+x** 或 **F10** 即可继续启动救援模式。几秒钟后,你将以 root 用户身份进入救援模式(单用户模式)。以下是 Ubuntu 18.04 LTS 服务器版中救援模式的样子:
|
||||
|
||||

|
||||
|
||||
接下来,输入以下命令将根 (/) 文件系统挂载成读/写模式。
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 启动到紧急模式
|
||||
|
||||
将 Ubuntu 引导到紧急模式与上述方法相同。你只需在编辑 grub 菜单时将 “systemd.unit=rescue.target” 替换为 “systemd.unit=emergency.target” 即可。
|
||||
|
||||
[![emergency mode][3]][4]
|
||||
|
||||
添加 “systemd.unit=emergency.target” 后,按下 **Ctrl+x** 或 **F10** 继续启动到紧急模式。
|
||||
|
||||

|
||||
|
||||
最后,你可以使用以下命令将根文件系统挂载成读/写模式:
|
||||
|
||||
```
|
||||
mount -n -o remount,rw /
|
||||
```
|
||||
|
||||
### 在救援模式和紧急模式之间切换
|
||||
|
||||
如果你处于救援模式,则不必像上面提到的那样编辑 grub 条目。相反,只需输入以下命令即可立即切换到紧急模式:
|
||||
|
||||
```
|
||||
systemctl emergency
|
||||
```
|
||||
|
||||
同样,要从紧急模式切换到救援模式,请输入:
|
||||
|
||||
```
|
||||
systemctl rescue
|
||||
```
|
||||
|
||||
你现在知道了什么是救援模式和紧急模式以及如何在 Ubuntu 18.04 中启动这些模式。就像我已经提到的,这里提供的步骤将适用于许多使用 systemd 的 Linux 版本。
|
||||
|
||||
就是这些了。希望这篇文章有用。
|
||||
|
||||
还有更多好东西。敬请期待!
|
||||
|
||||
干杯!
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/
|
||||
|
||||
作者:[SK][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.ostechnix.com/author/sk/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ostechnix.com/check-runlevel-linux/
|
||||
[2]: https://www.ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/
|
||||
[3]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
|
||||
[4]: http://www.ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png
|
@ -0,0 +1,174 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (LazyWolfLin)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How to Update Ubuntu [Terminal & GUI Methods] It's FOSS)
|
||||
[#]: via: (https://itsfoss.com/update-ubuntu/)
|
||||
[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/)
|
||||
|
||||
如何更新 Ubuntu [终端及GUI方式] It's FOSS
|
||||
======
|
||||
|
||||
**这篇教程将向你展示如何更新服务器版本或者桌面版本的 Ubuntu。它还解释了更新和升级之间的区别以及你应该了解的有关于 Ubuntu Linux 中的更新的一些其他内容。**
|
||||
|
||||
如果你是一个新手并已经体验 Ubuntu 数天或几周,你可能想知道如何更新你的 [Ubuntu][1] 系统以获取安全补丁,错误修复和应用升级。
|
||||
|
||||
更新 Ubuntu 非常简单。我并不是瞎说。它简单得只要运行两个命令。让我来告诉你这两个命令的更多细节。
|
||||
|
||||
请注意,本教程适用于 Ubuntu 18.04,16.04 或任何其他版本。命令行方式也适用于基于 Ubuntu 的发行版如 Linux Mint,Linux Lite,elementary OS 等。
|
||||
|
||||
### 通过命令行更新 Ubuntu
|
||||
|
||||
![如何更新 Ubuntu][2]
|
||||
|
||||
在桌面上,打开终端。你可以在菜单里找到它或者使用 Ctrl+Alt+T [快捷键][3]。如果你是登陆到一台 [Ubuntu 服务器][4],那你已经在访问一个终端了。
|
||||
|
||||
在终端里,你只需要使用以下命令:
|
||||
|
||||
```
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
```
|
||||
|
||||
它将询问密码,而你可以使用你的账号密码。输入时,你将不会看到任何内容在屏幕上,所以请继续输入你的密码并按回车键。
|
||||
|
||||
现在,我来解释下上面的命令。
|
||||
|
||||
事实上,这不是一条命令。它由两条命令组成。符号 `&&` 是合并两条命令的一个方法,第二条命令仅在前一条命令执行成功时执行。
|
||||
|
||||
当命令 `apt upgrade` 要求你在安装更新前确认时,末尾的参数 `-y` 会自动输入 yes。
|
||||
|
||||
请注意,你也可以逐条使用这两条命令:
|
||||
|
||||
```
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
|
||||
这将花费更长的时间,因为你必须等待第一条命令执行完成后才能输入第二条命令。
|
||||
|
||||
#### 说明:sudo apt update
|
||||
|
||||
这条命令更新了可用软件包的本地数据库。如果你没运行这条命令,本地数据库将不会被更新,而你的系统将不会知道是否有可用的新版本。
|
||||
|
||||
这就是为什么当你运行 `sudo apt update`,你会在输出中看到大量的 URLs。这条命令会从对应的储存库(你在输出中看到的 URLs)中获取软件包信息。
|
||||
|
||||
![更新 Ubuntu Linux][5]
|
||||
|
||||
在命令的末尾,它告诉你有多少个软件包可以被更新。你可以使用下列命令查看这些软件包:
|
||||
|
||||
```
|
||||
apt list --upgradable
|
||||
```
|
||||
|
||||
**补充阅读:** 阅读这篇文章了解[命令 `apt update` 的输出中的 Ign,Hit 和 Get 是什么][6]。
|
||||
|
||||
#### 说明:sudo apt upgrade
|
||||
|
||||
这条命令将已安装的软件包版本与本地数据库进行匹配。它收集全部信息,然后列出所有具有更新版本的软件包。此时,它会询问您是否要升级(已安装的软件包更新到新版本)。
|
||||
|
||||
![通过命令行更新 Ubuntu Linux][7]
|
||||
|
||||
你可以键入 `yes`,`y` 或者只敲回车键去确认安装这些更新。
|
||||
|
||||
所以总的来说,`sudo apt update` 会检查可用的新版本,而 `sudo apt upgrade` 实际上会执行更新。
|
||||
|
||||
命令 `update` 可能会令人困惑,因为你可能期望通过命令 `apt update` 安装更新来更新系统,但这并不会发生。
|
||||
|
||||
### 通过 GUI 更新 Ubuntu[适用于桌面用户]
|
||||
|
||||
如果你使用桌面版 Ubuntu,你并不需要为了更新系统而打开终端。你可以仍可以使用命令行更新,但这只是一个选择。
|
||||
|
||||
在菜单力,找到 `Software Updater` 并运行它。
|
||||
|
||||
![在 Ubuntu 中运行 Software Updater][8]
|
||||
|
||||
它将检查你的系统是否有可用的更新。
|
||||
|
||||
![检查 Ubuntu 是否有可用更新][9]
|
||||
|
||||
如果有可用的更新,它将给你提供安装更新的选择。
|
||||
|
||||
![在 Ubuntu 中通过更新管理器安装更新][10]
|
||||
|
||||
现在,点击 `Install`,它可能会向你询问密码。
|
||||
|
||||
![通过 GUI 在 Ubuntu Linux 中安装更新][11]
|
||||
|
||||
一旦你输入你的密码,它将开始安装更新。
|
||||
|
||||
![通过 GUI 更新 Ubuntu][12]
|
||||
|
||||
在某些情况下,你可能需要重启系统才能使已安装的更新正常工作。如果需要重启系统,你将在更新结束时收到通知。
|
||||
|
||||
![通过 GUI 更新 Ubuntu][12]
|
||||
|
||||
如果你不希望马上重启你的系统,可以选择稍后重启。
|
||||
|
||||
![通过 GUI 在 Ubuntu 中安装更新][13]
|
||||
|
||||
提示:如果 `software updater` 返回一个错误,你需要在终端是使用命令 `sudo apt update`。输出的最后几行将包含真正的错误信息。你可以在因特网上搜索该错误并解决问题。
|
||||
|
||||
### 更新 Ubuntu 时要记住几件事
|
||||
|
||||
你刚学习了如何更新你的 Ubuntu 系统。如果你感兴趣,你还需要了解一些关于 Ubuntu 更新的内容。
|
||||
|
||||
#### 更新后清理
|
||||
|
||||
你的系统将会有一些更新后不再需要的软件包。你可用使用这条命令删除这些软件包并[释放空间][14]:
|
||||
|
||||
```
|
||||
sudo apt autoremove
|
||||
```
|
||||
|
||||
#### 在 Ubuntu Server 中内核热修复以避免重启
|
||||
|
||||
如果是 Linux 内核更新,你将需要在系统更新后重启。当你不希望服务器停机时,这将会是一个问题。
|
||||
|
||||
[热修复][15]功能允许Linux内核在持续运行时打补丁。换句话说就是你不需要重启你的系统。
|
||||
|
||||
如果你在管理服务器,你可能需要[在 Ubuntu 中启用热修复][16]。
|
||||
|
||||
#### 版本升级是不同的
|
||||
|
||||
本文讨论的更新是使你安装的 Ubuntu 保持最新。但它不包括[版本升级][17](例如从 Ubuntu 16.04 升级到 18.04)。
|
||||
|
||||
[Ubuntu 版本][18] 升级完全是另一回事。它更新整个操作系统核心。你需要在这个漫长的过程开始前做好备份。
|
||||
|
||||
### 总结
|
||||
|
||||
我希望你喜欢这个关于 Ubuntu 系统更新的教程并学到一些新东西。
|
||||
|
||||
如果你有其他问题,请随时提出。如果你是一位经验丰富的 Linux 用户并且有些更好的技巧,请同我们分享。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/update-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[LazyWolfLin](https://github.com/LazyWolfLin)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.ubuntu.com/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2018/12/how-to-update-ubuntu.png?resize=800%2C450&ssl=1
|
||||
[3]: https://itsfoss.com/ubuntu-shortcuts/
|
||||
[4]: https://www.ubuntu.com/download/server
|
||||
[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubunt-1.jpeg?resize=800%2C357&ssl=1
|
||||
[6]: https://itsfoss.com/apt-get-linux-guide/
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubunt-2.jpeg?ssl=1
|
||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubuntu-via-GUI-1.jpeg?resize=800%2C250&ssl=1
|
||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubuntu-via-GUI-2.jpeg?resize=800%2C250&ssl=1
|
||||
[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/update-ubuntu-GUI-3.jpeg?resize=800%2C365&ssl=1
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/install-update-ubuntu-1.jpg?resize=800%2C450&ssl=1
|
||||
[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/12/installing-updates-ubuntu.jpg?ssl=1
|
||||
[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/installing-updates-ubuntu-2.jpeg?ssl=1
|
||||
[14]: https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||
[15]: https://www.ubuntu.com/livepatch
|
||||
[16]: https://www.cyberciti.biz/faq/howto-live-patch-ubuntu-linux-server-kernel-without-rebooting/
|
||||
[17]: https://itsfoss.com/upgrade-ubuntu-version/
|
||||
[18]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
@ -0,0 +1,59 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (zhs852)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (Relax by the fire at your Linux terminal)
|
||||
[#]: via: (https://opensource.com/article/18/12/linux-toy-aafire)
|
||||
[#]: author: (Jason Baker https://opensource.com/users/jason-baker)
|
||||
|
||||
在 Linux 终端中观看火焰
|
||||
======
|
||||
何不在命令行中进行一次“烧烤”呢?
|
||||
|
||||

|
||||
|
||||
这里是《24 天了解 Linux 命令行小玩意》。如果你未曾读过本系列的文章,可以在本文的结尾部分获取上一篇文章的链接,以了解本系列的大概内容。我们所介绍的命令行小玩意可供你消遣无聊时光。
|
||||
|
||||
你或许知道它们其中的一些,也可能不曾知晓它们。无论如何,我们都希望你能度过一段愉快的时光。
|
||||
|
||||
如果你住在北半球的非热带地区,可能冬季来临时你会被冻得满脸通红。住在这里的我,最喜欢的事情便是在火炉旁惬意地边喝茶边读书。
|
||||
|
||||
不幸的是,我家刚好缺个放火炉的地方。不过,多亏了今天我要介绍的 **aafire** ,我仍然可以假装我坐在火炉旁。
|
||||
|
||||
在我所使用的系统里, **aafire** 被打包进了 **aalib** 。 **aalib** 是一个受人喜爱的库,它可以很方便地将图像转换成 ASCII 图并输出到终端(或其它任何地方)。 **aalib** 将多种多样的图像带入了 Linux 终端。你可以看看本系列的其它文章,了解一下其它小程序,以便配合使用并充分利用它们。在 Fedora 中,你可以通过以下命令来安装 **aalib** :
|
||||
|
||||
```
|
||||
$ sudo dnf install aalib
|
||||
```
|
||||
|
||||
接着,试着运行 **aafire** 命令。 **aalib** 默认会使用 GUI 模式,我们要进行一些操作来让它在终端中运行(毕竟这一系列文章都讲的是命令行)。十分幸运的是,仅需安装 [curses][1] 就能实现我们想要的效果。请执行:
|
||||
|
||||
```
|
||||
$ aafire -driver curses
|
||||
```
|
||||
|
||||

|
||||
|
||||
如果你觉得 **aa-lib** 挺有意思,可以在 [Sourceforge][2] 上找到它的源码(以 LGPLv2 许可证开源)。
|
||||
|
||||
欢迎将你觉得有意思的命令行小程序投稿到原作者处,只需在原文下留言即可。
|
||||
|
||||
如果有兴趣,可以查看原作者的上一篇文章: [Patch into The Matrix at the Linux command line][3] 。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/18/12/linux-toy-aafire
|
||||
|
||||
作者:[Jason Baker][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[zhs852](https://github.com/zhs852)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/jason-baker
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://en.wikipedia.org/wiki/Curses_(programming_library)
|
||||
[2]: http://aa-project.sourceforge.net/aalib/
|
||||
[3]: https://opensource.com/article/18/12/linux-toy-cmatrix
|
@ -1,22 +1,22 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (qhwdw)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: reviewer: ()
|
||||
[#]: publisher: ()
|
||||
[#]: url: ()
|
||||
[#]: subject: (How to Build a Netboot Server, Part 3)
|
||||
[#]: via: (https://fedoramagazine.org/how-to-build-a-netboot-server-part-3/)
|
||||
[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/)
|
||||
|
||||
How to Build a Netboot Server, Part 3
|
||||
如何构建一台网络引导服务器(第三部分)
|
||||
======
|
||||
|
||||

|
||||
|
||||
The [How to Build a Netboot Server, Part 1][1] article provided a minimal [iPXE][2] boot script for your netboot image. Many users probably have a local operating system that they want to use in addition to the netboot image. But switching bootloaders using the typical workstation’s BIOS can be cumbersome. This part of the series shows how to set up some more complex iPXE configurations. These allow the end user to easily choose which operating system they want to boot. They also let the system administrator manage the boot menus from a central server.
|
||||
在 [如何构建一台网络引导服务器(第一部分)][1] 的文章中,我们提供了一个极简的 [iPXE][2] 引导脚本来引导你的网络引导镜像。许多用户除了使用网络引导镜像外,可能在机器本地也有一个操作系统。但是使用常见的工作站的 BIOS 去切换引导加载器是很笨拙的。在本系列文件的第三部分,我们将向你展示如何设置一个更复杂的 iPXE 配置。它将允许终端用户以更容易的方式去选择引导哪个操作系统。它也可以配置为让系统管理员从一台中央服务器来统一管理引导菜单。
|
||||
|
||||
### An interactive iPXE boot menu
|
||||
### 一个交互式 iPXE 引导菜单
|
||||
|
||||
The commands below redefine the netboot image’s boot.cfg as an interactive iPXE boot menu with a 5 second countdown timer:
|
||||
下面这些命令重定义了网络引导镜像的 boot.cfg 来作为一个交互式的 iPXE 引导菜单,并使用了一个 5 秒倒计时的定时器:
|
||||
|
||||
```
|
||||
$ MY_FVER=29
|
||||
@ -59,32 +59,33 @@ boot || goto failed
|
||||
END
|
||||
```
|
||||
|
||||
The above menu has five sections:
|
||||
上述菜单有五个节:
|
||||
|
||||
* **menu** defines the actual menu that will be shown on the screen.
|
||||
* **failed** notifies the user that something went wrong and drops the user to a shell so they can troubleshot the problem.
|
||||
* **shell** provides an interactive command prompt. You can reach it either by pressing the **Esc** key while at the boot menu or if the “boot” command returns with a failure code.
|
||||
* **lcl** contains a single command that tells iPXE to exit and return control back to the BIOS. Whatever you want to boot by default (e.g. the workstation’s local hard drive) **must** be listed as the next boot item right after iPXE in your workstation’s BIOS.
|
||||
* **f29** contains the same netboot code used earlier but with the final exit replaced with goto failed.
|
||||
* **menu** 定义了显示在屏幕上的实际菜单内容。
|
||||
* **failed** 提示用户发生了错误,并将用户带到 shell 以错误错误。
|
||||
* **shell** 提供了交互式命令提示符。你可以在引导菜单出现时按下 **Esc** 键进入,或者是
|
||||
“boot” 命令失败时也会进入到命令提示符。
|
||||
* **lcl** 包含一个提供给 iPXE 退出的简单命令,以及返还控制权给 BIOS。在 iPXE 之后,无论你希望缺省引导的设备(即:工作站的本地硬件)是什么,都必须在你的工作站的 BIOS 中正确地作为下一个引导设备列出来。
|
||||
* **f29** 包含前面文章提到同一个网络引导代码,但使用最终的退出代码来替换掉 goto failed。
|
||||
|
||||
|
||||
|
||||
Copy the updated boot.cfg from your $HOME/esp/linux directory out to the ESPs of all your client systems. If all goes well, you should see results similar to the image below:
|
||||
从你的 `$HOME/esp/linux` 目录中复制更新后的 boot.cfg 到所有客户端系统的 ESP 中。如果一切顺利,你应该会看到类似下面图片的结果:
|
||||
|
||||
![][3]
|
||||
|
||||
### A server hosted boot menu
|
||||
### 一个服务器托管的引导菜单
|
||||
|
||||
Another feature you can add to the netboot server is the ability to manage all the client boot menus from one central location. This feature can be especially useful when rolling out a new version of the OS. It lets you perform a sort of [atomic transaction][4] to switch all clients over to the new OS after you’ve copied the new kernel and initramfs out to the ESPs of all the clients.
|
||||
你可以添加到网络引导服务器的另一个特性是,能够从一台中央位置去管理所有客户端的引导菜单。这个特性尤其适用于批量安装(升级)一个新版本的操作系统。在你将新内核和新的 initramfs 复制到所有客户端的 ESP 之后,这个特性可以让你执行一种 [原子事务][4] 去切换所有客户端到新操作系统。
|
||||
|
||||
Install Mojolicious:
|
||||
安装 Mojolicious:
|
||||
|
||||
```
|
||||
$ sudo -i
|
||||
# dnf install -y perl-Mojolicious
|
||||
```
|
||||
|
||||
Define the “bootmenu” app:
|
||||
定义 “bootmenu” 应用程序:
|
||||
|
||||
```
|
||||
# mkdir /opt/bootmenu
|
||||
@ -102,7 +103,7 @@ END
|
||||
# chmod 755 /opt/bootmenu/bootmenu.pl
|
||||
```
|
||||
|
||||
Define the configuration file for the bootmenu app:
|
||||
为 “bootmenu” 应用程序定义配置文件:
|
||||
|
||||
```
|
||||
# cat << END > /opt/bootmenu/bootmenu.conf
|
||||
@ -115,16 +116,16 @@ Define the configuration file for the bootmenu app:
|
||||
END
|
||||
```
|
||||
|
||||
This is an extremely simple Mojolicious application that listens on port 80 and only answers to /menu requests. If you want a quick introduction to what Mojolicious can do, run man Mojolicious::Guides::Growing to view the manual. Use the **Q** key to quit the manual.
|
||||
这是一个非常简单的 Mojolicious 应用程序,它监听 80 端口,并且只回复到 /menu 的请求。如果你想快速了解 Mojolicious 能做什么,运行 `man Mojolicious::Guides::Growing` 去查看手册。按 **Q** 键退出手册。
|
||||
|
||||
Move boot.cfg over to our netboot app as a template named menu.html.ep:
|
||||
将 boot.cfg 移到我们的网络引导应用程序中作为一个名为 menu.html.ep 的模板:
|
||||
|
||||
```
|
||||
# mkdir /opt/bootmenu/templates
|
||||
# mv $HOME/esp/linux/boot.cfg /opt/bootmenu/templates/menu.html.ep
|
||||
```
|
||||
|
||||
Define a systemd service to manage the bootmenu app:
|
||||
定义一个 systemd 服务去管理引导菜单应用程序:
|
||||
|
||||
```
|
||||
# cat << END > /etc/systemd/system/bootmenu.service
|
||||
@ -147,7 +148,7 @@ WantedBy=multi-user.target
|
||||
END
|
||||
```
|
||||
|
||||
Add an exception for the HTTP service to the local firewall and start the bootmenu service:
|
||||
在本地防火墙中为 HTTP 服务添加一个例外规则,并启动 bootmenu 服务:
|
||||
|
||||
```
|
||||
# firewall-cmd --add-service http
|
||||
@ -156,7 +157,7 @@ Add an exception for the HTTP service to the local firewall and start the bootme
|
||||
# systemctl start bootmenu.service
|
||||
```
|
||||
|
||||
Test it with wget:
|
||||
用 wget 测试它:
|
||||
|
||||
```
|
||||
$ sudo dnf install -y wget
|
||||
@ -164,7 +165,7 @@ $ MY_BOOTMENU_SERVER=server-01.example.edu
|
||||
$ wget -q -O - http://$MY_BOOTMENU_SERVER/menu
|
||||
```
|
||||
|
||||
The above command should output something similar to the following:
|
||||
以上的命令应该会输出类似下面的内容:
|
||||
|
||||
```
|
||||
#!ipxe
|
||||
@ -198,9 +199,9 @@ initrd --name initrd.img ${prefix}/initramfs-4.19.4-300.fc29.x86_64.img
|
||||
boot || goto failed
|
||||
```
|
||||
|
||||
Now that the boot menu server is working, rebuild the ipxe.efi bootloader with an init script that points to it.
|
||||
现在,引导菜单服务器已经正常工作了,重新构建 ipxe.efi 引导加载器,使用一个 init 脚本指向它。
|
||||
|
||||
First, update the init.ipxe script created in part one of this series:
|
||||
第一步,先更新我们在本系列文章的第一部分中创建的 init.ipxe 脚本:
|
||||
|
||||
```
|
||||
$ MY_BOOTMENU_SERVER=server-01.example.edu
|
||||
@ -213,7 +214,7 @@ chain http://$MY_BOOTMENU_SERVER/menu || exit
|
||||
END
|
||||
```
|
||||
|
||||
Now, rebuild the boot loader:
|
||||
现在,重新构建引导加载器:
|
||||
|
||||
```
|
||||
$ cd $HOME/ipxe/src
|
||||
@ -221,23 +222,23 @@ $ make clean
|
||||
$ make bin-x86_64-efi/ipxe.efi EMBED=../init.ipxe
|
||||
```
|
||||
|
||||
Copy the updated bootloader to your ESP:
|
||||
将更新后的引导加载器复制到你的 ESP 中:
|
||||
|
||||
```
|
||||
$ cp $HOME/ipxe/src/bin-x86_64-efi/ipxe.efi $HOME/esp/efi/boot/bootx64.efi
|
||||
```
|
||||
|
||||
After you’ve copied the updated bootloader to all your clients, you can make future updates to the boot menu simply by editing /opt/bootmenu/templates/menu.html.ep and running:
|
||||
将更新后的引导加载器复制到所有的客户端中之后,以后更新引导菜单只需要简单地编辑 `/opt/bootmenu/templates/menu.html.ep` 文件,然后再运行如下命令:
|
||||
|
||||
```
|
||||
$ sudo systemctl restart bootmenu.service
|
||||
```
|
||||
|
||||
### Making further changes
|
||||
### 做一步的改变
|
||||
|
||||
If the boot menu server is working properly, you’ll longer need the the boot.cfg file on your client systems.
|
||||
如果引导菜单服务器工作正常,在你的客户端系统上的 boot.cfg 文件将更长。
|
||||
|
||||
For example, re-add the Fedora 28 image to the boot menu:
|
||||
比如,重新添加 Fedora 28 镜像到引导菜单中:
|
||||
|
||||
```
|
||||
$ sudo -i
|
||||
@ -259,18 +260,17 @@ END
|
||||
# systemctl restart bootmenu.service
|
||||
```
|
||||
|
||||
If all goes well, your clients should see results similar to the image below the next time they boot:
|
||||
如果一切顺利,你的客户端下次引导时,应该看到如下图所示的结果:
|
||||
|
||||
![][5]
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://fedoramagazine.org/how-to-build-a-netboot-server-part-3/
|
||||
|
||||
作者:[Gregory Bartholomew][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[qhwdw](https://github.com/qhwdw)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user