mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
commit
c7d734b759
@ -3,49 +3,52 @@
|
||||
[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "zz-air"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13765-1.html"
|
||||
|
||||
了解团队隐含价值观和需求的指南
|
||||
======
|
||||
为了增强团队动力,开放的领导可以研究指导成员行为和决策的隐性社会规范。
|
||||
![Working meetings can be effective meetings][1]
|
||||
|
||||
文化在[开放的组织][2]很重要。 但“文化”似乎是一个如此庞大而复杂的概念。我们该如何帮助开放式的团队组织去理解它呢?
|
||||
> 为了增强团队动力,开放式领导可以研究指导成员行为和决策的隐性社会规范。
|
||||
|
||||
一个解决方案可能来自于 [_Rule Makers, Rule Breakers_][4]_的作者 [Michele J. Gelfand][3]:紧密和松散的文化以及指导我们生活的秘密信号_。Gelfand 把所有的国家和文化分成简单的两类, 一类是“紧密的”文化另一类是“松散的”。然后,她解释了两者的特点和社会规范,提供了它们的相对优势和劣势。通过研究两者,我们可以克服团队、组织和国家之间的分歧和冲突。
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/08/142831uj5zz2shqr1pybr2.jpg)
|
||||
|
||||
In this two-part review of _Rule Makers, Rule Breakers_, 我将解释 Gelfand 的论点,并讨论它对在开放性组织中工作的人们有用的方式。
|
||||
文化在 [开放式组织][2] 很重要。但“文化”似乎是一个如此庞大而复杂的概念。我们该如何帮助开放式组织去理解它呢?
|
||||
|
||||
一个解决方案可能来自于《[Rule Makers, Rule Breakers][4]》的作者 [Michele J. Gelfand][3]:紧密和松散的文化以及指导我们生活的秘密信号。Gelfand 把所有的国家和文化分成简单的两类:一类是“紧密的”文化,另一类是“松散的”。然后,她解释了两者的特点和社会规范,提供了它们的相对优势和劣势。通过研究两者,我们可以克服团队、组织和国家之间的分歧和冲突。
|
||||
|
||||
在这个分为两篇的《Rule Makers, Rule Breakers》的点评中, 我将解释 Gelfand 的论点,并讨论它对在开放性组织中工作的人们有用的方式。
|
||||
|
||||
### 了解你的社会规范
|
||||
|
||||
Gelfand 认为,我们的行为很大程度上取决于我们是生活在 "紧密的" 还是 "松散的" 社区文化中,因为这些文化有不同于其他文化的社会规范。这些规范————以及强制执行的严格程度————将决定我们在社会中的行为。 它们给了我们身份。它们帮助我们彼此协调,简而言之,这些价值使社区团结在一起。
|
||||
Gelfand 认为,我们的行为很大程度上取决于我们是生活在“紧密的”还是“松散的”社区文化中,因为每一种文化都有不同于其他文化的社会规范。这些规范 ——— 以及强制执行的严格程度 ——— 将决定我们在社会中的行为。它们给了我们身份,它们帮助我们彼此协调。简而言之,这些价值使社区团结在一起。
|
||||
|
||||
它们也会影响我们的世界观,影响我们构造环境的方式,甚至影响我们大脑的处理过程。 Gelfand 写道:“无数研究表明,社会规范对于将社区团结成合作、协调良好的团体,从而实现伟大成就至关重要。” 纵观历史,社区让其公民参加看似最疯狂的仪式,除了维持群体凝聚力和合作外,别无其他原因。 这些仪式产生了更紧密的联系,使人们得以生存(特别是在狩猎、觅食和战争时期)。
|
||||
|
||||
社会规范包括我们所有人都会自动遵守的规则, Gelfand 称之为一种 “规范性自动驾驶仪。” 这些是我们不需要思考就能做的事情————例如,在图书馆、电影院、电梯或飞机上保持安静。 我们会自动的做这些事。 “从外面看,” Gelfand 说, “我们的社会规范通常看起来很奇怪。但在内心深处,我们认为这是理所当然的。” 她解释到,社会规范可以被编入法规和法律(“遵守停车标志”和“不要偷窃”)。还有一些基本上是默不作声的(“不要盯着火车上的人看”或“打喷嚏时捂住嘴”)。当然,它们因环境而异。
|
||||
社会规范包括我们所有人都会自动遵守的规则, Gelfand 称之为一种 “规范性自动驾驶仪”。 这些是我们不需要思考就能做的事情————例如,在图书馆、电影院、电梯或飞机上保持安静。 我们会自动的做这些事。 “从表面看,” Gelfand 说, “我们的社会规范通常看起来很奇怪。但在内心深处,我们认为这是理所当然的。” 她解释到,社会规范可以被编入法规和法律(“遵守停车标志”和“不要偷窃”)。还有一些基本上是不言而喻的(“不要盯着火车上的人看”或“打喷嚏时捂住嘴”)。当然,它们因环境而异。
|
||||
|
||||
挑战在于大多数社会规范都是无形的,我们不知道这些社会规范在多大程度上控制着我们。在不知不觉中,我们常常只是跟随周围的人群。这被称为“群体思维”,在这种思维中,人们会跟随他们认同的群体,即使这个群体是错误的。他们不想站出来。
|
||||
|
||||
### 组织,有松有紧
|
||||
|
||||
Gelfand 将社会规范组织成不同的群体。她认为,一些规范具有“紧密”文化的特征,而另一些规范则具有“松散”文化的特征。为此, Gelfand 对来自五大洲 30 多个国家的约 7000 人进行了研究和抽样,他们的职业、性别、年龄、宗教、教派,以及社会阶层,以了解这些社区将自己定位在何处(以及他们的社会规范在官方和社区/社区总体上的执行力度)。 紧密和松散文化之间的差异在国家之间、国家内部(如美国及其各个地区)、组织内部、社会阶层内部甚至家庭内部都有所不同。
|
||||
Gelfand 将社会规范组织成不同的组别。她认为,一些规范具有“紧密”文化的特征,而另一些规范则具有“松散”文化的特征。为此, Gelfand 对来自五大洲 30 多个国家的约 7000 人进行了研究和抽样,他们具有广泛的职业、性别、年龄、宗教、教派,以及社会阶层,以了解这些社区将自己定位在何处(以及他们的社会规范在官方和社区/社区总体上的执行力度)。 紧密和松散文化之间的差异在国家之间、国家内部(如美国及其各个地区)、组织内部、社会阶层内部甚至家庭内部都有所不同。
|
||||
|
||||
因为组织有文化,它们也有自己的社会规范(毕竟,如果一个组织无法协调其成员并影响其行为,它将无法生存)。 因此,组织也可以反映和灌输 Gelfand 所描述的轻松”或“松散”的文化特征。 并且如果我们有很强的能力识别这些差异,我们就能更成功地预测和解决冲突。然后,在对这些社会规范有了更高认识的情况下,我们可以将开放式组织原则付诸实践。
|
||||
因为组织有文化,它们也有自己的社会规范(毕竟,如果一个组织无法协调其成员并影响其行为,它将无法存在)。 因此,组织也可以反映和灌输 Gelfand 所描述的“紧密”或“松散”的文化特征。 并且如果我们有很强的能力识别这些差异,我们就能更成功地预测和解决冲突。然后,在对这些社会规范有了更高认识的情况下,我们可以将开放式组织原则付诸实践。
|
||||
|
||||
Gelfand 这样描述紧密和松散文化的区别:
|
||||
|
||||
> 从广义上讲,松散的文化倾向于开放,但它们也更加无序。另一方面,紧密的文化有令人欣慰的秩序和可预测性,但它们的容忍度较低。这就是紧-松的权衡:一个领域的优势与另一个领域的劣势并存。
|
||||
> 从广义上讲,松散的文化倾向于开放,但它们也更加无序。另一方面,紧密的文化有令人欣慰的秩序和可预测性,但它们的容忍度较低。这就是紧与松的权衡:一个领域的优势与另一个领域的劣势并存。
|
||||
|
||||
她总结说,紧密的社会保持着严格的社会秩序、同步性和自律性;宽松的社会以高度宽容、富有创造力和对变化持开放态度而自豪。
|
||||
|
||||
虽然并非所有情况都是如此,但紧密和松散的文化通常会表现出一些权衡;每个人都有自己的长处和短处。参见下面的图 1 。
|
||||
|
||||
![][5]
|
||||
|
||||
在这两种环境中成功应用五项开放式组织原则的工作可能会有很大的不同。要取得成功,社区承诺至关重要,如果社会规范不同,承诺的原因也会不同。组织领导者必须知道社区的价值观是什么。只有这样,这个人才能充分激励他人。
|
||||
在这两种环境中成功应用五项开放式组织原则的工作可能会有很大的不同。要取得成功,社区承诺至关重要,如果社会规范不同,承诺的理由也会不同。组织领导者必须知道社区的价值观是什么。只有这样,这个人才能充分激励他人。
|
||||
|
||||
在本综述的下一部分中,我将更彻底地解释紧密文化和松散文化的特征,以便领导者能够更好地了解如何将开放式组织原则运用到团队中。
|
||||
在本点评的下一部分中,我将更彻底地解释紧密文化和松散文化的特征,以便领导者能够更好地了解如何将开放式组织原则运用到团队中。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -54,7 +57,7 @@ via: https://opensource.com/open-organization/21/8/leadership-cultural-social-no
|
||||
作者:[Ron McFarland][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[zz-air](https://github.com/zz-air)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
@ -3,20 +3,22 @@
|
||||
[#]: author: "Jim Hall https://opensource.com/users/jim-hall"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "perfiffer"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13762-1.html"
|
||||
|
||||
通过 ncurses 在 Linux 上写一个猜谜游戏
|
||||
======
|
||||
使用 ncurses 的灵活性和强大功能在 Linux 上创建一个猜数字游戏。
|
||||
![question mark in chalk][1]
|
||||
|
||||
在我的[上一篇文章][2],我简要介绍了使用 ncurses 库通过 C 语言编写文本模式交互式应用程序。使用 `ncurses`,我们可以控制文本在终端上的显示位置和方式。如果你通过阅读手册页探索 `ncurses` 库函数,你会发现有很多不同的方式来显示文本,包括粗体文本、颜色、闪烁文本、窗口、边框、图形字符和其它功能,这些都可以使你的应用脱颖而出。
|
||||
> 使用 ncurses 的灵活性和强大功能在 Linux 上创建一个猜数字游戏。
|
||||
|
||||
如果你想探索一个更高级的程序来演示其中一些有趣的功能,这里有一个简单的“猜数字”游戏,已更新为使用 `ncurses`。该程序在一个范围内选择一个随机数,然后要求用户进行重复猜测,直到他们猜到秘密数字。当用户进行猜测时,程序会告知他们猜测的数字是太低还是太高。
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/07/224224ecchm0t5jbjc1dzy.jpg)
|
||||
|
||||
请注意,程序限定可能的数字范围是 0 到 7。将值保持在有限的个位数数字范围内,可以更轻松的使用 `getch()` 函数从用户读取单个数字。我还使用了 `getrandom` 内核系统调用来生成随机数,设定数字最大值为 7,以从 0 (二进制 0000)到 7 (二进制0111)中选择一个随机数。
|
||||
在我的 [上一篇文章][2],我简要介绍了使用 ncurses 库通过 C 语言编写文本模式交互式应用程序。使用 ncurses,我们可以控制文本在终端上的显示位置和方式。如果你通过阅读手册页探索 ncurses 库函数,你会发现显示文本有很多不同的方式,包括粗体文本、颜色、闪烁文本、窗口、边框、图形字符和其它功能,这些都可以使你的应用脱颖而出。
|
||||
|
||||
如果你想探索一个更高级的程序来演示其中一些有趣的功能,有一个简单的“猜数字”游戏,我已更新为使用 ncurses 编写的了。该程序在一个范围内选择一个随机数,然后要求用户进行重复猜测,直到他们猜到这个秘密数字。当用户进行猜测时,程序会告知他们猜测的数字是太低还是太高。
|
||||
|
||||
请注意,程序限定可能的数字范围是 0 到 7。将值保持在有限的个位数数字范围内,可以更轻松的使用 `getch()` 函数从用户读取单个数字。我还使用了 `getrandom` 内核系统调用来生成随机数,设定数字最大值为 7,以从 0 (二进制 `0000`)到 7 (二进制 `0111`)中选择一个随机数。
|
||||
|
||||
```
|
||||
#include <curses.h>;
|
||||
@ -44,7 +46,7 @@ read_guess()
|
||||
}
|
||||
```
|
||||
|
||||
通过使用 `ncurses`,我们可以增加一些有趣的视觉体验。通过添加函数,我们可以在屏幕顶部显示重要的文本信息,在屏幕底部显示状态消息行。
|
||||
通过使用 ncurses,我们可以增加一些有趣的视觉体验。通过添加函数,我们可以在屏幕顶部显示重要的文本信息,在屏幕底部显示状态消息行:
|
||||
|
||||
```
|
||||
void
|
||||
@ -72,7 +74,7 @@ print_status(const char *text)
|
||||
}
|
||||
```
|
||||
|
||||
通过这些函数,我们就可以构建猜数字游戏的主要部分。首先,程序为 `ncurses` 设置终端,然后从 0 到 7 中选择一个随机数。显示数字刻度后,程序启动一个循环,询问用户的猜测。
|
||||
通过这些函数,我们就可以构建猜数字游戏的主要部分。首先,程序为 ncurses 设置终端,然后从 0 到 7 中选择一个随机数。显示数字刻度后,程序启动一个循环,询问用户的猜测。
|
||||
|
||||
当用户进行猜测时,程序会在屏幕上提供反馈。如果猜测太低,程序会在屏幕上的数字下方打印一个左方括号。如果猜测太高,程序会在屏幕上的数字下方打印一个右方括号。这有助于用户缩小他们的选择范围,直到他们猜出正确的数字。
|
||||
|
||||
@ -125,20 +127,21 @@ main()
|
||||
}
|
||||
```
|
||||
|
||||
复制这个程序,自己尝试编译它。不要忘记你需要告诉 GCC 编译器链接到 `ncurses` 库:
|
||||
复制这个程序,自己尝试编译它。不要忘记你需要告诉 GCC 编译器链接到 ncurses 库:
|
||||
|
||||
```
|
||||
$ gcc -o guess guess.c -lncurses
|
||||
```
|
||||
|
||||
我留下了一个调试行,所以你可以看到屏幕右上角附近的秘密数字:
|
||||
|
||||
![guess number game interface][3]
|
||||
|
||||
图1:猜数字游戏。注意右上角的秘密数字。
|
||||
*图1:猜数字游戏。注意右上角的秘密数字。*
|
||||
|
||||
### 开始使用 ncurses
|
||||
|
||||
该程序使用了 `ncurses` 的许多其它功能,你可以从这些功能开始。例如,`print_header` 函数在屏幕顶部居中以粗体文本打印消息,`print_status` 函数在屏幕左下角以反向文本打印消息。使用它来帮助你开始使用 `ncurses` 编程。
|
||||
该程序使用了 ncurses 的许多其它函数,你可以从这些函数开始。例如,`print_header` 函数在屏幕顶部居中以粗体文本打印消息,`print_status` 函数在屏幕左下角以反向文本打印消息。使用它来帮助你开始使用 ncurses 编程。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
@ -147,7 +150,7 @@ via: https://opensource.com/article/21/8/guess-number-game-ncurses-linux
|
||||
作者:[Jim Hall][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[perfiffer](https://github.com/perfiffer)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
120
published/20210831 What is a container image.md
Normal file
120
published/20210831 What is a container image.md
Normal file
@ -0,0 +1,120 @@
|
||||
[#]: subject: "What is a container image?"
|
||||
[#]: via: "https://opensource.com/article/21/8/container-image"
|
||||
[#]: author: "Nived V https://opensource.com/users/nivedv"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13766-1.html"
|
||||
|
||||
什么是容器镜像?
|
||||
======
|
||||
|
||||
> 容器镜像包含一个打包的应用,以及它的依赖关系,还有它在启动时运行的进程信息。
|
||||
|
||||
![](https://img.linux.net.cn/data/attachment/album/202109/08/152733c9i69xsssa62b6rr.jpg)
|
||||
|
||||
容器是当今 IT 运维的一个关键部分。<ruby>容器镜像<rt>container image</rt></ruby>包含了一个打包的应用,以及它的依赖关系,还有它在启动时运行的进程信息。
|
||||
|
||||
你可以通过提供一组特殊格式的指令来创建容器镜像,可以是提交给<ruby>注册中心<rt>Registry</rt></ruby>,或者是作为 Dockerfile 保存。例如,这个 Dockerfile 为 PHP Web 应用创建了一个容器:
|
||||
|
||||
```
|
||||
FROM registry.access.redhat.com/ubi8/ubi:8.1
|
||||
|
||||
RUN yum --disableplugin=subscription-manager -y module enable php:7.3 \
|
||||
&& yum --disableplugin=subscription-manager -y install httpd php \
|
||||
&& yum --disableplugin=subscription-manager clean all
|
||||
|
||||
ADD index.php /var/www/html
|
||||
|
||||
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
|
||||
&& sed -i 's/listen.acl_users = apache,nginx/listen.acl_users =/' /etc/php-fpm.d/www.conf \
|
||||
&& mkdir /run/php-fpm \
|
||||
&& chgrp -R 0 /var/log/httpd /var/run/httpd /run/php-fpm \
|
||||
&& chmod -R g=u /var/log/httpd /var/run/httpd /run/php-fpm
|
||||
|
||||
EXPOSE 8080
|
||||
USER 1001
|
||||
CMD php-fpm & httpd -D FOREGROUND
|
||||
```
|
||||
|
||||
这个文件中的每条指令都会在容器镜像中增加一个<ruby>层<rt>layer</rt></ruby>。每一层只增加与下面一层的区别,然后,所有这些堆叠在一起,形成一个只读的容器镜像。
|
||||
|
||||
### 它是如何工作的?
|
||||
|
||||
你需要知道一些关于容器镜像的事情,按照这个顺序理解这些概念很重要:
|
||||
|
||||
1. 联合文件系统
|
||||
2. 写入时复制(COW)
|
||||
3. 叠加文件系统
|
||||
4. 快照器
|
||||
|
||||
### 联合文件系统
|
||||
|
||||
<ruby>联合文件系统<rt>Union File System</rt></ruby>(UnionFS)内置于 Linux 内核中,它允许将一个文件系统的内容与另一个文件系统的内容合并,同时保持“物理”内容的分离。其结果是一个统一的文件系统,即使数据实际上是以分支形式组织。
|
||||
|
||||
这里的想法是,如果你有多个镜像有一些相同的数据,不是让这些数据再次复制过来,而是通过使用一个叫做<ruby>层<rt>layer</rt></ruby>的东西来共享。
|
||||
|
||||
![UnionFS][2]
|
||||
|
||||
每一层都是一个可以在多个容器中共享的文件系统,例如,httpd 基础层是 Apache 的官方镜像,可以在任何数量的容器中使用。想象一下,由于我们在所有的容器中使用相同的基础层,我们节省了多少磁盘空间。
|
||||
|
||||
这些镜像层总是只读的,但是当我们用这个镜像创建一个新的容器时,我们会在它上面添加一个薄的可写层。这个可写层是你创建、修改、删除或进行每个容器所需的其他修改的地方。
|
||||
|
||||
### 写时复制(COW)
|
||||
|
||||
当你启动一个容器时,看起来好像这个容器有自己的整个文件系统。这意味着你在系统中运行的每个容器都需要自己的文件系统副本。这岂不是要占用大量的磁盘空间,而且还要花费大量的时间让容器启动?不是的,因为每个容器都不需要它自己的文件系统副本!
|
||||
|
||||
容器和镜像使用<ruby>写时复制<rt>copy-on-write</rt></ruby>(COW)机制来实现这一点。写时复制策略不是复制文件,而是将同一个数据实例分享给多个进程,并且只在一个进程需要修改或写入数据时进行复制。所有其他进程将继续使用原始数据。
|
||||
|
||||
Docker 对镜像和容器都使用了写时复制的机制。为了做到这一点,在旧版本中,镜像和运行中的容器之间的变化是通过<ruby>图驱动<rt>graph driver</rt></ruby>来跟踪的,现在则是通过<ruby>快照器<rt>snapshotter</rt></ruby>来跟踪。
|
||||
|
||||
在运行中的容器中执行任何写操作之前,要修改的文件的副本被放在容器的可写层上。这就是发生 _写_ 的地方。现在你知道为什么它被称为“写时复制”了么。
|
||||
|
||||
这种策略既优化了镜像磁盘空间的使用,也优化了容器启动时间的性能,并与 UnionFS 一起工作。
|
||||
|
||||
### 叠加文件系统
|
||||
|
||||
<ruby>叠加文件系统<rt>Overlay File System</rt></ruby>位于现有文件系统的顶部,结合了上层和下层的目录树,并将它们作为一个单一的目录来呈现。这些目录被称为<ruby>层<rt>layer</rt></ruby>。下层保持不被修改。每一层只增加与下一层的差异(计算机术语为 “diff”),这种统一的过程被称为<ruby>联合挂载<rt>union mount</rt></ruby>。
|
||||
|
||||
最低的目录或镜像层被称为<ruby>下层目录<rt>lowerdir</rt></ruby>,上面的目录被称为 <ruby>上层目录<rt>upperdir</rt></ruby>。最后的覆盖层或统一层被称为<ruby>合并层<rt>merged</rt></ruby>。
|
||||
|
||||
![Layered file system][3]
|
||||
|
||||
常见的术语包括这些层的定义:
|
||||
|
||||
* <ruby>基础层<rt>Base layer</rt></ruby>:是你的文件系统的文件所在的地方。就容器镜像而言,这个层就是你的基础镜像。
|
||||
* <ruby>叠加层<rt>Overlay layer</rt></ruby>:通常被称为<ruby>容器层<rt>container layer</rt></ruby>,因为对运行中的容器所做的所有改变,如添加、删除或修改文件,都会写到这个可写层。对这一层所做的所有修改都存储在下一层,是基础层和差异层的联合视图。
|
||||
* <ruby>差异层<rt>Diff layer</rt></ruby>包含了在叠加层所作的所有修改。如果你写的东西已经在基础层了,那么叠加文件系统就会把文件复制到差异层,并做出你想写的修改。这被称为写时复制。
|
||||
|
||||
### 快照器
|
||||
|
||||
通过使用层和图驱动,容器可以将其更改作为其容器文件系统的一部分来构建、管理和分发。但是使用<ruby>图驱动<rt>graph driver</rt></ruby>的工作真的很复杂,而且容易出错。<ruby>快照器<rt>SnapShotter</rt></ruby>与图驱动不同,因为它们不用了解镜像或容器。
|
||||
|
||||
快照器的工作方式与 Git 非常相似,比如有树的概念,并跟踪每次提交对树的改变。一个<ruby>快照<rt>snapshot</rt></ruby>代表一个文件系统状态。快照有父子关系,使用一组目录。可以在父级和其快照之间进行差异比较(`diff`),以创建一个层。
|
||||
|
||||
快照器提供了一个用于分配、快照和挂载抽象的分层文件系统的 API。
|
||||
|
||||
### 总结
|
||||
|
||||
你现在对什么是容器镜像以及它们的分层方法如何使容器可移植有了很好的认识。接下来,我将介绍容器的运行机制和内部结构。
|
||||
|
||||
本文基于 [techbeatly][4] 的文章,经许可后改编。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/container-image
|
||||
|
||||
作者:[Nived V][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/nivedv
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers.png?itok=d_4QhZxT (Shipping containers stacked)
|
||||
[2]: https://opensource.com/sites/default/files/unionfs.png (UnionFS)
|
||||
[3]: https://miro.medium.com/max/4800/0*h61UE3S0jRPv3mA7 (Layered file system)
|
||||
[4]: https://medium.com/techbeatly/container-part-ii-images-4f2139194775
|
@ -0,0 +1,92 @@
|
||||
[#]: subject: "OpenWrt 21.02 Arrives With Linux Kernel 5.4 & WPA3 Support"
|
||||
[#]: via: "https://news.itsfoss.com/openwrt-21-02-release/"
|
||||
[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "wxy"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-13763-1.html"
|
||||
|
||||
OpenWrt 21.02 发布,支持 Linux 内核 5.4 和 WPA3
|
||||
======
|
||||
|
||||
![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/09/OpenWrt-21.02.jpg?w=1200&ssl=1)
|
||||
|
||||
OpenWrt 社区宣布了该发行版的最新稳定版本:OpenWrt 21.02。
|
||||
|
||||
补充一句,OpenWrt 是一个帮助你创建嵌入式设备定制操作系统的项目。
|
||||
|
||||
它使用户能够根据他们的网络需求公开定制他们的设备,这是市面上销售的路由器的固件所没有的功能。除了路由器之外,OpenWrt 还可以在各种设备上运行,如智能手机、住宅网关,甚至是 32 位的个人电脑。
|
||||
|
||||
自从旧的 OpenWrt 19.07 以来,这个版本的发布带来了超过 5800 个新提交。
|
||||
|
||||
让我们来看看 OpenWrt 21.02 有哪些新功能。
|
||||
|
||||
### OpenWrt 21.02 有什么新内容?
|
||||
|
||||
虽然有一些技术上的变化和改进,但让我强调一下主要的新增内容。
|
||||
|
||||
#### WPA3 支持
|
||||
|
||||
虽然在 19.07 版本中就已经存在,但这个最新的 Wi-Fi 网络安全标准现在已默认包含在镜像中了。
|
||||
|
||||
WPA3 的意思是<ruby>Wi-Fi 受保护接入第三版<rt>Wi-Fi Protected Access 3</rt></ruby>,与流行的 WPA2 相比,在安全方面有很大的改进,也向后兼容。
|
||||
|
||||
#### TLS 和 HTTPS 支持
|
||||
|
||||
就像 WPA3 一样,它也默认包括了 TLS 和 HTTPS 支持,并且带有来自 Mozilla 的可信 CA 证书。
|
||||
|
||||
有了这个支持,无需其它工作,`wget` 和 ` opkg` 现在可以通过 HTTPS 获取资源了。此外,除了 HTTP 之外,[LuCl][1] 也可以通过 HTTPS 获得。
|
||||
|
||||
#### 初步的 DSA 支持
|
||||
|
||||
正如其发布公告中所说:
|
||||
|
||||
> “DSA(<ruby>分布式交换机架构<rt>Distributed Switch Architecture</rt></ruby>)是关于可配置的以太网交换机的 Linux 标准。”
|
||||
|
||||
这取代了直到现在还在使用的 `swconfig` 系统,是对 VLAN 和交换机端口管理方式的一个明显变化。
|
||||
|
||||
#### 新的最低硬件要求
|
||||
|
||||
随着 OpenWrt 的众多新功能和更新,以及 Linux 内核的大小的普遍增加,其最低硬件要求也被提高。
|
||||
|
||||
现在设备需要至少 8MB 的闪存和 64MB 的内存来运行默认的构建版本,以确保适当的稳定性。
|
||||
|
||||
#### 软件包更新
|
||||
|
||||
该版本还包含了几个软件包的升级,其中一些是:
|
||||
|
||||
* Linux 内核 5.4.143
|
||||
* gcc 8.4.0
|
||||
* glibc 2.33
|
||||
* binutils 2.34
|
||||
* busybox 1.33.1
|
||||
|
||||
除了上述列出的软件包,还有许多其他软件包也得到了升级。你可以在 [官方发布公告][2] 中了解完整的技术细节。
|
||||
|
||||
### 下载 OpenWrt 21.02
|
||||
|
||||
你可以前往其官方网站下载最新的稳定版,或者选择开发快照进行实验。
|
||||
|
||||
构建自己的软件包和固件的说明应该可以在其文档中找到。
|
||||
|
||||
可以使用 `sysupgrade` 命令将你的系统从 OpenWrt 19.07 升级到 OpenWrt 21.02。请注意,你无法从 18.06 升级。
|
||||
|
||||
- [OpenWrt 21.02][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/openwrt-21-02-release/
|
||||
|
||||
作者:[Rishabh Moharir][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[wxy](https://github.com/wxy)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/rishabh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://openwrt.org/docs/techref/luci
|
||||
[2]: https://openwrt.org/releases/21.02/notes-21.02.0
|
||||
[3]: https://openwrt.org/downloads
|
@ -0,0 +1,96 @@
|
||||
[#]: subject: "Lakka Linux 3.4 Brings Fidelity FX Support With the New RetroArch 1.9.9"
|
||||
[#]: via: "https://news.itsfoss.com/lakka-retroarch-release/"
|
||||
[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Lakka Linux 3.4 Brings Fidelity FX Support With the New RetroArch 1.9.9
|
||||
======
|
||||
|
||||
For years now, [RetroArch][1] has been the gold standard in emulation, thanks to its ease of use and simplicity. Similarly, [Lakka][2] has gotten a name by using RetroArch to create an incredibly smooth and straightforward experience for its users.
|
||||
|
||||
Hence, we have recommended it in the past to [turn your old PC into a retrogaming console][3].
|
||||
|
||||
It is always a great day when these two large projects announce new releases, and it looks like we have some exciting news with Lakka 3.4 and RetroArch 1.9.9 release.
|
||||
|
||||
Here, we will be looking at some of the new features announced in RetroArch 1.9.9 and Lakka 3.4 and the significant impact on the future of emulation.
|
||||
|
||||
### What’s New?
|
||||
|
||||
With this release, RetroArch has introduced some useful and impactful new features. These include:
|
||||
|
||||
* AMD FidelityFX support for all games
|
||||
* Windows users can now use HDR on many games
|
||||
* New touchscreen menu for the Nintendo DS
|
||||
|
||||
|
||||
|
||||
Lakka (which includes RetroArch) has also received some welcome improvements.
|
||||
|
||||
* Improved stability
|
||||
* 3 new cores for the PS1, PS2, and DOS
|
||||
* Updated Mesa to version 21.2.1
|
||||
|
||||
|
||||
|
||||
Here we focus on the key highlights and, primarily, Integrated FidelityFX.
|
||||
|
||||
#### FidelityFX For Retro Games
|
||||
|
||||
![][4]
|
||||
|
||||
When AMD announced its open-source alternative to DLSS back in June, we could never have predicted the incredible impact it would have on emulation.
|
||||
|
||||
For those not aware, [FidelityFX][5] allows games to run at a lower resolution while retaining the same image quality, dramatically improving the performance.
|
||||
|
||||
Now, with the RetroArch 1.9.9 release, this technology is being brought to RetroArch and Lakka. This is great because it allows older games designed to run at a low resolution to look much better without resorting to mods or texture packs.
|
||||
|
||||
Overall, I expect this addition to be widely appreciated, especially by people looking for a more modern version of their favorite retro games.
|
||||
|
||||
If you want to learn more about FidelityFX and upscaling, I’d highly suggest you check out [our article on Intel’s XeSS where we explain all this][6] and how it impacts you.
|
||||
|
||||
#### New Touchscreen Menu For Nintendo 3DS
|
||||
|
||||
One of the more interesting ports of RetroArch, the Nintendo 3DS, has also gotten a cool new feature. This comes in the form of a touchscreen menu for the bottom screen, which shows a few useful shortcuts without covering the game.
|
||||
|
||||
While this doesn’t apply to Lakka, users of RetroArch running on top of another distribution should receive this change once RetroArch 1.9.9 lands in the repositories.
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Overall, [RetroArch 1.9.9][7] and [Lakka 3.4][8] are looking to be significant upgrades, especially with the new integration with FidelityFX.
|
||||
|
||||
As we have already seen, with emulators such as [RPCS3][9], FidelityFX can provide significant graphical improvements on older games, so it is exciting to see this come to RetroArch.
|
||||
|
||||
_What do you think about FidelityFX being used for retro games? Let me know in the comments below!_
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/lakka-retroarch-release/
|
||||
|
||||
作者:[Jacob Crume][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://news.itsfoss.com/author/jacob/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.retroarch.com/
|
||||
[2]: http://lakka.tv
|
||||
[3]: https://itsfoss.com/lakka-retrogaming-linux/
|
||||
[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIzMCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[5]: https://www.amd.com/en/technologies/radeon-software-fidelityfx-super-resolution
|
||||
[6]: https://news.itsfoss.com/intel-xess-open-source/
|
||||
[7]: https://www.libretro.com/index.php/retroarch-1-9-9-released/
|
||||
[8]: http://lakka.tv/articles/2021/09/06/lakka-3.4/
|
||||
[9]: http://rpcs3.net
|
@ -1,116 +0,0 @@
|
||||
[#]: subject: "How to Install Dropbox on Ubuntu Linux"
|
||||
[#]: via: "https://itsfoss.com/install-dropbox-ubuntu/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Install Dropbox on Ubuntu Linux
|
||||
======
|
||||
|
||||
Dropbox is one of the [most popular cloud storage services available for Linux][1] and other operating systems.
|
||||
|
||||
In fact, Dropbox is one of the earliest services to provide a native Linux application. It still [supports 32-bit Linux systems][2] that is also a commendable job.
|
||||
|
||||
In this beginner’s tutorial, I’ll show the steps for installing Dropbox on Ubuntu. The steps are really simple but some websites make it unnecessarily complicated.
|
||||
|
||||
### Install Dropbox on Ubuntu desktop
|
||||
|
||||
Let’s see the installation procedure, step by step.
|
||||
|
||||
#### Step 1: Get Dropbox installer for Ubuntu
|
||||
|
||||
Dropbox offers DEB files for its installer. Go to the download section of its website:
|
||||
|
||||
[Dropbox Download][3]
|
||||
|
||||
And download the appropriate DEB file. Considering that you are using 64 bit Ubuntu, get the deb file for 64-bit version.
|
||||
|
||||
![Download the Dropbox installer][4]
|
||||
|
||||
#### Step 2: Install Dropbox installer
|
||||
|
||||
The deb file you downloaded is just an installer for Dropbox. Actual Dropbox installation starts later, similar to [installing Steam on Ubuntu][5].
|
||||
|
||||
To [install the downloaded deb file][6], either double click on it or right click and select open with Software Install.
|
||||
|
||||
![Installing the downloaded Dropbox deb file][7]
|
||||
|
||||
It will open the software center and you can click the install button.
|
||||
|
||||
![Installing Dropbox deb file][8]
|
||||
|
||||
Wait for the installation to finish.
|
||||
|
||||
#### Step 3: Start Dropbox installation
|
||||
|
||||
Dropbox installer is now installed. Press the Windows key (also known as super key) and search for Dropbox and click on it.
|
||||
|
||||
![Start Dropbox for installation][9]
|
||||
|
||||
On the first launch, it shows two popups. One about restarting Nautilus (the file explorer in Ubuntu) and the other about Dropbox installation.
|
||||
|
||||
![Starting Dropbox installation][10]
|
||||
|
||||
Clicking either Restart Nautilus/Close (on the Nautilus popup) or OK (on the installation popup) starts the actual Dropbox client download and installation. If the ‘Nautilus Restart’ does not close on clicking Close button, click the x button.
|
||||
|
||||
Wait for the Dropbox installation to finish.
|
||||
|
||||
![Installing Dropbox][11]
|
||||
|
||||
Oh! Nautilus restart is required because Dropbox adds some extra features like showing the synchronization status in the file explorer.
|
||||
|
||||
Once Dropbox is installed, it should either take you to the Dropbox login page automatically or you can hit the Dropbox icon at the top and select sign in option.
|
||||
|
||||
![Sign in to Dropbox after installation][12]
|
||||
|
||||
In fact, this is how you would be accessing Dropbox settings in the future.
|
||||
|
||||
#### Step 4: Start using Dropbox on Ubuntu
|
||||
|
||||
![Sign in into Dropbox][13]
|
||||
|
||||
**Note**: Dropbox won’t work until you successfully sign in. Here’s a catch. The free version of Dropbox limits the number of devices you can link to your account. **If you already have 3 linked devices, you should remove some of the older ones that you do not use.**
|
||||
|
||||
Once you are successfully signed in, you should see a Dropbox folder created in your home directory and your files from the cloud starts appearing here.
|
||||
|
||||
![Dropbox folder is created under home directory][14]
|
||||
|
||||
If you want to save disk space or bandwidth, you can go to the Preferences and choose the Selective Sync option. The selective sync option allows you only sync selected folders from Dropbox cloud on your local system.
|
||||
|
||||
![Using selective sync in Dropbox][15]
|
||||
|
||||
Dropbox automatically starts at each boot. This is the behavior you should expect from any cloud service, I believe.
|
||||
|
||||
That’s all you need to get started with Dropbox on Ubuntu. I hope you find this tutorial helpful.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-dropbox-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://itsfoss.com/cloud-services-linux/
|
||||
[2]: https://itsfoss.com/32-bit-linux-distributions/
|
||||
[3]: https://www.dropbox.com/install-linux
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/get-dropbox-for-ubuntu.png?resize=800%2C294&ssl=1
|
||||
[5]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[6]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/dropbox-installer-ubuntu.png?resize=797%2C476&ssl=1
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/installing-dropbox-deb-file.png?resize=800%2C346&ssl=1
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2021/09/start-drobox-ubuntu.webp
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2021/09/starting-dropbox-installation-800x599.webp
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2021/09/installing-dropbox.webp
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2021/09/sign-in-to-dropbox-after-first-installation.webp
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/sign-in-dropbox.png?resize=800%2C409&ssl=1
|
||||
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/dropbox-folder-ubuntu.png?resize=800%2C491&ssl=1
|
||||
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Dropbox-selective-sync.png?resize=800%2C399&ssl=1
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://itsfoss.com/stop-program-linux-terminal/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
189
sources/tech/20210907 How to use BusyBox on Linux.md
Normal file
189
sources/tech/20210907 How to use BusyBox on Linux.md
Normal file
@ -0,0 +1,189 @@
|
||||
[#]: subject: "How to use BusyBox on Linux"
|
||||
[#]: via: "https://opensource.com/article/21/8/what-busybox"
|
||||
[#]: author: "Seth Kenlon https://opensource.com/users/seth"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to use BusyBox on Linux
|
||||
======
|
||||
BusyBox is an open source (GPL) project providing simple implementations
|
||||
of nearly 400 common commands.
|
||||
![bash logo on green background][1]
|
||||
|
||||
It's easy to take Linux commands for granted. They come bundled with the system when you install Linux, and we often don't question why they're there. Some of the basic commands, such as [`cd`][2], [`kill`][3], and `echo` aren't always independent applications but are actually built into your shell. Others, such as [`ls`][4], [`mv`][5], and [`cat`][6] are part of a core utility package (often GNU `coreutils` specifically). But there are always alternatives in the world of open source, and one of the most interesting is [BusyBox][7].
|
||||
|
||||
### What is BusyBox in Linux?
|
||||
|
||||
BusyBox is an open source (GPL) project providing simple implementations of nearly 400 common commands, including `ls`, `mv`, `ln`, `mkdir`, `more`, `ps`, `gzip`, `bzip2`, `tar`, and `grep`. It also contains a version of the programming language `awk`, the stream editor `sed`, the filesystem checker `fsck`, the `rpm` and `dpkg` package managers, and of course, a shell (`sh`) that provides easy access to all of these commands. In short, it contains all the essential commands required for a POSIX system to perform common system maintenance tasks as well as many user and administrative tasks.
|
||||
|
||||
In fact, it even contains an `init` command which can be launched as PID 1 to serve as the parent process for all other system services. In other words, BusyBox can be used as an alternative to [systemd][8], OpenRC, sinit, init, and other launch daemons.
|
||||
|
||||
BusyBox is very small. As an executable, it's under 1 MB, so it has gained much of its popularity in the [embedded][9], [Edge][10], and [IoT][11] space, where drive space is at a premium. In the world of containers and cloud computing, it's also popular as a foundation for minimal Linux container images.
|
||||
|
||||
### Minimalism
|
||||
|
||||
Part of the appeal of BusyBox is its minimalism. All of its commands are compiled into a single binary (`busybox`), and its man page is a mere 81 pages (by my calculation of piping `man` to `pr`) but covers nearly 400 commands.
|
||||
|
||||
As an example comparison, here's the output of the `shadow` version of `useradd --help`:
|
||||
|
||||
|
||||
```
|
||||
-b, --base-dir BASE_DIR base directory for home
|
||||
-c, --comment COMMENT GECOS field of the new account
|
||||
-d, --home-dir HOME_DIR home directory of the new account
|
||||
-D, --defaults print or change the default config
|
||||
-e, --expiredate EXPIRE_DATE expiration date of the new account
|
||||
-f, --inactive INACTIVE password inactivity
|
||||
-g, --gid GROUP name or ID of the primary group
|
||||
-G, --groups GROUPS list of supplementary groups
|
||||
-h, --help display this help message and exit
|
||||
-k, --skel SKEL_DIR alternative skeleton dir
|
||||
-K, --key KEY=VALUE override /etc/login.defs
|
||||
-l, --no-log-init do not add the user to the lastlog
|
||||
-m, --create-home create the user's home directory
|
||||
-M, --no-create-home do not create the user's home directory
|
||||
-N, --no-user-group do not create a group with the user's name
|
||||
-o, --non-unique allow users with non-unique UIDs
|
||||
-p, --password PASSWORD encrypted password of the new account
|
||||
-r, --system create a system account
|
||||
-R, --root CHROOT_DIR directory to chroot into
|
||||
-s, --shell SHELL login shell of the new account
|
||||
-u, --uid UID user ID of the new account
|
||||
-U, --user-group create a group with the same name as a user
|
||||
```
|
||||
|
||||
And here's the BusyBox version of the same command:
|
||||
|
||||
|
||||
```
|
||||
-h DIR Home directory
|
||||
-g GECOS GECOS field
|
||||
-s SHELL Login shell
|
||||
-G GRP Group
|
||||
-S Create a system user
|
||||
-D Don't assign a password
|
||||
-H Don't create home directory
|
||||
-u UID User id
|
||||
-k SKEL Skeleton directory (/etc/skel)
|
||||
```
|
||||
|
||||
Whether or not this difference is a feature or a limitation depends on whether you prefer to have 20 options or ten options in your commands. For some users and use-cases, BusyBox's minimalism provides just enough for what needs to be done. For others, it's a good minimal environment to have as a fallback or as a foundation for installing more robust tools like [Bash][12], [Zsh][13], GNU [Awk][14], and so on.
|
||||
|
||||
### Installing BusyBox
|
||||
|
||||
On Linux, you can install BusyBox using your package manager. For example, on Fedora and similar:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install busybox`
|
||||
```
|
||||
|
||||
On Debian and derivatives:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install busybox`
|
||||
```
|
||||
|
||||
On macOS, use [MacPorts][15] or [Homebrew][16]. On Windows, use [Chocolatey][17].
|
||||
|
||||
You can set BusyBox as your shell using the `chsh --shell` command, followed by the path to the BusyBox `sh` application. I keep BusyBox in `/lib64`, but its location depends on where your distribution installed it.
|
||||
|
||||
|
||||
```
|
||||
$ which busybox
|
||||
/lib64/busybox/busybox
|
||||
$ chsh --shell /lib64/busybox/sh
|
||||
```
|
||||
|
||||
Replacing all common commands wholesale with BusyBox is a little more complex, because most distributions are "hard-wired" to look to specific packages for specific commands. In other words, while it's technically possible to replace `init` with BusyBox's `init`, your package manager may refuse to allow you to remove the package containing `init` for fear of you causing your system to become non-bootable. There are some distributions built upon BusyBox, so starting fresh is probably the easiest way to experience a system built around BusyBox.
|
||||
|
||||
### Try BusyBox
|
||||
|
||||
You don't have to change your shell to BusyBox permanently just to try it. You can launch a BusyBox shell from your current shell:
|
||||
|
||||
|
||||
```
|
||||
$ busybox sh
|
||||
~ $
|
||||
```
|
||||
|
||||
Your system still has the non-BusyBox versions of commands installed, though, so to experience BusyBox's tools, you must issue commands as arguments to the `busybox` executable:
|
||||
|
||||
|
||||
```
|
||||
~ $ busybox echo $0
|
||||
sh
|
||||
~ $ busybox ls --help
|
||||
BusyBox vX.YY.Z (2021-08-25 07:31:48 NZST) multi-call binary.
|
||||
|
||||
Usage: ls [-1AaCxdLHRFplinshrSXvctu] [-w WIDTH] [FILE]...
|
||||
|
||||
List directory contents
|
||||
|
||||
-1 One column output
|
||||
-a Include entries that start with .
|
||||
-A Like -a, but exclude . and ..
|
||||
-x List by lines
|
||||
[...]
|
||||
```
|
||||
|
||||
For the "full" BusyBox experience, you can create symlinks to `busybox` for each command. This is easier than it sounds, as long as you use a [for-loop][18]:
|
||||
|
||||
|
||||
```
|
||||
$ mkdir bbx
|
||||
$ for i in $(bbx --list); do \
|
||||
ln -s /path/to/busybox bbx/$i \
|
||||
done
|
||||
```
|
||||
|
||||
Add your directory of symlinks at the _start_ of your [path][19], and launch BusyBox:
|
||||
|
||||
|
||||
```
|
||||
`$ PATH=$(pwd)/bbx:$PATH bbx/sh`
|
||||
```
|
||||
|
||||
### Get busy
|
||||
|
||||
BusyBox is a fun project and an example of just how _minimal_ computing can be. Whether you use BusyBox as a lightweight environment for an [ancient computer][20] [you've rescued][21], as the userland for an [embedded device][22], to trial a new init system, or just as a curiosity, it can be fun reacquainting yourself with old familiar, yet somehow new, commands.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/what-busybox
|
||||
|
||||
作者:[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]: https://opensource.com/article/21/8/navigate-linux-directories
|
||||
[3]: https://opensource.com/article/18/5/how-kill-process-stop-program-linux
|
||||
[4]: https://opensource.com/article/19/7/master-ls-command
|
||||
[5]: https://opensource.com/article/19/8/moving-files-linux-depth
|
||||
[6]: https://opensource.com/article/19/2/getting-started-cat-command
|
||||
[7]: https://www.busybox.net
|
||||
[8]: https://opensource.com/article/20/4/systemd
|
||||
[9]: https://opensource.com/article/21/3/rtos-embedded-development
|
||||
[10]: https://opensource.com/article/17/9/what-edge-computing
|
||||
[11]: https://opensource.com/article/21/3/iot-measure-raspberry-pi
|
||||
[12]: https://opensource.com/article/20/4/bash-sysadmins-ebook
|
||||
[13]: https://opensource.com/article/19/9/getting-started-zsh
|
||||
[14]: https://opensource.com/article/20/9/awk-ebook
|
||||
[15]: https://opensource.com/article/20/11/macports
|
||||
[16]: https://opensource.com/article/20/6/homebrew-mac
|
||||
[17]: https://opensource.com/article/20/3/chocolatey
|
||||
[18]: https://opensource.com/article/19/10/programming-bash-loops
|
||||
[19]: https://opensource.com/article/17/6/set-path-linux
|
||||
[20]: https://opensource.com/article/20/2/restore-old-computer-linux
|
||||
[21]: https://opensource.com/article/19/7/how-make-old-computer-useful-again
|
||||
[22]: https://opensource.com/article/20/6/open-source-rtos
|
@ -2,7 +2,7 @@
|
||||
[#]: via: "https://itsfoss.com/tangram/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: translator: "anine09"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
@ -74,7 +74,7 @@ via: https://itsfoss.com/tangram/
|
||||
|
||||
作者:[Ankush Das][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[anine09](https://github.com/anine09)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
157
sources/tech/20210907 Use lspci on Linux to see your hardware.md
Normal file
157
sources/tech/20210907 Use lspci on Linux to see your hardware.md
Normal file
@ -0,0 +1,157 @@
|
||||
[#]: subject: "Use lspci on Linux to see your hardware"
|
||||
[#]: via: "https://opensource.com/article/21/9/lspci-linux-hardware"
|
||||
[#]: author: "Alan Formy-Duval https://opensource.com/users/alanfdoss"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
Use lspci on Linux to see your hardware
|
||||
======
|
||||
Use the lspci command to display devices and drivers on your Linux
|
||||
system.
|
||||
![computer screen ][1]
|
||||
|
||||
When you're running Linux on a desktop or server, sometimes you need to identify the hardware in that system. One command used for this is `lspci`. It works by showing all devices attached to the PCI bus. It's provided by the [pciutils][2] package and is available for a wide range of Linux and BSD-based operating systems.
|
||||
|
||||
### Basic usage
|
||||
|
||||
The information displayed when a regular user runs `lspci` might be limited due to access permissions. Running the command with `sudo` provides a complete picture.
|
||||
|
||||
Running `lspci` by itself lists the PCI buses and their attached devices. Here's an example from my media center PC. It's an AMD Phenom CPU-based system, so it has an AMD chipset. It also has an Atheros wireless controller and an Nvidia graphics card. All hardware devices are listed with details such as vendor, name, and model number:
|
||||
|
||||
|
||||
```
|
||||
$ sudo lspci
|
||||
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] RS880 Host Bridge
|
||||
00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780 PCI to PCI bridge (ext gfx port 0)
|
||||
00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 0)
|
||||
00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] RS780/RS880 PCI to PCI bridge (PCIE port 1)
|
||||
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode]
|
||||
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
|
||||
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
|
||||
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
|
||||
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
|
||||
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0 USB OHCI1 Controller
|
||||
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller
|
||||
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 3c)
|
||||
00:14.1 IDE interface: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 IDE Controller
|
||||
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller
|
||||
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge
|
||||
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller
|
||||
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration
|
||||
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map
|
||||
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller
|
||||
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control
|
||||
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control
|
||||
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)
|
||||
01:00.1 Audio device: NVIDIA Corporation GK107 HDMI Audio Controller (rev a1)
|
||||
02:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
|
||||
```
|
||||
|
||||
### Verbose output
|
||||
|
||||
Adding a `-v` option increases the verbosity or the level of detail for each device. You can use `-vv` or `-vvv` for even higher amounts of device detail. At this level, `lspci` displays various subsystems and memory addresses, interrupt request (IRQ) numbers, and other capabilities for all devices. The output is extremely long. Give it a try on your system.
|
||||
|
||||
### Searching with grep
|
||||
|
||||
Sometimes you want to narrow your search. For instance, the RPM Fusion web site has instructions for installing Nvidia graphics drivers. They begin with identifying your graphics card using the `grep` command. This is what I get on my laptop:
|
||||
|
||||
|
||||
```
|
||||
$ sudo lspci | grep -e VGA
|
||||
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 620 (rev 07)
|
||||
$ sudo lspci | grep -e 3D
|
||||
01:00.0 3D controller: NVIDIA Corporation GM108M [GeForce MX130] (rev a2)
|
||||
```
|
||||
|
||||
The `grep` commands above show one VGA device on my media center PC but no 3D device.
|
||||
|
||||
|
||||
```
|
||||
$ sudo lspci | grep -e VGA
|
||||
01:00.0 VGA compatible controller: NVIDIA Corporation GK107 [GeForce GTX 650] (rev a1)
|
||||
$ sudo lspci | grep -e 3D
|
||||
$
|
||||
```
|
||||
|
||||
### Searching by vendor ID
|
||||
|
||||
There is another way that doesn't require `grep`. Suppose I want to determine whether any other Nvidia devices are present. It's necessary to know a little more. I use the `-nn` option to display vendor and device ID numbers. On my media center PC, this option shows my VGA card, vendor ID, and device ID:
|
||||
|
||||
|
||||
```
|
||||
$ sudo lspci -nn | grep -e VGA
|
||||
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107 [GeForce GTX 650] [10de:0fc6] (rev a1)
|
||||
```
|
||||
|
||||
The set of brackets with the colon-separated numbers after the device name shows the vendor and device ID. The output indicates that the vendor ID for a device made by Nvidia Corporation is **10de**.
|
||||
|
||||
The `-d` option displays all devices from a specified vendor, device, or class ID. Here are all the Nvidia devices in my system (keeping the `-nn` to include the vendor IDs):
|
||||
|
||||
|
||||
```
|
||||
$ sudo lspci -nn -d 10de:
|
||||
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107 [GeForce GTX 650] [10de:0fc6] (rev a1)
|
||||
01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev a1)
|
||||
```
|
||||
|
||||
From the output, you can see that in addition to a graphics card, I have an Nvidia audio device. They are both actually part of the same **Nvidia GeForce GTX 650** card, but this is a good example nonetheless.
|
||||
|
||||
### Kernel modules
|
||||
|
||||
Along with PCI hardware devices, `lspci` can show what kernel driver modules are loaded with the `-k` option. I add this option to my `lspci` commands to view several pieces of information about my Nvidia devices.
|
||||
|
||||
|
||||
```
|
||||
$ sudo lspci -nn -k -d 10de:
|
||||
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107 [GeForce GTX 650] [10de:0fc6] (rev a1)
|
||||
Subsystem: eVga.com. Corp. GK107 [GeForce GTX 650] [3842:2650]
|
||||
Kernel driver in use: nvidia
|
||||
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
|
||||
01:00.1 Audio device [0403]: NVIDIA Corporation GK107 HDMI Audio Controller [10de:0e1b] (rev a1)
|
||||
Subsystem: eVga.com. Corp. GK107 HDMI Audio Controller [3842:2650]
|
||||
Kernel driver in use: snd_hda_intel
|
||||
Kernel modules: snd_hda_intel
|
||||
```
|
||||
|
||||
Two additional lines are displayed: _Kernel driver in use_ and _Kernel modules_. The second one lists the modules available to support the device.
|
||||
|
||||
### Keeping up to date
|
||||
|
||||
New devices and vendors are constantly entering the market. If you see a device listed as _unknown_, your PCI device ID database may be outdated. There are two ways to check. The `-Q` option uses DNS to query the central database. This, of course, requires network connectivity.
|
||||
|
||||
|
||||
```
|
||||
`$ sudo lspci -Q`
|
||||
```
|
||||
|
||||
You can also update your local PCI ID database by running the command `update-pciids`.
|
||||
|
||||
|
||||
```
|
||||
$ sudo update-pciids
|
||||
Downloaded daily snapshot dated 2021-08-22 03:15:01
|
||||
```
|
||||
|
||||
### Learn more about your hardware
|
||||
|
||||
Of course, `lspci` is just one of many commands available for Linux that is useful for querying the hardware and software on your system. Learn more about hardware on Linux in my article covering USB devices: [Recognize more devices on Linux with this USB ID Repository][3].
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/9/lspci-linux-hardware
|
||||
|
||||
作者:[Alan Formy-Duval][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/alanfdoss
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/features_solutions_command_data.png?itok=4_VQN3RK (computer screen )
|
||||
[2]: https://mj.ucw.cz/sw/pciutils/
|
||||
[3]: https://opensource.com/article/20/8/usb-id-repository
|
116
sources/tech/20210908 How to Run Java Programs in Ubuntu.md
Normal file
116
sources/tech/20210908 How to Run Java Programs in Ubuntu.md
Normal file
@ -0,0 +1,116 @@
|
||||
[#]: subject: "How to Run Java Programs in Ubuntu"
|
||||
[#]: via: "https://itsfoss.com/run-java-program-ubuntu/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Run Java Programs in Ubuntu
|
||||
======
|
||||
|
||||
So, you have started learning Java programming? That’s good.
|
||||
|
||||
And you want to run the java programs on your Linux system? Even better.
|
||||
|
||||
Let me show how to run Java in terminal in Ubuntu and other Linux distributions.
|
||||
|
||||
### Running Java programs in Ubuntu
|
||||
|
||||
Let’s go in proper steps here.
|
||||
|
||||
#### Step 1: Install Java compiler
|
||||
|
||||
To run a Java program, you need to compile the program first. You need Java compiler for this purpose.
|
||||
|
||||
The Java compiler is part of [JDK][1] (Java Development Kit). You need to install JDK in order to compile and run Java programs.
|
||||
|
||||
First, check if you already have Java Compiler installed on your system:
|
||||
|
||||
```
|
||||
javac --version
|
||||
```
|
||||
|
||||
If you see an error like “Command ‘javac’ not found, but can be installed with”, this means you need to install Java Development Kit.
|
||||
|
||||
![Check if Java compiler is already installed or not][2]
|
||||
|
||||
The simplest way to install JDK on Ubuntu is to go with the default offering from Ubuntu:
|
||||
|
||||
```
|
||||
sudo apt install default-jdk
|
||||
```
|
||||
|
||||
You’ll be asked to enter your account’s password. When you type the password, nothing is seen on the screen. That is normal. Just enter your password blindly. When asked, press the enter key or Y key.
|
||||
|
||||
![Installing JDK that also contains the Java compiler][3]
|
||||
|
||||
The above command should work for other Debian and Ubuntu based distributions like Linux Mint, elementary OS etc. For other distributions, use your distribution’s package manager. The package name could also be different.
|
||||
|
||||
Once installed, verify that javac is available now.
|
||||
|
||||
![Verify that Java compiler can be used now][4]
|
||||
|
||||
#### Step 2: Compile Java program in Linux
|
||||
|
||||
You need to have a Java program file for this reason. Let’s say you create a new Java program file named **HelloWorld.java** and it has the following content:
|
||||
|
||||
```
|
||||
class HelloWorld{
|
||||
public static void main(String args[]){
|
||||
System.out.println("Hello World");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
You can [use Nano editor in terminal][5] or Gedit graphical text editor for writing your Java programs.
|
||||
|
||||
```
|
||||
javac HelloWorld.java
|
||||
```
|
||||
|
||||
If there is no error, the above command produces no output.
|
||||
|
||||
When you compile the Java program, it generates a .class file with the class name you used in your program. You have to run this class file.
|
||||
|
||||
#### Step 3: Run the Java class file
|
||||
|
||||
You do not need to specify the class extension here. Just the name of the class. And this time, you use the command java, not javac.
|
||||
|
||||
```
|
||||
java HelloWorld
|
||||
```
|
||||
|
||||
This will print Hello World on the screen for my program.
|
||||
|
||||
![Running java programs in the Linux terminal][6]
|
||||
|
||||
And that’s how you run a Java program in the Linux terminal.
|
||||
|
||||
This was the simplest of the example. The sample program had just one class. The Java compiler creates a class file for each class in your program. Things get complicated for bigger programs and projects.
|
||||
|
||||
This is why I advise [installing Eclipse on Ubuntu][7] for proper Java programming. It is easier to program in an IDE.
|
||||
|
||||
I hope you find this tutorial helpful. Questions or suggestions? The comment section is all yours.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/run-java-program-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://jdk.java.net/
|
||||
[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/java-compiler-check-ubuntu.png?resize=800%2C328&ssl=1
|
||||
[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/install-jdk-ubuntu.png?resize=800%2C430&ssl=1
|
||||
[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/java-compiler-ubuntu.png?resize=798%2C226&ssl=1
|
||||
[5]: https://itsfoss.com/nano-editor-guide/
|
||||
[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/running-java-programs-in-Linux-terminal.png?resize=798%2C301&ssl=1
|
||||
[7]: https://itsfoss.com/install-latest-eclipse-ubuntu/
|
@ -0,0 +1,127 @@
|
||||
[#]: subject: "How to Use the dd Command to Create a Live USB Drive in Linux Terminal [For Experts and Adventurers]"
|
||||
[#]: via: "https://itsfoss.com/live-usb-with-dd-command/"
|
||||
[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Use the dd Command to Create a Live USB Drive in Linux Terminal [For Experts and Adventurers]
|
||||
======
|
||||
|
||||
There are several graphical tools available for creating live USB. [Etcher on Linux][1] is probably the most popular. Ubuntu has its own Startup Disk Creator tool for this purpose.
|
||||
|
||||
However, advanced Linux users swear by the comfort and swiftness of creating live USBs in Linux terminal using the dd command.
|
||||
|
||||
The dd command is a [CLI tool][2] that gives you powerful features for copying and converting files.
|
||||
|
||||
A common use case that people use dd for is to write ISO files to an external storage device such as a USB drive, which can be used to do things like install a new Linux distribution onto a computer or laptop.
|
||||
|
||||
That’s what I am going to show in this tutorial. I’ll go over the commands you will need to run, finding our USB drive from the terminal, and then finally doing the actual flashing of the ISO file.
|
||||
|
||||
### Creating live USB from ISO with dd command
|
||||
|
||||
Before I show you the steps, let me quickly go over the command which you’ll be using and explain what it does.
|
||||
|
||||
Here’s the example command for flashing of the ISO:
|
||||
|
||||
```
|
||||
dd if="./filename.iso" of="/dev/sdb" status="progress" conv="fsync"
|
||||
```
|
||||
|
||||
Let’s go over what exactly that [dd command][3] is doing.
|
||||
|
||||
#### Understanding the above dd command
|
||||
|
||||
![Explanation of the dd command for live USB creation][4]
|
||||
|
||||
First, you enter `dd`. As expected, this is just the name of the program you are going to run.
|
||||
|
||||
Next, you specify `if="./filename.iso"`. `if` stands for input file, which tells `dd` what file you are going to be writing to the external storage drive.
|
||||
|
||||
After that, you enter `of="/dev/sdb"`. As was with `if`, `of` simply stands for output file.
|
||||
|
||||
The thing to remember is that the output file doesn’t technically have to be a file on your system. You can also specify things like the path to an external device (as shown in the example), which just **looks** like a normal file on your system, but actually points to a device connected to your machine.
|
||||
|
||||
`status` can be set to three options: `none`, `noxfer` and `progress.`
|
||||
|
||||
The `progress` option that you set will cause dd to show periodic statistics on how much of the ISO has been transferred to the storage drive, as well as an estimation on how much longer it will be until dd is finished.
|
||||
|
||||
If you were to have set the `none` option instead, dd would only print error messages during the writing of the ISO, thus removing things like the progress bar.
|
||||
|
||||
The `noxfer` option hides some information that’s printed after a transfer is complete, such as how long it took from start to finish.
|
||||
|
||||
Lastly, you set the `conv` option to `fsync`. This causes dd to not report a successful write until the entire ISO has been written to the USB drive.
|
||||
|
||||
If you omit this option, dd will still write just fine (and might actually appear to run quicker), but you might find your system taking quite a while before it tells you it’s safe to remove the USB drive as it will finish writing the ISO’s content in the background, thus allowing you to do other things in the meantime.
|
||||
|
||||
_**Now that you understand what you have to do, let’s see how to do it.**_
|
||||
|
||||
Warning
|
||||
|
||||
The command line is a double-edged sword. Be extra careful when you are running a command like dd. You must make sure that you are using the correct device for the output file destination. One wrong step and you may format your main system disk and lose your operating system.
|
||||
|
||||
#### Step 0: Download the desired ISO
|
||||
|
||||
This goes without saying that you need to have an ISO image file in order to flash it on a USB.
|
||||
|
||||
I am going to use Ubuntu 20.04 ISO (downloadable [here][5]) to test the dd command I showed earlier.
|
||||
|
||||
#### Step 1: Get the USB disk label
|
||||
|
||||
Plug in your USB disk.
|
||||
|
||||
The specific path I entered for `of` was `/dev/sdb`. The USB disks are usually labelled /dev/sdb but that’s not a hard and fast rule.
|
||||
|
||||
This path may differ on your system, but you can confirm the path of the drive with the `lsblk` command. Just look for a listing that looks like the size of your USB drive, and that’ll be it.
|
||||
|
||||
![][6]
|
||||
|
||||
If you are more comfortable with GUI programs, you can also find the drive’s path with tools like GNOME Disks.
|
||||
|
||||
![][7]
|
||||
|
||||
Now that you have established the path to our external drive, let’s create the live USB.
|
||||
|
||||
#### Step 2: Writing the ISO file to the USB disk
|
||||
|
||||
Open up a terminal at the directory where the ISO file is downloaded, and run the following (remember to replace `/dev/sdb` with the name of your storage device if it’s something different):
|
||||
|
||||
```
|
||||
sudo dd if="./ubuntu-20.04.2.0-desktop-amd64.iso" of="/dev/sdb" status="progress" conv="fsync"
|
||||
```
|
||||
|
||||
After that, just let dd do it’s thing, and it’ll print a completion message once it’s done:
|
||||
|
||||
![][8]
|
||||
|
||||
And just like that, you’ve flashed an ISO with dd command in the Linux terminal!
|
||||
|
||||
### Wrapping Up
|
||||
|
||||
Now you’re on your way to doing even more things through the terminal, allowing you to do things faster and quicker than you might have been able to do before.
|
||||
|
||||
Got any remaining questions about the dd command, or something just not working right? Feel free to leave any of it in the comment section below.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/live-usb-with-dd-command/
|
||||
|
||||
作者:[Hunter Wittenborn][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/hunter/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/install-etcher-linux/
|
||||
[2]: https://itsfoss.com/gui-cli-tui/
|
||||
[3]: https://linuxhandbook.com/dd-command/
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/dd-command-for-live-usb-creation.png?resize=800%2C450&ssl=1
|
||||
[5]: https://ubuntu.com/download/desktop/thank-you?version=20.04.2.0&architecture=amd64
|
||||
[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/dd_disks.png?resize=753%2C264&ssl=1
|
||||
[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/dd_gnome_disks.png?resize=800%2C440&ssl=1
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/dd-iso-write.png?resize=800%2C322&ssl=1
|
@ -0,0 +1,103 @@
|
||||
[#]: subject: "What is the Latest Ubuntu Version? Which one to use?"
|
||||
[#]: via: "https://itsfoss.com/latest-ubuntu-version/"
|
||||
[#]: author: "Ankush Das https://itsfoss.com/author/ankush/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
What is the Latest Ubuntu Version? Which one to use?
|
||||
======
|
||||
|
||||
So, you decided to use Ubuntu. Set upon to install Ubuntu and find that there are several active Ubuntu releases.
|
||||
|
||||
That makes you bother about the latest Ubuntu release. Let me help you with that.
|
||||
|
||||
**The newest Ubuntu release is Ubuntu 21.04.** It is a short term release which was out in April 2021 and it will be supported till January 2022. After that, you’ll have to upgrade to Ubuntu 21.10 (will be releases in October 2021).
|
||||
|
||||
**The latest LTS release is Ubuntu 20.04 codenamed Focal Fossa**. It was released in April 2020 and it will be supported till April 2025. If you do not want to upgrade your version every nine months, stick with the latest LTS release.
|
||||
|
||||
In other current Ubuntu releases, version 18.04 is still active. It will be supported till April 2023. But if you are going for a [fresh Ubuntu install][1], go for the latest Ubuntu LTS release, which is 20.04.
|
||||
|
||||
For your information, every two years, there is a new LTS release and **three non-LTS releases** in between (every six months). You may [read this article to know about Ubuntu LTS and non-LTS releases][2].
|
||||
|
||||
The non-LTS releases often bring bleeding-edge features but with minor iterations. And, the next LTS release can be expected to bring all the features added to the non-LTS releases.
|
||||
|
||||
### Latest LTS Version of Ubuntu 20.04 “Focal Fossa”
|
||||
|
||||
![Ubuntu 20.04 LTS][3]
|
||||
|
||||
Every Ubuntu release is associated with a codename, which is often named after animals in alphabetical order.
|
||||
|
||||
In this case, it is “**Focal Fossa**” which refers to a catlike animal found on Madagascar.
|
||||
|
||||
Ubuntu 20.04 comes packed with [Linux Kernel 5.4][4] will be supported till **April 2025**. And, the latest LTS point release is **Ubuntu 20.04.3**.
|
||||
|
||||
If you are using the latest point release (via a new installation), you might have [Linux Kernel 5.11][5] if you are hardware did not fully support Linux 5.4
|
||||
|
||||
Did You Know?
|
||||
|
||||
Every LTS version release is followed by seven point releases, with extra extended security maintenance updates available for five more years (for a fee).
|
||||
|
||||
If you are an enterprise or want longer LTS support than usual, you can subscribe to Ubuntu ESM to get a total of ten years of support for Ubuntu LTS versions on your desktop or server.
|
||||
|
||||
The Long Term Support versions are usually known for adding major feature improvements while the non-LTS versions add bleeding-edge technologies to test and get it ready for the next LTS release.
|
||||
|
||||
If you take a look at [Ubuntu 20.04 features][6] and [Ubuntu 21.04 features][7], you should get an idea of the differences between an LTS and non-LTS release.
|
||||
|
||||
### Which versions of Ubuntu are LTS?
|
||||
|
||||
Not just limited to the version number, there are several Ubuntu flavors available as well. Some of them offer similar software update support and some of them only give you **three years of updates** (in contrast to five by Canonical).
|
||||
|
||||
So, if you want to explore those, I suggest you know [which Ubuntu version to use][8] before deciding to install any Ubuntu flavour.
|
||||
|
||||
### How Long is Ubuntu LTS Supported?
|
||||
|
||||
Any Ubuntu release is supported until the [end-of-life period][9].
|
||||
|
||||
For LTS versions, this is usually five years. And, for non-LTS versions, it is nine months.
|
||||
|
||||
### Should I Upgrade to Ubuntu 20.04 LTS?
|
||||
|
||||
First, you should [check the Ubuntu version installed on your computer][10].
|
||||
|
||||
If you are using an older LTS release, you should definitely consider upgrading to the new one for better hardware compatibility, improved workflow, and performance.
|
||||
|
||||
If you do not want to break the user experience, you can stick to the older release until it reaches the end-of-life period.
|
||||
|
||||
### How to Upgrade to the Latest Ubuntu version?
|
||||
|
||||
![][11]
|
||||
|
||||
You can upgrade to the latest Ubuntu version using the graphical user interface (GUI) or the terminal.
|
||||
|
||||
Simply head to the Software Updater, it should check and notify you if an update is available.
|
||||
|
||||
To get help, you can refer to our [upgrade instructions guide][12] to swiftly upgrade your Ubuntu version without any issues.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/latest-ubuntu-version/
|
||||
|
||||
作者:[Ankush Das][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/ankush/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/install-ubuntu/
|
||||
[2]: https://itsfoss.com/long-term-support-lts/
|
||||
[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/ubuntu_yaru_light_dark_theme.jpg?resize=800%2C450&ssl=1
|
||||
[4]: https://itsfoss.com/linux-kernel-5-4/
|
||||
[5]: https://news.itsfoss.com/linux-kernel-5-11-release/
|
||||
[6]: https://itsfoss.com/ubuntu-20-04-release-features/
|
||||
[7]: https://news.itsfoss.com/ubuntu-21-04-features/
|
||||
[8]: https://itsfoss.com/which-ubuntu-install/
|
||||
[9]: https://itsfoss.com/end-of-life-ubuntu/
|
||||
[10]: https://itsfoss.com/how-to-know-ubuntu-unity-version/
|
||||
[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/start-upgrade-focal.jpg?resize=800%2C495&ssl=1
|
||||
[12]: https://itsfoss.com/upgrade-ubuntu-version/
|
@ -1,126 +0,0 @@
|
||||
[#]: subject: "What is a container image?"
|
||||
[#]: via: "https://opensource.com/article/21/8/container-image"
|
||||
[#]: author: "Nived V https://opensource.com/users/nivedv"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
什么是容器镜像?
|
||||
======
|
||||
容器镜像包含一个打包的应用,以及它的依赖关系,还有它在启动时运行的进程信息。
|
||||
|
||||
![Shipping containers stacked][1]
|
||||
|
||||
容器是当今 IT 运维的一个关键部分。一个_容器镜像_包含了一个打包的应用,以及它的依赖关系,还有它在启动时运行的进程信息。
|
||||
|
||||
你通过提供一组特殊格式的指令来创建容器镜像,可以是提交给 Registry,或者是 Dockerfile。 例如,这个 Dockerfile 为 PHP Web 应用创建了一个容器:
|
||||
|
||||
|
||||
```
|
||||
FROM registry.access.redhat.com/ubi8/ubi:8.1
|
||||
|
||||
RUN yum --disableplugin=subscription-manager -y module enable php:7.3 \
|
||||
&& yum --disableplugin=subscription-manager -y install httpd php \
|
||||
&& yum --disableplugin=subscription-manager clean all
|
||||
|
||||
ADD index.php /var/www/html
|
||||
|
||||
RUN sed -i 's/Listen 80/Listen 8080/' /etc/httpd/conf/httpd.conf \
|
||||
&& sed -i 's/listen.acl_users = apache,nginx/listen.acl_users =/' /etc/php-fpm.d/www.conf \
|
||||
&& mkdir /run/php-fpm \
|
||||
&& chgrp -R 0 /var/log/httpd /var/run/httpd /run/php-fpm \
|
||||
&& chmod -R g=u /var/log/httpd /var/run/httpd /run/php-fpm
|
||||
|
||||
EXPOSE 8080
|
||||
USER 1001
|
||||
CMD php-fpm & httpd -D FOREGROUND
|
||||
```
|
||||
|
||||
这个文件中的每条指令都会在容器镜像中增加一个_层_。每一层只增加与下面一层的区别,然后,所有这些层叠在一起,形成一个只读的容器镜像。
|
||||
|
||||
### 这是怎么做到的?
|
||||
|
||||
你需要知道一些关于容器镜像的事情,按照这个顺序理解这些概念很重要:
|
||||
|
||||
1. Union 文件系统
|
||||
2. 写入时复制
|
||||
3. Overlay 文件系统
|
||||
4. SnapShotters
|
||||
|
||||
|
||||
|
||||
### Union 文件系统(Aufs)
|
||||
|
||||
Union 文件系统(UnionFS)内置于 Linux 内核中,它允许将一个文件系统的内容与另一个文件系统的内容合并,同时保持“物理”内容的分离。其结果是一个统一的文件系统,即使数据实际上是以分支形式组织。
|
||||
|
||||
这里的想法是,如果你有多个镜像有一些相同的数据,不是让这些数据再次复制过来,而是通过使用一个叫做_层_的东西来共享。
|
||||
|
||||
![UnionFS][2]
|
||||
|
||||
图片 CC BY-SA opensource.com
|
||||
|
||||
每一层都是一个可以在多个容器中共享的文件系统,例如,httpd 基础层是 Apache 的官方镜像,可以在任何数量的容器中使用。想象一下,由于我们在所有的容器中使用相同的基础层,我们节省了多少磁盘空间。
|
||||
|
||||
这些镜像层总是只读的,但是当我们用这个镜像创建一个新的容器时,我们会在它上面添加一个薄的可写层。这个可写层是你创建/修改/删除或进行每个容器所需的其他修改的地方。
|
||||
|
||||
### 写时复制
|
||||
|
||||
当你启动一个容器时,看起来好像这个容器有自己的整个文件系统。这意味着你在系统中运行的每个容器都需要自己的文件系统副本。这岂不是要占用大量的磁盘空间,而且还要花费大量的时间让容器启动?不是的,因为每个容器都不需要它自己的文件系统副本!
|
||||
|
||||
容器和镜像使用写时复制机制来实现这一点。写时复制策略不是复制文件,而是将同一个数据实例分享给多个进程,并且只在一个进程需要修改或写入数据时进行复制。所有其他进程将继续使用原始数据。在运行中的容器中执行任何写操作之前,要修改的文件的副本被放在容器的可写层上。这就是发生_写_的地方。现在你知道为什么它被称为“写时复制”了么。
|
||||
|
||||
这种策略既优化了镜像磁盘空间的使用,也优化了容器启动时间的性能,并与 UnionFS 一起工作。
|
||||
|
||||
### Overlay 文件系统
|
||||
|
||||
Overlay 文件系统位于现有文件系统的顶部,结合了上层和下层的目录树,并将它们作为一个单一的目录来呈现。这些目录被称为_层_。下层保持不被修改。每一层只增加与下一层的差异(计算术语为 _diff_),这种统一的过程被称为 _union 挂载_。
|
||||
|
||||
最低的目录或镜像层被称为 _lowerdir_,上面的目录被称为 _upperdir_。最后的覆盖层或统一层被称为 _merged_。
|
||||
|
||||
![Layered file system][3]
|
||||
|
||||
图片 CC BY-SA opensource.com
|
||||
|
||||
常见的术语包括这些层的定义:
|
||||
|
||||
* 基础层是你的文件系统的文件所在的地方。就容器镜像而言,这个层就是你的基础镜像。
|
||||
* Overlay 层通常被称为_容器层_,因为对运行中的容器所做的所有改变,如添加、删除或修改文件,都会写到这个可写层。对这一层所做的所有修改都存储在下一层,是基础层和 Diff 层的 _union_ 视图。
|
||||
* Diff 层包含了在 Overlay 层所作的所有修改。如果你写的东西已经在基础层了,那么 Overlay 文件系统就会把文件复制到 Diff层,并做出你想写的修改。这被称为_写时复制_。
|
||||
|
||||
|
||||
|
||||
# SnapShotters
|
||||
|
||||
容器可以使用层和图形驱动程序构建、管理和分发更改作为其容器文件系统的一部分。。但是使用图形驱动的工作真的很复杂,而且容易出错。SnapShotters 与图形驱动不同,因为它们不了解镜像或容器。
|
||||
|
||||
Snapshotters 的工作方式与 Git 非常相似,比如有树的概念,并跟踪每次提交对树的改变。一个_快照_代表一个文件系统状态。快照有父子关系,使用一组目录。可以在父级和其快照之间进行 _diff_,以创建一个层。
|
||||
|
||||
Snapshotter 提供了一个用于分配、快照和挂载抽象的分层文件系统的 API。
|
||||
|
||||
### 总结
|
||||
|
||||
你现在对什么是容器镜像以及它们的分层方法如何使容器可移植有了很好的认识。接下来,我将介绍容器的运行机制和内部结构。
|
||||
|
||||
* * *
|
||||
|
||||
_本文基于 [techbeatly][4] 的文章,经许可后改编。_
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/21/8/container-image
|
||||
|
||||
作者:[Nived V][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://opensource.com/users/nivedv
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers.png?itok=d_4QhZxT (Shipping containers stacked)
|
||||
[2]: https://opensource.com/sites/default/files/unionfs.png (UnionFS)
|
||||
[3]: https://opensource.com/sites/default/files/rect1036.png (Layered file system)
|
||||
[4]: https://medium.com/techbeatly/container-part-ii-images-4f2139194775
|
@ -0,0 +1,116 @@
|
||||
[#]: subject: "How to Install Dropbox on Ubuntu Linux"
|
||||
[#]: via: "https://itsfoss.com/install-dropbox-ubuntu/"
|
||||
[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/"
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "geekpi"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何在 Ubuntu Linux 上安装 Dropbox
|
||||
======
|
||||
|
||||
Dropbox 是[最受欢迎的云存储服务之一,可用于 Linux][1] 和其他操作系统。
|
||||
|
||||
事实上,Dropbox 是最早提供原生 Linux 应用的服务之一。它仍然[支持 32 位 Linux 系统][2],这也是一项值得称赞的工作。
|
||||
|
||||
在这个初学者的教程中,我将展示在 Ubuntu 上安装 Dropbox 的步骤。这些步骤其实很简单,但有些网站把它弄得不必要的复杂。
|
||||
|
||||
### 在 Ubuntu 桌面上安装 Dropbox
|
||||
|
||||
让我们来看看安装步骤,一步一步来。
|
||||
|
||||
#### 第一步:获取 Ubuntu 的 Dropbox 安装程序
|
||||
|
||||
Dropbox 为其安装程序提供 DEB文 件。进入网站的下载页面:
|
||||
|
||||
[Dropbox Download][3]
|
||||
|
||||
下载相应的 DEB 文件。考虑到你使用的是 64 位的 Ubuntu,请获取 64 位版本的 DEB 文件。
|
||||
|
||||
![Download the Dropbox installer][4]
|
||||
|
||||
#### 第二步:安装 Dropbox 安装程序
|
||||
|
||||
你下载的 deb 文件只是 Dropbox 的一个安装程序。实际的 Dropbox 安装稍后开始,类似于[在 Ubuntu 上安装 Steam][5]。
|
||||
|
||||
要[安装下载的 deb 文件][6],可以双击它,或者右击并选择用软件安装打开。
|
||||
|
||||
![Installing the downloaded Dropbox deb file][7]
|
||||
|
||||
它将打开软件中心,你可以点击安装按钮。
|
||||
|
||||
![Installing Dropbox deb file][8]
|
||||
|
||||
等待安装完成。
|
||||
|
||||
#### 第三步:开始安装 Dropbox
|
||||
|
||||
现在 Dropbox 安装程序已经安装完毕。按 Windows 键(也叫 super 键),搜索 Dropbox 并点击它。
|
||||
|
||||
![Start Dropbox for installation][9]
|
||||
|
||||
第一次启动时,它显示两个弹出窗口。一个是关于重启 Nautilus(Ubuntu 中的文件资源管理器),另一个是关于 Dropbox 的安装。
|
||||
|
||||
![Starting Dropbox installation][10]
|
||||
|
||||
点击 Restart Nautilus/Close(在 Nautilus 弹出窗口)或 OK(在安装弹出窗口),开始实际的 Dropbox 客户端下载和安装。如果 “Nautilus Restart” 在点击关闭按钮时没有关闭,请点击 x 按钮。
|
||||
|
||||
等待Dropbox的安装完成。
|
||||
|
||||
![Installing Dropbox][11]
|
||||
|
||||
哦!需要重新启动 Nautilus,因为 Dropbox 增加了一些额外的功能,如在文件资源管理器中显示同步状态。
|
||||
|
||||
当 Dropbox 安装完毕,它应该会自动带你到 Dropbox 的登录页面,或者你可以点击顶部的 Dropbox 图标并选择登录选项。
|
||||
|
||||
![Sign in to Dropbox after installation][12]
|
||||
|
||||
事实上,这就是你今后访问 Dropbox 设置的方式。
|
||||
|
||||
#### 第四步:开始在 Ubuntu 上使用 Dropbox
|
||||
|
||||
![Sign in into Dropbox][13]
|
||||
|
||||
**注意**:在你成功登录之前,Dropbox 将不会工作。这里有一个问题。免费版的 Dropbox 限制了你可以链接到你的账户的设备数量。**如果你已经有 3 个链接的设备,你应该删除一些你不使用的旧设备。**
|
||||
|
||||
当你成功登录后,你应该看到在你的家目录中创建了一个 Dropbox 文件夹,你的云端文件开始出现在这里。
|
||||
|
||||
![Dropbox folder is created under home directory][14]
|
||||
|
||||
如果你想节省磁盘空间或带宽,你可以进入偏好设置并选择选择性同步选项。选择性同步选项允许你只在本地系统上同步来自 Dropbox 云的选定文件夹。
|
||||
|
||||
![Using selective sync in Dropbox][15]
|
||||
|
||||
Dropbox 会在每次启动时自动启动。我相信,这是你应该从任何云服务中期待的行为。
|
||||
|
||||
这就是你在 Ubuntu 上开始使用 Dropbox 所需要的一切。我希望这个教程对你有帮助。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://itsfoss.com/install-dropbox-ubuntu/
|
||||
|
||||
作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://itsfoss.com/cloud-services-linux/
|
||||
[2]: https://itsfoss.com/32-bit-linux-distributions/
|
||||
[3]: https://www.dropbox.com/install-linux
|
||||
[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/get-dropbox-for-ubuntu.png?resize=800%2C294&ssl=1
|
||||
[5]: https://itsfoss.com/install-steam-ubuntu-linux/
|
||||
[6]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||
[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/dropbox-installer-ubuntu.png?resize=797%2C476&ssl=1
|
||||
[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/installing-dropbox-deb-file.png?resize=800%2C346&ssl=1
|
||||
[9]: https://itsfoss.com/wp-content/uploads/2021/09/start-drobox-ubuntu.webp
|
||||
[10]: https://itsfoss.com/wp-content/uploads/2021/09/starting-dropbox-installation-800x599.webp
|
||||
[11]: https://itsfoss.com/wp-content/uploads/2021/09/installing-dropbox.webp
|
||||
[12]: https://itsfoss.com/wp-content/uploads/2021/09/sign-in-to-dropbox-after-first-installation.webp
|
||||
[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/sign-in-dropbox.png?resize=800%2C409&ssl=1
|
||||
[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/dropbox-folder-ubuntu.png?resize=800%2C491&ssl=1
|
||||
[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Dropbox-selective-sync.png?resize=800%2C399&ssl=1
|
Loading…
Reference in New Issue
Block a user