From 51e856036649ff7a75db544bf1da8c7c66da2542 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Tue, 7 Apr 2020 00:21:46 +0800 Subject: [PATCH 001/394] Update 20190814 9 open source cloud native projects to consider.md --- ...ource cloud native projects to consider.md | 61 ++++++++++++++----- 1 file changed, 45 insertions(+), 16 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index b3d31fc7af..2ab8fb2dc2 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -7,48 +7,58 @@ [#]: via: (https://opensource.com/article/19/8/cloud-native-projects) [#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo) -9 open source cloud native projects to consider +9 open source cloud native projects to consider 值得考虑的9个开源的云原生项目 ====== Work with containers? Get familiar with these projects from the Cloud Native Computing Foundation +工作中使用了容器?熟悉来自云原生计算基金会的这些项目 ![clouds in the sky with blue pattern][1] -As the practice of developing applications with containers is getting more popular, [cloud-native applications][2] are also on the rise. By [definition][3]: +As the practice of developing applications with containers is getting more popular, [cloud-native applications][2] are also on the rise. By [definition][3]: +随着通过容器开发应用的实践变得流行,[云原生应用][2]也在上升。其定义: +云原生技术被用于开发应用程序,这些程序通过将服务打包在容器中来完成构建,部署为微服务,通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。 > "Cloud-native technologies are used to develop applications built with services packaged in containers, deployed as microservices, and managed on elastic infrastructure through agile DevOps processes and continuous delivery workflows." -This description includes four elements that are integral to cloud-native applications: +This description includes four elements that are integral to cloud-native applications: +这个描述包括构成云原生应用的4个元素: - 1. Container - 2. Microservice - 3. DevOps - 4. Continuous integration and continuous delivery (CI/CD) + 1. Container 容器 + 2. Microservice 微服务 + 3. DevOps DevOps + 4. Continuous integration and continuous delivery (CI/CD) 持续集成和持续交付 -Although these technologies have very distinct histories, they complement each other well and have led to surprisingly exponential growth of cloud-native applications and toolsets in a short time. This [Cloud Native Computing Foundation][4] (CNCF) infographic shows the size and breadth of the cloud-native application ecosystem today. +Although these technologies have very distinct histories, they complement each other well and have led to surprisingly exponential growth of cloud-native applications and toolsets in a short time. This [Cloud Native Computing Foundation][4] (CNCF) infographic shows the size and breadth of the cloud-native application ecosystem today. +尽管这些技术有非常独特的历史,它们互相补充,共同导致了短时间内的云原生应用和工具的惊人的指数级增长。这个[云原生计算基金会][4]信息图现实了今天的云原生应用生态的规模和广度。 ![Cloud-Native Computing Foundation applications ecosystem][5] Cloud-Native Computing Foundation projects +云原生计算基金会项目 I mean, just look at that! And this is just a start. Just as NodeJS’s creation sparked the explosion of endless JavaScript tools, the popularity of container technology started the exponential growth of cloud-native applications. +我的意思是,看看那! 这仅仅是一个开始。 正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用程序的指数增长。 The good news is that there are several organizations that oversee and connect these dots together. One is the [**Open Containers Initiative (OCI)**][6], which is a lightweight, open governance structure (or project), "formed under the auspices of the Linux Foundation for the express purpose of creating open industry standards around container formats and runtime." The other is the **CNCF**, "an open source software foundation dedicated to making cloud native computing universal and sustainable." +好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[** Open Containers Initiative(OCI)**][6],它是一种轻量级的,开放的治理结构(或项目),“是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准容器格式和运行时。” 另一个是** CNCF **,“致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 In addition to building a community around cloud-native applications generally, CNCF also helps projects set up structured governance around their cloud-native applications. CNCF created the concept of maturity levels—Sandbox, Incubating, or Graduated—which correspond to the Innovators, Early Adopters, and Early Majority tiers on the diagram below. - +除了通常围绕云原生应用建立社区之外,CNCF还帮助项目围绕其云原生应用建立结构化的管理。CNCF创建了成熟度级别的概念(沙箱,孵化或毕业),与下图中的“创新者”,“早期采用者”和“早期多数”层相对应。 ![CNCF project maturity levels][7] -CNCF project maturity levels +CNCF project maturity levels CNCF项目成熟度级别 The CNCF has detailed [criteria][8] for each maturity level (included below for readers’ convenience). A two-thirds supermajority of the Technical Oversight Committee (TOC) is required for a project to be Incubating or Graduated. +CNCF为每个成熟度级别制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会(TOC)的三分之二的同意才能转为孵化或毕业项目。 -### Sandbox stage +### Sandbox stage 沙箱级 -> To be accepted in the sandbox, a project must have at least two TOC sponsors. See the CNCF Sandbox Guidelines v1.0 for the detailed process. +> To be accepted in the sandbox, a project must have at least two TOC sponsors. See the CNCF Sandbox Guidelines v1.0 for the detailed process. 要成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 -### Incubating stage + +### Incubating stage 孵化级 > Note: The incubation level is the point at which we expect to perform full due diligence on projects. > @@ -59,9 +69,18 @@ The CNCF has detailed [criteria][8] for each maturity level (included below for > * Demonstrate a substantial ongoing flow of commits and merged contributions. > * Since these metrics can vary significantly depending on the type, scope, and size of a project, the TOC has final judgement over the level of activity that is adequate to meet these criteria > +>注意:孵化级是我们期望对项目进行全面尽职调查的起点。 +> +>要进入孵化阶段,项目除了满足沙箱阶段的要求之外还要满足: +> +> *证明至少有三个独立的最终用户已成功将其用于生产,且TOC判断这些最终用户具有足够的质量和范围。 +> *合入者的数量要合理。合入者定义为具有合入权的人。即可以接受对部分或全部项目贡献的人。 +> *演示有大量正在进行的提交和合并的贡献。 +> *由于这些指标可能会根据项目的类型,范围和大小而有很大差异,因此TOC对足以满足这些标准的活动级别拥有最终决策权 -### Graduated stage + +### Graduated stage 毕业级 > To graduate from sandbox or incubating status, or for a new project to join as a graduated project, a project must meet the incubating stage criteria plus: > @@ -73,13 +92,23 @@ The CNCF has detailed [criteria][8] for each maturity level (included below for > * Have a public list of project adopters for at least the primary repo (e.g., ADOPTERS.md or logos on the project website). > * Receive a supermajority vote from the TOC to move to graduation stage. Projects can attempt to move directly from sandbox to graduation, if they can demonstrate sufficient maturity. Projects can remain in an incubating state indefinitely, but they are normally expected to graduate within two years. > +>要从沙箱或孵化状态毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化阶段标准外还要满足: +> +> *至少有两个组织的提交者。 +> *已获得并维护了“核心基础设施计划最佳实践徽章”。 +> *已完成独立和第三方安全审核,并发布了具有与以下示例类似的范围和质量的结果(包括已解决的关键漏洞):和所有关键毕业之前需要解决漏洞。 +> *采用CNCF行为准则。 +> *明确定义项目治理和提交流程。最好将其排布在GOVERNANCE.md文件中,并引用显示当前提交者和荣誉提交者的OWNERS.md文件。 +> *至少有主仓的项目采用者的公开列表(例如,ADOPTERS.md或项目网站上的徽标)。 +> *获得TOC的多数票,进入毕业阶段。如果项目能够证明足够的成熟度,则可以尝试直接从沙箱过渡到毕业。项目可以无限期保持孵化状态,但是通常预计它们会在两年内毕业。 - -## 9 projects to consider +## 9 projects to consider 值得考虑的9个项目 While it’s impossible to cover all of the CNCF projects in this article, I’ll describe are nine of most interesting Graduated and Incubating open source projects. +本文不可能涵盖所有的CNCF项目,我将介绍最有趣的9个“毕业和孵化中”的开源项目。 Name | License | What It Is +名称|授权类型|简要描述 ---|---|--- [Kubernetes][9] | Apache 2.0 | Orchestration platform for containers [Prometheus][10] | Apache 2.0 | Systems and service monitoring tool From b92368a456a10747fc4d5ec875c0a055caf58e77 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Tue, 7 Apr 2020 23:42:26 +0800 Subject: [PATCH 002/394] Update --- ...ource cloud native projects to consider.md | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index 2ab8fb2dc2..a543462a0f 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -12,6 +12,7 @@ Work with containers? Get familiar with these projects from the Cloud Native Computing Foundation 工作中使用了容器?熟悉来自云原生计算基金会的这些项目 + ![clouds in the sky with blue pattern][1] As the practice of developing applications with containers is getting more popular, [cloud-native applications][2] are also on the rise. By [definition][3]: @@ -39,7 +40,7 @@ Cloud-Native Computing Foundation projects 云原生计算基金会项目 I mean, just look at that! And this is just a start. Just as NodeJS’s creation sparked the explosion of endless JavaScript tools, the popularity of container technology started the exponential growth of cloud-native applications. -我的意思是,看看那! 这仅仅是一个开始。 正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用程序的指数增长。 +我的意思是,留意吧!这仅仅是一个开始。 正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用程序的指数增长。 The good news is that there are several organizations that oversee and connect these dots together. One is the [**Open Containers Initiative (OCI)**][6], which is a lightweight, open governance structure (or project), "formed under the auspices of the Linux Foundation for the express purpose of creating open industry standards around container formats and runtime." The other is the **CNCF**, "an open source software foundation dedicated to making cloud native computing universal and sustainable." 好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[** Open Containers Initiative(OCI)**][6],它是一种轻量级的,开放的治理结构(或项目),“是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准容器格式和运行时。” 另一个是** CNCF **,“致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 @@ -110,31 +111,37 @@ While it’s impossible to cover all of the CNCF projects in this article, I’l Name | License | What It Is 名称|授权类型|简要描述 ---|---|--- -[Kubernetes][9] | Apache 2.0 | Orchestration platform for containers -[Prometheus][10] | Apache 2.0 | Systems and service monitoring tool -[Envoy][11] | Apache 2.0 | Edge and service proxy -[rkt][12] | Apache 2.0 | Pod-native container engine -[Jaeger][13] | Apache 2.0 | Distributed tracing system -[Linkerd][14] | Apache 2.0 | Transparent service mesh -[Helm][15] | Apache 2.0 | Kubernetes package manager -[Etcd][16] | Apache 2.0 | Distributed key-value store -[CRI-O][17] | Apache 2.0 | Lightweight runtime for Kubernetes +[Kubernetes][9] | Apache 2.0 | Orchestration platform for containers 容器编排平台 +[Prometheus][10] | Apache 2.0 | Systems and service monitoring tool 系统和服务监控工具 +[Envoy][11] | Apache 2.0 | Edge and service proxy 边缘和服务代理 +[rkt][12] | Apache 2.0 | Pod-native container engine Pod原生的容器引擎 +[Jaeger][13] | Apache 2.0 | Distributed tracing system 分布式跟踪系统 +[Linkerd][14] | Apache 2.0 | Transparent service mesh 无感服务网格 +[Helm][15] | Apache 2.0 | Kubernetes package manager K8s包管理器 +[Etcd][16] | Apache 2.0 | Distributed key-value store 分布式键值存储 +[CRI-O][17] | Apache 2.0 | Lightweight runtime for Kubernetes 专门用于K8s的轻量级运行时环境 I also created this video tutorial to walk through these projects. +我也创建了这个视频材料来介绍这些项目。 -## Graduated projects +## Graduated projects 毕业项目 Graduated projects are considered mature—adopted by many organizations—and must adhere to the CNCF’s guidelines. Following are three of the most popular open source CNCF Graduated projects. (Note that some of these descriptions are adapted and reused from the projects' websites.) +已毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了CNCF的准则。 以下是三个最受欢迎的开源CNCF毕业项目。 (请注意,其中一些描述来源于项目的网站并被做了改编。) -### Kubernetes +### Kubernetes K8S Ah, Kubernetes. How can we talk about cloud-native applications without mentioning Kubernetes? Invented by Google, Kubernetes is undoubtedly the most famous container-orchestration platform for container-based applications, and it is also an open source tool. +Kubernetes。我们如何在不提及Kubernetes的情况下谈论云原生应用程序? Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 What is a container orchestration platform? Basically, a container engine on its own may be okay for managing a few containers. However, when you are talking about thousands of containers and hundreds of services, managing those containers becomes super complicated. This is where the container engine comes in. The container-orchestration engine helps scale containers by automating the deployment, management, networking, and availability of containers. +什么是容器编排平台? 通常,一个容器引擎本身可以管理几个容器。 但是,当您谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。 这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署,管理,网络和可用性来帮助管理大量的容器。 Docker Swarm and Mesosphere Marathon are other container-orchestration engines, but it is safe to say that Kubernetes has won the race (at least for now). Kubernetes also gave birth to Container-as-a-Service (CaaS) platforms like [OKD][18], the Origin community distribution of Kubernetes that powers [Red Hat OpenShift][19]. +Docker Swarm和Mesosphere Marathon也是容器编排引擎,但是可以肯定地说Kubernetes在竞争中胜出(至少现在是这样)。Kubernetes还诞生了容器即服务(CaaS)平台如[OKD][18],它是Origin社区针对Kubernetes的发行版,并成了[Red Hat OpenShift][19]的一部分。 To get started, visit the [Kubernetes GitHub repository][9], and access its documentation and learning resources from the [Kubernetes documentation][20] page. +想开始学习请访问[Kubernetes GitHub仓库][9],并从[Kubernetes文档][20]页面访问其文档和学习资源。 ### Prometheus From 71a93c952db70ce2ca2eb6869a62a53944ff0f1e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Apr 2020 13:41:51 +0800 Subject: [PATCH 003/394] PRF @geekpi --- ...hich Graphics Card do You Have in Linux.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md b/translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md index 68e41c5b9a..e7b5957c9e 100644 --- a/translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md +++ b/translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md @@ -1,16 +1,16 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Find Which Graphics Card do You Have in Linux?) [#]: via: (https://itsfoss.com/check-graphics-card-linux/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -如何找出 Linux 中的显卡? +如何知道你的 Linux 用的哪种显卡? ====== -无论是 [Nvidia][1] 还是 [Radeon][2] 或者 Intel,它们都可能在 Linux 中有问题。当你要对图形问题进行故障排除时,首先要了解系统中装有哪种显卡。 +无论是 [Nvidia][1] 还是 [Radeon][2] 或者 Intel,它们的显卡都可能在 Linux 中有问题。当你要对图形问题进行故障排除时,首先要了解系统中装有哪种显卡。 Linux 有几个命令可以检查硬件信息。你可以使用它们来检查你有哪些显卡(也称为视频卡)。让我向你展示一些命令来获取 Linux 中的 GPU 信息。 @@ -20,9 +20,9 @@ Linux 有几个命令可以检查硬件信息。你可以使用它们来检查 #### 使用 lspci 命令查找显卡 -lspci 命令显示通过 [PCI][4](外设组件互连)总线连接的设备的信息。基本上,此命令提供有关系统所有外设的详细信息,从键盘和鼠标到声卡、网卡和显卡。 +`lspci` 命令显示通过 [PCI][4](外设组件互连Peripheral Component Interconnect)总线连接的设备的信息。基本上,此命令提供有关系统从键盘和鼠标到声卡、网卡和显卡的所有外设的详细信息。 -默认情况下,你会有大量的此类外设列表。这就是为什么你需要用 grep 命令过滤显卡的原因: +默认情况下,你会有大量的此类外设列表。这就是为什么你需要用 `grep` 命令过滤出显卡的原因: ``` lspci | grep VGA @@ -31,7 +31,7 @@ lspci | grep VGA 这应该会显示一行有关你显卡的信息: ``` -[email protected]:~$ lspci | grep VGA +abhishek@itsfoss:~$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 620 (rev 02) ``` @@ -39,7 +39,7 @@ lspci | grep VGA #### 在 Linux 中使用 lshw 命令获取显卡详细信息 -lspci 命令足以查看你的显卡,但是并不能告诉你很多信息。你可以使用 lshw 命令获取有关它的更多信息。 +`lspci` 命令足以查看你的显卡,但是并不能告诉你很多信息。你可以使用 `lshw` 命令获取有关它的更多信息。 此命令要求你有 root 用户权限。你需要以这种方式查找视频卡(显卡)信息: @@ -50,7 +50,7 @@ sudo lshw -C video 正如你在下面的输出中看到的那样,此命令提供了有关显卡的更多信息,例如时钟频率、位宽、驱动等。 ``` -[email protected]:~$ sudo lshw -C video +abhishek@itsfoss:~$ sudo lshw -C video [sudo] password for abhishek: *-display description: VGA compatible controller @@ -66,7 +66,7 @@ sudo lshw -C video resources: irq:139 memory:db000000-dbffffff memory:90000000-9fffffff ioport:f000(size=64) memory:c0000-dffff ``` -#### 额外的技巧:以图形方式检查显卡详细信息 +#### 附赠技巧:以图形方式检查显卡详细信息 并非必须使用命令行在 Linux 中查找显卡详细信息。大多数 Linux 发行版(或者应该说是桌面环境)在设置中提供了必要的详细信息。 @@ -85,7 +85,7 @@ via: https://itsfoss.com/check-graphics-card-linux/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 00a7bcbfbf88e3e72a57ec2f897ff1011aa0d1f6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Apr 2020 13:42:41 +0800 Subject: [PATCH 004/394] PUB @geekpi https://linux.cn/article-12086-1.html --- ...01 How to Find Which Graphics Card do You Have in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200401 How to Find Which Graphics Card do You Have in Linux.md (98%) diff --git a/translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md b/published/20200401 How to Find Which Graphics Card do You Have in Linux.md similarity index 98% rename from translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md rename to published/20200401 How to Find Which Graphics Card do You Have in Linux.md index e7b5957c9e..6ad35a9367 100644 --- a/translated/tech/20200401 How to Find Which Graphics Card do You Have in Linux.md +++ b/published/20200401 How to Find Which Graphics Card do You Have in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12086-1.html) [#]: subject: (How to Find Which Graphics Card do You Have in Linux?) [#]: via: (https://itsfoss.com/check-graphics-card-linux/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 10b94f2ee3e2b25b6acd18d8e0459134f68cf4ff Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Apr 2020 19:18:16 +0800 Subject: [PATCH 005/394] PRF --- ...r Python code should be flat and sparse.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/translated/tech/20191224 Why your Python code should be flat and sparse.md b/translated/tech/20191224 Why your Python code should be flat and sparse.md index d1d59b5fc6..23de06e38f 100644 --- a/translated/tech/20191224 Why your Python code should be flat and sparse.md +++ b/translated/tech/20191224 Why your Python code should be flat and sparse.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (caiichenr) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Why your Python code should be flat and sparse) @@ -9,19 +9,20 @@ 为何你的 Python 代码应是扁平与稀疏的 ====== -本文是 Python 之禅特别系列当中的一篇,此篇着眼于其中第五与第六条原则:扁平与稀疏。 -![Digital creative of a browser on the internet][1] -[Python之禅][2] 得名如此,正是由于它那简明扼要的规则被设计出的意图在于让读者进行深入地思考,而绝不单是为编程提供一份易于遵守的指南。 +> 本文是 Python 之禅特别系列的第三篇,此篇着眼于其中第五与第六条原则:扁平与稀疏。 -读后不去三思其意,断然难以体会 Python 之禅的妙处。倘若 Python 之禅仅仅罗列出一组清晰的法则,那法则之间的矛盾只能算作一种错误。然而用作引导读者去为最优方案沉思的工具,矛盾却是绝佳的。 +![](https://img.linux.net.cn/data/attachment/album/202004/08/191645uiniiy56keig95gi.jpg) -### 扁平胜过嵌套 Flat is better than nested. +[Python 之禅][2] 之所以得名,正是由于它那简明扼要的规则被设计出的意图在于让读者进行深入地思考,而绝不单是为编程提供一份易于遵守的指南。 -迫于对缩进的强硬要求,Python 对“扁平化”的需求显然远超它者。其余编程语言为了缓解对缩进的需求,通常会在嵌套结构里加入一种“欺诈”的手段。用以说明此点,不妨一同看看JavaScript。 +读后不去三思其意,断然难以体会 Python 之禅的妙处。倘若 Python 之禅仅仅罗列出一组清晰的法则,那法则之间的矛盾是一种缺憾,然而作为引导读者沉思最优方案沉思的工具,矛盾却是绝佳的。 -JavaScript 是原生异步的,这意味着程序员用 JavaScript 写的代码会用到大量的回调函数。 +### 扁平胜过嵌套Flat is better than nested +迫于对缩进的强硬要求,Python 对“扁平化”的需求显然远超它者。其余编程语言为了缓解对缩进的需求,通常会在嵌套结构里加入一种“作弊”的手段。为了理解这一点,不妨一同来看看 JavaScript。 + +JavaScript 本质上是异步的,这意味着程序员用 JavaScript 写的代码会用到大量的回调函数。 ``` a(function(resultsFromA) { @@ -33,8 +34,7 @@ a(function(resultsFromA) { } ``` -忽略这段代码的具体内容,只去观察这段代码的形状与缩进带来极右点的方式。这种独特的“箭头”图形在我们扫看代码时格外扎眼,这种写法也因此被视作不可取,甚至得到了“回调地狱”的绰号。不过,在 JavaScript 中,这种反映嵌套关系的缩进可以通过“欺诈”来回避。 - +忽略这段代码的具体内容,只去观察这段代码的形状与缩进带来一个最右边的点的方式。这种独特的“箭头”图形在我们扫看代码时格外扎眼,这种写法也因此被视作不可取,甚至得到了“回调地狱”的绰号。不过,在 JavaScript 中,这种反映嵌套关系的缩进可以通过“作弊”来回避。 ``` a(function(resultsFromA) { @@ -46,10 +46,9 @@ c(resultsFromC, }}} ``` -Python 并没有提供这种欺诈手段:每一级嵌套在代码中都如实的对应着一层缩进。因此,Python 深层的嵌套关系在_视觉_上也一定是深层嵌套的。这使得“回调地狱”的问题对于 Python 而言要比在 JavaScript 中严重得多:嵌套的回调函数必定带来缩进,而绝无使用花括号来“欺诈”的可能。 - -这项挑战与 Python 之禅的指导原则相结合后,在我参与的库中催生出了一个优雅的解决方案。我们在 [Twisted][3] 框架里提出了 _deferred_ 抽象,日后 JavaScript 中流行的 _promise_ 抽象亦是受其启发而生。正是由于 Python 对整洁代码的坚守,方能推动 Python 开发者去发掘新的,强力的抽象。 +Python 并没有提供这种作弊手段:每一级嵌套在代码中都如实的对应着一层缩进。因此,Python 深层的嵌套关系在*视觉*上也一定是深层嵌套的。这使得“回调地狱”的问题对于 Python 而言要比在 JavaScript 中严重得多:嵌套的回调函数必定带来缩进,而绝无使用花括号来“作弊”的可能。 +这项挑战与 Python 之禅的指导原则相结合后,在我参与的库中催生出了一个优雅的解决方案。我们在 [Twisted][3] 框架里提出了 deferred 抽象,日后 JavaScript 中流行的 promise 抽象亦是受其启发而生。正是由于 Python 对整洁代码的坚守,方能推动 Python 开发者去发掘新的、强力的抽象。 ``` future_value = future_result() @@ -58,11 +57,11 @@ future_value.addCallback(b) future_value.addCallback(c) ``` -(现代 JavaScript 程序员也许会觉得这段代码十分眼熟:Promises 着实受到了 Twisted 里 deferreds 抽象的深远影响。) +(现代 JavaScript 程序员也许会觉得这段代码十分眼熟:promise 着实受到了 Twisted 里 deferred 抽象的深远影响。) -### 稀疏胜过密集 Sparse is better than dense. +### 稀疏胜过密集Sparse is better than dense -最易降低代码密集程度的方法是引入嵌套。这种习惯也正是有关稀疏的原则要随着前一条提出的原因:在竭尽所能地降低代码密集性之后,我们往往会遗留下_密集_的代码或数据结构。此处的密集,是指塞进过量信息的小段代码,它们会导致错误发生后的解析变得困难。 +最易降低代码密集程度的方法是引入嵌套。这种习惯也正是有关稀疏的原则要随着前一条提出的原因:在竭尽所能地减少嵌套之后,我们往往会遗留下*密集的*代码或数据结构。此处的密集,是指塞进过量信息的小段代码,它们会导致错误发生后的解析变得困难。 这种密集性唯有通过创造性的思考方可改善,此外别无捷径。Python 之禅并不为我们提供简单的解决方案,它只会指明改善代码的方向,而非提供“如何”去做的向导。 @@ -75,7 +74,7 @@ via: https://opensource.com/article/19/12/zen-python-flat-sparse 作者:[Moshe Zadka][a] 选题:[lujun9972][b] 译者:[caiichenr](https://github.com/caiichenr) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8790324ab1a7675e41105fa1c1766972d751bb81 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Apr 2020 19:19:21 +0800 Subject: [PATCH 006/394] PUB @caiichenr https://linux.cn/article-12087-1.html --- ...20191224 Why your Python code should be flat and sparse.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20191224 Why your Python code should be flat and sparse.md (98%) diff --git a/translated/tech/20191224 Why your Python code should be flat and sparse.md b/published/20191224 Why your Python code should be flat and sparse.md similarity index 98% rename from translated/tech/20191224 Why your Python code should be flat and sparse.md rename to published/20191224 Why your Python code should be flat and sparse.md index 23de06e38f..5f9bf864e6 100644 --- a/translated/tech/20191224 Why your Python code should be flat and sparse.md +++ b/published/20191224 Why your Python code should be flat and sparse.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (caiichenr) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12087-1.html) [#]: subject: (Why your Python code should be flat and sparse) [#]: via: (https://opensource.com/article/19/12/zen-python-flat-sparse) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) From 44fa3c9e108bf8a419cb2c5447dfc1752eb8695b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Apr 2020 22:57:27 +0800 Subject: [PATCH 007/394] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chunibyo-wly 恭喜你完成了第一篇翻译贡献! --- .../20190612 How to write a loop in Bash.md | 110 +++++++++--------- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git a/translated/tech/20190612 How to write a loop in Bash.md b/translated/tech/20190612 How to write a loop in Bash.md index d17bfdd4b2..99844f15ff 100644 --- a/translated/tech/20190612 How to write a loop in Bash.md +++ b/translated/tech/20190612 How to write a loop in Bash.md @@ -1,31 +1,33 @@ [#]: collector: "lujun9972" [#]: translator: "chunibyo-wly" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "How to write a loop in Bash" [#]: via: "https://opensource.com/article/19/6/how-write-loop-bash" -[#]: author: "Seth Kenlon https://opensource.com/users/seth/users/goncasousa/users/howtopamm/users/howtopamm/users/seth/users/wavesailor/users/seth" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" -# 如何在 Bash 中使用循环 +如何在 Bash 中使用循环 +====== -使用循环和查找命令批量自动处理文件。 -![bash logo on green background][1] +> 使用循环和查找命令批量自动对多个文件进行一系列的操作。 -人们希望学习批处理命令的一个普遍原因是批处理具有强大的功能。如果你希望批量的对文件执行指令,制作一个可以重复运行在那些文件上的命令就是一种方法。在编程术语中,这被称作 _execution control_ ,**for** 循环就是其中最常见的一种。 +![](https://img.linux.net.cn/data/attachment/album/202004/08/225655by8i8k7uyppp18ph.jpg) -**for** 循环可以详细描述你希望你的计算机对 _for_ 遍历的数据对象(比如说文件)所进行的操作。 +人们希望学习批处理命令的一个普遍原因是要得到批处理强大的功能。如果你希望批量的对文件执行一些指令,构造一个可以重复运行在那些文件上的命令就是一种方法。在编程术语中,这被称作*执行控制*,`for` 循环就是其中最常见的一种。 -### 一般循环 +`for` 循环可以详细描述你希望计算机对你指定的每个数据对象(比如说文件)所进行的操作。 -使用循环的一个简单例子是对一组文件进行分析。这个循环可能没什么用,但是这是一个安全的证明自己有能力独立处理文件夹里每一个文件的方法。首先,创建一个文件夹然后拷贝一些文件(例如 JPEG,PNG 等类似的文件)至文件夹中生成一个测试环境。你可以通过文件管理器或者终端来完成创建文件夹和拷贝文件的操作: +### 一般的循环 + +使用循环的一个简单例子是对一组文件进行分析。这个循环可能没什么用,但是这是一个安全的证明自己有能力独立处理文件夹里每一个文件的方法。首先,创建一个文件夹然后拷贝一些文件(例如 JPEG、PNG 等类似的文件)至文件夹中生成一个测试环境。你可以通过文件管理器或者终端来完成创建文件夹和拷贝文件的操作: ```bash $ mkdir example $ cp ~/Pictures/vacation/*.{png,jpg} example ``` -切换到你刚创建的那个文件夹,然后列出文件并确认这个测试环境是你需要的: +切换到你刚创建的那个新文件夹,然后列出文件并确认这个测试环境是你需要的: ``` $ cd example @@ -36,27 +38,27 @@ otago.jpg waterfall.png ``` -在循环中逐一遍历文件的语法是:首先声明一个变量(例如使用 **f** 代表文件),然后定义一个你希望用变量循环的数据集。在这种情况下,使用 **\*** 通配符来遍历当前文件夹下的所有文件(通配符 **\*** 匹配 _一切_)。然后使用一个分号(**;**)来结束这个语句。 +在循环中逐一遍历文件的语法是:首先声明一个变量(例如使用 `f` 代表文件),然后定义一个你希望用变量循环的数据集。在这种情况下,使用 `*` 通配符来遍历当前文件夹下的所有文件(通配符 `*` 匹配*所有文件*)。然后使用一个分号(`;`)来结束这个语句。 ``` -`$ for f in * ;` +$ for f in * ; ``` -取决于你个人的喜好,你可以选择在这里按下 **Return**。在语法完成前,shell 是不会尝试执行这个循环的。 +取决于你个人的喜好,你可以选择在这里按下回车键。在语法完成前,shell 是不会尝试执行这个循环的。 -接下来,定义在每次循环中你想要进行的操作。简单起见,使用 **file** 命令来得到 **f** 变量(使用 **\$** 告诉 shell 使用这个变量的值,无论这个变量现在存储着什么)所存储着的文件的信息: +接下来,定义你想在每次循环中进行的操作。简单起见,使用 `file` 命令来得到 `f` 变量(使用 `$` 告诉 shell 使用这个变量的值,无论这个变量现在存储着什么)所存储着的文件的各种信息: ``` -`do file $f ;` +do file $f ; ``` -使用另一个引号结束这一行,然后关闭这个循环: +使用另一个分号结束这一行,然后关闭这个循环: ``` -`done` +done ``` -按下 **Return** 启动 shell 对当前文件夹下 _所有东西_ 的遍历。**for** 循环将会一个一个的将文件分配给变量 **f** 并且执行你的命令: +按下回车键启动 shell 对当前文件夹下*所有东西*的遍历。`for` 循环将会一个一个的将文件分配给变量 `f` 并且执行你的命令: ``` $ for f in * ; do @@ -82,49 +84,49 @@ waterfall.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced ### 一个实用的例子 -下面是一个循环在日常使用中的实用案例。假如你拥有一堆假期拍的照片想要发给你的朋友。它们对于 email 来说太大了,上传到 [photo-sharing service][2] 也不方便。因此你希望创建小型的 web 版本的照片,但是你不希望花费太多时间在一个一个的压缩图片体积上。 +下面是一个循环在日常使用中的实用案例。假如你拥有一堆假期拍的照片想要发给你的朋友。但你的照片太大了,无法通过电子邮件发送,上传到[图片分享服务][2]也不方便。因此你想为你的照片创建小型的 web 版本,但是你不希望花费太多时间在一个一个的压缩图片体积上。 -首先,在你的 Linux,BSD 或者 Mac 上使用包管理器安装 **ImageMagick** 命令。例如,在 Fedora 和 RHEL 上: +首先,在你的 Linux、BSD 或者 Mac 上使用包管理器安装 ImageMagick 命令。例如,在 Fedora 和 RHEL 上: ``` -`$ sudo dnf install ImageMagick` +$ sudo dnf install ImageMagick ``` 在 Ubuntu 和 Debian 上: ``` -`$ sudo apt install ImageMagick` +$ sudo apt install ImageMagick ``` -在 BSD 上,使用 **ports** 或者 [pkgsrc][3]。在 Mac 上,使用 [Homebrew][4] 或者 [MacPorts][5]。 +在 BSD 上,使用 `ports` 或者 [pkgsrc][3] 安装。在 Mac 上,使用 [Homebrew][4] 或者 [MacPorts][5] 安装。 -在你安装了 ImageMagick 之后,你就拥有一系列命令可以用来操作图片了。 +在你安装了 ImageMagick 之后,你就拥有一系列可以用来操作图片的新命令了。 为你将要创建的文件建立一个目标文件夹: ``` -`$ mkdir tmp` +$ mkdir tmp ``` 使用下面的循环可以将每张图片减小至原来大小的 33%。 ``` -`$ for f in * ; do convert $f -scale 33% tmp/$f ; done` +$ for f in * ; do convert $f -scale 33% tmp/$f ; done ``` -然后就可以在 **tmp** 文件夹中看到已经缩小了的照片了。 +然后就可以在 `tmp` 文件夹中看到已经缩小了的照片了。 -你可以在循环体中使用任意数量的命令,因此如果你需要对一批文件进行复杂的操作,可以将你的命令放在一个 **for** 循环的 **do** 和 **done** 声明之间。例如,假设你希望将所有处理过的图片拷贝至你的网站所托管的图片文件夹并且在本地系统移除这些文件: +你可以在循环体中使用任意数量的命令,因此如果你需要对一批文件进行复杂的操作,可以将你的命令放在一个 `for` 循环的 `do` 和 `done` 语句之间。例如,假设你希望将所有处理过的图片拷贝至你的网站所托管的图片文件夹并且在本地系统移除这些文件: ``` $ for f in * ; do -convert $f -scale 33% tmp/$f -scp -i seth_web tmp/$f [seth@example.com][6]:~/public_html -trash tmp/$f ; + convert $f -scale 33% tmp/$f + scp -i seth_web tmp/$f seth@example.com:~/public_html + trash tmp/$f ; done ``` -你的计算机会对 **for** 循环中处理的每一个文件自动的执行 3 条命令。这意味着假如你仅仅处理 10 张图片,也会省下 30 条指令和更多的时间。 +你的计算机会对 `for` 循环中处理的每一个文件自动的执行 3 条命令。这意味着假如你仅仅处理 10 张图片,也会省下输入 30 条指令和更多的时间。 ### 限制你的循环 @@ -136,7 +138,7 @@ $ ls -m tmp cat.jpg, otago.jpg ``` -或者,你希望重复特定次数的某个操作而不仅仅只处理文件。**for** 循环的变量的值是被你赋给它的不管何种类型的数据所决定的,所以你可以创建一个循环遍历数字而不只是文件: +或者,你希望重复特定次数的某个操作而不仅仅只处理文件。`for` 循环的变量的值是被你赋给它的(不管何种类型的)数据所决定的,所以你可以创建一个循环遍历数字而不只是文件: ``` $ for n in {0..4}; do echo $n ; done @@ -149,15 +151,15 @@ $ for n in {0..4}; do echo $n ; done ### 更多循环 -现在你了解的知识已经足够用来创建自己的循环体了。直到你对循环非常熟悉之前,尽可能的在需要处理的文件的 _复制_ 上进行操作。使用固有的保护措施可以预防损坏自己的数据和制造不可复现的错误,例如偶然将一个文件夹下的所有文件重命名为同一个名字,就可能会导致他们的相互覆盖。 +现在你了解的知识已经足够用来创建自己的循环体了。直到你对循环非常熟悉之前,尽可能的在需要处理的文件的*副本*上进行操作。使用内置的保护措施可以预防损坏自己的数据和制造不可复现的错误,例如偶然将一个文件夹下的所有文件重命名为同一个名字,就可能会导致他们的相互覆盖。 -更多的 **for** 循环话题,请继续阅读。 +更进一步的 `for` 循环话题,请继续阅读。 -### Not all shells are Bash 不是所有的 shell 都是 Bash +### 不是所有的 shell 都是 Bash -关键字 **for** 是内置在 Bash shell 中的。许多类似的 shell 会使用和 Bash 同样的关键字和语法,但是也有某些 shell ,比如 [tcsh][7],使用不同的关键字,例如 **foreach**。 +关键字 `for` 是内置在 Bash shell 中的。许多类似的 shell 会使用和 Bash 同样的关键字和语法,但是也有某些 shell ,比如 [tcsh][7],使用不同的关键字,例如 `foreach`。 -tcsh 的语法与 Bash 类似,但是它更为严格。例如在下面的例子中,不要在你的终端的第 2,3 行键入 **foreach?** 。它只是提示你仍处在构建循环的过程中。 +tcsh 的语法与 Bash 类似,但是它更为严格。例如在下面的例子中,不要在你的终端的第 2、3 行键入 `foreach?` 。它只是提示你仍处在构建循环的过程中。 ``` $ foreach f (*) @@ -169,15 +171,15 @@ otago.jpg: JPEG image data, EXIF standard 2.2 waterfall.png: PNG image data, 4608 x 2592, 8-bit/color RGB, non-interlaced ``` -在 tcsh 中,**foreach** 和 **end** 都必须单独的在一行中出现。因此你不能像 Bash 或者其他类似的 shell 一样只使用一行命令创建一个 **for** 循环。 +在 tcsh 中,`foreach` 和 `end` 都必须单独的在一行中出现。因此你不能像 Bash 或者其他类似的 shell 一样只使用一行命令创建一个 `for` 循环。 ### for 循环与 find 命令 -理论上,你可能会用到不支持 **for** 循环的 shell,或者你只是更想使用其他命令的一些特性来完成和循环一样的工作。 +理论上,你可能会用到不支持 `for` 循环的 shell,或者你只是更想使用其他命令的一些特性来完成和循环一样的工作。 -使用**find** 命令是另一个实现 **for** 循环功能的途径。这个命令通过 [Parallel][8] 提供了几种方法来定义你的循环中需要包括的文件的范围。 +使用 `find` 命令是另一个实现 `for` 循环功能的途径。这个命令提供了多种方法来定义循环中包含哪些文件的范围以及[并行][8]处理的选项。 -**find** 命令顾名思义就是帮助你查询存储在硬盘里的文件。他的用法很简单:提供一个你希望它查询的位置的路径,接着 **find** 就会查询这个路径下面的所有文件和文件夹。 +`find` 命令顾名思义就是帮助你查询存储在硬盘里的文件。它的用法很简单:提供一个你希望它查询的位置的路径,接着 `find` 就会查询这个路径下面的所有文件和文件夹。 ``` $ find . @@ -188,7 +190,7 @@ $ find . ./waterfall.png ``` -你可以通过添加名称的某些部分用于过滤搜索结果: +你可以通过添加名称的某些部分来过滤搜索结果: ``` $ find . -name "*jpg" @@ -196,7 +198,7 @@ $ find . -name "*jpg" ./otago.jpg ``` -**find** 命令非常好的地方在于你可以通过 **-exec** 参数标志将它查询到的每一个文件放入循环中。例如,只对存放在你的 example 文件夹下的 PNG 图片进行体积压缩操作: +`find` 命令非常好的地方在于你可以通过 `-exec` 参数标志将它查询到的每一个文件放入循环中。例如,只对存放在你的 `example` 文件夹下的 PNG 图片进行体积压缩操作: ``` $ find . -name "*png" -exec convert {} -scale 33% tmp/{} \; @@ -204,9 +206,9 @@ $ ls -m tmp design_maori.png, waterfall.png ``` -在 **-exec** 短语中,括号 **{}** 表示的是 **find** 正在处理的条目(换句话说,每一个被找到的以 PNG 结尾的文件)。**-exec** 短语必须使用分号结尾,但是 Bash 中常常也会使用分号。为了解决这个二义性问题,你的 **结束符** 可以使用反斜杠加上一个分号(**\;**),使得 **find** 命令可以知道这个结束符是用来标识自己结束使用的。 +在 `-exec` 短语中,括号 `{}` 表示的是 `find` 正在处理的条目(换句话说,每一个被找到的以 PNG 结尾的文件)。`-exec` 短语必须使用分号结尾,但是 Bash 中常常也会使用分号。为了解决这个二义性问题,你的 `结束符` 可以使用反斜杠加上一个分号(`\;`),使得 `find` 命令可以知道这个结束符是用来标识自己结束使用的。 -**find** 命令的操作非常棒,某些情况下它甚至可以表现得更棒。比如说,在一个新的进程中使用同一条命令查找 PNG 文件,你可能就会得到一些错误信息: +`find` 命令的操作非常棒,某些情况下它甚至可以表现得更棒。比如说,在一个新的进程中使用同一条命令查找 PNG 文件,你可能就会得到一些错误信息: ``` $ find . -name "*png" -exec convert {} -flip -flop tmp/{} \; @@ -215,27 +217,27 @@ No such file or directory @ error/blob.c/OpenBlob/2643. ... ``` -看起来 **find** 不只是定位了当前文件夹(**.**)下的所有 PNG 文件,还包括已经处理并且存储到了 **tmp** 下的文件。在一些情况下,你可能希望 **find** 查询当前文件夹下再加上其子文件夹下的所有文件。**find** 命令是一个功能强大的递归工具,特别体现在处理一些文件结构复杂的情境下(比如用来放置存满了音乐人音乐专辑的文件夹),同时你也可以使用 **-maxdepth** 选项来限制最大的递归深度。 +看起来 `find` 不只是定位了当前文件夹(`.`)下的所有 PNG 文件,还包括已经处理并且存储到了 `tmp` 下的文件。在一些情况下,你可能希望 `find` 查询当前文件夹下再加上其子文件夹下的所有文件。`find` 命令是一个功能强大的递归工具,特别体现在处理一些文件结构复杂的情境下(比如用来放置存满了音乐人音乐专辑的文件夹),同时你也可以使用 `-maxdepth` 选项来限制最大的递归深度。 -只在当前文件夹下查找 PNG 文件(不包括子文件夹) +只在当前文件夹下查找 PNG 文件(不包括子文件夹): ``` -`$ find . -maxdepth 1 -name "*png"` +$ find . -maxdepth 1 -name "*png" ``` -上一条命令的最大深度再加 1 就可以查找和处理当前文件夹及下一级子文件夹下面的文件 +上一条命令的最大深度再加 1 就可以查找和处理当前文件夹及下一级子文件夹下面的文件: ``` -`$ find . -maxdepth 2 -name "*png"` +$ find . -maxdepth 2 -name "*png" ``` -**find** 命令默认是查找每一级文件夹。 +`find` 命令默认是查找每一级文件夹。 ### 循环的乐趣与收益 你使用的循环越多,你就可以越多的省下时间和力气,并且可以应对庞大的任务。虽然你只是一个用户,但是通过使用循环,可以使你的计算机完成困难的任务。 -你可以并且应该使用循环就像使用其他的命令一样。在你需要重复的处理单个或多个文件时,尽可能的使用这个命令。无论如何,这也算是一项需要被严肃对待的编程活动,因此如果你需要在一些文件上完成复杂的任务,你应该多花点时间在计划自己的工作流上面。如果你可以在一份文件上完成你的工作,接下来将操作包装进 **for** 循环里就相对简单了,这里面唯一的“编程”的需要只是理解变量是如何工作的并且进行充分的规划工作将已处理过的文件和未处理过的文件分开。经过一段时间的练习,你就可以从一名 Linux 用户升级成一位知道如何使用循环的 Linux 用户,所以开始让计算机为你工作吧! +你可以并且应该就像使用其他的命令一样使用循环。在你需要重复处理单个或多个文件时,尽可能的使用这个命令。无论如何,这也算是一项需要被严肃对待的编程活动,因此如果你需要在一些文件上完成复杂的任务,你应该多花点时间在规划自己的工作流上面。如果你可以在一份文件上完成你的工作,接下来将操作包装进 `for` 循环里就相对简单了,这里面唯一的“编程”的需要只是理解变量是如何工作的并且进行充分的规划工作将已处理过的文件和未处理过的文件分开。经过一段时间的练习,你就可以从一名 Linux 用户升级成一位知道如何使用循环的 Linux 用户,所以开始让计算机为你工作吧! --- @@ -244,7 +246,7 @@ via: https://opensource.com/article/19/6/how-write-loop-bash 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[chunibyo-wly](https://github.com/chunibyo-wly) -校对:[校对者 ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 From a87d9e03019bc8e503b2bfa56fde97be045ef508 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 8 Apr 2020 22:58:46 +0800 Subject: [PATCH 008/394] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @chunibyo-wly 本文首发地址: https://linux.cn/article-12088-1.html 你的 LCTT 专页地址: https://linux.cn/lctt/chunibyo-wly 请注册以领取你的 LCCN: https://lctt.linux.cn/ --- .../20190612 How to write a loop in Bash.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190612 How to write a loop in Bash.md (99%) diff --git a/translated/tech/20190612 How to write a loop in Bash.md b/published/20190612 How to write a loop in Bash.md similarity index 99% rename from translated/tech/20190612 How to write a loop in Bash.md rename to published/20190612 How to write a loop in Bash.md index 99844f15ff..6649f2b926 100644 --- a/translated/tech/20190612 How to write a loop in Bash.md +++ b/published/20190612 How to write a loop in Bash.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "chunibyo-wly" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-12088-1.html" [#]: subject: "How to write a loop in Bash" [#]: via: "https://opensource.com/article/19/6/how-write-loop-bash" [#]: author: "Seth Kenlon https://opensource.com/users/seth" From 866abac6ddb8c2b80a1e952b14ffbae488790703 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Wed, 8 Apr 2020 23:19:09 +0800 Subject: [PATCH 009/394] Update 20190814 9 open source cloud native projects to consider.md --- ...90814 9 open source cloud native projects to consider.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index a543462a0f..6d81cf1762 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -146,14 +146,16 @@ To get started, visit the [Kubernetes GitHub repository][9], and access its docu ### Prometheus Prometheus is an open source system monitoring and alerting toolkit built at SoundCloud in 2012. Since then, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project that is maintained independently of the company. +Prometheus是2012年在SoundCloud上构建的一个开源系统监控和告警工具。之后,许多公司和组织都使用了Prometheus,并且该项目拥有非常活跃的开发者和用户群体。 现在,它是一个独立于公司的独立维护的开源项目。 ![Prometheus’ architecture][21] -Prometheus’ architecture +Prometheus’ architecture Prometheus的架构 The easiest way to think about Prometheus is to visualize a production system that needs to be up 24 hours a day and 365 days a year. No system is perfect, and there are techniques to reduce failures (called fault-tolerant systems). However, if an issue occurs, the most important thing is to identify it as soon as possible. That is where a monitoring tool like Prometheus comes in handy. Prometheus is more than a container-monitoring tool, but it is most popular among cloud-native application companies. In addition, other open source monitoring tools, including [Grafana][22], leverage Prometheus. - +理解Prometheus的最简单方法是可视化一个生产系统,该系统需要24(小时)x365天都可以正常运行。 没有哪个系统是完美的,也有减少故障的技术(称为容错系统)。 但是,如果出现问题,最重要的是尽快识别它。 这就是像Prometheus这样的监控工具的用武之地。Prometheus不仅是容器监控工具,它在云原生应用公司中也最受欢迎。 此外,其他开源监视工具,包括[Grafana][22],都借鉴了Prometheus。 The best way to get started with Prometheus is to check out its [GitHub repo][10]. Running Prometheus locally is easy, but you need to have a container engine installed. You can access detailed documentation on [Prometheus’ website][23]. +开始使用Prometheus的最佳方法是下载其[GitHub仓库][10]。 在本地运行Prometheus很容易,但是您需要安装一个容器引擎。 您可以在[Prometheus网站][23]上查看详细的文档。 ### Envoy From 05a9c3d1eb64fa18e0f7e927e845cd072f8a9664 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Apr 2020 00:57:54 +0800 Subject: [PATCH 010/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200409=20GNOME?= =?UTF-8?q?=20Announces=20Community=20Engagement=20Challenge=20Offering=20?= =?UTF-8?q?up=20to=20$65,000=20in=20Rewards?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md --- ...lenge Offering up to -65,000 in Rewards.md | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md diff --git a/sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md b/sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md new file mode 100644 index 0000000000..63de71fec7 --- /dev/null +++ b/sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md @@ -0,0 +1,84 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (GNOME Announces Community Engagement Challenge Offering up to $65,000 in Rewards) +[#]: via: (https://itsfoss.com/gnome-community-engagement-challenge/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +GNOME Announces Community Engagement Challenge Offering up to $65,000 in Rewards +====== + +It’s always good to see several competitions or challenges trying to promote Free and Open-Source Software (FOSS) more than ever. + +In a recent effort by GNOME with the help of [Endless][1], they announced the inaugural GNOME Community Engagement Challenge. + +This Community Challenge is a part of their original announcement of [coding education challenge for which GNOME was granted $500,000 funding by Endless][2] last year. + +The three-phase challenge aims to attract new developers to engage with FOSS and potentially create new/unique solutions that would gain more traction from the next-gen coders. + +The challenge will involve up to $65,000 in cash prizes. Sounds exciting, right? Let’s take a look at some of the details involved in the challenge. + +![][3] + +### Why The GNOME Community Engagement Challenge? + +In their official [press release][4], they mentioned their primary motive for the challenge: + +> “Through the Challenge we hope to reach a diverse audience, to encourage beginning coders to get involved with the FOSS community to help ensure that free software is available long into the future,” said Neil McGovern, GNOME Foundation Executive Director. “What better way to do that than to reach out to the community itself to come up with creative ways to inspire the next generation?” + +As Neil mentioned above, it’s definitely a good idea to reach out to more people (community) to look for creative ways to promote and work on FOSS projects that will leave a significant impact on the open-source community. + +And, rewarding for the ideas in the form of a challenge will easily get the attention needed. + +### Here’s How The Community Challenge Works + +To quote the official announcement: + +> The Challenge will ask entrants to devise creative ways to promote open-source software to coders typically in high school and college. How a submission will achieve this goal has deliberately been left open-ended to encourage unique, novel approaches. + +So, there’s no particular constraint for the type of ideas or projects you can propose and submit. But, it would be wise to read the usual [terms and conditions][5] to know about the submission rules, eligibility, requirements, prize details, and more. + +Here are the key information about the three phases of the challenge as per the announcement: + + * The **first phase** of the Challenge asks entrants to submit a written proposal for their concept no later than **July 1, 2020**. Twenty entries will be chosen to move to the next round and receive **$1000 each**. + * The **second phase** of the Challenge will require proof of concept, with four entries receiving **$5000** and moving onto the final round. + * The final round will call for a deliverable end product, with the winner receiving **$15,000** and the second place finisher receiving **$10,000**. + + + +They plan to announce the winner of the challenge in the spring of 2021. + +You can take a look at their [challenge FAQ][6] and the [official webpage][7] for more details before starting to submit your entry on **April 9th**. The last date of submission is **July 1, 2020**. + +Head to their website to get started and explore more about the challenge. + +[GNOME Community Engagement Challenge][7] + +### Wrapping Up + +I think this is a perfect opportunity for developers to get started with FOSS projects that will end up rewarding them with a good amount of money and help the community at the same time. + +What do you think about the community engagement challenge by GNOME? Feel free to let me know your thoughts in the comments below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gnome-community-engagement-challenge/ + +作者:[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://www.endlessnetwork.com/ +[2]: https://itsfoss.com/endless-gnome-coding-education-challenge/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-community-challenge.png?ssl=1 +[4]: https://www.gnome.org/news/2020/04/gnome-foundation-and-endless-launch-inaugural-community-engagement-challenge/ +[5]: https://www.gnome.org/challenge/terms/ +[6]: https://www.gnome.org/challenge/faq/ +[7]: https://www.gnome.org/challenge/ From 93b8258f3abaa92e92910980100ed3af91a5d72f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Apr 2020 00:58:29 +0800 Subject: [PATCH 011/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200409=20Here?= =?UTF-8?q?=E2=80=99s=20How=20to=20Find=20Out=20Which=20Desktop=20Environm?= =?UTF-8?q?ent=20You=20are=20Using?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md --- ...Which Desktop Environment You are Using.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md diff --git a/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md new file mode 100644 index 0000000000..3a8576fc49 --- /dev/null +++ b/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md @@ -0,0 +1,111 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using) +[#]: via: (https://itsfoss.com/find-desktop-environment/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Here’s How to Find Out Which Desktop Environment You are Using +====== + +If you are a new Linux user and seeking help in one of the Linux forums, you may be asked this question: + +_**“Which desktop environment are you using?”**_ + +You have an idea about what a desktop environment is but how do you know which one are you using? I’ll tell you how to find it out. I’ll show the command line method first because that is applicable to [all kind of Linux distributions][1]. I’ll also show the graphical way of getting this information. + +### Check which desktop environment you are using + +![][2] + +You can [use the echo command in Linux][3] to display the value of XDG_CURRENT_DESKTOP variable in the terminal. + +Open the terminal and copy paste this command: + +``` +echo $XDG_CURRENT_DESKTOP +``` + +For example, it shows that I am using [GNOME desktop][4] in [Ubuntu 20.04][5]: + +``` +[email protected]:~$ echo $XDG_CURRENT_DESKTOP +ubuntu:GNOME +``` + +While this command quickly tells you which desktop environment is being used, it doesn’t give any other information. + +Knowing the version of desktop environment (also called DE) could be important in some cases. Each new version of a software brings new features or removes some. [GNOME 3.36][6] introduces a ‘Do Not Disturb’ option to toggle off all the desktop notifications. + +Suppose you read about this new Do Not Disturb feature. You verify that you are using GNOME and yet you don’t see this option in your GNOME desktop. If you could check the GNOME desktop version you have installed on your system, that could make things clear for you. + +I’ll show you the commands to check the desktop environment’s version first because you can use it in any Linux, running desktop environment. + +### How to get desktop environment version + +Unlike getting the name of desktop environment. getting its version number is not straightforward because there is no standard command or environment variable that could give this information. + +One way to get the desktop environment information in Linux is by using a tool like [Screenfetch][7]. This [command line tool displays the logo of your Linux distribution in ascii format][8] along with a few basic system information. Desktop environment version is one of them. + +In Ubuntu based distributions, you can install Screenfetch by [enabling Universe repository][9] and then using this command: + +``` +sudo apt install screenfetch +``` + +For other Linux distributions, please use your system’s package manager to install this program. + +Once installed, simply type screenfetch in the terminal and it should show the desktop environment version along with other system information. + +![Check Desktop Environment Version][10] + +As you can see in the above image, my system is using GNOME 3.36.1 (basically GNOME 3.36). You can also [check the Linux kernel version][11] and other details here. + +Please keep in mind that it is not necessary that Screenfetch will display the desktop environment version. I checked its source code and it has lots of if-else code to get the version information from a number of sources and parameters in various desktop environments. If it can find nothing on version, it just displays the DE name. + +### Using GUI to check desktop environment version + +Almost all desktop environments provide basic system details in their Settings-About section. + +The one major problem is that most DEs look different and thus I cannot show the exact steps for each of them. I am going to show it for GNOME and I let you discover it in your desktop. + +So, search for Settings in the menu (press Windows key and search): + +![Search for Settings application][12] + +In here, go to the bottom to find the About section. Click on it and you should have the desktop environment along with its version. + +![Check Desktop Environment in Ubuntu][13] + +As you can see, it shows that my system is using GNOME 3.36. + +I hope you find this quick beginner tip useful. If you have questions or suggestions, please leave a comment below. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/find-desktop-environment/ + +作者:[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/what-is-linux/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1 +[3]: https://linuxhandbook.com/echo-command/ +[4]: https://www.gnome.org/ +[5]: https://itsfoss.com/ubuntu-20-04-release-features/ +[6]: https://itsfoss.com/gnome-3-36-release/ +[7]: https://github.com/KittyKatt/screenFetch +[8]: https://itsfoss.com/display-linux-logo-in-ascii/ +[9]: https://itsfoss.com/ubuntu-repositories/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1 +[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1 From 5e2dc96d4941fd5da4be5c5feb0e0253815c9947 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Apr 2020 01:01:10 +0800 Subject: [PATCH 012/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200408=20My=20L?= =?UTF-8?q?inux=20Story:=20From=208-bit=20enthusiast=20to=20Unix=20sysadmi?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md --- ... From 8-bit enthusiast to Unix sysadmin.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md diff --git a/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md b/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md new file mode 100644 index 0000000000..569981ebea --- /dev/null +++ b/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (My Linux Story: From 8-bit enthusiast to Unix sysadmin) +[#]: via: (https://opensource.com/article/20/4/linux-story) +[#]: author: (James Farrell https://opensource.com/users/jamesf) + +My Linux Story: From 8-bit enthusiast to Unix sysadmin +====== +How my early interest in computers got me hooked on a career as a +sysadmin and Linux fan. +![Person typing on a 1980's computer][1] + +It all started in the mid-1980s with an [Apple ][c][2] that my parents purchased for our family. Although I enjoyed playing games, I quickly became fascinated with BASIC programming and how useful it could be for work and fun. This was an era when computers were viewed as little more than typewriters, so people with "advanced computer skills" could easily use them to their advantage. + +One example was using BASIC and a dot matrix printer to auto-generate punishment assignments. When I was assigned to write out 200 times some apologetic statements, I asked my teacher if it could be typed out. On confirmation, I wrote a 5 line BASIC program to generate it for me. Another example of subtle trickery was using non-WYSIWYG word processors, such as AppleWorks for micro-manipulation of fonts, line spacing, and margins to "stretch" term papers out to the required length. + +My obsession with computers quickly lead to an Apple ][gs with a RAM drive card and an x86 PC co-processor card. Modems and BBSs were getting hot, and having a dual-hardware system like this gave me all sorts of options for software. However, modem speeds of 2400bps put a real damper on getting anything more than a few KBs of fun downloads per day. I stuck with Apple as a hobby for some time, but that was soon to change. + +### Venturing into Unix + +My undergraduate program was BS in Computer Information Systems (CIS) and my graduate degree was MS in Computer Science. My undergraduate education program put me mostly into PCs and a little into timeshare mainframes. The real fun began in my graduate programs, where dial-in access to Unix machines with internet connections opened a whole new world of exploration. Although I still used my dual-processor ][gs for modem work and writing and printing papers, Unix systems really grabbed my attention with their general-access Telnet-based games, FTP archives, online email, and C programming. Gopher was popular and growing with people like me who were bound to plain terminal interfaces. + +My graduate program took a fateful turn for the better when I was assigned to the academic computing department, which was charged with running computer services for the school. The students had access to [Ultrix][3]-based systems with X Window terminals. Most were grayscale, as color processing was then a CPU intensive task and really affected system performance. The few color systems were nice, but those machines just dragged. + +This was a really fun time for me, as I was given root access to systems and assigned to system and network maintenance. I had some excellent mentors, and this strongly influenced my decision to get into system administration rather than programming (although I still really love programming to this day). + +### From Unix to Linux + +Scarcity is the mother of invention, and we students often got creative when we had to share the scant resources of the school's computer systems. We had three to five times more students than we had Ultrix workstations, so finding resources (especially at project delivery time) was often a challenge. There was a bank of 56k [PPP][4] modems available for remote system access when graphical displays were not needed. However, finding a machine with spare resources and sharing the system for source compilation often resulted in slow progress. Like most, I found working at night often helped, but I needed something else to let me iterate more quickly. + +Then one of the school's sysadmins suggested I check out a Unix system that was freely available. This was Linux, made available as 3.5" floppy images. Given our school's blazing fast T1 line, it was easy for me to search newsgroups and other sources to learn how to download it. It was all 32-bit Intel PC-based, a class of equipment that I did not own. + +Luckily, my work at the school gave me access to junk piles of old computers, so the wheels started turning. + +I found enough discarded PCs to build a solid 80386 PC with some decent RAM (I am sure well under 1GB), a workable graphic display, a thin-net (coax) Ethernet card, and a hard disk. The images I had were Linux kernel 0.98, and I don't recall it being part of an official distribution (it might have been SLS). What I do remember is that it came on a series of floppy images—the first booted the kernel and a minimal installer, next it formatted the drive, and then it asked for each successive floppy image to install the core GNU utilities. After the core was installed and the system bootable, you would download and install other package images, like compilers and such. + +This was a serious boon to me in my academic career. With no X Window server display running, this PC seriously outperformed the Ultrix workstations I had access to at school. I was allowed to connect this machine to the academic network, mount the school's student Network File System (NFS) shares, and access the internet directly. Since my graduate program used [GCC][5] (and sometimes Perl 4) for most student work, I could do my development work locally. This gave me exclusive access to a key resource that enabled me to iterate more quickly on my projects. + +All was not perfect, however. The hardware was a tiny bit unstable (likely why it was discarded), but I could deal with that. What really got me was how much Linux and Ultrix differed at the OS and system library level. I began to appreciate what it meant to port software to other platforms; I was free to develop wherever I wanted, but I had to deliver my projects as Ultrix compiled binaries. The C code that ran perfectly on one platform would crash on the other. This was very frustrating, but probably my rudest awakening was early Linux's handling of null-pointer dereferencing. Linux seemed happy to pass over these as a virtual no-op, but Ultrix promptly dumped core on [SIGSEGV][6]. This was quite a thing to find out when my first port to the target platform happened days before my project was due! This also made my exploration of C++ quite challenging, as my careless use of malloc()/free() along with automatic [constructor and destructor][7] processing peppered my projects with null pointer bombs all over the place. + +Toward the end of my graduate program, I upgraded to a complete beast of a workstation—an Intel 486DX2 66MHz with SCSI hard drives, a CD-ROM drive, a 1024x768 RGB monitor, and a 16550 UART serial card perfectly matched to my new US Robotics V.Everything modem. It could dual-boot Windows and Linux, but more importantly, the graphics card and processor allowed a much more pleasant (and faster) development environment. The old 386 was still in service back at the school, but most of my heavy work and hacking now happened at home. + +Similar to [Mike Harris' story][8] about Linux in the '90s, I really got into those CD bundles that were popular at the time. There was a new Micro Center computer store close to where I lived, and it was a goldmine of hobby PC parts, phenomenal technical books, and every conceivable Linux (and free Unix) CD archive. I remember [Yggdrasil][9] and [Slackware][10] being some of my favorite distributions. What was really incredible was the enormous size of CD storage—650MB! This was an essential resource for getting access to software. Yes, you could download the bits at 56k, but that was quite limiting. Not to mention the fact that most people could not afford to archive that much idle data for later perusal. + +### And on to today + +This is what kicked off my more than 25 years of system administration and open source software fun. Linux has been an important part of both my career and personal development. Nowadays, I am still heavily into Linux (mostly CentOS, RedHat, and Ubuntu), but often have fun with the likes of [FreeBSD][11] and other cool open source offerings. + +My forays into Linux led me to Opensource.com, where I hope to give back a little and help bootstrap new generations of hands-on computer fun. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/linux-story + +作者:[James Farrell][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/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer) +[2]: https://en.wikipedia.org/wiki/Apple_IIc +[3]: https://en.wikipedia.org/wiki/Ultrix +[4]: https://en.wikipedia.org/wiki/Point-to-Point_Protocol +[5]: https://en.wikipedia.org/wiki/GNU_Compiler_Collection +[6]: https://en.wikipedia.org/wiki/Segmentation_fault +[7]: https://www.tutorialspoint.com/cplusplus/cpp_constructor_destructor.htm +[8]: https://opensource.com/article/19/11/learning-linux-90s +[9]: https://en.wikipedia.org/wiki/Yggdrasil_Linux/GNU/X +[10]: http://slackware.com +[11]: https://www.freebsd.org/ From 12f0a4eb986490c045d60b5cf9783721e9fc4fd7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Apr 2020 01:02:11 +0800 Subject: [PATCH 013/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200408=20Create?= =?UTF-8?q?=20web=20tutorials=20with=20Reveal.js=20and=20Git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200408 Create web tutorials with Reveal.js and Git.md --- ...te web tutorials with Reveal.js and Git.md | 221 ++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 sources/tech/20200408 Create web tutorials with Reveal.js and Git.md diff --git a/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md b/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md new file mode 100644 index 0000000000..52e34b34e1 --- /dev/null +++ b/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md @@ -0,0 +1,221 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Create web tutorials with Reveal.js and Git) +[#]: via: (https://opensource.com/article/20/4/create-web-tutorial-git) +[#]: author: (Eric D. Schabell https://opensource.com/users/eschabell) + +Create web tutorials with Reveal.js and Git +====== +Workshop slides can be viewed consistently on any browser, device, and +platform with this easy workflow. +![Person reading a book and digital copy][1] + +Whether you're a learner or a teacher, you probably recognize the value of online workshops set up like slideshows for communicating knowledge. If you've ever stumbled upon one of these well-organized tutorials that are set up page by page, chapter by chapter, you may have wondered how hard it was to create such a website. + +Well, I'm here to show you how easy it is to generate this type of workshop using a fully automated process. + +### Introduction + +When I started putting my learning content online, it was not a nice, seamless experience. So, I wanted something repeatable and consistent that was also easy to maintain, since my content changes as the technology I teach progresses. + +I tried many delivery models, from low-level code generators, such as [Asciidoctor][2], to laying out a workshop in a single PDF file. All failed to satisfy me. When I deliver live, onsite workshops, I like using slideshows, so I wondered if I could do the same thing for my online, self-paced workshop experiences. + +After some digging, I built a foundation for creating painless workshop websites. It helped that I was already using a presentation-generation framework that resulted in a website-friendly format (HTML). + +### Setting it up + +Here the basic components you need for this project: + + * Workshop idea (this is your problem, can't help you here) + * Reveal.js for the workshop slides + * GitLab project repository + * Your favorite HTML code editor + * Web browser + * Git installed on your machine + + + +If this list looks intimidating, there's a quick way to get started that doesn't involve pulling all the pieces together one by one: You can use my template project to give you a kickstart with the slides and project setup. + +This article assumes you're familiar with Git and projects hosted on a Git platform like GitLab. If you need a refresher or tutorial, check out our [introductory Git series][3]. + +Start by cloning the template project to your local machine: + + +``` +`$ git clone https://gitlab.com/eschabell/beginners-guide-automated-workshops.git` +``` + +Set up a new GitLab project for this and import the template project as the initial import. + +There are a number of important files for the workshop website. In the **root** directory, you'll find a file called **.gitlab-ci.yml**, which is used as a trigger when you commit changes to the master branch (i.e., merge pull requests to **master**). It triggers a copy of the complete contents of the **slides** directory into the GitLab project's **website** folder. + +I have this hosted as a project called **beginners-guide-automated-workshops** in my GitLab account. When it deploys, you can view the contents of the **slides** directory in your browser by navigating to: + + +``` +`https://eschabell.gitlab.io/beginners-guide-automated-workshops` +``` + +For your user account and project, the URL would look like: + + +``` +`https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME]` +``` + +These are the basic materials you need to start creating your website content. When you push changes, they will automatically generate your updated workshop website. Note that the default template contains several example slides, which will be your first workshop website after you complete the full check-in to your repository. + +The workshop template results in a [reveal.js][4] slideshow that can run in any browser, with automatic resizing that allows it to be viewed by almost anyone, anywhere, on any device. + +How's that for creating handy and accessible workshops? + +### How it works + +With this background in place, you're ready to explore the workshop materials and start putting your content together. Everything you need can be found in the project's **slides** directory; this is where all of the magic happens with reveal.js to create the workshop slideshow in a browser. + +The files and directories you'll be working with to craft your workshop are: + + * The **default.css** file + * The **images** directory + * The **index.html** file + + + +Open each one in your favorite HTML/CSS editor and make the changes described below. It does not matter which editor you use; I prefer [RubyMine IDE][5] because it offers a page preview in the local browser. This helps when I'm testing out content before pushing it online to the workshop website. + +#### Default.css file + +The file **css/theme/default.css** is the base file where you will set important global settings for your workshop slides. The two main items of interest are the default font and background image for all slides. + +In **default.css**, look at the section labeled **GLOBAL STYLES**. The current default font is listed in the line: + + +``` +`font-family: "Red Hat Display", "Overpass", san-serif;` +``` + +If you're using a non-standard font type, you must import it (as was done for the Overpass font type) in the line: + + +``` +`@import url('SOME_URL');` +``` + +The **background** is the default image for every slide you create. It is stored in the **images** directory (see below) and set in the line below (focus on the image path): + + +``` +`background: url("…/…/images/backgrounds/basic.png")` +``` + +To set a default background, just point this line to the image you want to use. + +#### Images directory + +As its name implies, the **images** directory is used for storing the images you want to use on your workshop slides. For example, I usually put screenshots that demonstrate the progress of the workshop topic on my individual slides. + +For now, just know that you need to store the background images in a subdirectory (**backgrounds**) and the images you plan to use in your slides in the **Images** directory. + +#### Index.html file + +Now that you have those two files sorted out, you'll spend the rest of your time creating slides in the HTML files, starting with **index.html**. For your workshop website to start taking shape, pay attention to the following three sections in this file: + + * The **head** section, where you set the title, author, and description + * The **body** section, where you find the individual slides to design + * Each **section**, where you define the contents of individual slides + + + +Start with the **head** section, since it's at the top. The template project has three placeholder lines for you to update: + + +``` +<title>INSERT-YOUR-TITLE-HERE</title> +<meta name="description" content="YOUR DESCIPTION HERE."> +<meta name="author" content="YOUR NAME"> +``` + +The **title** tag contains the text that appears in the browser tab when the file is open. Change it to something relevant to the title of your workshop (or maybe a section of your workshop), but remember to keep it short since tab title space is limited. The **description** meta tag contains a short description of your workshop, and the **author** meta tag is where you should put your name (or the workshop creator's name, if you're doing this for someone else). + +Now move on to the **body** section. You'll notice that it's divided into a number of **section** tags. The opening of the **body** contains a comment that explains that you're creating slides for each open and closing tag labeled **section**: + + +``` +<body> +        <div class="reveal"> + +        <!-- Any section element inside of this container is displayed as a slide --> +        <div class="slides"> +``` + +Next, create your individual slides, with each slide enclosed in **section** tags. The template includes a few slides to help you get started. For example, here's the first slide: + + +``` +<section> +      <div style="width: 1056px; height: 300px"> +            <h1>Beginners guide</h1> +            <h2>to automated workshops</h2> +      </div> +      <div style="width: 1056px; height: 200px; text-align: left"> +            Brought to you by,<br/> +            YOUR-NAME<br/> +      </div> +      <aside class="notes">Here are notes: Welcome to the workshop!</aside> +</section> +``` + +This slide has two areas divided with **div** tags. Spacing separates the title and the author. + +Assuming you have some knowledge of using HTML, try various things to develop your workshop. It's really handy to use a browser as you go to preview the results. Some IDEs provide local viewing of changes, but you can also open the **index.html** file and view your changes before pushing them to the repository. + +Once you're satisfied with your workshop, push your changes, and wait for them to pass through the continuous integration pipeline. They'll be hosted like the template project at . + +### Learn more + +To learn more about what you can do with this workflow, check out the following example workshops and sites that host workshop collections. All of these are based on the workflow described in this article. + +Workshop examples: + + * [Red Hat Process Automation Manage workshop][6] + * [JBoss Travel Agency BPM Suite online workshop][7] + + + +Workshop collections: + + * [Rule the world: Practical decisions & process automation development workshops][8] + * [Application development in the cloud workshop][9] + * [Portfolio architecture: Workshops for creating impactful architectural diagrams][10] + + + +I hope this beginner's guide and the template workshop project show you easy and painless it can be to develop and maintain workshop websites in a consistent manner. I also hope this workflow gives your workshop audiences full access to your content on almost any device so they can learn from the knowledge you're sharing. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/create-web-tutorial-git + +作者:[Eric D. Schabell][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/eschabell +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) +[2]: https://asciidoctor.org/ +[3]: https://opensource.com/resources/what-is-git +[4]: https://revealjs.com/#/ +[5]: https://www.jetbrains.com/ruby/ +[6]: https://gitlab.com/bpmworkshop/rhpam-devops-workshop +[7]: https://gitlab.com/bpmworkshop/presentation-bpmworkshop-travel-agency +[8]: https://bpmworkshop.gitlab.io/ +[9]: https://appdevcloudworkshop.gitlab.io/ +[10]: https://redhatdemocentral.gitlab.io/portfolio-architecture-workshops From c1d36e79b154a820e1a9a20e34fb0ad28be44c7d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 9 Apr 2020 01:05:03 +0800 Subject: [PATCH 014/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200408=20IBM=20?= =?UTF-8?q?taps=20new=20leaders=20for=20hybrid=20cloud=20battles=20ahead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md --- ... leaders for hybrid cloud battles ahead.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md diff --git a/sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md b/sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md new file mode 100644 index 0000000000..fbcb14b32d --- /dev/null +++ b/sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IBM taps new leaders for hybrid cloud battles ahead) +[#]: via: (https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +IBM taps new leaders for hybrid cloud battles ahead +====== +IBM installs Arvind Krishna as CEO, and appoints Red Hat execs to round out new cloud-oriented team +Stephen Lawson/IDG + +Amid the business chaos COVID-19 is causing, IBM has set its course by [installing][1] Arvind Krishna as CEO and Red Hat CEO Jim Whitehurst as IBM president.  The company also named Red Hat veteran Paul Cormier as CEO of Red Hat. + +Krishna replaces long-time CEO Virginia Rometty, who will  retire at the end of the year, and the package of executive moves solidifies the team that will lead Big Blue into to [hybrid-cloud][2] world where it will battle Amazon, Google and Microsoft. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] + +Right now, though, that team must also compete in the face the COVID-19 pandemic, an issue [Krishna][4] mentioned in a [letter he posted on LinkedIn][5] on his first day on the job, April 6. + +“During this challenging time, we all need to have empathy, solidarity, and understanding for each other…If there’s one thing that this public health crisis has brought to light it is the ever essential role of IBM in the world. We are the backbone of some of the most critical systems of the world. Our technologies and services help banks run credit-card transactions, businesses run supply chains, telcos connect customers, healthcare providers improve patient care, and companies and cities tackle cyberthreats,” Krishna wrote. + +IBM has been part of the technology community that is helping address COVID-19.  For example, [IBM Research][6] has been developing cloud and AI-powered technologies that can help researchers battle against coronavirus, in part by accelerating COVID-19 drug discovery.  + +IBM is also leading the [COVID-19 High Performance Computing Consortium][7] with AWS, Google, HPE, and Microsoft as well as US National Labs, NASA, and others to bring [high-performance computing][8] systems together to help researchers run massive modeling calculations. + +While COVID-19 is a focus for now, the long term-goal is developing cloud technologies. + +[][9] + +“I believe we can make IBM the most trusted technology partner of the 21st century. For this to happen, we have to ensure that IBM continues to innovate and lead in the transformational journeys our clients are on. Hybrid cloud and AI are two dominant forces driving change for our clients and must have the maniacal focus of the entire company,” he stated. + +### Linux, Kubernetes and containers + +Krishna also wrote about IBM’s strategic cloud directions going forward. “First, we have to deepen our understanding of IBM’s two strategic battles: the journey to hybrid cloud and AI. We all need to understand and leverage IBM’s sources of competitive advantage. Namely, our open source and security leadership, our deep expertise and trust, and the fact that we enable clients to build mission-critical applications once and run them anywhere,” Krishna stated. + +IBM also has to win the battle for architecting the cloud. “There’s a unique window of opportunity for IBM and Red Hat to establish [Linux][10], containers and Kubernetes as the new standard. We can make Red Hat OpenShift the default choice for hybrid cloud in the same way that Red Hat Enterprise Linux is the default choice for the operating system,” Krishna stated. + +When IBM closed its [acquisition][11] of Red Hat last July for $34 billion it was clear it would take on the hybrid-cloud market and now, especially with the current executive team in place, that path is set more solidly. + +Krishna, 57, was a principal architect of IBM’s $34 billion acquisition of Red Hat last year and was IBM’s senior vice president of Cloud and Cognitive Software. Red Hat said Cormier drove more than 25 acquisitions at Red Hat and is credited with pioneering the subscription model that transformed Red Hat from an open-source disruptor to an enterprise-technology mainstay. + +Also as part of the new team, IBM said it tapped Bank of America telecom and cloud-technology executive Howard Boville as senior vice president of cloud platform, overseeing the IBM Cloud. + +Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html + +作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/article/3518795/ibms-ceo-virginia-rometty-to-be-replaced-by-its-cloud-red-hat-chiefs.html +[2]: https://www.networkworld.com/article/3233132/what-is-hybrid-cloud-computing.html +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.cnbc.com/video/2020/04/06/watch-cnbcs-full-interview-with-new-ibm-ceo-arvind-krishna.html?linkId=85936703 +[5]: https://www.linkedin.com/pulse/my-first-day-ceo-our-journey-together-arvind-krishna/?trackingId=SRWcJy7mSzagoHDTJX%2Br2Q%3D%3D +[6]: https://www.ibm.com/thought-leadership/covid19/ +[7]: https://www.networkworld.com/article/3533426/covid-19-tech-giants-government-agencies-add-supercomputing-to-the-fight.html +[8]: https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html +[9]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[10]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html +[11]: https://www.networkworld.com/article/3317517/the-ibm-red-hat-deal-what-it-means-for-enterprises.html +[12]: https://www.facebook.com/NetworkWorld/ +[13]: https://www.linkedin.com/company/network-world From f7dc249bd7b3817adc0b923918bdf6d0c86f6cb6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Apr 2020 08:46:46 +0800 Subject: [PATCH 015/394] translated --- ...ow to Use AUR on Arch and Manjaro Linux.md | 140 ------------------ ...ow to Use AUR on Arch and Manjaro Linux.md | 140 ++++++++++++++++++ 2 files changed, 140 insertions(+), 140 deletions(-) delete mode 100644 sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md create mode 100644 translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md diff --git a/sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md deleted file mode 100644 index 550ac3f9e4..0000000000 --- a/sources/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md +++ /dev/null @@ -1,140 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?) -[#]: via: (https://itsfoss.com/aur-arch-linux/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux? -====== - -If you have been using [Arch Linux][1] or other distribution based on Arch such as Manjaro, you might have comes across the term AUR. You try to install a new software and someone suggests to install it from AUR. This leaves you confused. - -What is this AUR? Why is it used? How to use AUR? I’ll answer these questions in this article. - -### What is AUR? - -![][2] - -AUR stands for Arch User Repository. It is a community-driven repository for Arch-based Linux distributions users. It contains package descriptions named [PKGBUILDs][3] that allow you to compile a package from source with [makepkg][4] and then install it via [pacman][5] (package manager in Arch Linux). - -The AUR was created to organize and share new packages from the community and to help accelerate popular packages’ inclusion into the [community repository][6]. - -A good number of new packages that enter the official repositories start in the AUR. In the AUR, users are able to contribute their own package builds (PKGBUILD and related files). - -The AUR community has the ability to vote for packages in the AUR. If a package becomes popular enough — provided it has a compatible license and good packaging technique — it may be entered into the community repository directly accessible by pacman. - -In short, AUR is the way for developers to make new software available to Arch Linux users before the software is officially included in Arch repositories. - -### Should you use AUR? What’s the risk involved? - -Using the AUR is like crossing the street. If you proceed with caution you should be fine. - -If you are new to Linux it is advised to not to use the AUR until you build a foundation knowledge about Arch/Manjaro and Linux in general. - -It is true that anyone can upload packages to the AUR but the [Trusted Users][7] (TUs) are charged with keeping an eye on what gets uploaded. Although TUs perform quality control to the uploaded packages, there is in no guarantee that packages in the AUR are well formed or not malicious. - -In practice the AUR seems to be quite safe but in theory it can do some damage, but only if you are not careful. A smart Arch user, **always** inspects PKGBUILDs and *.install files when building packages from the AUR. - -Additionally TUs (Trusted Users) also remove packages in the AUR that are included in core/extra/community so there should be no naming conflicts between them. The AUR will often contain developmental versions of packages (cvs/svn/git/etc) but they will have modified names such as foo-git. - -As for the AUR packages, pacman handles dependency resolution and detects file conflicts so you never have to worry about overwriting files in one package with files from another package unless you use the “–force” option by default. If you do that, you probably have more serious problems than file conflicts. - -### How to use AUR? - -The simplest way to use AUR is through a AUR helper. An [AUR helper][8] is a command line tool (some has GUI as well) that lets you search for packages published on the AUR and install them. - -##### Installing an AUR helper on Arch Linux - -Let’s say you want to use [Yay AUR helper][9]. Make sure that you have git installed on Linux. And then clone the repository, go to the directory and build the package. - -Use these commands one by one for that: - -``` -sudo pacman -S git -sudo git clone https://aur.archlinux.org/yay-git.git -cd yay -makepkg -si -``` - -Once installed, you can use yay command like this to install a package: - -``` -yay -S package_name -``` - -It’s not that you must use AUR helper for installing packages from AUR. Expand the next section to see how to use AUR without AUR helper. - -##### Installing AUR packages without AUR helpers - -If you don’t want to use AUR helper, you can install packages from AUR on your own as well. - -As soon as you find the package you want to install on [AUR page][10] it is advised to confirm “Licence”, “Popularity”, “Last Updated”, “Dependencies” and so on as an extra quality control step. - -``` -git clone [package URL] -cd [package name] -makepkg -si -``` - -For example. let’s say you want to install [telegram desktop package][11]: - -``` -git clone https://aur.archlinux.org/telegram-desktop-git.git -cd telegram-desktop-git -makepkg -si -``` - -#### Enabling AUR support in Manjaro Linux - -AUR isn’t enabled by default and you have to enable it through pamac. My laptop runs [Manjaro][12] Cinnamon but the steps are same for all Manjaro flavors. - -Open Pamac (listed as Add/Remove Software): - -![][13] - -Once you are in pamac go to preferences like shown below. - -![][14] - -In preferences dialog box go to AUR tab, enable the AUR support, enable check for updates and close the dialog box. - -![][15] - -You can now search for packages and those which belong to AUR can be identified by the tag under the package descriptions. - -![][16] - -I hope you find this article useful and keep an eye on social media for upcoming Arch related topics. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/aur-arch-linux/ - -作者:[Dimitrios Savvopoulos][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/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://www.archlinux.org/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-is-aur.png?ssl=1 -[3]: https://wiki.archlinux.org/index.php/PKGBUILD -[4]: https://wiki.archlinux.org/index.php/Makepkg -[5]: https://wiki.archlinux.org/index.php/Pacman#Additional_commands -[6]: https://wiki.archlinux.org/index.php/Community_repository -[7]: https://wiki.archlinux.org/index.php/Trusted_Users -[8]: https://itsfoss.com/best-aur-helpers/ -[9]: https://github.com/Jguer/yay -[10]: https://aur.archlinux.org/ -[11]: https://aur.archlinux.org/packages/telegram-desktop-git -[12]: https://manjaro.org/ -[13]: https://i1.wp.com/i.imgur.com/kFF6HtW.png?ssl=1 -[14]: https://i0.wp.com/i.imgur.com/47r963A.png?ssl=1 -[15]: https://i1.wp.com/i.imgur.com/UThiDHO.png?ssl=1 -[16]: https://i2.wp.com/i.imgur.com/RM5BKi2.png?ssl=1 diff --git a/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md new file mode 100644 index 0000000000..5a44bc4fef --- /dev/null +++ b/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md @@ -0,0 +1,140 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?) +[#]: via: (https://itsfoss.com/aur-arch-linux/) +[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) + +什么是 Arch 用户仓库(AUR)?如何在 Arch 和 Manjaro Linux 上使用 AUR? +====== + +如果你一直在使用 [Arch Linux][1] 或其他基于 Arch 的发行版,如 Manjaro,那么可能会遇到 AUR。你尝试安装新软件,有人建议从 AUR 中安装它。这让你感到困惑。 + +什么是 AUR?为什么使用它?如何使用 AUR?我将在本文中回答这些问题。 + +### 什么是 AUR? + +![][2] + +AUR 表示 Arch 用户仓库 (Arch User Repository)。它是针对基于 Arch 的 Linux 发行版用户的社区驱动的仓库。它包含名为 [PKGBUILDs][3] 的包描述,它可让你使用 [makepkg][4] 从源代码编译软件包,然后通过 [pacman][5](Arch Linux 中的软件包管理器)安装。 + +创建 AUR 的目的是组织和共享社区中的新软件包,并帮助加速将流行的软件包纳入[社区仓库][6]。 + +进入官方仓库的大量新软件包都从 AUR 开始。在 AUR 中,用户可以贡献自己的软件包构建(PKGBUILD 和相关文件)。 + +AUR 社区可以对 AUR 中的软件包进行投票。如果一个软件包变得足够流行(假设它具有兼容的许可证和良好的打包技术),那么可以将其加入 pacman 直接访问的社区仓库中。 + +简而言之,AUR 是开发人员在 Arch 仓库中正式包含新软件之前向 Arch Linux 用户提供新软件的一种方式。 + +### 你应该使用 AUR 吗?有什么风险? + +使用 AUR 就像过马路一样。如果你谨慎操作,应该就没问题。 + +如果你刚接触 Linux,建议你在建立有关 Arch/Manjaro 和 Linux 的基础知识之前不要使用 AUR。 + +的确,任何人都可以将软件包上传到 AUR,但[受信任用户][7] (TU) 负责监视上传的内容。尽管 TU 对上传的软件包执行质量控制,但不能保证 AUR 中的软件包格式正确或没有恶意。 + +在实践中,AUR 似乎很安全,但理论上讲它可以造成一定程度的损害,但前提是你不小心。从 AUR 构建软件包时,聪明的 Arch 用户**总是**检查 PKGBUILD 和 *.install 文件。 + +此外,TU(受信任用户)还删除了 AUR 中包含在 core/extra/community 中的软件包,因此它们之间不应存在命名冲突。AUR 通常会包含软件包的开发版本 (cvs/svn/git 等),但它们的名称会被修改,例如 foo-git。 + +对于 AUR软 件包,pacman 会处理依赖关系并检测文件冲突,因此,除非你默认使用 “–force” 选项,否则你不必担心用另一个包中的文件会覆盖另一个包的文件。如果这么做了,你可能会遇到比文件冲突更严重的问题。 + +### 如何使用 AUR? + +使用 AUR 的最简单方法是通过 AUR helper。 [AUR helper][8] 是一个命令行工具(有些还有 GUI),可让你搜索在 AUR 上发布的软件包并安装。 + +##### 在 Arch Linux 上安装 AUR helper + +假设你要使用 [Yay AUR helper][9]。确保在 Linux 上安装了 git。然后克隆仓库,进入目录并构建软件包。 + +依次使用以下命令: + +``` +sudo pacman -S git +sudo git clone https://aur.archlinux.org/yay-git.git +cd yay +makepkg -si +``` + +安装后,你可以使用 yay 命令来安装软件包: + +``` +yay -S package_name +``` + +并非必须使用 AUR helper 来从 AUR 安装软件包。从以下文章解如何在没有 AUR helper 的情况下使用 AUR。 + +##### 不使用 AUR helper 安装 AUR 软件包 + +如果你不想使用 AUR helper,那么也可以自行从 AUR 安装软件包。 + +在 [AUR 页面][10]上找到要安装的软件包后,建议确认“许可证”、“流行程度”、“最新更新”、“依赖项”等,作为额外的质量控制步骤。 + +``` +git clone [package URL] +cd [package name] +makepkg -si +``` + +例如。假设你要安装 [telegram 桌面包][11]: + +``` +git clone https://aur.archlinux.org/telegram-desktop-git.git +cd telegram-desktop-git +makepkg -si +``` + +#### 在 Manjaro Linux 中启用 AUR 支持 + +它默认情况下未启用 AUR,你必须通过 pamac 启用它。我的笔记本电脑运行 [Manjaro][12] Cinnamon,但是所有 Manjaro 变种的步骤都相同。 + +打开 Pamac(列为 “Add/Remove Software”): + +![][13] + +进入 pamac 后,请进入如下所示的首选项。 + +![][14] + +在首选项对话框中,进入 AUR 选项卡,启用 AUR 支持,启用检查更新并关闭对话框。 + +![][15] + +现在,你可以搜索软件包,并且可以通过软件包描述下的标签来识别属于 AUR 的软件包。 + +![][16] + +希望本文对你有用,并关注社交媒体上即将出现的与 Arch 相关的主题。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/aur-arch-linux/ + +作者:[Dimitrios Savvopoulos][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/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://www.archlinux.org/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-is-aur.png?ssl=1 +[3]: https://wiki.archlinux.org/index.php/PKGBUILD +[4]: https://wiki.archlinux.org/index.php/Makepkg +[5]: https://wiki.archlinux.org/index.php/Pacman#Additional_commands +[6]: https://wiki.archlinux.org/index.php/Community_repository +[7]: https://wiki.archlinux.org/index.php/Trusted_Users +[8]: https://itsfoss.com/best-aur-helpers/ +[9]: https://github.com/Jguer/yay +[10]: https://aur.archlinux.org/ +[11]: https://aur.archlinux.org/packages/telegram-desktop-git +[12]: https://manjaro.org/ +[13]: https://i1.wp.com/i.imgur.com/kFF6HtW.png?ssl=1 +[14]: https://i0.wp.com/i.imgur.com/47r963A.png?ssl=1 +[15]: https://i1.wp.com/i.imgur.com/UThiDHO.png?ssl=1 +[16]: https://i2.wp.com/i.imgur.com/RM5BKi2.png?ssl=1 From a900e7f8615b6e1973a7c37389a92597f0c523a8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 9 Apr 2020 09:00:46 +0800 Subject: [PATCH 016/394] translating --- ...n UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md b/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md index 20ea7834d6..b540f8995d 100644 --- a/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md +++ b/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 05bf9826af2249895e0c89bc4300de5f0dd2b343 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 9 Apr 2020 09:27:51 +0800 Subject: [PATCH 017/394] Rename sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md to sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md --- ...0200408 IBM taps new leaders for hybrid cloud battles ahead.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{talk => news}/20200408 IBM taps new leaders for hybrid cloud battles ahead.md (100%) diff --git a/sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md b/sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md similarity index 100% rename from sources/talk/20200408 IBM taps new leaders for hybrid cloud battles ahead.md rename to sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md From 1c4f864f6928f125760885fa88ced6e2cf739fbd Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Thu, 9 Apr 2020 14:26:28 +0800 Subject: [PATCH 018/394] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qfzy1233 is translating --- ...tes in LibreOffice to Save Time and Increase Productivity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md index 6eb5183c01..d464f6ccd4 100644 --- a/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md +++ b/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (qfzy1233 ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d2a7bb8ebffe7ab075e25b3943bfef2699bfb418 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Apr 2020 21:59:54 +0800 Subject: [PATCH 019/394] PRF @MjSeven --- ...ing tasks on Linux using the at command.md | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/translated/tech/20200403 Scheduling tasks on Linux using the at command.md b/translated/tech/20200403 Scheduling tasks on Linux using the at command.md index 3e44489281..931cf5315e 100644 --- a/translated/tech/20200403 Scheduling tasks on Linux using the at command.md +++ b/translated/tech/20200403 Scheduling tasks on Linux using the at command.md @@ -1,41 +1,42 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Scheduling tasks on Linux using the at command) [#]: via: (https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) -使用 at 命令在 Linu 上安排任务 +使用 at 命令在 Linux 上安排任务 ====== -at 命令可以很容易地安排 Linux 任务在你选择的任何时间或日期运行,让我们来看看它能为你做什么。 -![][0] -romkaz / Getty Images -当你希望命令或脚本在某个特定时间运行时,你不需要将手指放在键盘上盘旋等待按下回车键,或者是在特定时间坐在办公桌前。相反,你可以通过 **at** 命令来设置任务。在本文中,我们将研究如何使用 **at** 来安排任务,如何精确地选择任务希望运行的时间以及如何使用 **at** 来查看安排运行的任务。 +> at 命令可以很容易地安排 Linux 任务在你选择的任何时间或日期运行,让我们来看看它能为你做什么。 + +![][0] + +当你希望命令或脚本在某个特定时间运行时,你不需要将手指放在键盘上盘旋等待按下回车键,或者是在特定时间坐在办公桌前。相反,你可以通过 `at` 命令来设置任务。在本文中,我们将研究如何使用 `at` 来安排任务,如何精确地选择任务希望运行的时间,以及如何使用 `at` 来查看安排运行的任务。 ### at vs cron -对于那些使用 **cron** 在 Linux 系统上安排任务的人来说,**at** 命令类似于 **cron**,因为你可以在选定的时间调度任务,但是 **cron** 用于定期运行的作业 - 甚至是每年仅一次。大多数 **cron** 作业的频率都设置为每天、每周或每月运行一次,不过你可以控制运行的频率和时间。 +对于那些使用 cron 在 Linux 系统上安排任务的人来说,`at` 命令类似于 cron,因为你可以在选定的时间调度任务,但是 cron 用于定期运行的作业 —— 甚至是每年仅一次。大多数 cron 作业的频率都设置为每天、每周或每月运行一次,不过你可以控制运行的频率和时间。 -另一方面,**at** 命令用于仅运行一次的任务。想在午夜重启系统?没问题,假设你有适当的权限,**at** 可以为你完成此操作。如果你希望系统在每个星期六凌晨 2 点重启,那么改用 **cron**。 +另一方面,`at` 命令用于仅运行一次的任务。想在午夜重启系统?没问题,只要你有适当的权限,`at` 可以为你完成此操作。如果你希望系统在每个星期六凌晨 2 点重启,那么改用 cron。 ### 使用 at -**at** 命令很容易使用,只需记住几件事。一个简单使用 **at** 的例子类似于这样: +`at` 命令很容易使用,只需记住几件事。一个简单使用 `at` 的例子类似于这样: + ``` $ at 5:00PM at> date >> thisfile at> ``` -在输入 "at" 和应该运行命令的时间,**at** 会提示你在设定时间会运行该命令(此例中是 **`date`** 命令)。输入 **^D**(Ctrl + d) 来完成请求。 +在输入 `at` 和应该运行命令的时间,`at` 会提示你在设定时间会运行该命令(此例中是 `date` 命令)。输入 `^D`(`Ctrl + d`)来完成请求。 -假设我们在下午 5 点之前设置这个 **at** 命令,那么日期和时间将在当天下午 5 点添加到名为 "thisfile" 文件的末尾。否则,该命令将在第二天下午 5 点运行。 +假设我们在下午 5 点之前设置这个 `at` 命令,那么这个日期和时间将在当天下午 5 点添加到名为 `thisfile` 文件的末尾。否则,该命令将在第二天下午 5 点运行。 -与 **at** 命令进行交互时,可以输入多个命令。如果你要同时运行多个命令,只需输入多个命令行即可: -[][1] +与 `at` 命令进行交互时,可以输入多个命令。如果你要同时运行多个命令,只需输入多个命令行即可: ``` $ at 6:22 @@ -45,9 +46,9 @@ at> echo second >> thisfile at> ``` -在上面的命令中,我们使用了一个普通的用户账户,将一些简单的文本添加到该用户主目录的文件中。如果在上午 6:22 之后运行这些命令,那么命令会在第二天运行,因为 6:22 表示上午 6:22。如果你想在下午 6:22 运行,使用 6:22 PM 或者 18:22,"6:22 PM" 也可以。 +在上面的命令中,我们使用了一个普通的用户账户,将一些简单的文本添加到该用户主目录的文件中。如果在上午 6:22 之后运行这些命令,那么命令会在第二天运行,因为 6:22 表示上午 6:22。如果你想在下午 6:22 运行,使用 `6:22 PM` 或者 `18:22`。`6:22 PM` 这样也是可以工作的。 -你也可以通过使用 **at** 来安排命令在指定的日期或时间运行,例如 "10:00AM April 15 2021" 或 "noon + 5 days"(从今天起 5 天内的中午运行),以下是一些例子: +你也可以通过使用 `at` 来安排命令在指定的日期或时间运行,例如 `10:00AM April 15 2021` 或 `noon + 5 days`(从今天起 5 天内的中午运行),以下是一些例子: ``` at 6PM tomorrow @@ -56,7 +57,8 @@ at noon + 5 days at 9:15 + 1000 days ``` -在指定要运行的命令并按下 **^D** 后,你会注意到 **at** 命令为每个请求分配了一个作业编号,这个数字将显示在 **at** 命令的作业队列中。 +在指定要运行的命令并按下 `^D` 后,你会注意到 `at` 命令为每个请求分配了一个作业编号,这个数字将显示在 `at` 命令的作业队列中。 + ``` $ at noon + 1000 days warning: commands will be executed using /bin/sh @@ -67,7 +69,8 @@ job 36 at Tue Dec 27 12:00:00 2022 <== job # is 36 ### 检查队列 -你可以使用 **atq**(at queue) 命令来查看 **at** 作业队列: +你可以使用 `atq`(at queue)命令来查看 `at` 作业队列: + ``` $ atq 32 Thu Apr 2 03:06:00 2020 a shs @@ -76,7 +79,8 @@ $ atq 34 Thu Apr 2 18:00:00 2020 a shs ``` -如果你需要取消队列中的一个作业,使用 **atrm**(at remote) 命令和作业编号: +如果你需要取消队列中的一个作业,使用 `atrm`(at remove)命令和作业编号: + ``` $ atrm 32 $ atq @@ -85,7 +89,8 @@ $ atq 34 Thu Apr 2 18:00:00 2020 a shs ``` -你可以使用 **at -c** 命令来查看安排任务的详细信息,其它详细信息(活动的搜索路径等)也可以,但是输出的最后一行将显示计划运行的命令。 +你可以使用 `at -c` 命令来查看安排任务的详细信息,其它详细信息(活动的搜索路径等)也可以看到,但是输出的最后一行将显示计划运行的命令。 + ``` $ at -c 36 | tail -6 cd /home/shs || { @@ -95,11 +100,12 @@ cd /home/shs || { date >> thisfile ``` -注意,命令首先会测试是否可以通过 **cd** 命令进入用户目录。如果不可以,作业将退出并显示错误。如果可以,则运行在 **at** 中指定的命令。它将命令视为 “进入 /home/shs 或退出并显示错误”。 +注意,该命令显示首先会测试是否可以通过 `cd` 命令进入用户目录。如果不可以,作业将退出并显示错误。如果可以,则运行在 `at` 中指定的命令。它将命令视为 “进入 `/home/shs` 或退出并显示错误”。 ### 以 root 身份运行作业 -要以 root 身份运行 **at** 作业,只需将 **sudo** 与你的 **at** 命令一起使用,如下所示: +要以 root 身份运行 `at` 作业,只需将 `sudo` 与你的 `at` 命令一起使用,如下所示: + ``` $ sudo at 8PM [sudo] password for shs: @@ -109,7 +115,8 @@ at> job 37 at Wed Apr 1 16:00:00 2020 ``` -注意,root 的任务以 **root** 作为执行者显示在队列中。 +注意,root 的任务以 `root` 作为执行者显示在队列中。 + ``` 35 Mon Apr 6 12:00:00 2020 a shs 36 Tue Dec 27 12:00:00 2022 a shs @@ -118,7 +125,8 @@ job 37 at Wed Apr 1 16:00:00 2020 ### 运行脚本 -你还可以使用 **at** 命令来运行脚本,这里有一个例子: +你还可以使用 `at` 命令来运行脚本,这里有一个例子: + ``` $ at 4:30PM warning: commands will be executed using /bin/sh @@ -128,11 +136,11 @@ at> ### 禁止使用 at 命令 -**/etc/at.deny** 文件提供了一种禁止用户使用 **at** 命令的方法。默认情况下,它可能会包含一个不允许的账户列表,例如 **ftp** 和 **nobody**。可以使用 **/etc/at.allow** 文件执行相反的操作,但是通常只配置 **at.deny** 文件。 +`/etc/at.deny` 文件提供了一种禁止用户使用 `at` 命令的方法。默认情况下,它可能会包含一个不允许的账户列表,例如 `ftp` 和 `nobody`。可以使用 `/etc/at.allow` 文件执行相反的操作,但是通常只配置 `at.deny` 文件。 -**总结** +### 总结 -当你要安排一项一次性任务时,无论你是希望在今天下午或几年后运行,**at** 命令都是通用且易于使用的。 +当你要安排一项一次性任务时,无论你是希望在今天下午或几年后运行,`at` 命令都是通用且易于使用的。 -------------------------------------------------------------------------------- @@ -141,7 +149,7 @@ via: https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-usin 作者:[Sandra Henry-Stocker][a] 选题:[lujun9972][b] 译者:[MjSeven](https://github.com/MjSeven) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3d60cfd54eca04e65167978d96ba8bf49077d987 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Apr 2020 22:00:19 +0800 Subject: [PATCH 020/394] PUB @MjSeven https://linux.cn/article-12092-1.html --- ...20200403 Scheduling tasks on Linux using the at command.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200403 Scheduling tasks on Linux using the at command.md (98%) diff --git a/translated/tech/20200403 Scheduling tasks on Linux using the at command.md b/published/20200403 Scheduling tasks on Linux using the at command.md similarity index 98% rename from translated/tech/20200403 Scheduling tasks on Linux using the at command.md rename to published/20200403 Scheduling tasks on Linux using the at command.md index 931cf5315e..5c692a68ef 100644 --- a/translated/tech/20200403 Scheduling tasks on Linux using the at command.md +++ b/published/20200403 Scheduling tasks on Linux using the at command.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MjSeven) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12092-1.html) [#]: subject: (Scheduling tasks on Linux using the at command) [#]: via: (https://www.networkworld.com/article/3535808/scheduling-tasks-on-linux-using-the-at-command.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) From acc77f3db0ac59a5d547d084120b22e027ed65de Mon Sep 17 00:00:00 2001 From: MFG <48886453+MFGJT@users.noreply.github.com> Date: Thu, 9 Apr 2020 22:15:14 +0800 Subject: [PATCH 021/394] Update and rename sources/tech/20190116 Best Audio Editors For Linux.md to translated/20190116 Best Audio Editors For Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 翻译完毕 --- .../20190116 Best Audio Editors For Linux.md | 156 ------------------ .../20190116 Best Audio Editors For Linux.md | 155 +++++++++++++++++ 2 files changed, 155 insertions(+), 156 deletions(-) delete mode 100644 sources/tech/20190116 Best Audio Editors For Linux.md create mode 100644 translated/20190116 Best Audio Editors For Linux.md diff --git a/sources/tech/20190116 Best Audio Editors For Linux.md b/sources/tech/20190116 Best Audio Editors For Linux.md deleted file mode 100644 index 3b14f5b366..0000000000 --- a/sources/tech/20190116 Best Audio Editors For Linux.md +++ /dev/null @@ -1,156 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (MFGJT) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Best Audio Editors For Linux) -[#]: via: (https://itsfoss.com/best-audio-editors-linux) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Best Audio Editors For Linux -====== - -You’ve got a lot of choices when it comes to audio editors for Linux. No matter whether you are a professional music producer or just learning to create awesome music, the audio editors will always come in handy. - -Well, for professional-grade usage, a [DAW][1] (Digital Audio Workstation) is always recommended. However, not everyone needs all the functionalities, so you should know about some of the most simple audio editors as well. - -In this article, we will talk about a couple of DAWs and basic audio editors which are available as **free and open source** solutions for Linux and (probably) for other operating systems. - -### Top Audio Editors for Linux - -![Best audio editors and DAW for Linux][2] - -We will not be focusing on all the functionalities that DAWs offer – but the basic audio editing capabilities. You may still consider this as the list of best DAW for Linux. - -**Installation instruction:** You will find all the mentioned audio editors or DAWs in your AppCenter or Software center. In case, you do not find them listed, please head to their official website for more information. - -#### 1\. Audacity - -![audacity audio editor][3] - -Audacity is one of the most basic yet a capable audio editor available for Linux. It is a free and open-source cross-platform tool. A lot of you must be already knowing about it. - -It has improved a lot when compared to the time when it started trending. I do recall that I utilized it to “try” making karaokes by removing the voice from an audio file. Well, you can still do it – but it depends. - -**Features:** - -It also supports plug-ins that include VST effects. Of course, you should not expect it to support VST Instruments. - - * Live audio recording through a microphone or a mixer - * Export/Import capability supporting multiple formats and multiple files at the same time - * Plugin support: LADSPA, LV2, Nyquist, VST and Audio Unit effect plug-ins - * Easy editing with cut, paste, delete and copy functions. - * Spectogram view mode for analyzing frequencies - - - -#### 2\. LMMS - -![][4] - -LMMS is a free and open source (cross-platform) digital audio workstation. It includes all the basic audio editing functionalities along with a lot of advanced features. - -You can mix sounds, arrange them, or create them using VST instruments. It does support them. Also, it comes baked in with some samples, presets, VST Instruments, and effects to get started. In addition, you also get a spectrum analyzer for some advanced audio editing. - -**Features:** - - * Note playback via MIDI - * VST Instrument support - * Native multi-sample support - * Built-in compressor, limiter, delay, reverb, distortion and bass enhancer - - - -#### 3\. Ardour - -![Ardour audio editor][5] - -Ardour is yet another free and open source digital audio workstation. If you have an audio interface, Ardour will support it. Of course, you can add unlimited multichannel tracks. The multichannel tracks can also be routed to different mixer tapes for the ease of editing and recording. - -You can also import a video to it and edit the audio to export the whole thing. It comes with a lot of built-in plugins and supports VST plugins as well. - -**Features:** - - * Non-linear editing - * Vertical window stacking for easy navigation - * Strip silence, push-pull trimming, Rhythm Ferret for transient and note onset-based editing - - - -#### 4\. Cecilia - -![cecilia audio editor][6] - -Cecilia is not an ordinary audio editor application. It is meant to be used by sound designers or if you are just in the process of becoming one. It is technically an audio signal processing environment. It lets you create ear-bending sound out of them. - -You get in-build modules and plugins for sound effects and synthesis. It is tailored for a specific use – if that is what you were looking for – look no further! - -**Features:** - - * Modules to achieve more (UltimateGrainer – A state-of-the-art granulation processing, RandomAccumulator – Variable speed recording accumulator, -UpDistoRes – Distortion with upsampling and resonant lowpass filter) - * Automatic Saving of modulations - - - -#### 5\. Mixxx - -![Mixxx audio DJ ][7] - -If you want to mix and record something while being able to have a virtual DJ tool, [Mixxx][8] would be a perfect tool. You get to know the BPM, key, and utilize the master sync feature to match the tempo and beats of a song. Also, do not forget that it is yet another free and open source application for Linux! - -It supports custom DJ equipment as well. So, if you have one or a MIDI – you can record your live mixes using this tool. - -**Features** - - * Broadcast and record DJ Mixes of your song - * Ability to connect your equipment and perform live - * Key detection and BPM detection - - - -#### 6\. Rosegarden - -![rosegarden audio editor][9] - -Rosegarden is yet another impressive audio editor for Linux which is free and open source. It is neither a fully featured DAW nor a basic audio editing tool. It is a mixture of both with some scaled down functionalities. - -I wouldn’t recommend this for professionals but if you have a home studio or just want to experiment, this would be one of the best audio editors for Linux to have installed. - -**Features:** - - * Music notation editing - * Recording, Mixing, and samples - - - -### Wrapping Up - -These are some of the best audio editors you could find out there for Linux. No matter whether you need a DAW, a cut-paste editing tool, or a basic mixing/recording audio editor, the above-mentioned tools should help you out. - -Did we miss any of your favorite? Let us know about it in the comments below. - - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/best-audio-editors-linux - -作者:[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://en.wikipedia.org/wiki/Digital_audio_workstation -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors-800x450.jpeg?resize=800%2C450&ssl=1 -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/audacity-audio-editor.jpg?fit=800%2C591&ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/lmms-daw.jpg?fit=800%2C472&ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/ardour-audio-editor.jpg?fit=800%2C639&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/cecilia.jpg?fit=800%2C510&ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/mixxx.jpg?fit=800%2C486&ssl=1 -[8]: https://itsfoss.com/dj-mixxx-2/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/rosegarden.jpg?fit=800%2C391&ssl=1 -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1 diff --git a/translated/20190116 Best Audio Editors For Linux.md b/translated/20190116 Best Audio Editors For Linux.md new file mode 100644 index 0000000000..827d5bc3da --- /dev/null +++ b/translated/20190116 Best Audio Editors For Linux.md @@ -0,0 +1,155 @@ +[#]: collector: (lujun9972) +[#]: translator: (MFGJT) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Best Audio Editors For Linux) +[#]: via: (https://itsfoss.com/best-audio-editors-linux) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Linux 上最好的音频编辑工具 +====== + +在 Linux 上,有很多种音频编辑器可供你选用。不论你是一个专业的音乐制作人,还是只想学学怎么做出超棒的音乐的爱好者,这些强大的音频编辑器都是很有用的工具。 + +对于专业级的使用,我总是建议使用 [DAW][1] (数码音频工作站)。但并不是所有人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。 + +在本文中,我们将讨论几个 DAW 和基础的音频编辑器,而且它们都是在 Linux 和(很有可能)其它操作系统上可以使用的**免费并开源**的音频编辑方案。 + +### Linux 上的最佳音频编辑器 + +![Best audio editors and DAW for Linux][2] + +我们不会关注 DAW 提供的所有功能,而只是关注基本的音频编辑功能。不过,你仍然可以把以下内容看作是 Linux 的最佳 DAW 名单。 + +**安装说明:**你可以在 AppCenter 或 Software center 中找到所有提到的音频编辑器或daw。如果你在这两个地方没有找到它们,请前往它们的官方网站获取更多信息。 + +#### 1\. Audacity + +![Audacity audio editor][3] + +Audacity 是 Linux 中最基本音频编辑器之一,但是它也很强大。它是一个免费的开源跨平台工具。肯定已经有很多人了解这个软件了。 + +现在的它相比它最初流行的时候有了很大的改进。我记得我以前试着通过从音频中去除人声来制作卡拉OK伴奏。现在有些时候,你仍然可以这么做。 + +**特性:** + +它还支持包含 VST 效果的插件。当然,你不应该期望它支持 VST 设备。 + + * 通过麦克风或混音器进行现场录制 + * 支持同时从多种音频格式的文件中批量导出/导入内容 + * 支持 LADSPA,LV2,Nyquist,VST 和 Audio Unit 的效果插件 + * 使用简单,带有剪切、粘贴、删除和拷贝的功能 + * 可观测声音频率的频谱模式 + + + +#### 2\. LMMS + +![LMMS audio editor][4] + +LMMS 是一个免费的开源(跨平台)数码音频工作站。它包括所有基本的音频编辑功能以及许多高级功能。 + +你可以混音,组合音频,或使用 VST 设备创造音频。 LMMS 支持这些功能。此外,它还自带一些样本音频,预设,VST 设备和特效来帮助你起步。创建音频。此外,你还可以得到一个频谱分析仪,以便进行高级的音频编辑工作。 + +**特性:** + + * 基于 MIDI 的音符回放 + * 支持 VST 设备 + * 支持多样本 + * 内置压缩器,限制器,延迟功能,混响功能,失真功能和低音增强器 + + + +#### 3\. Ardour + +![Ardour audio editor][5] + +Ardour 是另一个免费和开源的数码音频工作站。只要你有音频接口,Ardour 就支持它的使用。当然,你也可以无限地添加多通道音轨。这些多通道音轨也可以被指派到不同的混音带,以方便编辑和录音。 + +你也可以导入一个视频,编辑其中的音频,然后导出新的视频和音频。它提供了许多内置插件,并且支持 VST 插件。 + +**特性:** + + * 非线性编辑 + * 垂直窗口堆叠,简单的页面导航 + * 静默消除功能(strip silence),推拉修剪功能(push-pull trimming),和用以短暂片段或基于基于音符开始的编辑的 Rhythm Ferret。 + + + +#### 4\. Cecilia + +![Cecilia audio editor][6] + +Cecilia 不是一个普通的音频编辑器。它的使用者一般是音效设计师或者正在努力成为音效设计师的人。 Cecilia 实际上是一个音频信号处理环境。它可以让你的作品余音绕梁。 + +你还可以得到内置的音效与合成模组和插件。 Cecilia 为一个明确的目的而生:如果你正在找音效设计工具,这是你的不二之选! + +**特性:** + + * 利用模块来完成更多工作(UltimateGrainer——最先进的颗粒化处理工具,RandomAccumulator——记录变量速度的累加器,UpDistoRes——通过上采样和谐振低通滤波器创造失真效果的工具) + * 自动保存调制设定 + + + +#### 5\. Mixxx + +![Mixxx audio DJ][7] + +如果你想要在混合和录制一些东西的同时能够有一个虚拟的 DJ 工具,[Mixxx][8] 将是完美的工具。你可以用到 BPM,key,并使用主同步功能来匹配歌曲的节奏和节拍。另外,不要忘记它也是一个 Linux 的免费并开源的软件。 + +它还支持自定义 DJ 设备。所以,如果你有 DJ 设备或着 MIDI,你可以用这个工具录制你的现场混音。 + +**特性:** + + * 播送和录制你的歌曲的 DJ 混音 + * 可以连接到你的设备并且现场演奏 + * Key 检测和 BPM 检测 + + + +#### 6\. Rosegarden + +![Rosegarden audio editor][9] + +Rosegarden 是另一个令人赞叹的 Linux 的免费并开源的音频编辑器。它既不是一个功能齐全的 DAW,也不是一个基本的音频编辑工具。它是两者的混合体,并带有一些缩减的功能。 + +我不会向专业人士推荐这款软件,但如果你经营家庭音乐工作室或只是想体验一下,这将是 Linux 上可以安装的最好的音频编辑器之一。 + +**特性:** + + * 乐谱编辑 + * 记录、混合以及样本功能 + + + +#### 小结 + +这些是你可以找到的 Linux 上的最棒的一些音频编辑器了。不论你是需要 DAW,一个剪切/粘贴的编辑工具,或者仅仅想要一个拥有基础混音和录音功能的音频编辑工具,上述软件都能够满足你的需求。 + +如果在这篇文章中我们遗漏了你最喜欢的一些音频工具,可以在原文下方评论中回复告诉我们。 + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-audio-editors-linux + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[MFGJT](https://github.com/MFGJT) +校对:[校对者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://en.wikipedia.org/wiki/Digital_audio_workstation +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors-800x450.jpeg?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/audacity-audio-editor.jpg?fit=800%2C591&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/lmms-daw.jpg?fit=800%2C472&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/ardour-audio-editor.jpg?fit=800%2C639&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/01/cecilia.jpg?fit=800%2C510&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/01/mixxx.jpg?fit=800%2C486&ssl=1 +[8]: https://itsfoss.com/dj-mixxx-2/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/rosegarden.jpg?fit=800%2C391&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1 From ceb3ab7530525e35f7a787d0895871689638eb8b Mon Sep 17 00:00:00 2001 From: MFG <48886453+MFGJT@users.noreply.github.com> Date: Thu, 9 Apr 2020 22:17:11 +0800 Subject: [PATCH 022/394] Update 20190116 Best Audio Editors For Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正一处空格 --- translated/20190116 Best Audio Editors For Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/20190116 Best Audio Editors For Linux.md b/translated/20190116 Best Audio Editors For Linux.md index 827d5bc3da..4a6557edf2 100644 --- a/translated/20190116 Best Audio Editors For Linux.md +++ b/translated/20190116 Best Audio Editors For Linux.md @@ -12,7 +12,7 @@ Linux 上最好的音频编辑工具 在 Linux 上,有很多种音频编辑器可供你选用。不论你是一个专业的音乐制作人,还是只想学学怎么做出超棒的音乐的爱好者,这些强大的音频编辑器都是很有用的工具。 -对于专业级的使用,我总是建议使用 [DAW][1] (数码音频工作站)。但并不是所有人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。 +对于专业级的使用,我总是建议使用 [DAW][1](数码音频工作站)。但并不是所有人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。 在本文中,我们将讨论几个 DAW 和基础的音频编辑器,而且它们都是在 Linux 和(很有可能)其它操作系统上可以使用的**免费并开源**的音频编辑方案。 From 60085b9ae2d62f05f354c71fa44b98a5179d31d9 Mon Sep 17 00:00:00 2001 From: MFG <48886453+MFGJT@users.noreply.github.com> Date: Thu, 9 Apr 2020 22:20:38 +0800 Subject: [PATCH 023/394] Update and rename translated/20190116 Best Audio Editors For Linux.md to translated/tech/20190116 Best Audio Editors For Linux.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正一处格式,修正路径 --- translated/{ => tech}/20190116 Best Audio Editors For Linux.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename translated/{ => tech}/20190116 Best Audio Editors For Linux.md (97%) diff --git a/translated/20190116 Best Audio Editors For Linux.md b/translated/tech/20190116 Best Audio Editors For Linux.md similarity index 97% rename from translated/20190116 Best Audio Editors For Linux.md rename to translated/tech/20190116 Best Audio Editors For Linux.md index 4a6557edf2..7c72129b8d 100644 --- a/translated/20190116 Best Audio Editors For Linux.md +++ b/translated/tech/20190116 Best Audio Editors For Linux.md @@ -22,7 +22,8 @@ Linux 上最好的音频编辑工具 我们不会关注 DAW 提供的所有功能,而只是关注基本的音频编辑功能。不过,你仍然可以把以下内容看作是 Linux 的最佳 DAW 名单。 -**安装说明:**你可以在 AppCenter 或 Software center 中找到所有提到的音频编辑器或daw。如果你在这两个地方没有找到它们,请前往它们的官方网站获取更多信息。 +**安装说明:** +你可以在 AppCenter 或 Software center 中找到所有提到的音频编辑器或daw。如果你在这两个地方没有找到它们,请前往它们的官方网站获取更多信息。 #### 1\. Audacity From a2353f369ff4171bf5bf3b9d0adf69937107163e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Apr 2020 23:04:08 +0800 Subject: [PATCH 024/394] PRF @messon007 --- ...in Ubuntu- What is It and How to Use it.md | 138 +++++++++--------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md b/translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md index f2c2602601..020a06ecf0 100644 --- a/translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md +++ b/translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md @@ -1,153 +1,153 @@ [#]: collector: (lujun9972) [#]: translator: (messon007) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (The Keyring Concept in Ubuntu: What is It and How to Use it?) [#]: via: (https://itsfoss.com/ubuntu-keyring/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -解读Ubuntu里的密钥环概念 +解读 Ubuntu 里的密钥环概念 ====== -如果您用过[ubuntu里的自动登录功能][1]或者其他的Linux发行版, 您可能遇到过这种弹出消息: - -**请输入密码以解锁您的登录密钥环 - 登录密钥环在您登录系统时未解锁** - -![Enter Password To Unlock Your Login Keyring Ubuntu][2] - -你需要点击多次取消才能让它消失。你可能想知道为什么系统会多次反复提示这个密钥环消息? - -让我来告诉你答案。它其实并没有出错,它只是一个安全特性。 - -奇怪吗?下面就让我来解释下Linux里的密钥环概念。 - -### Linux里的密钥环是什么以及为什么需要它? - ![][3] -在现实生活中您为什么要用钥匙环(也叫[钥匙链][4])? 您用它把一把或多把钥匙串到一起, 以便于携带和查找。 +如果你用过 Ubuntu 或者其他的 Linux 发行版里的[自动登录功能][1], 你可能遇到过这种弹出消息: -Linux里也是类似的。密钥环特性使您的系统可以将各种密码放在一起,并将其保存在一个地方。 +> 请输入密码以解锁你的登录密钥环 +> +> 登录密钥环在你登录系统时未解锁。 -大多数Linux桌面环境像GNOME, KDE, Xfce等采用[gnome的密钥环][5]实现来提供这个功能。 +![Enter Password To Unlock Your Login Keyring Ubuntu][2] -该密钥环保存了ssh密钥,GPG密钥以及使用此功能的应用程序(例如Chromium浏览器)的密钥。 默认情况下,**“密钥环”通过主密码来保护**,该密码通常是帐户的登录密码。 +如果你一直点击取消,它会不断弹出几次才会消失。你可能想知道,为什么你会一直看到这个密钥环信息呢? -系统上的每个用户都有自己的密钥环,(通常)密码与用户帐户本身的密码相同。 当您使用密码登录系统时,您的密匙环将使用您帐户的密码自动解锁。 +让我来告诉你吧。它其实不是错误,而是一个安全特性。 -当您[启用Ubuntu中的自动登录功能时][1]时,就有问题了。这意味着您无需输入密码即可登录系统。 在这种情况下,您的密钥环不会自动解锁。 +奇怪吗?下面就让我来解释下 Linux 里的密钥环概念。 + +### Linux 里的密钥环是什么。为什么需要它? + +在现实生活中你为什么要用钥匙环(也叫[钥匙链][4])?你用它把一把或多把钥匙串到一起, 以便于携带和查找。 + +Linux 里也是类似的。密钥环特性使你的系统可以将各种密码放在一起,并将其保存在一个地方。 + +大多数 Linux 桌面环境,如 GNOME、KDE、Xfce 等采用 [GNOME 密钥环][5]来提供这个功能。 + +该密钥环保存了 ssh 密钥、GPG 密钥以及使用此功能的应用程序(例如 Chromium 浏览器)的密钥。默认情况下,**“密钥环”通过主密码来保护**,该密码通常是帐户的登录密码。 + +系统上的每个用户都有自己的密钥环,(通常)密码与用户帐户本身的密码相同。当你使用密码登录系统时,你的密匙环将使用你帐户的密码自动解锁。 + +当你[启用 Ubuntu 中的自动登录功能时][1]时,就有问题了。这意味着你无需输入密码即可登录系统。在这种情况下,你的密钥环不会自动解锁。 #### 密钥环是一个安全特性 -记得我说过密钥环是一个安全特性吗?现在想象一下您在您的Linux电脑上开启了自动登录功能。有权访问您电脑的任何人无需密码就能进入您的系统。但是您可能不会在意,因为您只是用它来访问互联网。 +记得我说过密钥环是一个安全特性吗?现在想象一下你在 Linux 电脑上开启了自动登录功能。有权访问你电脑的任何人无需密码就能进入你的系统。但是你可能不会在意,因为你只是用它来访问互联网。 -但是,如果您使用Chromium或[Ubuntu中的Google Chrome][6]之类的浏览器,并使用它来保存各种网站的登录密码,那么您将遇到麻烦。任何人都可以使用浏览器并利用您在浏览器中保存的密码登录网站。那不就是风险吗? +但是,如果你在 Ubuntu 中使用 Chromium 或 [Google Chrome][6] 之类的浏览器,并使用它来保存各种网站的登录密码,那么你将遇到麻烦。任何人都可以使用浏览器并利用你在浏览器中保存的密码登录网站。这不很危险吗? -这就是为什么当您使用Chrome时,它将反复地提示您先解锁密钥环。这确保了只有知道密钥环密码的人才能使用在浏览器中保存的密码来登录它们相关的网站。 +这就是为什么当你使用 Chrome 时,它将反复地提示你先解锁密钥环。这确保了只有知道密钥环密码(即账户密码)的人才能使用在浏览器中保存的密码来登录它们相关的网站。 -如果您反复取消解锁密钥环的提示,它最终将消失并允许您使用浏览器。但是,保存的密码将不会被解锁,您在Chromium/Chome浏览器上将会看到'同步暂停'的提示。 +如果你反复取消解锁密钥环的提示,它最终将消失,并允许你使用浏览器。但是,保存的密码将不会被解锁,你在 Chromium/Chome 浏览器上将会看到“同步暂停”的提示。 ![Sync paused in Google Chrome][7] -#### 如果密钥环总是存在的,为什么您从来没有见过它呢? +#### 如果密钥环一直存在,为什么你从来没有见过它呢? -如果您在您的Linux系统上从没见过它的话,这就是一个有效的问题。 +如果你在你的 Linux 系统上从没见过它的话,这个问题就很有道理。 -如果您从没有用过自动登录功能(或者修改您的账户密码),您可能都没有意识到这个特性的存在。 +如果你从没有用过自动登录功能(或者修改你的账户密码),你可能都没有意识到这个特性的存在。 -这是因为当您通过您的密码登录系统时,您的密钥环被您的账户密码自动解锁了。 +这是因为当你通过你的密码登录系统时,你的密钥环被你的账户密码自动解锁了。 -Ubuntu(和其他发行版)对于通用的管理任务像修改用户, 安装新软件等需要输入密码,无论您是否是自动登录的。但是对于日常任务像使用浏览器,它不需要输入密码因为密钥环已经被解锁了。 +Ubuntu(和其他发行版)在执行普通的管理任务如修改用户、安装新软件等需要输入密码,无论你是否是自动登录的。但是对于日常任务像使用浏览器,它不需要输入密码因为密钥环已经被解锁了。 -当您切换到自动登录时,您不再需要输入登录密码。这意味着密钥环没有被自动解锁,因此当您使用利用了密钥环特性的浏览器时,它将提示您来解锁密钥环。 +当你切换到自动登录时,你不再需要输入登录密码。这意味着密钥环没有被自动解锁,因此当你使用利用了密钥环特性的浏览器时,它将提示你来解锁密钥环。 -#### 您可以容易地管理密钥环和密码 +#### 你可以轻松地管理密钥环和密码 -这个密钥环放在哪里?它的核心是一个守护任务(一个后台自动运行的程序)。 +这个密钥环放在哪里?它的核心是一个守护任务(一个后台自动运行的程序)。 -别担心。您不必通过终端来操作守护任务。大多数桌面环境都自带有图形化的应用程序可以和守护进程进行交互。KDE上有KDE钱包,GNOME和其他桌面上叫做密码和密钥(原来叫[海马][8])。 +别担心。你不必通过终端来操作守护任务。大多数桌面环境都自带一个可以和这个守护进程进行交互的图形化应用程序。KDE 上有 KDE 钱包,GNOME 和其他桌面上叫做“密码和密钥”(之前叫 [Seahorse][8])。 ![Password And Keys App in Ubuntu][9] -您可以用这个GUI程序来查看什么应用程序在用密钥环来管理/保护密码。 +你可以用这个 GUI 程序来查看哪些应用程序在用密钥环来管理/保护密码。 -您可以看到,我的系统有自动创建的登录密钥环。也有一个存储GPG和SSH密钥的密钥环。那个[证书][10]是用来保存证书机构颁发的证书(像HTTPS证书)的。 +你可以看到,我的系统有自动创建的登录密钥环。也有一个存储 GPG 和 SSH 密钥的密钥环。那个[证书][10]用来保存证书机构颁发的证书(如 HTTPS 证书)。 ![Password and Keys application in Ubuntu][11] -您也可以使用这个应用程序来手动保存网站的密码。例如,我创建了一个新的叫做'Test'的被密码保护的密钥环,并手动存储了一个密码。 +你也可以使用这个应用程序来手动保存网站的密码。例如,我创建了一个新的叫做“Test”的被密码保护的密钥环,并手动存储了一个密码。 -这比保存一批密码在一个文本文件中要好一些。至少在这种情况下,您的密码只有在您通过密码解锁了密钥环时才允许被看到。 +这比在一个文本文件中保存一批密码要好一些。至少在这种情况下,你的密码只有在你通过密码解锁了密钥环时才允许被看到。 ![Saving New Password Seahorse][12] -一个潜在的问题是如果您格式化您的系统,手动保存的密码必然会丢失。通常,您会备份您的个人文件,但并不是所有的用户特定数据如密钥环文件。 +这里有一个潜在的问题,如果你格式化你的系统,手动保存的密码必然会丢失。通常,你会备份你的个人文件,但并不是所有的用户特定数据,如密钥环文件。 -有一种办法能解决它。密钥环数据通常保存在~/.local/share/keyrings目录。在这里您可以看到所有的密钥环但是您不能直接看到它们的内容。如果您移除密钥环的密码(我会在这篇文章的后面描述操作步骤),您可以像一个普通的文本文件一样读取密钥环的内容。您可以完整地拷贝这个解锁后的密钥环文件并在其他的Linux机器(安装了密码和密钥应用)上导入到密码和密钥应用程序。 +有一种办法能解决它。密钥环数据通常保存在 `~/.local/share/keyrings` 目录。在这里你可以看到所有的密钥环,但是你不能直接看到它们的内容。如果你移除密钥环的密码(我会在这篇文章的后面描述操作步骤),你可以像一个普通的文本文件一样读取密钥环的内容。你可以将这个解锁后的密钥环文件完整地复制下来,并在其他的 Linux 机器上运行“密码和密钥”应用程序导入到其中。 总结一下目前为止所学的内容: - * 大多数Linux缺省已经安装并激活了密钥环特性 + + * 大多数 Linux 系统缺省已经安装并激活了密钥环特性 * 系统上的每个用户都拥有他自己的密钥环 - * 密钥环通常被账户密码锁定(保护) - * 当您通过密码登录时密钥环会被自动解锁 - * 对于自动登录,密钥环不会自动解锁,因此当您试图使用依赖密钥环的应用程序时会被提示先解锁它 + * 密钥环通常是用账户密码锁定的(保护) + * 当你通过密码登录时密钥环会被自动解锁 + * 对于自动登录,密钥环不会自动解锁,因此当你试图使用依赖密钥环的应用程序时会被提示先解锁它 * 并不是所有的浏览器或应用程序利用了密钥环特性 - * (Linux上)安装了一个GUI程序可以和密钥环交互 - * 您可以用密钥环来手动以加密格式来存储密码 - * 您可以自己修改密钥环密码 - * 您可以通过导出(需要先解锁密钥环)并导入(到其他计算机上)的方式来获取手工保存的密码。 - - + * (Linux 上)安装一个 GUI 程序可以和密钥环交互 + * 你可以用密钥环来手动存储加密格式的密码 + * 你可以自己修改密钥环密码 + * 你可以通过导出(需要先解锁密钥环)并导入到其他计算机上的方式来获取手工保存的密码。 ### 修改密钥环密码 -假设您修改了您的账户密码。当您登录时,您的系统试图通过新的登录密码来自动解锁密钥环。但是密钥环还在使用老的登录密码。 +假设你修改了你的账户密码。当你登录时,你的系统试图通过新的登录密码来自动解锁密钥环。但是密钥环还在使用老的登录密码。 -这种情况下,您可以修改密钥环密码为新的登录密码,这样密码环才能在您登录系统时自动解锁。 +这种情况下,你可以修改密钥环密码为新的登录密码,这样密码环才能在你登录系统时自动解锁。 -从菜单中打开密码和密钥应用程序: +从菜单中打开“密码和密钥”应用程序: ![Look for Password and Keys app in the menu][9] -在登录密钥环上右击并点击修改密码: +在“Login”密钥环上右击并点击“修改密码”: ![Change Keyring Password][13] -如果您不记得老的登录密码怎么办? +#### 如果你不记得老的登录密码怎么办? -您可能知道[Ubuntu上复位忘记的密码是很容易的][14]。但是密钥环在这种场景下还是有问题。您修改了账户密码但是您不记得仍然被密钥环使用的老的账户密码。 +你可能知道在 [Ubuntu 上重置忘记的密码很容易][14]。但是密钥环在这种场景下还是有问题。你修改了账户密码,但是你不记得仍然被密钥环使用的老的账户密码。 -您不能修改它因为您不知道老的密码。怎么办? +你不能修改它因为你不知道老的密码。怎么办? -这种情况下,您将不得不移除整个密钥环。您可以通过密码和密钥应用程序来操作: +这种情况下,你将不得不移除整个密钥环。你可以通过“密码和密钥”应用程序来操作: ![Delete Keyring Ubuntu][15] -它会提示您进行确认: +它会提示你进行确认: ![Delete Keyring][16] -另外,您也可以手动删除~/.local/share/keyrings目录下的密钥环文件。 +另外,你也可以手动删除 `~/.local/share/keyrings` 目录下的密钥环文件。 -老的密钥环文件被移除后,您再打开Chrome/Chromium时,它会提示您创建一个新的密钥环。 +老的密钥环文件被移除后,你再打开 Chrome/Chromium 时,它会提示你创建一个新的密钥环。 ![New Keyring Password][17] -您可以用新的登录密码,密钥环就会被自动解锁了。 +你可以用新的登录密码,密钥环就会被自动解锁了。 ### 禁用密钥环密码 -在您想用自动登录但又不想手动解锁密钥环时,您可以把禁用密钥环密码作为一个规避方法。记住您正在禁用一个安全特性,因此请三思。 +在你想用自动登录但又不想手动解锁密钥环时,你可以把禁用密钥环密码作为一个规避方法。记住你正在禁用一个安全特性,因此请三思。 -操作步骤和修改密钥环相似。打开密码和密钥应用程序,然后修改密钥环密码。 +操作步骤和修改密钥环相似。打开“密码和密钥”应用程序,然后修改密钥环密码。 -技巧在于当它提示修改密码时,不要输入新密码,而是点击继续按钮。这将移除密钥环的密码。 +技巧在于当它提示修改密码时,不要输入新密码,而是点击“继续”按钮。这将移除密钥环的密码。 ![Disable Keyring password by not setting any password at all][18] -这种方法,密钥环没有密码保护并将一直处于解锁状态。 +这种方法,密钥环没有密码保护,并将一直处于解锁状态。 -------------------------------------------------------------------------------- @@ -156,7 +156,7 @@ via: https://itsfoss.com/ubuntu-keyring/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[messon007](https://github.com/messon007) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1ebce83dfcd5b99c2d50265e2423ba9846ee0d19 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 9 Apr 2020 23:05:03 +0800 Subject: [PATCH 025/394] PUB @messon007 https://linux.cn/article-12093-1.html --- ...Keyring Concept in Ubuntu- What is It and How to Use it.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md (99%) diff --git a/translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md b/published/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md similarity index 99% rename from translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md rename to published/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md index 020a06ecf0..3af840a02c 100644 --- a/translated/tech/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md +++ b/published/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (messon007) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12093-1.html) [#]: subject: (The Keyring Concept in Ubuntu: What is It and How to Use it?) [#]: via: (https://itsfoss.com/ubuntu-keyring/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 6e825ef842be94ecfde84e728f446f085a620493 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Thu, 9 Apr 2020 23:26:44 +0800 Subject: [PATCH 026/394] Update 20190814 9 open source cloud native projects to consider.md --- ...9 open source cloud native projects to consider.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index 6d81cf1762..551c8df7d1 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -160,8 +160,10 @@ The best way to get started with Prometheus is to check out its [GitHub repo][10 ### Envoy Envoy (or Envoy Proxy) is an open source edge and service proxy designed for cloud-native applications. Created at Lyft, Envoy is a high-performance, C++, distributed proxy designed for single services and applications, as well as a communications bus and a universal data plane designed for large microservice service mesh architectures. Built on the learnings of solutions such as Nginx, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner. +Envoy(或Envoy代理)是专为云原生应用设计的开源的边缘和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对Nginx,HAProxy,硬件负载均衡器和云负载均衡器等方案了解的基础上,Envoy与每个应用相伴运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。 When all service traffic in an infrastructure flows through an Envoy mesh, it becomes easy to visualize problem areas via consistent observability, tune overall performance, and add substrate features in a single place. Basically, Envoy Proxy is a service mesh tool that helps organizations build a fault-tolerant system for production environments. +当基础设施中的所有服务流量都经过一个Envoy网格时,很容易就可以通过连贯的监测来可视化问题域,调整整体性能,并在单个位置添加基础功能。基本上,Envoy代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。 There are numerous alternatives for service mesh applications, such as Uber’s [Linkerd][24] (discussed below) and [Istio][25]. Istio extends Envoy Proxy by deploying as a [Sidecar][26] and leveraging the [Mixer][27] configuration model. Notable Envoy features are: @@ -172,9 +174,18 @@ There are numerous alternatives for service mesh applications, such as Uber’s * It’s API-driven and supports dynamic configuration and hot reloads * Has a strong focus on metric collection, tracing, and overall observability +服务网格应用程序有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: + + *所有的“桌面赌注”特性(与控制平面(例如Istio)配对时) + *带载运行时的低延时, 延迟率低至99% + *将L3/L4过滤器作为核心,许多L7过滤器被考虑在外 + *支持gRPC和HTTP / 2(上行/下行) +   *由API驱动,并支持动态配置和热重载 + *重点关注指标收集,跟踪和整体可监测性 Understanding Envoy, proving its capabilities, and realizing its full benefits require extensive experience with running production-level environments. You can learn more in its [detailed documentation][28] and by accessing its [GitHub][11] repository. +要想了解Envoy,证实其能力并意识到其全部优势,需要丰富的在生产级环境运行的经验。 您可以在[详细文档][28]或访问其[GitHub][11]仓库了解更多信息。 ## Incubating projects From f152ae25f55b749c8f0a01871cee6288f1359067 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Apr 2020 01:09:35 +0800 Subject: [PATCH 027/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200410=20How=20?= =?UTF-8?q?to=20Go=20Full=20Dark=20Mode=20in=20Ubuntu=2020.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md --- ...ow to Go Full Dark Mode in Ubuntu 20.04.md | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md diff --git a/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md new file mode 100644 index 0000000000..bf90b3ea4f --- /dev/null +++ b/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md @@ -0,0 +1,111 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04) +[#]: via: (https://itsfoss.com/dark-mode-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Go Full Dark Mode in Ubuntu 20.04 +====== + +One of the most talked about [new features in Ubuntu 20.04][1] is the dark mode. You can [install dark theme in any Ubuntu version][2] to give it a dark look but the new Ubuntu 20.04 makes it a lot easier. + +You don’t need to install themes on your own. You can find three variants of the default theme (called Yaru) and you can enable the dark mode from the settings. + +It still leaves a few thing to I am going to show you some tips on giving complete dark mode to your Ubuntu system. + +### Enable dark mode in Ubuntu 20.04 + +[Subscribe to our YouTube channel for more Linux videos][3] + +The steps are performed on the GNOME desktop. If you are [using some other desktop environment][4], the screenshots may look different. + +Press the super key (Windows key) and start typing settings to search for the Settings application. + +![Search for Settings][5] + +In the Settings application, go to Apperance section and you should see three variants of the theme: Light, Standard and Dark. No prizes for guessing that you need to select Dark if you want to use the dark mode. + +![Enable Dark Theme in Ubuntu][6] + +Not all but applications using GTK3 should automatically comply with the dark theme. In other words, you’ll notice that most of the applications like text editor, terminal, LibreOffice etc on your system automatically switch to dark mode. + +But it still leaves a few thing in the light mode. Let me show you a couple of tips to ‘go to the darker side’. + +### Tweaks to go full dark mode in Ubuntu 20.04 + +You’ll notice that the shell theme is still light. The message tray, system tray (in the top panel) are still not using dark mode. + +![No Dark Shell by default in Ubuntu][7] + +You’ll have to [use a GNOME extension][8] here that will let you install Yaru dark shell theme. Install the browser extension first by using this command in terminal ([use Ctrl+Alt+T keyboard shortcut for terminal in Ubuntu][9]). + +``` +sudo apt install chrome-gnome-shell +``` + +Now [go to the extension’s webpage][10] and enable the extension by switching it on: + +![Enable User Themes GNOME Extension][11] + +You need to [install GNOME Tweaks tool][12] by using this command: + +``` +sudo apt install gnome-tweaks +``` + +Open the GNOME Tweaks tool and go to Appearance. You’ll see the option to change the shell theme. You don’t need to install this Yaru dark shell theme. It’s already there. You just have to enable it. + +![Enable Yaru Dark Shell Theme in Ubuntu][13] + +Now, you can see that even the shell features like desktop notifications, message tray, system tray are also in dark mode. + +![Yaru Dark Shell Theme in Ubuntu][14] + +Looks better, isn’t it? There is one more thing you could do to further enjoy dark mode in Ubuntu. You’ll notice that the websites you visit still have white background. You cannot expect all the websites to provide a dark mode. + +This is where you can use a browser extension like [Dark Reader][15]. John has already discussed it in the tutorial on [enabling dark mode in Firefox][16]. It’s not a complicated task. If you use Firefox, Chrome or [Chromium in Ubuntu][17], you can install the browser extension listed on the [Dark Reader website][15]. + +Once you have installed Dark Reader, all the websites you visit should be in dark mode automatically. + +![It’s FOSS Homepage in Dark Mode with Dark Reader][18] + +You may still find a few external third party applications using light theme. You may have to manually enable dark theme, if they have such an option available. + +Dark mode is getting popular these days even among the non-coders. With these tips, you can satisfy your craving of dark mode in Ubuntu. + +I hope you like it. Enjoy the dark mode. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dark-mode-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/ubuntu-20-04-release-features/ +[2]: https://itsfoss.com/install-themes-ubuntu/ +[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[4]: https://itsfoss.com/find-desktop-environment/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/no-dark-shell-ubuntu.jpg?ssl=1 +[8]: https://itsfoss.com/gnome-shell-extensions/ +[9]: https://itsfoss.com/ubuntu-shortcuts/ +[10]: https://extensions.gnome.org/extension/19/user-themes/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-user-themes-gnome.jpg?ssl=1 +[12]: https://itsfoss.com/gnome-tweak-tool/ +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-yaru-dark-shell-theme.jpeg?ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/yaru-dark-shell-theme-ubuntu.jpg?ssl=1 +[15]: https://darkreader.org/ +[16]: https://itsfoss.com/firefox-dark-mode/ +[17]: https://itsfoss.com/install-chromium-ubuntu/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/itsfoss_dark_mode.jpg?ssl=1 From b575da60045a3905bac3f23123f67e7f1db1f665 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Apr 2020 01:10:34 +0800 Subject: [PATCH 028/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200409=20Print?= =?UTF-8?q?=20double-sided=20documents=20at=20home=20with=20this=20simple?= =?UTF-8?q?=20Bash=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md --- ...ts at home with this simple Bash script.md | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md diff --git a/sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md b/sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md new file mode 100644 index 0000000000..daacfa8365 --- /dev/null +++ b/sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md @@ -0,0 +1,152 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Print double-sided documents at home with this simple Bash script) +[#]: via: (https://opensource.com/article/20/4/print-duplex-bash-script) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) + +Print double-sided documents at home with this simple Bash script +====== +Use this script and save yourself the hassle and wasted paper of trying +to manually load and print double-sided documents. +![bash logo on green background][1] + +We have a laser printer at home. This Hewlett Packard LaserJet Pro CP1525nw Color Printer is an older model, but it has been a great workhorse that prints reliably and in color. I [put it on our home network][2] a few years ago using our [Raspberry Pi][3] as a print server. + +The LaserJet has been a great addition to my home office. Since [I launched my company][4] last year, I have relied on this little laser printer to print handouts and other materials for client meetings, workshops, and training sessions. + +My only gripe with this printer is that it prints single-sided only. If you want to print double-sided, you need to set up a custom print job to do it yourself. That's inconvenient and requires manual steps. In LibreOffice, I need to specifically set up the print job to print the odd-numbered pages first, then reload the paper before printing the even-numbered pages on the other side—but in reverse order. + +![LibreOffice print dialog][5] + +If I need to print a PDF that someone has sent me, the process is the same. For a four-page document, I first need to print pages 1 and 3, then reload the paper and print pages 2 and 4 in reverse order. In the GNOME print dialog, you need to select "Page Setup" to print odd pages or even pages. + +![Gnome print dialog][6] + +![Gnome page setup][7] + +Regardless of how I print, the overall process is to print the odd-numbered pages, reload the stack of printed pages into the paper tray, then print the even-numbered pages in reverse order. If I'm printing a four-page document, printing the even-numbered pages in reverse order means page 4 prints on the back of page 3 and page 2 prints on the back of page 1. Imagine my frustration in those few instances when I forgot to select the option to print in reverse order when printing the even-numbered pages and ruined a long print job. + +Similarly, it's easy to forget how to deal with documents that have an odd number of pages. In a five-page document, you first print pages 1, 3, and 5. But when you reload the printed pages into the printer, you don't want page 5. Instead, you only want to load pages 1 and 3. Otherwise, page 4 will print on the back of page 5, page 2 will print on the back of page 3, and nothing gets printed on the back of page 1. + +To make things easier and more reliable, I wrote a simple Bash script that automates printing duplex. This is basically a wrapper to print odd-numbered pages, remind me to reload the pages (and remove the last page if needed), then print the even-numbered pages. + +Whenever I need to print a document as duplex, I first convert the document to PDF. This is very easy to do. In LibreOffice, there's a toolbar icon to export directly as PDF. You can also navigate under **File— Export As—Export as PDF** to do the same. Or in any other application, there's usually a **Save to PDF** feature. When in doubt, GNOME supports printing to a PDF file instead of a printer. + +![Libre Office toolbar][8] + +![Export as PDF][9] + +### How it works + +Once I've saved to PDF, I let my Bash script do the rest. This really just automates the **lpr** commands to make printing easier. It prints odd pages first, prompts me to reload the paper, then prints the even pages. If the document has an odd number of pages, it also reminds me to remove the last page when I reload the printed pages. It's pretty simple. + +The only "programming" part of the script is determining the page count, and figuring out if that's an even or odd number. Both of those are easy to do. + +To determine the page count, I use the **pdfinfo** command. This generates useful info about a PDF document. Here's some sample output: + + +``` +$ pdfinfo All\ training\ -\ catalog.pdf +Creator:        Writer +Producer:       LibreOffice 6.3 +CreationDate:   Fri Oct 18 16:06:07 2019 CDT +Tagged:         no +UserProperties: no +Suspects:       no +Form:           none +JavaScript:     no +Pages:          11 +Encrypted:      no +Page size:      612 x 792 pts (letter) +Page rot:       0 +File size:      65623 bytes +Optimized:      no +PDF version:    1.5 +``` + +That output is very easy to parse. To get the page count, I use an AWK one-line script to look for **Pages:** and print the second field. + + +``` +`pages=$( pdfinfo "$1" | awk '/^Pages:/ {print $2}' )` +``` + +To figure out if this is an odd or even number, I use the modulo (**%**) arithmetic operator to divide by two and tell me the remainder. The modulo of two will always be zero for an even number, and one for an odd number. I use this simple test to determine if the document has an odd number of pages, so I'll need to remove the last page before printing the rest of the document: + + +``` +`if [ $(( $pages % 2 )) -ne 0 ] ; then` +``` + +With that, writing the **print-duplex.sh** Bash script is a simple matter of calling **lpr** with the correct options to send output to my printer (**lpr -P "HP_LaserJet_CP1525nw"**), to print odd-numbered pages (**-o page-set=odd**) or even-numbered pages (**-o page-set=even**), and to print in reverse order (**-o outputorder=reverse**). + +### Bash script + + +``` +#!/bin/sh +# print-duplex.sh +# simple wrapper to print duplex + +cat<<EOF +$1 ($pages pages) +\------------------------------------------------------------------------------- +Printing odd pages first +Please wait for job to finish printing... +\------------------------------------------------------------------------------- +EOF + +lpr -P "HP_LaserJet_CP1525nw" -o page-set=odd "$1" +sleep $pages + +cat<<EOF +=============================================================================== +Put paper back into the printer in EXACT OUTPUT ORDER (face down in tray) +then press ENTER +=============================================================================== +EOF + +pages=$( pdfinfo "$1" | awk '/^Pages:/ {print $2}' ) + +if [ $(( $pages % 2 )) -ne 0 ] ; then +  echo '!! Remove the last page - this document has an odd number of pages' +fi + +echo -n '>' +read x + +cat<<EOF +\------------------------------------------------------------------------------- +Printing even pages +Please wait for job to finish printing... +\------------------------------------------------------------------------------- +EOF + +lpr -P "HP_LaserJet_CP1525nw" -o page-set=even -o outputorder=reverse "$1" +``` + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/print-duplex-bash-script + +作者:[Jim Hall][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/jim-hall +[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/18/3/print-server-raspberry-pi +[3]: https://opensource.com/resources/raspberry-pi +[4]: https://opensource.com/article/19/9/business-creators-open-source-tools +[5]: https://opensource.com/sites/default/files/uploads/print_dialog_-_libreoffice_0.png (LibreOffice print dialog) +[6]: https://opensource.com/sites/default/files/uploads/print_dialog_-_gnome_0.png (Gnome print dialog) +[7]: https://opensource.com/sites/default/files/uploads/print_dialog_-_gnome_-_page_setup.png (Gnome page setup) +[8]: https://opensource.com/sites/default/files/uploads/toolbar_-_export_as_pdf_-_libreoffice.png (Libre Office toolbar) +[9]: https://opensource.com/sites/default/files/uploads/file_-_export_as_pdf_-_libreoffice.png (Export as PDF) From 31523065808f7cd400e1179cfa053c7371b157be Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Apr 2020 01:11:33 +0800 Subject: [PATCH 029/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200409=20How=20?= =?UTF-8?q?to=20set=20up=20a=20remote=20school=20environment=20for=20kids?= =?UTF-8?q?=20with=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200409 How to set up a remote school environment for kids with Linux.md --- ... school environment for kids with Linux.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sources/tech/20200409 How to set up a remote school environment for kids with Linux.md diff --git a/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md b/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md new file mode 100644 index 0000000000..327af54c79 --- /dev/null +++ b/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md @@ -0,0 +1,75 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to set up a remote school environment for kids with Linux) +[#]: via: (https://opensource.com/article/20/4/school-home-linux) +[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) + +How to set up a remote school environment for kids with Linux +====== +Repurpose an old computer to support the new home-schooler in your life. +![Image by Alan Formy-Duvall][1] + +COVID-19 has suddenly thrown all of us into a new and challenging situation. Many of us are now working full-time from home, and for a lot of us (especially people who aren't used to working remotely), this is taking some getting used to. + +Another group that is similarly challenged is our kids. They can't go to school or participate in their regular after-school activities. My daughter's elementary school closed its classrooms and is teaching through an online, web-based learning portal instead. And one of her favorite extracurricular activities—a coding school where she has been learning Scratch and just recently "graduated" to WoofJS–has also gone to an online-only format. + +We are fortunate that so many of our children's activities can be done online now, as this is the only way they will be able to learn, share, and socialize for at least the next several months. + +### Setting up a temporary homeschool environment + +When our daughter's school went to an online-only format, we realized she needed a place and some tools to do her work. So we cleaned off her desk and cleared the toys from the floor around it to make an "office" for her. We also realized she would need a computer. While I could have shopped online and ordered a new computer (and spent at least several hundred dollars—if not more than $1,000—in the process), I chose an alternative and put an old, unused laptop back to work. + +If you have an unused computer sitting around and are willing to do a bit of tech work, you, too, can set something up to get your kids online. Here's how I did it. + +### The hardware + +While my daughter already has her own small IT department (as I like to say), it consists of some gaming systems, a tablet, and a Chromebook. Even her Chromebook has just an 11.6" screen and a small keyboard, so none of her devices are really quite adequate for full-time school duty. + +So we found ourselves in a pinch. She really needed a desktop-capable computer system with a decent-sized screen, a full keyboard, a good-quality microphone, a set of speakers, and a headphone jack. And having an external video connector helps if you decide one screen isn't enough. + +I didn't have a spare desktop, but I did have a laptop: a Lenovo G550 with a Pentium Dual-Core T4500 2.3GHz processor and 4GB RAM. I replaced its aging 5400RPM spindle hard drive with a 240GB solid-state drive. The laptop has a 15.6" screen, which is much easier to view than the small screens on her other devices, and a comfortable, full-size keyboard. Its CPU scores a bit better in PassMark's benchmarks (913 vs. 674) than the 1.6GHz Intel Celeron N3060 Dual-Core in the Chromebook. + +However, it is 10 years old, certainly on the edge of usability by today's standards. But, thanks to the efficiency of the Linux operating system, it gets the job done. I installed the latest version (v31) of [Fedora Workstation][2], but many other distributions will work just fine. If you really want to eke out every drop of performance, you could use one of the [lightweight Linux distributions][3]. The only area that required a little extra effort with Fedora was the wireless; I had to install the driver for the Broadcom WiFi hardware. But really, this was only a few extra steps and a restart, and it was good to go. + +Linux supports all of the other hardware in the laptop. My daughter prefers a full-sized mouse over the touchpad, so I attached one. She likes the keyboard on this laptop, but if she wants an external keyboard, there are enough USB ports to hook one up. + +It has a traditional 3.5mm audio jack, so she can use headphones. I recommend giving children decibel-limited headphones to protect their hearing. + +Even though this laptop has a 15.6" widescreen display, I think having a second monitor gives the best experience. I have a spare that I might hook up to the external VGA connector. + +### The software + +My daughter's school set up an online learning portal. The benefit is that students just need a supported web browser to log on and get to work, and I thank the school for its efforts and choice of a vendor-agnostic solution. Most Linux distributions include the Mozilla Firefox web browser installed by default, and Linux provides a full operating system, so I can install any applications she might need. Fedora is also updated regularly (unlike the old Windows Vista that came with the laptop and is no longer supported). + +![][4] + +Scratch running on Fedora + +Her extracurricular coding school is using the Zoom client. I'm happy to report that it was an easy [install with RPM][5] and works great on Fedora 31. + +### Success! + +My daughter has no trouble using her new laptop. She likes the [GNOME desktop][6], particularly the fact that it "Looks like Dad's!" This is turning out to be a great experiment in practical (and under-pressure) use of a Linux desktop. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/school-home-linux + +作者:[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/homeschool.jpg?itok=vYEd9NON (Image by Alan Formy-Duvall) +[2]: https://getfedora.org/en/workstation/ +[3]: https://opensource.com/article/19/6/linux-distros-to-try +[4]: https://opensource.com/sites/default/files/scratch.jpg +[5]: https://zoom.us/download?os=linux +[6]: https://www.gnome.org/ From 53fe54704526e28576dd34710ff108a70fd25bdf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 10 Apr 2020 01:13:53 +0800 Subject: [PATCH 030/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200409=20Use=20?= =?UTF-8?q?Emacs=20Org=20mode=20to=20easily=20create=20LaTeX=20documents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md --- ...g mode to easily create LaTeX documents.md | 142 ++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md diff --git a/sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md b/sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md new file mode 100644 index 0000000000..461c52a8a5 --- /dev/null +++ b/sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md @@ -0,0 +1,142 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use Emacs Org mode to easily create LaTeX documents) +[#]: via: (https://opensource.com/article/20/4/emacs-org-mode) +[#]: author: (Peter Prevos https://opensource.com/users/danderzei) + +Use Emacs Org mode to easily create LaTeX documents +====== +You can use LaTeX for scientific and technical documents without all of +the confusing commands and syntax you would normally need. +![Filing cabinet for organization][1] + +LaTeX is a powerful system, especially for writing scientific and technical documents. But writing documents in LaTeX can be confusing because you need to know a lot of commands, and your text is littered with backslashes, curly braces, and other syntax distractions. But being productive as a writer requires that you focus on the text's content instead of how it looks. Fortunately, the [GNU Emacs][2] Org mode extension makes it easy to write plain-text documents and seamlessly export them to LaTeX and PDF. + +[Org mode][3] is a built-in Emacs extension that helps you keep notes, maintain to-do lists, manage projects, and author documents with a fast and effective plain-text system. Emacs also comes with [AUCTeX][4], an extensible package for writing TeX files in Emacs. AUCTeX has a preview module that shows the results of what you type, but I find it distracting because it draws my attention away from the document's content to its design. Writing text in Org mode is my preferred option because the source remains a plain-text file with minimal typesetting elements. The text is independent of its result because Org mode can export it to multiple formats, including LaTeX and PDF. + +Emacs is known for being difficult to use with a steep learning curve. But Emacs is only difficult when you want to fine-tune the default settings. By following a minimalist approach to using the vanilla GNU Emacs, this article will get you quickly and easily on your way to writing beautiful documents without any complex configuration. + +### First steps + +Before you begin, [install Emacs][5] and a fully functioning version of [LaTeX][6] on your computer. + +Next, you need to learn some conventions. In Emacs lingo, the abbreviation **C-c** means to enter **Ctrl+C** on your keyboard. The abbreviation **M-x** means **Alt+X**. The M stands for the mod key, which no longer exists in modern systems. The **S** prefix indicates the **Shift** key. + +The **find-file** function, which you start with the **C-x C-f** keystroke combination, creates a new document or opens an existing document. Entering this function opens a dialog in the mini-buffer at the bottom of the screen, which is where Emacs communicates with the user. Type the name of the file you want to create or open into the mini-buffer. Emacs is sensitive to file extensions, so make sure that the name of your document ends in **.org**. + +In Emacs speak, opening or creating a file is called ["visiting" a file][7]. Visiting a file means reading its contents into an Emacs buffer so that it is available for editing. Emacs generates a new buffer for each file you visit. + +### Writing prose with Org mode + +Once you're visiting a file, you can start typing your text the same way you would in any text editor or word processor. Some conventions: Begin the file with **#+TITLE:** to denote the title of the document and **#+AUTHOR** for your name. These options are used when exporting the file. Org mode recognizes a range of [export settings][8] to configure the output. For example, to suppress the table of contents, enter **#+OPTIONS: toc:nil**. + +Org mode has its own Markdown-like conventions to format your document. [Headlines][9] start with one or more asterisks. Org mode can [collapse a headline][10] to render parts of it invisible with the **TAB** or **S-TAB** keys. You can make words ***bold***, **/italic/**, **_underlined_**, or **=verbatim=**. The Org manual describes the many options for [rich text][11]. + +One minor issue with plain-vanilla Emacs that you will quickly notice is it does not wrap lines at the end of the visible screen. Emacs has several line-wrapping functions, and [Visual Line mode][12] is the most useful for writing long-form text. To activate this mode, use **M-x** and enter **visual-line-mode** in the mini-buffer at the bottom of the screen. The **M-x** keyboard shortcut enables executing functions for which there is no direct keyboard shortcut. + +Adding [images][13] is as easy as adding a link to the image file within double square brackets: + + +``` +`[[file:path_to_image.png]]` +``` + +Org has a great system for [formatting tables][14] in plain ASCII. Any line with **|** is considered part of a table. The vertical line is also the column separator. A line starting with **|-** is rendered as a horizontal rule, and rows before the first horizontal rule are header lines. A table might look like this in the source file: + + +``` +| Name  |   id | Age | +|-------+------+-----| +| Peter | 1234 |  50 | +| Sue   | 4321 |  54 | +``` + +Both images and tables are preceded with **#+CAPTION:** to add a [caption][15]. Advanced options are also available to control float placement and size of figures. + +Emacs has extensive [editing functions][16] to make you more efficient when typing text. Spell checking, thesaurus, auto-completion, and an undo tree are just some of the tools that help you write efficiently. + +### Adding LaTeX snippets to Org + +In addition to the text itself, Org mode-text can include simple LaTeX commands, such as **\newpage**, within the text. Equations in standard LaTeX syntax are placed between dollar signs **$e^{i\pi} + 1 = 0$**. The **org-latex-preview** function (**C-c C-x C-l**) shows a [preview][17] of any LaTeX equations within the text buffer. Last, you can also add complete LaTeX snippets to insert complex content. The code has to be placed in an export block: + + +``` +#+BEGIN_EXPORT latex +\setlength{\unitlength}{1cm} +\thicklines +\begin{picture}(10,6) +\put(2,2.2){\line(1,0){6}} +\put(2,2.2){\circle{2}} +\put(6,2.2){\oval(4,2)[r]} +\end{picture} +#+END_EXPORT +``` + +### Exporting to LaTeX + +Org mode includes a powerful export module to convert your files to many formats using the powerful [Pandoc][18] software. Start the export module with the **org-export-dispatch** function, which you can run with the **C-c C-e** keyboard shortcut. The dispatch will split your screen and provide a range of options. + +First, Pandoc converts the Org mode file to a LaTeX file. Then you can choose to open the LaTeX file in a new buffer or save it as a file. Org mode can also directly render a PDF file, which you can view within Emacs or save to disk. + +![Emacs with Org mode source and PDF preview][19] + +### Advanced use + +This article provides a first taste of writing prose in Org mode and LaTeX. Org mode has numerous configuration options to fine-tune your document or to change default settings. + +By default, Org mode uses the article style to export documents, but you can change this with export settings. These settings can also be used to add commands to the document header, for example: + + +``` +#+LATEX_CLASS: report +#+LATEX_CLASS_OPTIONS: [a4paper] +#+LATEX_HEADER: \usepackage{times} +``` + +If you write scientific documents, the [org-ref][20] package by John Kitchin provides Org-mode modules for citations, cross-references, and bibliographies in Org mode and useful BibTeX tools to go with it. + +The Org mode manual's [LaTex export][21] section provides a detailed discussion of the functionality available. + +### Conclusion + +Org mode is a perfect editor for writing LaTeX. The main advantage is that you lose the clutter of LaTeX syntax and can focus on the text. This comes at no cost because you can still add LaTeX code as much as you need, and you get access to the powerful editing functions in Emacs. + +Using Org to write books and articles allows you to focus on the text as you combine two of the oldest and most powerful pieces of open source software. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/emacs-org-mode + +作者:[Peter Prevos][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/danderzei +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_organize_letter.png?itok=GTtiiabr (Filing cabinet for organization) +[2]: https://opensource.com/article/20/3/getting-started-emacs +[3]: https://orgmode.org +[4]: https://www.gnu.org/software/auctex/ +[5]: https://www.gnu.org/software/emacs/ +[6]: https://www.latex-project.org/get/ +[7]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Visiting.html +[8]: https://orgmode.org/manual/Export-Settings.html +[9]: https://orgmode.org/manual/Headlines.html#Headlines +[10]: https://orgmode.org/manual/Global-and-local-cycling.html#Global-and-local-cycling +[11]: https://orgmode.org/manual/Markup-for-Rich-Contents.html#Markup-for-Rich-Contents +[12]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html +[13]: https://orgmode.org/manual/Images.html +[14]: https://orgmode.org/manual/Built_002din-Table-Editor.html#Built_002din-Table-Editor +[15]: https://orgmode.org/manual/Captions.html#Captions +[16]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Basic.html#Basic +[17]: https://orgmode.org/manual/Previewing-LaTeX-fragments.html +[18]: https://pandoc.org/ +[19]: https://opensource.com/sites/default/files/uploads/org-mode-latex-screenshot.png (Emacs with Org mode source and PDF preview.) +[20]: https://github.com/jkitchin/org-ref +[21]: https://orgmode.org/manual/LaTeX-Export.html#LaTeX-Export From 41eed4a789cae84562df3d1a6105acc522cedf10 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Apr 2020 08:37:01 +0800 Subject: [PATCH 031/394] translated --- ...ver with a Raspberry Pi and Rocket.Chat.md | 102 ------------------ ...ver with a Raspberry Pi and Rocket.Chat.md | 100 +++++++++++++++++ 2 files changed, 100 insertions(+), 102 deletions(-) delete mode 100644 sources/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md create mode 100644 translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md diff --git a/sources/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md b/sources/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md deleted file mode 100644 index 8c7b49e7c3..0000000000 --- a/sources/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat) -[#]: via: (https://opensource.com/article/20/3/raspberry-pi-rocketchat) -[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) - -Build a private chat server with a Raspberry Pi and Rocket.Chat -====== -Create your own truly private chat and messaging solution with these -simple, cost-effective open source tools. -![Chat via email][1] - -The internet offers plenty of free messaging services. Applications like WhatsApp and Viber are part of our daily life and are the most common way we communicate with relatives and friends. But security awareness is increasing the demand for a truly private chat solution. Furthermore, messaging apps take up a lot of space in our devices, so an alternative chat channel could be useful to share media, info, and contacts with our friends. - -Today we are going to see how to install a private chat and messaging server with a [Raspberry Pi][2] and Rocket.Chat. - -### What is Rocket.Chat? - -[Rocket.Chat][3] is an open source solution that provides an enhanced chat service. It includes collaboration tools like media sharing, screen sharing, and video/audio calling support. - -It can be used both via browser or from apps available in all the main app stores (Google Play, App Store, etc.). - -In addition to the community version, Rocket.Chat also offers Enterprise and Professional versions, including support and additional features. - -### What we need - -For this project, I’m going to use a cheaper Raspberry Pi 3 model A+. RPI 3 models B and B+, and RPI 4 model B should also work in the same way. - -I also suggest a performing SD card, because Rocket.Chat can put a heavy workload on our Raspberry Pi. As discussed in other articles, a performing SD card strongly improves Raspbian OS performance. - -We’ll use a lite version of Raspbian with pre-configured WiFi access and SSH service, so ![][4] there will no need for keyboards or HDMI cables. - -### Step-by-step procedure - -Start by [installing the last version of Raspbian Buster Lite][5]. - -We’ll simplify Rocket.Chat installation by using [Snap][6]. Login via SSH and type from the terminal: - - -``` -sudo apt-get update -sudo apt-get upgrade -``` - -Install Snap: - - -``` -`sudo apt-get install snapd` -``` - -For Snap installation, we need a system reboot to make it work: - - -``` -`sudo reboot` -``` - -Login again via SSH and install the Rocket.Chat server with the simple command: - - -``` -`sudo snap install rocketchat-server` -``` - -After installing from the terminal, please wait a while for Rocket.Chat to initialize its database and services. Have a cup of tea, and after a few minutes you should be able to reach with your browser the address http://<<YOUR_RPI_IP_ADDRESS>>:3000 and you should see the following: - -![Rocket Chat setup wizard][7] - -Complete the required forms, and everything should go fine. After four simple setup windows, you should reach the Rocket.Chat home page: - -![Rocket Chat home page][8] - -Enjoy! - -_This article originally posted on [peppe8o.com][9], reposted with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/raspberry-pi-rocketchat - -作者:[Giuseppe Cassibba][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/peppe8o -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) -[2]: https://opensource.com/resources/raspberry-pi -[3]: https://rocket.chat/ -[4]: https://ir-na.amazon-adsystem.com/e/ir?t=peppe8o0b-20&l=am2&o=1&a=B07KKBCXLY -[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/ -[6]: https://snapcraft.io/ -[7]: https://opensource.com/sites/default/files/uploads/rocket-chat-setup-wizard.jpg (Rocket Chat setup wizard) -[8]: https://opensource.com/sites/default/files/uploads/rocket-chat-home.jpg (Rocket Chat home page) -[9]: https://peppe8o.com/private-chat-and-messaging-server-with-raspberry-pi-and-rocket-chat/ diff --git a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md b/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md new file mode 100644 index 0000000000..9a7af28493 --- /dev/null +++ b/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md @@ -0,0 +1,100 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat) +[#]: via: (https://opensource.com/article/20/3/raspberry-pi-rocketchat) +[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) + +使用树莓派和 Rocket.Chat 构建一个私人聊天服务器 +====== +使用这些简单、经济高效的开源工具创建你自己的真正私人聊天和消息解决方案。 +![Chat via email][1] + +互联网提供大量免费的消息服务。WhatsApp 和 Viber 等应用是我们日常生活的一部分,也是我们与亲朋好友沟通的最常见方式。但是,安全意识正在增加对真正私人聊天解决方案的需求。此外,消息应用在我们的设备中占用了大量空间,因此备用聊天渠道可用于与朋友共享媒体、信息和联系人。 + +今天,我们将了解如何使用[树莓派][2]和 Rocket.Chat 安装一个私人聊天和消息服务器。 + +### 什么是 Rocket.Chat? + +[Rocket.Chat][3] 是一个开源解决方案,它提供增强的聊天服务。它包括媒体共享、屏幕共享和视频/音频呼叫支持等协作工具。 + +它可以通过浏览器或从所有主要应用商店(Google Play、App Store 等)下载使用。 + +除了社区版本外,Rocket.Chat 还提供企业版和专业版,包括支持和其他功能。 + +### 我们需要什么 + +对于这个项目,我将使用更便宜的树莓派 3 model A+。树莓派 3 model B 和 B+ 以及树莓派 4 model B 工作应该一样。 + +我也建议使用高性能 SD 卡,因为 Rocket.Chat 会给树莓派大量的负载。如其他文章中所述,高性能 SD 卡可显著提高 Raspbian 操作系统的性能。 + +我们将使用 Raspbian 的精简版本,拥有预配置的 WiFi 访问和 SSH 服务,因此不需要键盘或 HDMI 线缆。 + +### 分步过程 + +从[安装最新版本的 Raspbian Buster Lite][5] 开始 + +我们将使用 [Snap][6] 简化 Rocket.Chat 安装。通过 SSH 登录并从终端输入: + + +``` +sudo apt-get update +sudo apt-get upgrade +``` + +安装 Snap: + + +``` +`sudo apt-get install snapd` +``` + +安装 Snap 后,我们需要重启系统使其正常工作: + + +``` +`sudo reboot` +``` + +再次通过 SSH 登录,并用以下简单的命令安装 Rocket.Chat: + + +``` +`sudo snap install rocketchat-server` +``` + +从终端安装后,请等待一段时间,等待 Rocket.Chat 初始化数据库和服务。休息一下,几分钟后,你应该能够在浏览器中访问 http://<<YOUR_RPI_IP_ADDRESS>>:3000,你应该看到以下内容: + +![Rocket Chat setup wizard][7] + +填写所需的表格就可以了。四个简单的设置窗口后,你应该会进入 Rocket.Chat 主页: + +![Rocket Chat home page][8] + +享受吧! + +_本文最初发表在 [peppe8o.com][9],并或许重新发布。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/raspberry-pi-rocketchat + +作者:[Giuseppe Cassibba][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/peppe8o +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) +[2]: https://opensource.com/resources/raspberry-pi +[3]: https://rocket.chat/ +[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/ +[6]: https://snapcraft.io/ +[7]: https://opensource.com/sites/default/files/uploads/rocket-chat-setup-wizard.jpg (Rocket Chat setup wizard) +[8]: https://opensource.com/sites/default/files/uploads/rocket-chat-home.jpg (Rocket Chat home page) +[9]: https://peppe8o.com/private-chat-and-messaging-server-with-raspberry-pi-and-rocket-chat/ From e154021b1961dff7406861973965c2c44f582e48 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 10 Apr 2020 08:53:42 +0800 Subject: [PATCH 032/394] Update 20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md --- ...a private chat server with a Raspberry Pi and Rocket.Chat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md b/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md index 9a7af28493..dd59fe627f 100644 --- a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md +++ b/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md @@ -75,7 +75,7 @@ sudo apt-get upgrade 享受吧! -_本文最初发表在 [peppe8o.com][9],并或许重新发布。_ +_本文最初发表在 [peppe8o.com][9],并获许重新发布。_ -------------------------------------------------------------------------------- From 3b103482c77504c713fc45768bba8cae8ca6ee6d Mon Sep 17 00:00:00 2001 From: Hank Chow <280630620@qq.com> Date: Fri, 10 Apr 2020 13:26:09 +0800 Subject: [PATCH 033/394] hankchow translating --- .../tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md index bf90b3ea4f..e668ac6d00 100644 --- a/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md +++ b/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (HankChow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 912a18282068f59473ee03731ba3738c3861492b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Apr 2020 17:45:21 +0800 Subject: [PATCH 034/394] PRF @MFGJT --- .../20190116 Best Audio Editors For Linux.md | 84 ++++++++----------- 1 file changed, 35 insertions(+), 49 deletions(-) diff --git a/translated/tech/20190116 Best Audio Editors For Linux.md b/translated/tech/20190116 Best Audio Editors For Linux.md index 7c72129b8d..0cf01bc796 100644 --- a/translated/tech/20190116 Best Audio Editors For Linux.md +++ b/translated/tech/20190116 Best Audio Editors For Linux.md @@ -1,20 +1,20 @@ [#]: collector: (lujun9972) [#]: translator: (MFGJT) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Best Audio Editors For Linux) [#]: via: (https://itsfoss.com/best-audio-editors-linux) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -Linux 上最好的音频编辑工具 +Linux 上的最佳音频编辑工具推荐 ====== 在 Linux 上,有很多种音频编辑器可供你选用。不论你是一个专业的音乐制作人,还是只想学学怎么做出超棒的音乐的爱好者,这些强大的音频编辑器都是很有用的工具。 -对于专业级的使用,我总是建议使用 [DAW][1](数码音频工作站)。但并不是所有人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。 +对于专业级的使用,我总是建议使用 [DAW][1](数码音频工作站)。但并不是每个人都需要全部的功能,所以你也应该了解一些最简单的音频编辑器。 -在本文中,我们将讨论几个 DAW 和基础的音频编辑器,而且它们都是在 Linux 和(很有可能)其它操作系统上可以使用的**免费并开源**的音频编辑方案。 +在本文中,我们将讨论几款 DAW 和基础的音频编辑器,而且它们都是在 Linux 和(可能)其它操作系统上可以使用的**自由开源**的解决方案。 ### Linux 上的最佳音频编辑器 @@ -22,115 +22,101 @@ Linux 上最好的音频编辑工具 我们不会关注 DAW 提供的所有功能,而只是关注基本的音频编辑功能。不过,你仍然可以把以下内容看作是 Linux 的最佳 DAW 名单。 -**安装说明:** -你可以在 AppCenter 或 Software center 中找到所有提到的音频编辑器或daw。如果你在这两个地方没有找到它们,请前往它们的官方网站获取更多信息。 +**安装说明:**你可以在 AppCenter 或软件中心中找到所有提到的音频编辑器或 DAW。如果你在这两个地方没有找到它们,请前往它们的官方网站获取更多信息。 -#### 1\. Audacity +#### 1、Audacity ![Audacity audio editor][3] -Audacity 是 Linux 中最基本音频编辑器之一,但是它也很强大。它是一个免费的开源跨平台工具。肯定已经有很多人了解这个软件了。 +[Audacity](https://www.audacityteam.org/) 是 Linux 中最基本音频编辑器之一,但是它也很强大。它是一个自由开源的跨平台工具。肯定已经有很多人了解这个软件了。 -现在的它相比它最初流行的时候有了很大的改进。我记得我以前试着通过从音频中去除人声来制作卡拉OK伴奏。现在有些时候,你仍然可以这么做。 +现在的它相比它最初流行的时候有了很大的改进。我记得我以前试着通过从音频中去除人声来制作卡拉 OK 伴奏。现在有些时候,你仍然可以这么做。 **特性:** -它还支持包含 VST 效果的插件。当然,你不应该期望它支持 VST 设备。 +它还支持包含 VST 效果的插件。当然,你不应该期望它支持 VST 乐器。 * 通过麦克风或混音器进行现场录制 - * 支持同时从多种音频格式的文件中批量导出/导入内容 - * 支持 LADSPA,LV2,Nyquist,VST 和 Audio Unit 的效果插件 + * 支持同时从多种音频格式的多个文件中批量导出/导入内容 + * 支持 LADSPA、LV2、Nyquist、VST 和 Audio Unit 的效果插件 * 使用简单,带有剪切、粘贴、删除和拷贝的功能 * 可观测声音频率的频谱模式 - - -#### 2\. LMMS +#### 2、LMMS ![LMMS audio editor][4] -LMMS 是一个免费的开源(跨平台)数码音频工作站。它包括所有基本的音频编辑功能以及许多高级功能。 +[LMMS](https://lmms.io/) 是一个自由开源的(跨平台)数码音频工作站。它包括所有基本的音频编辑功能以及许多高级功能。 -你可以混音,组合音频,或使用 VST 设备创造音频。 LMMS 支持这些功能。此外,它还自带一些样本音频,预设,VST 设备和特效来帮助你起步。创建音频。此外,你还可以得到一个频谱分析仪,以便进行高级的音频编辑工作。 +你可以混音、组合音频,或使用 VST 设备创造音频。LMMS 支持这些功能。此外,它还自带一些样本音频、预设、VST 设备和特效来帮助你起步。此外,你还可以得到一个频谱分析仪,以便进行高级的音频编辑工作。 **特性:** * 基于 MIDI 的音符回放 * 支持 VST 设备 - * 支持多样本 - * 内置压缩器,限制器,延迟功能,混响功能,失真功能和低音增强器 + * 原生支持多采样 + * 内置压缩器、限制器、延迟功能、混响功能、失真功能和低音增强器 - - -#### 3\. Ardour +#### 3、Ardour ![Ardour audio editor][5] -Ardour 是另一个免费和开源的数码音频工作站。只要你有音频接口,Ardour 就支持它的使用。当然,你也可以无限地添加多通道音轨。这些多通道音轨也可以被指派到不同的混音带,以方便编辑和录音。 +[Ardour](https://ardour.org/) 是另一个自由开源的数码音频工作站。只要你有音频接口,Ardour 就支持它的使用。当然,你也可以无限地添加多声道音轨。这些多声道音轨也可以被指派到不同的混音带,以方便编辑和录音。 -你也可以导入一个视频,编辑其中的音频,然后导出新的视频和音频。它提供了许多内置插件,并且支持 VST 插件。 +你也可以导入一个视频,编辑其中的音频,然后导出新的视频。它提供了许多内置插件,并且支持 VST 插件。 **特性:** * 非线性编辑 - * 垂直窗口堆叠,简单的页面导航 - * 静默消除功能(strip silence),推拉修剪功能(push-pull trimming),和用以短暂片段或基于基于音符开始的编辑的 Rhythm Ferret。 + * 垂直窗口堆叠,便于导航 + * 静默消除功能strip silence推拉修剪功能push-pull trimming,和用以短暂片段或基于基于音符开始的编辑的 Rhythm Ferret。 - - -#### 4\. Cecilia +#### 4、Cecilia ![Cecilia audio editor][6] -Cecilia 不是一个普通的音频编辑器。它的使用者一般是音效设计师或者正在努力成为音效设计师的人。 Cecilia 实际上是一个音频信号处理环境。它可以让你的作品余音绕梁。 +[Cecilia](http://ajaxsoundstudio.com/software/cecilia/) 不是一个普通的音频编辑器。它的使用者一般是音效设计师或者正在努力成为音效设计师的人。 Cecilia 实际上是一个音频信号处理环境。它可以让你的作品余音绕梁。 -你还可以得到内置的音效与合成模组和插件。 Cecilia 为一个明确的目的而生:如果你正在找音效设计工具,这是你的不二之选! +你还可以得到内置的音效与合成模组和插件。Cecilia 为一个明确的目的而生:如果你正在找音效设计工具,这是你的不二之选! **特性:** - * 利用模块来完成更多工作(UltimateGrainer——最先进的颗粒化处理工具,RandomAccumulator——记录变量速度的累加器,UpDistoRes——通过上采样和谐振低通滤波器创造失真效果的工具) + * 利用模块来完成更多工作(UltimateGrainer —— 最先进的颗粒化处理工具,RandomAccumulator —— 记录变量速度的累加器,UpDistoRes——通过上采样和谐振低通滤波器创造失真效果的工具) * 自动保存调制设定 - - -#### 5\. Mixxx +#### 5、Mixxx ![Mixxx audio DJ][7] -如果你想要在混合和录制一些东西的同时能够有一个虚拟的 DJ 工具,[Mixxx][8] 将是完美的工具。你可以用到 BPM,key,并使用主同步功能来匹配歌曲的节奏和节拍。另外,不要忘记它也是一个 Linux 的免费并开源的软件。 +如果你想要在混合和录制一些东西的同时能够有一个虚拟的 DJ 工具,[Mixxx](https://www.mixxx.org/) 将是完美的工具。你可以用到 BPM、音调,并使用主同步功能来匹配歌曲的节奏和节拍。另外,不要忘记它也是一个 Linux 的自由开源的软件。 -它还支持自定义 DJ 设备。所以,如果你有 DJ 设备或着 MIDI,你可以用这个工具录制你的现场混音。 +它还支持自定义 DJ 设备。所以,如果你有 DJ 设备或者 MIDI,你可以用这个工具录制你的现场混音。 **特性:** * 播送和录制你的歌曲的 DJ 混音 * 可以连接到你的设备并且现场演奏 - * Key 检测和 BPM 检测 + * 音调检测和 BPM 检测 - - -#### 6\. Rosegarden +#### 6、Rosegarden ![Rosegarden audio editor][9] -Rosegarden 是另一个令人赞叹的 Linux 的免费并开源的音频编辑器。它既不是一个功能齐全的 DAW,也不是一个基本的音频编辑工具。它是两者的混合体,并带有一些缩减的功能。 +[Rosegarden](https://www.rosegardenmusic.com/) 是另一个令人赞叹的 Linux 的自由开源的音频编辑器。它既不是一个功能齐全的 DAW,也不是一个基本的音频编辑工具。它是两者的混合体,并带有一些缩减的功能。 我不会向专业人士推荐这款软件,但如果你经营家庭音乐工作室或只是想体验一下,这将是 Linux 上可以安装的最好的音频编辑器之一。 **特性:** * 乐谱编辑 - * 记录、混合以及样本功能 + * 录音、混音以及采样 +### 小结 - -#### 小结 - -这些是你可以找到的 Linux 上的最棒的一些音频编辑器了。不论你是需要 DAW,一个剪切/粘贴的编辑工具,或者仅仅想要一个拥有基础混音和录音功能的音频编辑工具,上述软件都能够满足你的需求。 +这些是你可以找到的 Linux 上的最棒的一些音频编辑器了。不论你是需要 DAW,一个剪切/粘贴的编辑工具,或者仅仅想要一个拥有基础的混音和录音功能的音频编辑工具,上述软件都能够满足你的需求。 如果在这篇文章中我们遗漏了你最喜欢的一些音频工具,可以在原文下方评论中回复告诉我们。 - -------------------------------------------------------------------------------- via: https://itsfoss.com/best-audio-editors-linux @@ -138,7 +124,7 @@ via: https://itsfoss.com/best-audio-editors-linux 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[MFGJT](https://github.com/MFGJT) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1b8d3c34983c489c607b13d5d4feff837aec9127 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Apr 2020 17:46:09 +0800 Subject: [PATCH 035/394] PUB @MFGJT https://linux.cn/article-12095-1.html --- .../20190116 Best Audio Editors For Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190116 Best Audio Editors For Linux.md (99%) diff --git a/translated/tech/20190116 Best Audio Editors For Linux.md b/published/20190116 Best Audio Editors For Linux.md similarity index 99% rename from translated/tech/20190116 Best Audio Editors For Linux.md rename to published/20190116 Best Audio Editors For Linux.md index 0cf01bc796..a6977b7d73 100644 --- a/translated/tech/20190116 Best Audio Editors For Linux.md +++ b/published/20190116 Best Audio Editors For Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (MFGJT) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12095-1.html) [#]: subject: (Best Audio Editors For Linux) [#]: via: (https://itsfoss.com/best-audio-editors-linux) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 559e9c6cad4ddb80f5a68450f86957cb8d761ad9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Apr 2020 20:40:29 +0800 Subject: [PATCH 036/394] =?UTF-8?q?=E5=9B=9E=E6=94=B6=E6=96=B0=E9=97=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...buntu- UBports is Renaming it to Lomiri.md | 91 ----------------- ... mobile OSes, and more open source news.md | 82 ---------------- ...ert inclusion, and more industry trends.md | 60 ------------ ... Largest Software Registry in the World.md | 78 --------------- ...an-based Games Capture Feature and More.md | 98 ------------------- ...in Kubernetes, and more industry trends.md | 70 ------------- 6 files changed, 479 deletions(-) delete mode 100644 sources/news/20200301 Remember Unity8 from Ubuntu- UBports is Renaming it to Lomiri.md delete mode 100644 sources/news/20200314 Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news.md delete mode 100644 sources/news/20200319 Tools for monitoring, introvert inclusion, and more industry trends.md delete mode 100644 sources/news/20200319 With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World.md delete mode 100644 sources/news/20200322 OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More.md delete mode 100644 sources/news/20200325 npm joins GitHub, building operators in Kubernetes, and more industry trends.md diff --git a/sources/news/20200301 Remember Unity8 from Ubuntu- UBports is Renaming it to Lomiri.md b/sources/news/20200301 Remember Unity8 from Ubuntu- UBports is Renaming it to Lomiri.md deleted file mode 100644 index 7badbfc8a2..0000000000 --- a/sources/news/20200301 Remember Unity8 from Ubuntu- UBports is Renaming it to Lomiri.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Remember Unity8 from Ubuntu? UBports is Renaming it to Lomiri) -[#]: via: (https://itsfoss.com/unity8-lomiri/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -Remember Unity8 from Ubuntu? UBports is Renaming it to Lomiri -====== - -Ever since Ubuntu abandoned the Unity project, UBports continued the maintenance and development of Unity. On February 27th 2020, [UBports][1] announced that they are giving Unity8 a new branding in the form of Lomiri. - -### Unity8 is now Lomiri - -![Unity8 in action | Image Credit: UBports][2] - -[UBports announced][3] that the Unity8 desktop environment would be renamed as Lomiri. They gave three reasons for this fairly drastic announcement. - -First, they want to avoid confusion with the [Unity game engine][4]. Quite a few people confused the two. UBports noted that they are frequently receiving questions regarding “how to import 3D models and meshes into our shell”. When you search “Unity” in your favorite search engine, most of the top links are for the game engine. - -The second reason for the name change has to do with the new effort to package Unity8 for Debian. Unfortunately, many of the Unity8’s dependencies have Ubuntu in the name, for example, _**ubuntu-ui-toolkit**_. Debian packagers warned that packages that have Ubuntu in the name may not be accepted into [Debian][5]. - -Finally, UBports said the name change would improve verbal communications. Saying Unity8 repeatedly can be a mouthful. People would not have to worry about confusing “users of Ubuntu Unity and Unity (the game engine)”. - -UBports went on to stress that the name change was not “triggered by any action from Canonical or the Ubuntu community, legal or otherwise”. - -They noted that this name change was the perfect time for them to switch to [GitHub alternative GitLab][6] for their development. - -Interestingly, the announcement did not explain how they picked Lomiri as the new name. All they said is that “We went through many different names before settling on Lomiri. All of them had problems with pronunciation, availability, or other related issues.” - -UBports noted that most Ubuntu Touch users would be unaffected by the name change. Developers and power users might notice some changes, but UBports “will strive to maintain backwards compatibility within Ubuntu Touch for the foreseeable future”. - -### What Exactly is Being Renamed? - -![][7] - -According to the announcement, packages that have either Ubuntu or Unity in the title will be affected. For example, - - * **unity8**, containing the shell, will become **lomiri** - * **ubuntu-ui-toolkit** will become **lomiri-ui-toolkit** - * **ubuntu-download-manager** will become **lomiri-download-manager** - - - -On top of this, interfaces call will change, as well. “For example, the **Ubuntu.Components** QML import will change to **Lomiri.Components**.” For the sake of backwards compatibility, Ubuntu Touch images will not change too much. “Developers will only need to update to the new API when they’d like to package their apps for other distributions.” - -### What Will Stay the Same? - -Since renaming packages can cause quite a few cascading problems, UBports wants to limit the number of packages they change. They don’t expect the following things to change. - - * Packages that don’t use the “Ubuntu” or “Unity” names - * Ubuntu Touch will remain the same - * Any components which are already used by other projects and accepted into other distributions - - - -### Final Thoughts - -![][8] - -Overall, I think this change will be good for Ubuntu Touch in the long run. I understand why [Canonical][9] picked the Unity name for their convergence desktop, but I think the desktop environment was overshadowed by the game engine from the beginning. This will give them room to breathe and also free up valuable coding time. The less time spent replying to questions about 3D models the more time that can be spent creating a convergent desktop. - -If you have any further questions or concerns about the name change, you visit the [UBports forms][10]. They have set up a thread specifically for this topic. - -Don’t hesitate to share our views on it in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/unity8-lomiri/ - -作者:[John Paul][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/john/ -[b]: https://github.com/lujun9972 -[1]: https://ubports.com/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/unity8_ubports.png?ssl=1 -[3]: https://ubports.com/blog/ubports-blog-1/post/lomiri-new-name-same-great-unity8-265 -[4]: https://en.wikipedia.org/wiki/Unity_(game_engine) -[5]: https://www.debian.org/ -[6]: https://itsfoss.com/github-alternatives/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/Unity8-lomiri.png?ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/ubports.jpeg?ssl=1 -[9]: https://canonical.com/ -[10]: https://forums.ubports.com/topic/3874/unity8-is-now-lomiri diff --git a/sources/news/20200314 Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news.md b/sources/news/20200314 Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news.md deleted file mode 100644 index 0f3aa9a0a3..0000000000 --- a/sources/news/20200314 Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news) -[#]: via: (https://opensource.com/article/20/3/news-march-14) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Linux Foundation prepares for disaster, new anti-tracking data set, Mozilla goes back to mobile OSes, and more open source news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this edition of our open source news roundup, we take a look at the Linux Foundation's disaster relief project, DuckDuckGo's anti-tracking tool, open textbooks, and more! - -### Linux Foundation unveils Project OWL - -When a disaster happens, it's vital to keep communications links up and running. One way to do that is with [mesh networks][2]. The Linux Foundation [has unveiled][3] Project OWL to "help build mesh network nodes for global emergency communications networks." - -Short for _Organisation, Whereabouts, and Logistics_, OWL is firmware for Internet of Things (IoT) devices that "can quickly turn a cheap wireless device into a ‘DuckLink’, a mesh network node". Those devices can connect to other, similar devices around them. OWL also provides an analytics tool that responders can use for "coordinating resources, learning about weather patterns, and communicating with civilians who would otherwise be cut off." - -### New open source tool to block web trackers - -It's no secret that sites all over the web track their visitors. Often, it's shocking how much of that goes on and what a threat to your privacy that is. To help web browser developers better protect their users, the team behind search engine DuckDuckGo is "[sharing data it's collected about online trackers with other companies so they can also protect your privacy][4]." - -That dataset is called Tracker Radar and it "details 5,326 internet domains used by 1,727 companies and organizations that track you online". Browser Radar is different from other tracker databases in that it "annotates data with other information, like whether blocking a tracker is likely to break a website, so anyone using it can pick the best balance of privacy and convenience." - -Tracker Radar's dataset is [available on GitHub][5]. The repository also links to the code for the [crawler][6] and [detector][7] that work with the data. - -### Oregon Tech embracing open textbooks - -With the cost of textbooks taking an increasingly large bite out of the budgets of university students, more and more schools are turning to open textbooks to cut those costs. By embracing open textbooks, the Oregon Institute of Technology has [save students $400,000][8] over the last two years. - -The school offers open textbooks for 26 courses, ranging "from chemistry and biology, to respiratory care, sociology and engineering." Although the textbooks are free, university librarian John Schoppert points out that the materials are of a high quality and that faculty members have been "developing lab manuals and open-licensed textbooks where they hadn’t existed before and improved on others’ materials." - -### Mozilla to help update feature phone OS - -A few years ago, Mozilla tried to break into the world of mobile operating systems with Firefox OS. While that effort didn't pan out, Firefox OS found new life powering low-cost feature phones under the name KaiOS. Mozilla's [jumping back into the game][9] by helping "modernize the browser engine that's core to the software." - -KaiOS is built upon a four-year-old version of Mozilla's Gecko browser engine. Updating Gecko will "improve security, make apps run faster and more smoothly, and open [KaiOS to] more-sophisticated apps and WebGL 2.0 for better games graphics." Mozilla said its collaboration will include "Mozilla's help with test engineering and adding new low-level Gecko abilities." - -#### In other news - - * [CERN adopts Mattermost, an open source messaging app][10] - * [Open-source software analyzes economics of biofuels, bioproducts][11] - * [Netflix releases Dispatch for crisis management orchestration][12] - * [FreeNAS and TrueNAS are merging][13] - * [Smithsonian 3D Scans NASA Space Shuttle Discovery And Makes It Open Source][14] - - - -Thanks, as always, to Opensource.com staff members and [Correspondents][15] for their help this week. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/news-march-14 - -作者:[Scott Nesbitt][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/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://en.wikipedia.org/wiki/Mesh_networking -[3]: https://www.smartcitiesworld.net/news/news/linux-announces-open-source-project-to-aid-disaster-relief-5102 -[4]: https://www.cnet.com/news/privacy-focused-duckduckgo-launches-new-effort-to-block-online-tracking/ -[5]: https://github.com/duckduckgo/tracker-radar -[6]: https://github.com/duckduckgo/tracker-radar-collector -[7]: https://github.com/duckduckgo/tracker-radar-detector -[8]: https://www.heraldandnews.com/news/local_news/oregon-tech-turns-to-open-source-materials-to-save-students/article_ba641e79-3034-5b9a-a8f7-b5872ddc998e.html -[9]: https://www.cnet.com/news/mozilla-helps-modernize-feature-phones-powered-by-firefox-tech/ -[10]: https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/cern-uses-mattermost -[11]: http://www.biomassmagazine.com/articles/16848/open-source-software-analyzes-economics-of-biofuels-bioproducts -[12]: https://jaxenter.com/netflix-dispatch-crisis-management-orchestration-169381.html -[13]: https://liliputing.com/2020/03/freenas-and-turenas-are-merging-open-source-operating-systems-for-network-attached-storage.html -[14]: https://www.forbes.com/sites/tjmccue/2020/03/04/smithsonian-3d-scans-the-nasa-space-shuttle-discovery-and-makes-it-open-source/#39aa0f243ecd -[15]: https://opensource.com/correspondent-program diff --git a/sources/news/20200319 Tools for monitoring, introvert inclusion, and more industry trends.md b/sources/news/20200319 Tools for monitoring, introvert inclusion, and more industry trends.md deleted file mode 100644 index 838a4e2c23..0000000000 --- a/sources/news/20200319 Tools for monitoring, introvert inclusion, and more industry trends.md +++ /dev/null @@ -1,60 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tools for monitoring, introvert inclusion, and more industry trends) -[#]: via: (https://opensource.com/article/20/3/monitoring-introvert-industry-trends) -[#]: author: (Tim Hildred https://opensource.com/users/thildred) - -Tools for monitoring, introvert inclusion, and more industry trends -====== -A weekly look at open source community and industry trends. -![Person standing in front of a giant computer screen with numbers, data][1] - -As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. - -## [Top six open source tools for monitoring][2] - -> These tools are widely used in the tech industry, and they all have their benefits. Most of these solutions, however, require skilled implementation and ongoing manual maintenance that can be a burden for DevOps teams and a distraction from the business. There’s no one solution that can cater to all of your requirements, since each tool focuses on one or two specific aspects of observability and analysis. By mixing these tools together, you can derive a unique solution for your individual business needs.  - -**The impact**: If a container falls over in the cluster and there is no open source monitoring tool to see it, did it really happen? - -## [Introvert environment: What can we do?][3] - -> An example is its inclusive team dynamics programme, which consists of both information and guidance on everyday practices. Each team is required to appoint an inclusion champion, who ensures all members are given the space to contribute to discussions. Leaders are also encouraged not to speak first during meetings. - -**The impact**: If it is hard for you not to speak for a while in a meeting, that probably indicates you should be doing it more often. Will new WFH policies make this harder, or easier? Only time will tell. - -## [The difference between API Gateways and service mesh][4] - -> The service connectivity capabilities that service mesh provides are conflicting with the API connectivity features that an API gateway provides. However, because the ones provided by service mesh are more inclusive (L4 + L7, all TCP traffic, not just HTTP and not just limited to APIs but to every service), they are in a way more complete. But as we can see from the diagram above, there are also use cases that service mesh does not provide, and that is the “API as a product” use case as well as the full API management lifecycle, which still belong to the API gateway pattern. - -**The impact**: Another way of saying this is you can't make money from your service mesh directly, unlike your APIs. - -## [Open Policy Agent’s mission to secure the cloud][5] - -> While the cost of implementing OPA is a little high today, the technology pays for itself by providing more control and helping to secure systems. As OPA continues to be refined, we can expect implementation costs to fall, making an investment in OPA easier to justify. - -**The impact**: Compliance is expensive; large investments in it only make sense if non-compliance is even more so. - -_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/monitoring-introvert-industry-trends - -作者:[Tim Hildred][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/thildred -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) -[2]: https://devops.com/top-six-open-source-tools-for-monitoring-kubernetes-and-docker/ -[3]: https://www.raconteur.net/hr/introverts-workplace -[4]: https://www.cncf.io/blog/2020/03/06/the-difference-between-api-gateways-and-service-mesh/ -[5]: https://thenewstack.io/open-policy-agents-mission-to-secure-the-cloud/ diff --git a/sources/news/20200319 With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World.md b/sources/news/20200319 With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World.md deleted file mode 100644 index 7e2d898bfe..0000000000 --- a/sources/news/20200319 With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World) -[#]: via: (https://itsfoss.com/microsoft-npm-acquisition/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -With npm Acquisition, Microsoft is Set to Own the Largest Software Registry in the World -====== - -Microsoft has been betting big on open source for past few years. Apart from open sourcing a few things here and there, Microsoft is contributing a lot to Linux kernel (for its Azure cloud platform). - -To further strengthen its position in the open source world, [Microsoft acquired the popular open source code hosting platform GitHub for $7.5 billion][1]. - -Now Microsoft owned GitHub [has acquired][2] [npm][3] ( short for Node Package Manager). npm is the [world’s largest software registry][4] with [more than 1.3 million packages that have 75 billion downloads a month][5]. - -![][6] - -If you are not familiar, npm is a package manager for JavaScript programming language, primarily the hugely popular open source [Node.js][7]. - -Though npm has scope of private repository for enterprises, most of the 1.3 million packages are open source and/or used in various open source projects. - -Both node.js and npm are used by big software and IT companies like IBM, Yahoo and big corporations like Netflix and PayPal. - -In case you are wondering, the acquisition amount has not been disclosed by either party. - -### Microsoft’s proposed plan for npm - -![][8] - -GitHub CEO Nat Friedman assured that Microsoft intends to keep the npm registry available as open-source and free to developers. - -Once the acquisition is complete, Microsoft is going to invest in the registry infrastructure and platform. It plans to improve the core experience of npm by adding new features like Workspaces, as well as bringing improvements to publishing and multi-factor authentication. - -Microsoft also intends to integrate GitHub and npm so that developers could trace a change from a GitHub pull request to the npm package version that fixed it. - -### Part of a larger plan - -First, [Microsoft bought GitHub][1], the platform that had the largest open source repositories and now npm, the largest software registry. Clearly, Microsoft is tightening its grip around open source projects. This could allow Microsoft to dictate the policies around these open source projects in future. - -When Microsoft acquired GitHub, several open source developers moved to [alternate platforms like GitLab][9] but GitHub remained the first choice for the developers. Microsoft did introduce some innovative features like security advisories, [package registry][10], [sponsorship][11] etc. Microsoft is expanding GitHub by forming communities around it specially in developing countries. Recently, [GitHub announced its Indian subsidiary][12] to specially attract young developers to its platform. - -So now Microsoft owns the professional social network [LinkedIn][13], developer oriented GitHub and npm. This indicates that Microsoft will continue its shopping spree and will acquire more open source related projects that have substantial developer population. - -What could be next then? WordPress because it is the [most popular open source CMS][14] and [runs 33% of the websites][15] on the internet? - -While we wait and watch for Microsoft’s next move, why not share your views on this development? Comment section is all yours. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/microsoft-npm-acquisition/ - -作者:[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/microsoft-github/ -[2]: https://github.blog/2020-03-16-npm-is-joining-github/ -[3]: https://www.npmjs.com/ -[4]: https://www.linux.com/news/state-union-npm/ -[5]: https://www.zdnet.com/article/microsoft-buys-javascript-developer-platform-npm-plans-to-integrate-it-with-github/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/microsoft-github-npm.jpg?ssl=1 -[7]: https://nodejs.org/en/ -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/github-npm.jpg?ssl=1 -[9]: https://itsfoss.com/github-alternatives/ -[10]: https://github.blog/2019-05-10-introducing-github-package-registry/ -[11]: https://itsfoss.com/github-sponsors-program/ -[12]: https://github.blog/2020-02-12-announcing-github-india/ -[13]: https://www.linkedin.com/ -[14]: https://itsfoss.com/open-source-cms/ -[15]: https://wordpress.org/news/2019/03/one-third-of-the-web/ diff --git a/sources/news/20200322 OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More.md b/sources/news/20200322 OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More.md deleted file mode 100644 index afd9891678..0000000000 --- a/sources/news/20200322 OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More) -[#]: via: (https://itsfoss.com/obs-studio-25-release/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -OBS Studio 25.0 is Here With Vulkan-based Games Capture Feature and More -====== - -_**Brief: Open source screen recording and streaming software OBS Studio 25.0 has just been released and it brings the ability to capture Vulkan-based games with game capture among other new features.**_ - -![][1] - -If you are into recording your desktop or streaming it, you might have heard of [OBS][2] (Open Broadcaster Software) Studio. It’s one of the [best screen recorder tools on Linux][3] and other operating systems. - -But OBS is more than just a simple screen recorder. It also provides all the stuff you need for streaming your recordings. - -### New features in OBS Studio 25.0 - -![OBS 25.0][4] - -OBS Studio has released it’s latest version 25.0 with plenty of new features to make your recording and streaming experience better. Let’s take a look at some of the main new features: - - * Capture Vulkan-based games with game capture - * New capture method to window capture which allows capturing browsers, browser-based windows, and UWP programs - * Advanced scene collection importing allows you to import from other common streaming programs - * Media source hotkeys to allow control of playback - * Ability to drag and drop URLs to create browser sources - * Support for the [SRT protocol][5] - * Ability to lock volume values of audio sources in the mixer - * Support for certain devices that can automatically rotate their camera output such as the Logitech StreamCam - * System tray icon to show when the recording is paused - * Help icons when an property has a tooltip associated with it - - - -Apart from there, there are plenty of bug features and minor changes that you may follow in the [release notes][6]. - -### Install OBS Studio 25.0 on Linux - -OBS Studio is a cross-platform software and is also available for Windows and macOS in addition to Linux. You can download it from its official website. - -[Download OBS Studio 25.0][7] - -For Linux, you can grab the source code and build it your self. I know that’s not very convenient for everyone. The good news is that you can install the latest OBS version using Snap or Flatpak packages. - -On Ubuntu or any other [Linux distribution with Snap support][8], you can use the following command: - -``` -sudo snap install obs-studio -``` - -If your distribution supports Fltapak packages, you can get it from Flathub website: - -[OBS Studio on Flathub][9] - -For Ubuntu users, there is also the official PPA for easily installing it. In a terminal, you can enter the following command one by one: - -``` -sudo add-apt-repository ppa:obsproject/obs-studio -sudo apt update -sudo apt install obs-studio -``` - -You can [learn about deleting PPA here][10]. - -Personally, I haven’t used OBS much though I have heard great stuff about it. I don’t live stream but I do record my desktop to create tutorial and information Linux videos on I[t’s FOSS YouTube channel][11] (you should subscribe to it if you haven’t already). For that, I [use Kazam][12] which I find simpler to use. - -Do you use OBS Studio? Which features you like the most? Do share your views. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/obs-studio-25-release/ - -作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/obs_logo_icon_small.png?resize=150%2C150&ssl=1 -[2]: https://obsproject.com/ -[3]: https://itsfoss.com/best-linux-screen-recorders/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/obs-25-ubuntu.png?ssl=1 -[5]: https://en.wikipedia.org/wiki/Secure_Reliable_Transport -[6]: https://github.com/obsproject/obs-studio/releases/tag/25.0.0 -[7]: https://obsproject.com/download -[8]: https://itsfoss.com/install-snap-linux/ -[9]: https://flathub.org/apps/details/com.obsproject.Studio -[10]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/ -[11]: https://www.youtube.com/channel/UCEU9D6KIShdLeTRyH3IdSvw -[12]: https://itsfoss.com/kazam-screen-recorder/ diff --git a/sources/news/20200325 npm joins GitHub, building operators in Kubernetes, and more industry trends.md b/sources/news/20200325 npm joins GitHub, building operators in Kubernetes, and more industry trends.md deleted file mode 100644 index 3a7671da2c..0000000000 --- a/sources/news/20200325 npm joins GitHub, building operators in Kubernetes, and more industry trends.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (npm joins GitHub, building operators in Kubernetes, and more industry trends) -[#]: via: (https://opensource.com/article/20/3/npm-github-operators-kubernetes-industry-trends) -[#]: author: (Tim Hildred https://opensource.com/users/thildred) - -npm joins GitHub, building operators in Kubernetes, and more industry trends -====== -A weekly look at open source community and industry trends. -![Person standing in front of a giant computer screen with numbers, data][1] - -As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. - -## [npm is joining GitHub][2] - -> Looking further ahead, we’ll integrate GitHub and npm to improve the security of the open source software supply chain, and enable you to trace a change from a GitHub pull request to the npm package version that fixed it. Open source security is an important global issue, and with the recent launch of the [GitHub Security Lab][3] and GitHub’s built-in [security advisories][4], we are well-positioned to make a difference. In addition, [GitHub Sponsors][5] has already paid out millions of dollars to open source contributors, and we’re excited to explore tasteful ways to extend it to the npm ecosystem. - -**The impact**: Open source supply chain security is a big problem that probably needs a lot more resources thrown at it. - -## [Why and how to build operators in Kubernetes][6] - -> For cluster administrators managing large clusters, this proliferation of development methodologies and management interfaces can be problematic. The class of applications that Operators were developed to manage are almost always part of a larger application stack, with dependencies between them. If we have a lot of Operators written in different ways running on our clusters, how can we ensure they will interoperate with each other, and how do we validate and test them? - -**The impact**: This illustrates two cool things about open source. First, the alternating waves of innovation and consolidation. Second, the empowering of affected parties to address their own challenges. - -## [Automation for improved security frameworks][7] - -> In recent years we’ve seen the posts of CIO and CTO elevated to boardroom level, with senior figures in IT now influencing corporate strategy. Due to a heightened awareness of cybersecurity, it won’t be long before the board looks to CSO and CISO executives for strategic direction. - -**The impact**: This statement has gotten truer over the last several weeks. More activity is being pushed online than ever before; keeping that activity secure is integral to making it all profitable. Security people need to be able to say "no" at the highest possible level. - -## [Interoperability of open source tools: The emergence of interfaces][8] - -> Being non-opinionated about the adoption of specific technologies and the methodologies of distributing its primitive resources, were the main axes of Kubernetes evolution. Additionally, the proliferation of solutions from multiple vendors played an instrumental role in the emergence of interfaces and it served as the engine for further development and innovation. - -**The impact**: Kubernetes may be the only large-scale open source project where competition is hot. Even still, competitors need to be able to work together and interfaces are the points that separate collaboration and competition. - -## [Do you operate OpenStack? Take this survey.][9] - -> Direct feedback from the individuals and organizations operating OpenStack helps the upstream development community know what features to prioritize and which bugs to fix first, among other important learnings on how the software is being used. Each of the official project teams has the opportunity to add a question to the survey as well as review anonymized data and trends to further influence their roadmaps. - -**The impact**: Not every community participant can or will provide feedback on bug reports or feature requests. In that case, it is important to provide multiple ways to get feedback and meet users where they are. - -_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/npm-github-operators-kubernetes-industry-trends - -作者:[Tim Hildred][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/thildred -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) -[2]: https://github.blog/2020-03-16-npm-is-joining-github/ -[3]: https://securitylab.github.com -[4]: https://help.github.com/en/github/managing-security-vulnerabilities/creating-a-security-advisory -[5]: https://github.com/sponsors -[6]: https://devops.com/day-2-for-the-operator-ecosystem/ -[7]: https://www.infosecurity-magazine.com/opinions/automation-governance-culture/ -[8]: https://medium.com/@kgamanji/interoperability-of-open-source-tools-the-emergence-of-interfaces-f3b7a90891e4 -[9]: https://superuser.openstack.org/articles/operate-openstack-take-the-survey-heres-why-it-matters/ From 6574f187f5b36e6f5b52671692865622def3dd25 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Apr 2020 21:02:06 +0800 Subject: [PATCH 037/394] APL --- ...ssociation Launches an Open Source Collaboration Platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md b/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md index 9a6eadffad..d3010bed2d 100644 --- a/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md +++ b/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f8d1047052c3a5587897492820fd208f6e24664c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Apr 2020 21:53:03 +0800 Subject: [PATCH 038/394] TSL&PRF --- ...s an Open Source Collaboration Platform.md | 93 ------------------- ...s an Open Source Collaboration Platform.md | 91 ++++++++++++++++++ 2 files changed, 91 insertions(+), 93 deletions(-) delete mode 100644 sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md create mode 100644 translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md diff --git a/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md b/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md deleted file mode 100644 index d3010bed2d..0000000000 --- a/sources/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IEEE Standards Association Launches an Open Source Collaboration Platform) -[#]: via: (https://itsfoss.com/ieee-open-source-collaboration-platform/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -IEEE Standards Association Launches an Open Source Collaboration Platform -====== - -_**Brief: IEEE Standards Association has announced a GitLab-based open source collaboration platform. Read how is it different and what advantages it has.**_ - -[IEEE][1] is the world’s largest technical professional organization dedicated to advancing technology. The IEEE Standards Association (IEEE SA) is an organization within IEEE that develops global standards in a broad range of industries. - -The IEEE Standards Association (SA) has come up with an open-source collaboration platform i.e [IEEE SA Open][2]. - -It is technically a self-hosted GitLab instance combined with [Mattermost][3] (a [slack alternative][4]) and [GitLab Pages][5]. To describe it further, the [official blog post][6] mentioned: - -> The platform enables independent software developers, startups, industry, academic institutions, and others to create, test, manage, and deploy innovative projects in a collaborative, safe, and responsible environment. - -### How is it different or useful? - -The main key attraction for this platform would be IEEE’s members’ network, technical expertise, and resources. - -IEEE President, [Robert Fish][7], also mentions in brief (during an interview with Radio Kan) how it’s different and why IEEE wanted to go with it: - -> Today, much of the world’s infrastructure is run by software, and that software needs to comply with standards in communications networking, electrical grids, agriculture, and the like. - -It makes sense – if we want to improve standardizing technologies, it highly depends on the software. So, this definitely sounds like something to standardize innovative open-source projects to gear them up for potential capital opportunities as well. - -IEEE also clarified that: - -> As software becomes increasingly prevalent in the world today, ethical alignment, reliability, transparency, and democratic governance become must-haves. IEEE is uniquely positioned to endow open-source projects with these attributes. - -While this sounds good, what exactly the open-source platform by the IEEE offer? Let’s take a look at that: - -### IEEE SA Open: Quick overview - -![][8] - -To start with, it is open to all and completely free to use. You just need to create an [IEEE account][9] and then [sign in to the open-source platform][10] to get started. - -Along with the benefits associated with IEEE’s extensive network of Members, you can also expect guidance support from their open-source community managers or community members. - -![Ieee Gitlab][11] - -The platform presents use cases for both standard and non-standard projects, so you can give it a try. - -For its choice to go with GitLab combined with Mattermost and Pages, you get a couple of useful features, they are: - - * Project planning and management features - * Source code management - * Testing, code quality, and continuous integration features - * Docker container registry and Kubernetes integration - * Application release and delivery features - * Integrated Mattermost chat forum w/slash commands; (Android and iPhone apps are fully supported) - * Capable of bridging the gap between Standards development and open source communities to allow for the advancement of nimble and creative technical solutions at a faster pace - * A safe open space with an enforced code of conduct - - - -### Wrapping Up - -It’s obviously a good thing to have more platforms to potentially amplify the exposure of open-source projects – hence, IEEE’s initiative sounds promising to start with. - -What do you think about it? Let me know your thoughts! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ieee-open-source-collaboration-platform/ - -作者:[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://www.ieee.org/about/index.html -[2]: https://standards.ieee.org/content/ieee-standards/en/initiatives/opensource/ -[3]: https://mattermost.com/ -[4]: https://itsfoss.com/open-source-slack-alternative/ -[5]: https://docs.gitlab.com/ee/user/project/pages/ -[6]: https://spectrum.ieee.org/the-institute/ieee-products-services/ieee-standards-association-launches-a-platform-for-open-source-collaboration -[7]: https://www.linkedin.com/in/robertsfish/ -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-opensource.jpg?ssl=1 -[9]: https://www.ieee.org/profile/public/createwebaccount/showRegister.html -[10]: https://opensource.ieee.org/ -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-gitlab.jpg?ssl=1 diff --git a/translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md b/translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md new file mode 100644 index 0000000000..bb64b0e9df --- /dev/null +++ b/translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md @@ -0,0 +1,91 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IEEE Standards Association Launches an Open Source Collaboration Platform) +[#]: via: (https://itsfoss.com/ieee-open-source-collaboration-platform/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +IEEE 标准协会推出开源协作平台 +====== + +> IEEE 标准协会宣布了一个基于 GitLab 的开源协作平台。 + +[IEEE][1] 是世界上最大的技术专业组织,致力于推动技术的发展。IEEE 标准协会the IEEE Standards Association(IEEE SA)是 IEEE 内部的一个组织,负责制定全球各行业的标准。 + +IEEE 标准协会(SA)提出了一个开源协作平台,即 [IEEE SA Open][2]。 + +技术上来说,它是一个自托管的 GitLab 实例,结合了 [Mattermost][3](一个 [Slack 的替代品][4])和 [GitLab Pages][5]。[其官方博文][6]对此进一步解释道: + +> 该平台使独立软件开发者、初创企业、业界、学术机构等能够在一个协作、安全、负责任的环境中创建、测试、管理和部署创新项目。 + +### 它有什么不同或有用的地方? + +这个平台最主要的吸引力应该是 IEEE 的会员网络、技术专长和资源。 + +IEEE 主席 [Robert Fish][7],也曾(在接受 Radio Kan 的采访时)简单地提到它有什么不同之处,以及为什么 IEEE 想要使用它。 + +> 如今,世界上大部分的基础设施都是由软件运行的,而这些软件需要符合通信网络、电网、农业等方面的标准。 + +这是有道理的 —— 如果我们想提高标准化技术,这在很大程度上取决于软件。所以,这听起来肯定是要对创新的开源项目进行标准化,让它们也能为潜在的资本机会做好准备。 + +IEEE 还澄清说: + +> 随着软件在当今世界越来越普遍,道德规范、可靠性、透明度和民主治理成为必须具备的条件。IEEE 在赋予开源项目这些属性方面有着得天独厚的优势。 + +虽然听起来很好,但 IEEE 的开源平台究竟能提供什么?让我们一起来看看这个问题。 + +### IEEE SA Open 概览 + +![][8] + +首先,它对所有人开放并且完全免费使用。你只需要创建一个 [IEEE 帐户][9],然后[登录到这个开源平台][10]就可以开始。 + +除了与 IEEE 广泛的会员网络相关的好处之外,你还可以期望其开源社区经理或社区成员提供指导性支持。 + +![Ieee Gitlab][11] + +该平台提供了标准和非标准项目的用例,你可以尝试一下。 + +因为选择将 GitLab 与 Mattermost 和 Pages 结合起来,你可以获得一些有用的功能,它们是: + + * 项目规划和管理功能 + * 源代码管理 + * 测试、代码质量和持续集成功能 + * Docker 容器注册库和 Kubernetes 集成 + * 应用程序的发布和交付功能 + * 集成了 Mattermost 聊天论坛的斜线命令(完全支持 Android 和 iPhone 应用程序) + * 能够弥合标准制定和开源社区之间的差距,以便以更快的速度推进灵活和创造性的技术解决方案 + * 安全的开放空间,并有严格的行为准则。 + +### 小结 + +显然,有更多的平台来潜在地放大开源项目的曝光率是一件好事 —— 因此,IEEE 的举措听起来很有希望。 + +你对此有何看法?让我知道你的想法吧! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ieee-open-source-collaboration-platform/ + +作者:[Ankush Das][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://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://www.ieee.org/about/index.html +[2]: https://standards.ieee.org/content/ieee-standards/en/initiatives/opensource/ +[3]: https://mattermost.com/ +[4]: https://itsfoss.com/open-source-slack-alternative/ +[5]: https://docs.gitlab.com/ee/user/project/pages/ +[6]: https://spectrum.ieee.org/the-institute/ieee-products-services/ieee-standards-association-launches-a-platform-for-open-source-collaboration +[7]: https://www.linkedin.com/in/robertsfish/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-opensource.jpg?ssl=1 +[9]: https://www.ieee.org/profile/public/createwebaccount/showRegister.html +[10]: https://opensource.ieee.org/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/ieee-gitlab.jpg?ssl=1 From a757d8cb078e646abdd98194606708288c4ec948 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 10 Apr 2020 22:29:54 +0800 Subject: [PATCH 039/394] PUB @wxy https://linux.cn/article-12096-1.html --- ...tion Launches an Open Source Collaboration Platform.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) rename {translated/news => published}/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md (96%) diff --git a/translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md b/published/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md similarity index 96% rename from translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md rename to published/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md index bb64b0e9df..891edf7bdb 100644 --- a/translated/news/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md +++ b/published/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12096-1.html) [#]: subject: (IEEE Standards Association Launches an Open Source Collaboration Platform) [#]: via: (https://itsfoss.com/ieee-open-source-collaboration-platform/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) @@ -12,6 +12,8 @@ IEEE 标准协会推出开源协作平台 > IEEE 标准协会宣布了一个基于 GitLab 的开源协作平台。 +![](https://img.linux.net.cn/data/attachment/album/202004/10/222910vjpiqd6lqqm6riqp.jpg) + [IEEE][1] 是世界上最大的技术专业组织,致力于推动技术的发展。IEEE 标准协会the IEEE Standards Association(IEEE SA)是 IEEE 内部的一个组织,负责制定全球各行业的标准。 IEEE 标准协会(SA)提出了一个开源协作平台,即 [IEEE SA Open][2]。 From 8644fda421837db548933a91ca861d2ca3009106 Mon Sep 17 00:00:00 2001 From: HankChow <280630620@qq.com> Date: Fri, 10 Apr 2020 22:46:43 +0800 Subject: [PATCH 040/394] hankchow translated --- ...ow to Go Full Dark Mode in Ubuntu 20.04.md | 111 ------------------ ...ow to Go Full Dark Mode in Ubuntu 20.04.md | 108 +++++++++++++++++ 2 files changed, 108 insertions(+), 111 deletions(-) delete mode 100644 sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md create mode 100644 translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md diff --git a/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md deleted file mode 100644 index e668ac6d00..0000000000 --- a/sources/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md +++ /dev/null @@ -1,111 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (HankChow) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04) -[#]: via: (https://itsfoss.com/dark-mode-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Go Full Dark Mode in Ubuntu 20.04 -====== - -One of the most talked about [new features in Ubuntu 20.04][1] is the dark mode. You can [install dark theme in any Ubuntu version][2] to give it a dark look but the new Ubuntu 20.04 makes it a lot easier. - -You don’t need to install themes on your own. You can find three variants of the default theme (called Yaru) and you can enable the dark mode from the settings. - -It still leaves a few thing to I am going to show you some tips on giving complete dark mode to your Ubuntu system. - -### Enable dark mode in Ubuntu 20.04 - -[Subscribe to our YouTube channel for more Linux videos][3] - -The steps are performed on the GNOME desktop. If you are [using some other desktop environment][4], the screenshots may look different. - -Press the super key (Windows key) and start typing settings to search for the Settings application. - -![Search for Settings][5] - -In the Settings application, go to Apperance section and you should see three variants of the theme: Light, Standard and Dark. No prizes for guessing that you need to select Dark if you want to use the dark mode. - -![Enable Dark Theme in Ubuntu][6] - -Not all but applications using GTK3 should automatically comply with the dark theme. In other words, you’ll notice that most of the applications like text editor, terminal, LibreOffice etc on your system automatically switch to dark mode. - -But it still leaves a few thing in the light mode. Let me show you a couple of tips to ‘go to the darker side’. - -### Tweaks to go full dark mode in Ubuntu 20.04 - -You’ll notice that the shell theme is still light. The message tray, system tray (in the top panel) are still not using dark mode. - -![No Dark Shell by default in Ubuntu][7] - -You’ll have to [use a GNOME extension][8] here that will let you install Yaru dark shell theme. Install the browser extension first by using this command in terminal ([use Ctrl+Alt+T keyboard shortcut for terminal in Ubuntu][9]). - -``` -sudo apt install chrome-gnome-shell -``` - -Now [go to the extension’s webpage][10] and enable the extension by switching it on: - -![Enable User Themes GNOME Extension][11] - -You need to [install GNOME Tweaks tool][12] by using this command: - -``` -sudo apt install gnome-tweaks -``` - -Open the GNOME Tweaks tool and go to Appearance. You’ll see the option to change the shell theme. You don’t need to install this Yaru dark shell theme. It’s already there. You just have to enable it. - -![Enable Yaru Dark Shell Theme in Ubuntu][13] - -Now, you can see that even the shell features like desktop notifications, message tray, system tray are also in dark mode. - -![Yaru Dark Shell Theme in Ubuntu][14] - -Looks better, isn’t it? There is one more thing you could do to further enjoy dark mode in Ubuntu. You’ll notice that the websites you visit still have white background. You cannot expect all the websites to provide a dark mode. - -This is where you can use a browser extension like [Dark Reader][15]. John has already discussed it in the tutorial on [enabling dark mode in Firefox][16]. It’s not a complicated task. If you use Firefox, Chrome or [Chromium in Ubuntu][17], you can install the browser extension listed on the [Dark Reader website][15]. - -Once you have installed Dark Reader, all the websites you visit should be in dark mode automatically. - -![It’s FOSS Homepage in Dark Mode with Dark Reader][18] - -You may still find a few external third party applications using light theme. You may have to manually enable dark theme, if they have such an option available. - -Dark mode is getting popular these days even among the non-coders. With these tips, you can satisfy your craving of dark mode in Ubuntu. - -I hope you like it. Enjoy the dark mode. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/dark-mode-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/ubuntu-20-04-release-features/ -[2]: https://itsfoss.com/install-themes-ubuntu/ -[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[4]: https://itsfoss.com/find-desktop-environment/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/no-dark-shell-ubuntu.jpg?ssl=1 -[8]: https://itsfoss.com/gnome-shell-extensions/ -[9]: https://itsfoss.com/ubuntu-shortcuts/ -[10]: https://extensions.gnome.org/extension/19/user-themes/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-user-themes-gnome.jpg?ssl=1 -[12]: https://itsfoss.com/gnome-tweak-tool/ -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-yaru-dark-shell-theme.jpeg?ssl=1 -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/yaru-dark-shell-theme-ubuntu.jpg?ssl=1 -[15]: https://darkreader.org/ -[16]: https://itsfoss.com/firefox-dark-mode/ -[17]: https://itsfoss.com/install-chromium-ubuntu/ -[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/itsfoss_dark_mode.jpg?ssl=1 diff --git a/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md new file mode 100644 index 0000000000..9d0223efa8 --- /dev/null +++ b/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md @@ -0,0 +1,108 @@ +[#]: collector: (lujun9972) +[#]: translator: (HankChow) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04) +[#]: via: (https://itsfoss.com/dark-mode-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +在 Ubuntu 20.04 中完全进入深色模式 +====== + +> 深色模式是 Ubuntu 20.04 最受瞩目的[新功能][1]之一了。任何版本的 Ubuntu 都可以通过[安装深色主题][2]让用户界面拥有一个深色的外观,但在 Ubuntu 20.04 中,这个过程变得更简单。 + +在 Ubuntu 20.04 中,无需额外安装主题,默认主题(称为 Yaru)本身就带有三种模式,其中就包括深色模式。 + +下面我会展示如何将 Ubuntu 系统完全设置为深色模式。 + +### 在 Ubuntu 20.04 打开深色模式 + +这个步骤将会在 GNOME 桌面上完成,如果你[使用的是其它桌面][4],你看到的可能会和下面的截图不一样。 + +按下 super 键(或 Windows 键),然后输入“settings”,就可以找到系统设置。 + +![Search for Settings][5] + +在系统设置中,进入“外观Appearance”部分,就可以看到浅色light标准standard深色dark三个选项。既然要使用深色模式,那自然而然要选择“深色”这个选项了。 + +![Enable Dark Theme in Ubuntu][6] + +完成设置以后,使用了 GTK3 的应用程序都可以跟随深色模式。因此你会看到系统中包括文本编辑器、终端、LibreOffice 等在内的大多数应用程序都已经切换成深色了。但未使用 GTK3 的应用程序可能并没有跟随进入深色模式,下面我会展示如何更完整地进入深色模式。 + +### 继续调整,进入完整深色模式 + +这个时候你会发现,shell 主题、屏幕顶部面板中的消息托盘和系统托盘还仍然保持在原有的模式当中。 + +![No Dark Shell by default in Ubuntu][7] + +现在就需要使用 [GNOME 扩展][8]安装 Yaru 深色 shell 主题了。[在 Ubuntu 中通过 Ctrl+Alt+T 打开终端][9],然后执行以下这个命令安装浏览器扩展: + +``` +sudo apt install chrome-gnome-shell +``` + +进入[扩展页面][10]启用这个扩展: + +![Enable User Themes GNOME Extension][11] + +执行以下命令安装 [GNOME 调整工具][12]: + +``` +sudo apt install gnome-tweaks +``` + +打开 GNOME 调整工具,进入“外观Appearance”部分,就可以看到 shell 主题的选项,现在只需要把它启用就可以了。 + +![Enable Yaru Dark Shell Theme in Ubuntu][13] + +设置完之后再观察一下,桌面通知、消息托盘、系统托盘等等都已经进入深色模式了。 + +![Yaru Dark Shell Theme in Ubuntu][14] + +现在感觉好多了。但你可能还会注意到,在使用浏览器访问网站的时候,很多网站都使用了白色的背景色。如果期望网站方提供深色模式,那是很不现实的,但我们可以自己实现这一件事。 + +你需要用到的东西就是诸如 [Dark Reader][15] 这样的浏览器扩展。《[在 Firefox 中启用深色模式][16]》这篇文章中也有讨论过这个浏览器扩展,它的使用过程并不复杂,如果你使用的浏览器是 Firefox、Chrome 或 [Ubuntu 下的 Chromium][17],就可以直接安装[其官方网站][15]上列出的扩展。 + +Dark Reader 安装完成后,就会以深色模式打开网站了。 + +![It’s FOSS Homepage in Dark Mode with Dark Reader][18] + +当然,有些外部的第三方应用程序可能仍然是浅色状态。如果它们自己附带了深色模式的选项,就需要手动启用它们的深色模式。 + +如今,深色模式在非开发者人群中也越来越流行了。按照以上的步骤,你就可以轻松进入深色模式。 + +请享受深色模式。 + + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dark-mode-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[HankChow](https://github.com/HankChow) +校对:[校对者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/ubuntu-20-04-release-features/ +[2]: https://itsfoss.com/install-themes-ubuntu/ +[3]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[4]: https://itsfoss.com/find-desktop-environment/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/no-dark-shell-ubuntu.jpg?ssl=1 +[8]: https://itsfoss.com/gnome-shell-extensions/ +[9]: https://itsfoss.com/ubuntu-shortcuts/ +[10]: https://extensions.gnome.org/extension/19/user-themes/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-user-themes-gnome.jpg?ssl=1 +[12]: https://itsfoss.com/gnome-tweak-tool/ +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-yaru-dark-shell-theme.jpeg?ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/yaru-dark-shell-theme-ubuntu.jpg?ssl=1 +[15]: https://darkreader.org/ +[16]: https://itsfoss.com/firefox-dark-mode/ +[17]: https://itsfoss.com/install-chromium-ubuntu/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/itsfoss_dark_mode.jpg?ssl=1 From 138e53ed1e58bd5bb846c85107a1c82b9fb763cd Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sat, 11 Apr 2020 00:05:05 +0800 Subject: [PATCH 041/394] Update 20190814 9 open source cloud native projects to consider.md --- ...ource cloud native projects to consider.md | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index 551c8df7d1..7e844d2605 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -160,7 +160,7 @@ The best way to get started with Prometheus is to check out its [GitHub repo][10 ### Envoy Envoy (or Envoy Proxy) is an open source edge and service proxy designed for cloud-native applications. Created at Lyft, Envoy is a high-performance, C++, distributed proxy designed for single services and applications, as well as a communications bus and a universal data plane designed for large microservice service mesh architectures. Built on the learnings of solutions such as Nginx, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner. -Envoy(或Envoy代理)是专为云原生应用设计的开源的边缘和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对Nginx,HAProxy,硬件负载均衡器和云负载均衡器等方案了解的基础上,Envoy与每个应用相伴运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。 +Envoy(或Envoy代理)是专为云原生应用设计的开源的边缘代理和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对Nginx,HAProxy,硬件负载均衡器和云负载均衡器等方案了解的基础上,Envoy与每个应用相伴(并行)运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。 When all service traffic in an infrastructure flows through an Envoy mesh, it becomes easy to visualize problem areas via consistent observability, tune overall performance, and add substrate features in a single place. Basically, Envoy Proxy is a service mesh tool that helps organizations build a fault-tolerant system for production environments. 当基础设施中的所有服务流量都经过一个Envoy网格时,很容易就可以通过连贯的监测来可视化问题域,调整整体性能,并在单个位置添加基础功能。基本上,Envoy代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。 @@ -176,9 +176,9 @@ There are numerous alternatives for service mesh applications, such as Uber’s 服务网格应用程序有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: - *所有的“桌面赌注”特性(与控制平面(例如Istio)配对时) - *带载运行时的低延时, 延迟率低至99% - *将L3/L4过滤器作为核心,许多L7过滤器被考虑在外 + *所有的“table stakes(入场筹码,引申为基础必备特性)”特性(与控制平面(例如Istio)组合时) + *带载运行时99%数据可达到低延时 + *将L3/L4过滤器作为核心,支持额外的L7过滤器 *支持gRPC和HTTP / 2(上行/下行)    *由API驱动,并支持动态配置和热重载 *重点关注指标收集,跟踪和整体可监测性 @@ -187,29 +187,34 @@ There are numerous alternatives for service mesh applications, such as Uber’s Understanding Envoy, proving its capabilities, and realizing its full benefits require extensive experience with running production-level environments. You can learn more in its [detailed documentation][28] and by accessing its [GitHub][11] repository. 要想了解Envoy,证实其能力并意识到其全部优势,需要丰富的在生产级环境运行的经验。 您可以在[详细文档][28]或访问其[GitHub][11]仓库了解更多信息。 -## Incubating projects +## Incubating projects 孵化项目 -Following are six of the most popular open source CNCF Incubating projects. +Following are six of the most popular open source CNCF Incubating projects. +下面是最流行的开源的CNCF孵化项目中的六个。 ### rkt rkt, pronounced "rocket," is a pod-native container engine. It has a command-line interface (CLI) for running containers on Linux. In a sense, it is similar to other containers, like [Podman][29], Docker, and CRI-O. +rkt, 拼为"rocket", 是一个pod原生的容器引擎。它有一个命令行接口用来在Linux上运行容器。从某种意义上讲,它和其他容器如[Podman][29], Docker和CRI-O相似。 rkt was originally developed by CoreOS (later acquired by Red Hat), and you can find detailed [documentation][30] on its website and access the source code on [GitHub][12]. +rkt最初由CoreOS开发(后来被Red Hat收购),您可以在其网站上找到详细的[文档][30],以及在[GitHub][12]上访问其源代码。 -### Jaeger +### Jaeger Jaeger is an open source, end-to-end distributed tracing system for cloud-native applications. In one way, it is a monitoring solution like Prometheus. Yet it is different because its use cases extend into: +Jaeger是面向云原生应用的开源的端到端的分布式跟踪系统。 在某种程度上,它是像Prometheus这样的监控解决方案。但它有所不同,因为其使用场景有所扩展: - * Distributed transaction monitoring - * Performance and latency optimization - * Root-cause analysis - * Service dependency analysis - * Distributed context propagation + * Distributed transaction monitoring 分布式事务监控 + * Performance and latency optimization 性能和延时优化 + * Root-cause analysis 根因分析 + * Service dependency analysis 服务的依赖分析 + * Distributed context propagation 分布式上下文传播 Jaeger is an open source technology built by Uber. You can find [detailed documentation][31] on its website and its [source code][13] on GitHub. +Jaeger是Uber建立的开源的技术。 您可以在其网站上找到[详细文档][31],以及在GitHub上找到其[源码][13]。 ### Linkerd @@ -221,9 +226,17 @@ However, there are some subtle differences between the two. While Envoy and Link * Built-in service discovery abstractions to unite multiple systems * Support for gRPC, HTTP/2, and HTTP/1.x requests plus all TCP traffic +像创建Envoy代理的Lyft一样,Uber开发了Linkerd开源解决方案用于生产级别上的服务维护。 在某些方面,Linkerd就像Envoy一样,因为两者都是服务网格工具,旨在提供平台级的可观测性,可靠性和安全性,而无需进行配置或代码更改。 + +但是,两者之间存在一些细微的差异。 尽管Envoy和Linkerd充当代理并可以通过所连接的服务进行上报,但是Envoy并不像Linkerd那样被设计为Kubernetes Ingress控制器。 Linkerd的显著功能包括: + + *支持多种平台(Docker,Kubernetes,DC / OS,Amazon ECS或单机) + *内置服务发现抽象将多个系统集成在一起 + *支持gRPC,HTTP / 2和HTTP / 1.x请求和所有的TCP流量 You can read more about it on [Linkerd’s website][32] and access its source code on [GitHub][14]. +您可以在[Linkerd网站][32]上阅读有关它的更多信息,并在[GitHub][14]上访问其源码。 ### Helm @@ -231,6 +244,10 @@ Helm is basically the package manager for Kubernetes. If you’ve used Apache Ma You can try Helm by following the [quickstart guide][34] in its documentation or its [GitHub guide][15]. +Helm基本上是Kubernetes的软件包管理器。 如果您使用过Apache Maven,Maven Nexus或类似的服务,您就会理解Helm的作用。 Helm可帮助您管理Kubernetes应用程序。 它使用“Helm图”来定义,安装和升级最复杂的Kubernetes应用程序。 Helm并不是实现此功能的唯一方法; 另一个流行的概念是[Kubernetes Operators][33],它被Red Hat OpenShift 4所使用。 + +您可以按照其文档中的[快速开始指南][34]或[GitHub指南][15]来试用Helm。 + ### Etcd Etcd is a distributed, reliable key-value store for the most critical data in a distributed system. Its key features are: From 883c5a55841c40858c8f9329ae43835aff82cbfb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 11 Apr 2020 01:03:37 +0800 Subject: [PATCH 042/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200410=20How=20?= =?UTF-8?q?I'm=20using=20AI=20to=20translate=20'wash=20your=20hands'=20in?= =?UTF-8?q?=20500=20languages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md --- ...late -wash your hands- in 500 languages.md | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md diff --git a/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md new file mode 100644 index 0000000000..a18d557337 --- /dev/null +++ b/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md @@ -0,0 +1,136 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages) +[#]: via: (https://opensource.com/article/20/4/ai-translation) +[#]: author: (Daniel Whitenack https://opensource.com/users/datadan) + +How I'm using AI to translate 'wash your hands' in 500 languages +====== +By using both human and machine-generated translations, key health +phrases can be translated into local languages spoken all over the +world. +![Two diverse hands holding a globe][1] + +You might not know, but there are currently [7,117 languages spoken in the world][2]. Not dialects, but living languages! However, much of the world's digital media is available in only a couple dozen languages, and translation platforms like Google Translate only support around 100 languages. This reality means that there are billions of people around the world that are marginalized due to a lack of timely access to information. The current coronavirus (COVID-19) pandemic has made this painfully clear, and it has stressed the need for immediate, rapid translation of health-related phrases (like "wash your hands" or "keep your distance") into the long tail of languages. + +To this end, I applied state-of-the-art AI techniques to construct something close to the phrase "wash your hands" in 544 languages and counting (my GPUs are still running). Multilingual Unsupervised and Supervised Embeddings (MUSE) methods are used to train cross-lingual word embeddings between each of 544 languages and English. These embeddings then allow for the extraction of a phrase similar to the target phrase from existing documents. + +I performed this work in collaboration with my colleagues at SIL International, who have gathered even more human translations of the phrase. The combination of these human translations and some of my machine translations can be searched on [this Ethnologue guide page][3] (machine-generated phrases are indicated with a little robot icon), and more translations will be added as they are generated/gathered. + +### Leveraging existing corpora + +SIL International has done linguistic work in over 2000 languages and is currently managing over 1600 language projects. Thus, as I approached this particular problem, I knew that we had likely already translated the phrase "wash your hands" and/or similar phrases many times into hundreds of languages, and that guess paid off in spades. I was able to quickly gather documents (mostly completed shell book templates, educational materials, and Bibles) from our archives in over 900 languages. Each of these documents has an English parallel, which necessarily includes the phrase "wash your hands" and/or similar phrases like "wash your face." Moreover, each of these documents is very high quality and translated and checked in cooperation with the local language communities. + +That is quite the multilingual data set. However, there are two problems to overcome. First, this data included thousands of samples for most languages, which is in contrast to the millions used to train machine translation models. Second, even if the documents include the phrase "wash your hands" in the target language, we don't know the exact location of the phrase within the surrounding text. + +We could certainly exploit some of the latest tricks in [machine translation for low resource languages][4], but it would take some time to tune automated methods for rapidly adapting translation models in each language pair. Moreover, many of the languages we are targeting have no existing baseline with which we could compare evaluation metrics, e.g., [BLEU score][5]. Given the pressing concerns about the Coronavirus pandemic, we wanted to move a bit faster than that (although we plan to return to this problem in the future). + +I opted to try and construct the phrase "wash your hands" by finding the phrase itself or components of the phrase (like "wash your" or "your hands") in existing documents. To find these, I trained cross-lingual embedding for each {English, Target Language} pair using [Multilingual Unsupervised and Supervised Embedding (MUSE)][6] from Facebook Research. MUSE takes monolingual word embeddings as input (I used [_fasttext_][7] to generate these) and learns a mapping from the English to the target embedding space using adversarial methods. The output of this process is cross-lingual word embeddings. + +![Using fasttext along with MUSE to perform cross-language embedding][8] + +Once the cross-lingual embeddings are generated, we can get to finding the phrase components in the target language documents. As it turns out, the phrase "wash your face" was most clearly used throughout the documents along with instances of "hands," "wash your," etc. in isolation. For each of the languages, I search through n-grams in areas where I expected the phrase to appear (based on its usage in the English parallel). N-grams were vectorized using the cross-lingual embedding and compared with vectorized versions of the English phrases using various distance metrics. The n-grams that were "closest" to the English phrases in the embedding space were determined to be the target language matches. + +Finally, component phrases matching their English counterparts were combined to generate the phrase "wash your hands" in the target language. This combination utilizes the cross-lingual embedding again to make sure that the components are combined in an appropriate manner. For example, if we matched the phrase "wash your feet" in the target language, the n-gram corresponding to "feet" must be replaced with the n-gram corresponding to "hands." Here's an example for Belize Kriol English: + +![][9] + +There were, of course, some assumptions that were made during this matching process, and it is entirely possible that this procedure does not produce grammatically correct predictions. For example, I assumed that in most languages, the word for "hands" and the word for "feet" are both one token long (with tokens being separated by spaces and punctuation). This is certainly not always the case. This could create a bad word salad something like "and wash the and hand you" or similar. Hopefully, we can overcome some of these limitations and extend the system in the future, but, for now, we chose to reinforce the idea with graphics. + +We adapted the World Health Organization's hand washing instructions into a template PNG image. We then took our translated and generated phrases and rendered them into the hand washing image using a combination of Bash and Go scripts. In this way, the idea of proper hand washing is emphasized in both text and imagery (just in case our generated translations are awkward). + +![][10] + +### Results + +Thus far, I've been able to train cross-lingual embeddings for 544 languages. I used the above-discussed method to try and construct "wash your hands" for all of these languages. Because I don't have aligned data for many of the language pairs, I used separate holdout documents also containing components of "wash your hands" to help validate the tokens in the constructed phrase. This gives us some confidence in the translations that we publicly release (at least that they contain information indicating washing and/or hands). In addition, I compared the method with language pairs that are also supported by Google Translate and/or have available human translations. Here's a sample of the translations with language stats from [the Ethnologue][11]: + +#### Language: Italian [ita] + +Location: Italy +Population: 68,000,000 +Our system: "làvati la mani" +Google Translate: "Lavati le mani" + +#### Language: Bulgarian [bul] + +Location: Bulgaria +Population: 8,000,000 +Our system: "умий ръцете" +Google Translate: "Измий си ръцете" + +#### Language: Dutch [nld] + +Location: Netherlands +Population: 24,000,000 +Our system: "wast uw handen" +Google Translate: "Was je handen" + +#### Language: Pijin [pis] + +Location: Solomon Islands +Population: 550,000 +Our system: "wasim han" +Google Translate: Not supported + +#### Language: Tikar [tik] + +Location: Cameroon +Population: 110,000 +Our system: "ɓɔsi fyàʼ" +Google Translate: Not supported + +#### Language: Waffa [waj] + +Location: Papua New Guinea +Population: 1,300 +Our system: "yaakuuvaitana nnikiiyauvaa fini" +Google Translate: Not supported + +The constructed phrases are similar to reference translations or appear to be alternative ways of saying "wash your hands." For example, in Bulgarian, I predict "умий ръцете," and Google Translate predicts "Измий си ръцете." However, if I back-translate my prediction using Google Translate, I still get "wash your hands." There is some uncertainty where I can't compare to reference translations (e.g., Pijin [pis] from the Solomon Islands) or human-annotated spans, but I can still validate that the word for wash (wasim) and the word for hands (han) are used in other reference documents that are necessarily talking about washing, or hands, respectively. About 15% of the translations could be validated using this method, and I hope to validate more as I gather reference dictionaries. + +Note, I used at most about 7,000 sentences in each language to get the above translations, even for high-resource languages like Italian. I also did not rely on aligned sentences between the language pairs. Despite this very data-scarce, unsupervised scenario, I was still able to obtain phrases similar to that of Google Translate for languages supported by both systems. This demonstrates the potential utility of this sort of "hybrid" approach (unsupervised alignment of word embeddings + rule-based matching) for translating short phrases into languages where very little data exists. + +Note—I'm definitely not saying that this is a solution to the problem of information spread about Coronavirus and other health-related issues. There are still a lot of things to explore and formally evaluate here, and we are working on that. In many cases, this approach won't be able to help construct important informational material in hundreds of languages. However, I think that we should all be trying to develop creative solutions to problems related to the current crisis. Maybe this is one piece of a very large puzzle. + +You can view the complete list of validated translations plus human translations on [this Ethnologue guide page][3]. In addition, a more thorough description and analysis of the system in paper form is forthcoming. We welcome feedback from the public on the translations to help fine-tune the system and, most of all, to make sure that health information gets out to marginalized language communities around the world. + +### Create your own hand washing posters + +We have open sourced [the code used to render complex scripts and generate the hand washing posters][12]. This methodology should be able to handle almost all languages and scripts. You can add your own translation of "wash your hands" to a poster to help spread the word or tailor the translations for your own local context. Be sure to share your generated posters on social media with the hashtag #WashYourHands. + +### Develop your AI skills + +There are so many exciting AI problems out there that can make a huge impact in the world. If you want to solve problems like the one above with AI or if you think your business might need to start leveraging AI for other things (supply chain optimization, recommendation, customer service automation, etc.), don't miss the [_AI Classroom_ training event this May][13]. _AI Classroom_ is an immersive, three-day virtual training event for anyone with at least some programming experience and foundational understanding of mathematics. The training provides a practical baseline for realistic AI development using Python and open source frameworks like TensorFlow and PyTorch. After completing the course, participants will have the confidence to start developing and deploying their own AI solutions. + +_This article was republished with permission from _ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/ai-translation + +作者:[Daniel Whitenack][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/datadan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe) +[2]: https://www.ethnologue.com/guides/how-many-languages +[3]: https://www.ethnologue.com/guides/health +[4]: https://datadan.io/blog/resources-for-low-resource-machine-translation +[5]: https://en.wikipedia.org/wiki/BLEU +[6]: https://github.com/facebookresearch/MUSE +[7]: https://fasttext.cc/ +[8]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom.gif (Using fasttext along with MUSE to perform cross-language embedding) +[9]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom2.gif +[10]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom3.gif +[11]: https://www.ethnologue.com/ +[12]: https://github.com/sil-ai/wash-your-hands +[13]: https://datadan.io/ From 2356858e1e1a22ff850577a83e55c643b96dab21 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 11 Apr 2020 01:09:18 +0800 Subject: [PATCH 043/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200410=20Get=20?= =?UTF-8?q?started=20with=20Bash=20programming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200410 Get started with Bash programming.md --- ...00410 Get started with Bash programming.md | 157 ++++++++++++++++++ 1 file changed, 157 insertions(+) create mode 100644 sources/tech/20200410 Get started with Bash programming.md diff --git a/sources/tech/20200410 Get started with Bash programming.md b/sources/tech/20200410 Get started with Bash programming.md new file mode 100644 index 0000000000..875adb9876 --- /dev/null +++ b/sources/tech/20200410 Get started with Bash programming.md @@ -0,0 +1,157 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Get started with Bash programming) +[#]: via: (https://opensource.com/article/20/4/bash-programming-guide) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Get started with Bash programming +====== +Learn how to write custom programs in Bash to automate your repetitive +tasks. Download our new eBook to get started. +![Command line prompt][1] + +One of the original hopes for Unix was that it would empower everyday computer users to fine-tune their computers to match their unique working style. The expectations around computer customization have diminished over the decades, and many users consider their collection of apps and websites to be their "custom environment." One reason for that is that the components of many operating systems are not open, so their source code isn't available to normal users. + +But for Linux users, custom programs are within reach because the entire system is based around commands available through the terminal. The terminal isn't just an interface for quick commands or in-depth troubleshooting; it's a scripting environment that can reduce your workload by taking care of mundane tasks for you. + +### How to learn programming + +If you've never done any programming before, it might help to think of it in terms of two different challenges: one is to understand how code is written, and the other is to understand what code to write. You can learn _syntax_—but you won't get far without knowing what words are available to you in the _language_. In practice, you start learning both concepts all at once because you can't learn syntax without words to arrange, so initially, you write simple tasks using basic commands and basic programming structures. Once you feel comfortable with the basics, you can explore more of the language so you can make your programs do more and more significant things. + +In [Bash][2], most of the _words_ you use are Linux commands. The _syntax_ is Bash. If you already use Bash on a frequent basis, then the transition to Bash programming is relatively easy. But if you don't use Bash, you'll be pleased to learn that it's a simple language built for clarity and simplicity. + +### Interactive design + +Sometimes, the hardest thing to figure out when learning to program is what a computer can do for you. Obviously, if a computer on its own could do everything you do with it, then you wouldn't have to ever touch a computer again. But the reality is that humans are important. The key to finding something your computer can help you with is to take notice of tasks you repeatedly do throughout the week. Computers handle repetition particularly well. + +But for you to be able to tell your computer to do something, you must know how to do it. This is an area Bash excels in: interactive programming. As you perform an action in the terminal, you are also learning how to script it. + +For instance, I was once tasked with converting a large number of PDF books to versions that would be low-ink and printer-friendly. One way to do this is to open the PDF in a PDF editor, select each one of the hundreds of images—page backgrounds and textures counted as images—delete them, and then save it to a new PDF. Just one book would take half a day this way. + +My first thought was to learn how to script a PDF editor, but after days of research, I could not find a PDF editing application that could be scripted (outside of very ugly mouse-automation hacks). So I turned my attention to finding out to accomplish the task from within a terminal. This resulted in several new discoveries, including GhostScript, the open source version of PostScript (the printer language PDF is based on). By using GhostScript for the task for a few days, I confirmed that it was the solution to my problem. + +Formulating a basic script to run the command was merely a matter of copying the command and options I used to remove images from a PDF and pasting them into a text file. Running the file as a script would, presumably, produce the same results. + +### Passing arguments to a Bash script + +The difference between running a command in a terminal and running a command in a shell script is that the former is interactive. In a terminal, you can adjust things as you go. For instance, if I just processed **example_1.pdf** and am ready to process the next document, to adapt my command, I only need to change the filename. + +A shell script isn't interactive, though. In fact, the only reason a shell _script_ exists is so that you don't have to attend to it. This is why commands (and the shell scripts that run them) accept arguments. + +In a shell script, there are a few predefined variables that reflect how a script starts. The initial variable is **$0**, and it represents the command issued to start the script. The next variable is **$1**, which represents the first "argument" passed to the shell script. For example, in the command **echo hello**, the command **echo** is **$0,** and the word **hello** is **$1**. In the command **echo hello world**, the command **echo** is **$0**, **hello** is **$1**, and **world** is **$2**. + +In an interactive shell: + + +``` +$ echo hello world +hello world +``` + +In a non-interactive shell script, you _could_ do the same thing in a very literal way. Type this text into a text file and save it as **hello.sh**: + + +``` +`echo hello world` +``` + +Now run the script: + + +``` +$ bash hello.sh +hello world +``` + +That works, but it doesn't take advantage of the fact that a script can take input. Change **hello.sh** to this: + + +``` +`echo $1` +``` + +Run the script with two arguments grouped together as one with quotation marks: + + +``` +$ bash hello.sh "hello bash" +hello bash +``` + +For my PDF reduction project, I had a real need for this kind of non-interactivity, because each PDF took several minutes to condense. But by creating a script that accepted input from me, I could feed the script several PDF files all at once. The script processed each one sequentially, which could take half an hour or more, but it was a half-hour I could use for other tasks. + +### Flow control + +It's perfectly acceptable to create Bash scripts that are, essentially, transcripts of the exact process you took to achieve the task you need to be repeated. However, scripts can be made more powerful by controlling how information flows through them. Common methods of managing a script's response to data are: + + * if/then + * for loops + * while loops + * case statements + + + +Computers aren't intelligent, but they are good at comparing and parsing data. Scripts can feel a lot more intelligent if you build some data analysis into them. For example, the basic **hello.sh** script runs whether or not there's anything to echo: + + +``` +$ bash hello.sh foo +foo +$ bash hello.sh + +$ +``` + +It would be more user-friendly if it provided a help message when it receives no input. That's an if/then statement, and if you're using Bash in a basic way, you probably wouldn't know that such a statement existed in Bash. But part of programming is learning the language, and with a little research you'd learn about if/then statements: + + +``` +if [ "$1" = "" ]; then +        echo "syntax: $0 WORD" +        echo "If you provide more than one word, enclose them in quotes." +else +        echo "$1" +fi +``` + +Running this new version of **hello.sh** results in: + + +``` +$ bash hello.sh +syntax: hello.sh WORD +If you provide more than one word, enclose them in quotes. +$ bash hello.sh "hello world" +hello world +``` + +### Working your way through a script + +Whether you're looking for something to remove images from PDF files, or something to manage your cluttered Downloads folder, or something to create and provision Kubernetes images, learning to script Bash is a matter of using Bash and then learning ways to take those scripts from just a list of commands to something that responds to input. It's usually a process of discovery: you're bound to find new Linux commands that perform tasks you never imagined could be performed with text commands, and you'll find new functions of Bash to make your scripts adaptable to all the different ways you want them to run. + +One way to learn these tricks is to read other people's scripts. Get a feel for how people are automating rote commands on their systems. See what looks familiar to you, and look for more information about the things that are unfamiliar. + +Another way is to download our [introduction to programming with Bash][3] eBook. It introduces you to programming concepts specific to Bash, and with the constructs you learn, you can start to build your own commands. And of course, it's free to download and licensed under a [Creative Commons][4] license, so grab your copy today. + +### [Download our introduction to programming with Bash eBook!][3] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/bash-programming-guide + +作者:[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/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt) +[2]: https://opensource.com/resources/what-bash +[3]: https://opensource.com/downloads/bash-programming-guide +[4]: https://opensource.com/article/20/1/what-creative-commons From 0459777beeaf2b620a7a99e22c868a857d6c7a92 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 11 Apr 2020 01:11:50 +0800 Subject: [PATCH 044/394] add done: 20200410 Get started with Bash programming.md --- ...Kubernetes saved my desktop application.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sources/tech/20200410 How Kubernetes saved my desktop application.md diff --git a/sources/tech/20200410 How Kubernetes saved my desktop application.md b/sources/tech/20200410 How Kubernetes saved my desktop application.md new file mode 100644 index 0000000000..ecbd6ee273 --- /dev/null +++ b/sources/tech/20200410 How Kubernetes saved my desktop application.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How Kubernetes saved my desktop application) +[#]: via: (https://opensource.com/article/20/4/kubernetes-desktop-application) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) + +How Kubernetes saved my desktop application +====== +Keep this fix in mind if you have a broken Java desktop application but +aren't a crypto expert. +![Puzzle pieces coming together to form a computer screen][1] + +Recently, fellow Opensource.com scribe James Farrell wrote a wonderful article entitled _[How Ansible brought peace to my home][2]_. In addition to the great article, I really liked the title, one of those unexpected phrases that I’m sure brought a smile to many faces. + +I recently had a weird but positive experience of my own that begs a similar sort of unexpected label. I’ve been grappling with a difficult problem that arose when upgrading some server and networking infrastructure that broke a Java application I’ve been supporting since the early 2000s. Strangely enough, I found the solution in what appears to be a very informative and excellent article on Kubernetes, of all things. + +Without further ado, here is my problem: + +![][3] + +I’m guessing that most readers will look at that message and think things like, "I hope there’s more info in the log file," or "I’m really glad I’ve never received a message like that." + +Unfortunately, there isn’t a lot of info in the log file, just the same message, in fact. In an effort to debug this, I did three things: + + 1. I searched online for the message. Interestingly, or perhaps ominously, there were only 200 or so hits on this string, [one of which suggested][4] [turn][4][ing][4] [on more debugging output][4], which involved adding the setting + + +``` +**-Djavax.net.debug=ssl:handshake:verbose**[/code] to the **java** command running the application. + + 2. I tried that suggestion, which resulted in a lot of output (good), most of which only vaguely made sense to me as I’m no kind of expert in the underlying bits of stuff like SSL. But one thing I did notice is that there was no information regarding a response from the server in the midst of all of that output; + + 3. So I searched some more. + + + + +Another interesting part of this problem is that the code ran fine when executed by the Java command bundled in the OpenJDK, but failed with this error when using a customized runtime [created from the same OpenJDK in this way][5]. So the relatively modest number of apparently similar problems turned up from search #1 above were actually not all that relevant since they all seemed to be dealing mostly with bad SSL certificates on the server in conjunction with the PostgreSQL JDBC’s ability to check the server’s credentials. + +I should also mention that it took me quite some time to realize that the problem was introduced by using the custom Java runtime, as I managed to check many other possibilities along the way (and indeed, I did fix a few minor bugs while I was at it). My efforts included things like getting the latest OpenJDK, checking and re-checking all the URLs in case one had a typo, and so forth. + +As often happens, after putting the problem aside for a few hours, an idea occurred to me—perhaps I was missing some module in the customized Java runtime. While I didn’t receive any errors directly suggesting that problem, the observable fact that the standard OpenJDK environment worked while the custom one failed seemed to hint at that possibility. I took a quick look in the **jmods/** folder in the OpenJDK installation, but there are some 70 modules there and nothing jumped out at me. + +But again, what seemed odd was, with debugging turned on (see #1 above), there was no indication of what the server would accept, just what the client mostly couldn’t offer, many lines like this: +``` +`Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA` +``` +So I was at least thinking by this time that maybe what was missing was the module that offered those kinds of cipher suites. So I started searching with strings like "jdbc crypto," and in the midst of that, the most unlikely article showed up: [Optimizing Kubernetes Services—Part 2: Spring Web][6], written by [Juan Medina][7]. Midway down the article, I spotted the following: + +![][8] + +Huh! Imagine that, his script is creating a custom Java runtime, just like mine. But he says he needs to add in manually the module **jdk.crypto.ec** in order t \ No newline at end of file From 8af3b1b135a837d87fb3bad89e8f5c607c7ed2be Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Apr 2020 20:09:14 +0800 Subject: [PATCH 045/394] PRF @HankChow --- ...00410 How to Go Full Dark Mode in Ubuntu 20.04.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md index 9d0223efa8..2c10a487fc 100644 --- a/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md +++ b/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04) @@ -12,15 +12,19 @@ > 深色模式是 Ubuntu 20.04 最受瞩目的[新功能][1]之一了。任何版本的 Ubuntu 都可以通过[安装深色主题][2]让用户界面拥有一个深色的外观,但在 Ubuntu 20.04 中,这个过程变得更简单。 +![](https://img.linux.net.cn/data/attachment/album/202004/11/200841gvvaja25jaz5z7hv.jpg) + 在 Ubuntu 20.04 中,无需额外安装主题,默认主题(称为 Yaru)本身就带有三种模式,其中就包括深色模式。 下面我会展示如何将 Ubuntu 系统完全设置为深色模式。 ### 在 Ubuntu 20.04 打开深色模式 -这个步骤将会在 GNOME 桌面上完成,如果你[使用的是其它桌面][4],你看到的可能会和下面的截图不一样。 +- [video](https://player.vimeo.com/video/405726943) -按下 super 键(或 Windows 键),然后输入“settings”,就可以找到系统设置。 +这个步骤是在 GNOME 桌面上进行的,如果你[使用的是其它桌面][4],你看到的可能会和下面的截图不一样。 + +按下 super 键(或 Windows 键),然后输入 “settings”,就可以找到系统设置。 ![Search for Settings][5] @@ -82,7 +86,7 @@ via: https://itsfoss.com/dark-mode-ubuntu/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[HankChow](https://github.com/HankChow) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0d9662a4978f752a4382efc380e23de2eef29429 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Apr 2020 20:10:44 +0800 Subject: [PATCH 046/394] PUB @HankChow https://linux.cn/article-12098-1.html --- .../20200410 How to Go Full Dark Mode in Ubuntu 20.04.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md (98%) diff --git a/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/published/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md similarity index 98% rename from translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md rename to published/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md index 2c10a487fc..5ff72f17b5 100644 --- a/translated/tech/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md +++ b/published/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (HankChow) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12098-1.html) [#]: subject: (How to Go Full Dark Mode in Ubuntu 20.04) [#]: via: (https://itsfoss.com/dark-mode-ubuntu/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 38d5d0e41075da1876714b62360c38009e1f174e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Apr 2020 21:19:14 +0800 Subject: [PATCH 047/394] APL --- .../20200408 Create web tutorials with Reveal.js and Git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md b/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md index 52e34b34e1..05393b87e2 100644 --- a/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md +++ b/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b8be7d43683d0dfc5a439c370b153abbb18fce97 Mon Sep 17 00:00:00 2001 From: MjSeven Date: Sat, 11 Apr 2020 23:07:59 +0800 Subject: [PATCH 048/394] Translating by MjSeven --- ... to use pyenv to run multiple versions of Python on a Mac.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200407 How to use pyenv to run multiple versions of Python on a Mac.md b/sources/tech/20200407 How to use pyenv to run multiple versions of Python on a Mac.md index 4d15072b90..a77ff4ede5 100644 --- a/sources/tech/20200407 How to use pyenv to run multiple versions of Python on a Mac.md +++ b/sources/tech/20200407 How to use pyenv to run multiple versions of Python on a Mac.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (MjSeven) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 50a15b8c1702c3db8b64b57e770e241353d6038c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 11 Apr 2020 23:14:40 +0800 Subject: [PATCH 049/394] TSL --- ...te web tutorials with Reveal.js and Git.md | 221 ------------------ ...te web tutorials with Reveal.js and Git.md | 204 ++++++++++++++++ 2 files changed, 204 insertions(+), 221 deletions(-) delete mode 100644 sources/tech/20200408 Create web tutorials with Reveal.js and Git.md create mode 100644 translated/tech/20200408 Create web tutorials with Reveal.js and Git.md diff --git a/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md b/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md deleted file mode 100644 index 05393b87e2..0000000000 --- a/sources/tech/20200408 Create web tutorials with Reveal.js and Git.md +++ /dev/null @@ -1,221 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create web tutorials with Reveal.js and Git) -[#]: via: (https://opensource.com/article/20/4/create-web-tutorial-git) -[#]: author: (Eric D. Schabell https://opensource.com/users/eschabell) - -Create web tutorials with Reveal.js and Git -====== -Workshop slides can be viewed consistently on any browser, device, and -platform with this easy workflow. -![Person reading a book and digital copy][1] - -Whether you're a learner or a teacher, you probably recognize the value of online workshops set up like slideshows for communicating knowledge. If you've ever stumbled upon one of these well-organized tutorials that are set up page by page, chapter by chapter, you may have wondered how hard it was to create such a website. - -Well, I'm here to show you how easy it is to generate this type of workshop using a fully automated process. - -### Introduction - -When I started putting my learning content online, it was not a nice, seamless experience. So, I wanted something repeatable and consistent that was also easy to maintain, since my content changes as the technology I teach progresses. - -I tried many delivery models, from low-level code generators, such as [Asciidoctor][2], to laying out a workshop in a single PDF file. All failed to satisfy me. When I deliver live, onsite workshops, I like using slideshows, so I wondered if I could do the same thing for my online, self-paced workshop experiences. - -After some digging, I built a foundation for creating painless workshop websites. It helped that I was already using a presentation-generation framework that resulted in a website-friendly format (HTML). - -### Setting it up - -Here the basic components you need for this project: - - * Workshop idea (this is your problem, can't help you here) - * Reveal.js for the workshop slides - * GitLab project repository - * Your favorite HTML code editor - * Web browser - * Git installed on your machine - - - -If this list looks intimidating, there's a quick way to get started that doesn't involve pulling all the pieces together one by one: You can use my template project to give you a kickstart with the slides and project setup. - -This article assumes you're familiar with Git and projects hosted on a Git platform like GitLab. If you need a refresher or tutorial, check out our [introductory Git series][3]. - -Start by cloning the template project to your local machine: - - -``` -`$ git clone https://gitlab.com/eschabell/beginners-guide-automated-workshops.git` -``` - -Set up a new GitLab project for this and import the template project as the initial import. - -There are a number of important files for the workshop website. In the **root** directory, you'll find a file called **.gitlab-ci.yml**, which is used as a trigger when you commit changes to the master branch (i.e., merge pull requests to **master**). It triggers a copy of the complete contents of the **slides** directory into the GitLab project's **website** folder. - -I have this hosted as a project called **beginners-guide-automated-workshops** in my GitLab account. When it deploys, you can view the contents of the **slides** directory in your browser by navigating to: - - -``` -`https://eschabell.gitlab.io/beginners-guide-automated-workshops` -``` - -For your user account and project, the URL would look like: - - -``` -`https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME]` -``` - -These are the basic materials you need to start creating your website content. When you push changes, they will automatically generate your updated workshop website. Note that the default template contains several example slides, which will be your first workshop website after you complete the full check-in to your repository. - -The workshop template results in a [reveal.js][4] slideshow that can run in any browser, with automatic resizing that allows it to be viewed by almost anyone, anywhere, on any device. - -How's that for creating handy and accessible workshops? - -### How it works - -With this background in place, you're ready to explore the workshop materials and start putting your content together. Everything you need can be found in the project's **slides** directory; this is where all of the magic happens with reveal.js to create the workshop slideshow in a browser. - -The files and directories you'll be working with to craft your workshop are: - - * The **default.css** file - * The **images** directory - * The **index.html** file - - - -Open each one in your favorite HTML/CSS editor and make the changes described below. It does not matter which editor you use; I prefer [RubyMine IDE][5] because it offers a page preview in the local browser. This helps when I'm testing out content before pushing it online to the workshop website. - -#### Default.css file - -The file **css/theme/default.css** is the base file where you will set important global settings for your workshop slides. The two main items of interest are the default font and background image for all slides. - -In **default.css**, look at the section labeled **GLOBAL STYLES**. The current default font is listed in the line: - - -``` -`font-family: "Red Hat Display", "Overpass", san-serif;` -``` - -If you're using a non-standard font type, you must import it (as was done for the Overpass font type) in the line: - - -``` -`@import url('SOME_URL');` -``` - -The **background** is the default image for every slide you create. It is stored in the **images** directory (see below) and set in the line below (focus on the image path): - - -``` -`background: url("…/…/images/backgrounds/basic.png")` -``` - -To set a default background, just point this line to the image you want to use. - -#### Images directory - -As its name implies, the **images** directory is used for storing the images you want to use on your workshop slides. For example, I usually put screenshots that demonstrate the progress of the workshop topic on my individual slides. - -For now, just know that you need to store the background images in a subdirectory (**backgrounds**) and the images you plan to use in your slides in the **Images** directory. - -#### Index.html file - -Now that you have those two files sorted out, you'll spend the rest of your time creating slides in the HTML files, starting with **index.html**. For your workshop website to start taking shape, pay attention to the following three sections in this file: - - * The **head** section, where you set the title, author, and description - * The **body** section, where you find the individual slides to design - * Each **section**, where you define the contents of individual slides - - - -Start with the **head** section, since it's at the top. The template project has three placeholder lines for you to update: - - -``` -<title>INSERT-YOUR-TITLE-HERE</title> -<meta name="description" content="YOUR DESCIPTION HERE."> -<meta name="author" content="YOUR NAME"> -``` - -The **title** tag contains the text that appears in the browser tab when the file is open. Change it to something relevant to the title of your workshop (or maybe a section of your workshop), but remember to keep it short since tab title space is limited. The **description** meta tag contains a short description of your workshop, and the **author** meta tag is where you should put your name (or the workshop creator's name, if you're doing this for someone else). - -Now move on to the **body** section. You'll notice that it's divided into a number of **section** tags. The opening of the **body** contains a comment that explains that you're creating slides for each open and closing tag labeled **section**: - - -``` -<body> -        <div class="reveal"> - -        <!-- Any section element inside of this container is displayed as a slide --> -        <div class="slides"> -``` - -Next, create your individual slides, with each slide enclosed in **section** tags. The template includes a few slides to help you get started. For example, here's the first slide: - - -``` -<section> -      <div style="width: 1056px; height: 300px"> -            <h1>Beginners guide</h1> -            <h2>to automated workshops</h2> -      </div> -      <div style="width: 1056px; height: 200px; text-align: left"> -            Brought to you by,<br/> -            YOUR-NAME<br/> -      </div> -      <aside class="notes">Here are notes: Welcome to the workshop!</aside> -</section> -``` - -This slide has two areas divided with **div** tags. Spacing separates the title and the author. - -Assuming you have some knowledge of using HTML, try various things to develop your workshop. It's really handy to use a browser as you go to preview the results. Some IDEs provide local viewing of changes, but you can also open the **index.html** file and view your changes before pushing them to the repository. - -Once you're satisfied with your workshop, push your changes, and wait for them to pass through the continuous integration pipeline. They'll be hosted like the template project at . - -### Learn more - -To learn more about what you can do with this workflow, check out the following example workshops and sites that host workshop collections. All of these are based on the workflow described in this article. - -Workshop examples: - - * [Red Hat Process Automation Manage workshop][6] - * [JBoss Travel Agency BPM Suite online workshop][7] - - - -Workshop collections: - - * [Rule the world: Practical decisions & process automation development workshops][8] - * [Application development in the cloud workshop][9] - * [Portfolio architecture: Workshops for creating impactful architectural diagrams][10] - - - -I hope this beginner's guide and the template workshop project show you easy and painless it can be to develop and maintain workshop websites in a consistent manner. I also hope this workflow gives your workshop audiences full access to your content on almost any device so they can learn from the knowledge you're sharing. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/create-web-tutorial-git - -作者:[Eric D. Schabell][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/eschabell -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) -[2]: https://asciidoctor.org/ -[3]: https://opensource.com/resources/what-is-git -[4]: https://revealjs.com/#/ -[5]: https://www.jetbrains.com/ruby/ -[6]: https://gitlab.com/bpmworkshop/rhpam-devops-workshop -[7]: https://gitlab.com/bpmworkshop/presentation-bpmworkshop-travel-agency -[8]: https://bpmworkshop.gitlab.io/ -[9]: https://appdevcloudworkshop.gitlab.io/ -[10]: https://redhatdemocentral.gitlab.io/portfolio-architecture-workshops diff --git a/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md b/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md new file mode 100644 index 0000000000..5466f55d81 --- /dev/null +++ b/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md @@ -0,0 +1,204 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Create web tutorials with Reveal.js and Git) +[#]: via: (https://opensource.com/article/20/4/create-web-tutorial-git) +[#]: author: (Eric D. Schabell https://opensource.com/users/eschabell) + +使用 Reveal.js 和 Git 创建网页教程 +====== + +> 通过这个简单的工作流程创建的研讨会幻灯片,可以在任何浏览器、设备和平台上一致地查看。 + +![Person reading a book and digital copy][1] + +无论你是学习者还是教师,你可能都会认识到采用幻灯片放映来传播知识的在线研讨会workshop的价值。如果你曾经偶然看到过这样一个逐页、逐章设置的井井有条的教程,你可能会想知道创建这样的一个网站有多难。 + +好吧,让我在这里向你展示,使用全自动化的流程来生成这样的教程是多么容易。 + +### 介绍 + +当我开始将学习内容放到网上置时,体验并不是很好。我想要的是一种可重复的、一致的、易于维护的东西,因为我的内容会随着我的教学技术而进步。 + +我尝试了许多交付模型,从 [Asciidoctor][2] 这样的低级代码生成器到在单个 PDF 文件中放置教程。全都不能让我满意。当我举办现场的在座研讨会时,我喜欢使用幻灯片放映,因此我想知道我是否可以为自己的在线的,自定进度的研讨会体验做同样的事情。 + +经过一番挖掘,我为创建无痛的研讨会网站打下了基础。当时我已经在使用一个演示文稿生成框架,这对我来说是很有帮助的,因为这个框架可以产生对网站友好的格式(HTML)。 + +### 设置 + +这里是这个项目所需要的基本组件。 + + * 研讨会的想法(这是你的问题,我帮不了你) + * 用于研讨会幻灯片的 Reveal.js + * GitLab 项目仓库 + * 你最喜欢的 HTML 代码编辑器 + * Web 浏览器 + * 在你的机器上安装好 Git + +如果这个列表看起来令人望而生畏,那么有一个快速入门的方法,不需要把所有的东西一个个都拉到一起。你可以用我的模板项目来给你提供幻灯片和项目设置的入门教程。 + +本文假设你熟悉 Git 和托管在 Git 平台(如 GitLab)上的项目。如果你需要指导或教程,请查看我们的[Git 入门系列][3]。 + +首先,将模板项目克隆到本地机器上。 + +``` +$ git clone https://gitlab.com/eschabell/beginners-guide-automated-workshops.git +``` + +为此设置一个新的 GitLab 项目,导入模板项目作为初始导入。 + +研讨会网站有一些重要的文件。在**根目录**下,你会发现一个名为 `.gitlab-ci.yml` 的文件,当你向主分支提交修改时(即合并拉取请求到 `master` 分支),这个文件会作为触发器。它可以触发将 `slides` 目录的全部内容复制到 GitLab 项目的 `website` 文件夹中。 + +我把它托管在我的 GitLab 账户中,名为 `beginners-guide-automated-workshops`。当它部署完毕后,你可以在浏览器中通过导航到下列地址查看 `slides` 目录的内容: + +``` +https://eschabell.gitlab.io/beginners-guide-automated-workshops +``` + +对于你的用户帐户和项目,URL 如下所示: + +``` +https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME] +``` + +这些是你开始创建网站内容所需要的基本素材。当你推送修改后,它们会自动生成更新过的研讨会网站。请注意,默认模板包含了几个示例幻灯片,这将是你完成对存储库的完整签入后的第一个研讨会网站。 + +研讨会模板生成的结果是一个 [receive.js][4] 幻灯片,可以在任何浏览器中运行,并可以自动调整大小,几乎可以让任何人在任何地方、任何设备上观看。 + +这样创建一个方便、易访问的研讨会怎么样? + +### 它是如何工作的 + +有了这些背景信息,你就可以开始探索研讨会的这些素材,并开始把你的内容放在一起了。你需要的一切都可以在项目的 `slides` 目录中找到;这里是使用 reveal.js 在浏览器中创建研讨会幻灯片的地方。 + +你将用来制作研讨会的文件和目录是: + + * `default.css`文件 + * `images` 目录 + * `index.html`文件 + +在你喜欢的 HTML/CSS 编辑器中打开每一个文件,然后进行下面描述的修改。你用哪个编辑器并不重要,我更喜欢 [RubyMine IDE][5],因为它能在本地浏览器中提供页面预览。这对我在将内容推送到研讨会网站之前测试内容时很有帮助。 + +#### default.css 文件 + +文件 `css/theme/default.css` 是一个基础文件,你将在这里为你的研讨会幻灯片设置重要的全局设置。其中值得注意的两个主要的项目是所有幻灯片的默认字体和背景图片。 + +在 `default.css` 中,看一下标有 `GLOBAL STYLES` 的部分。当前的默认字体在这一行中列出了。 + +``` +font-family: "Red Hat Display", "Overpass", san-serif; +``` + +如果你使用的是非标准字体类型,则必须在以下行中将其导入(与 Overpass 字体类型相同): + +``` +@import url('SOME_URL'); +``` + +`background` 是你创建的每张幻灯片的默认图像。它存储在 `images` 目录下(见下面),并在下面这一行中设置(重点是图像路径)。 + +``` +background: url("…/…/images/backgrounds/basic.png") +``` + +要设置一个默认背景,只需将这一行指向你要使用的图片。 + +#### images 目录 + +顾名思义,`images` 目录是用来存储你想在研讨会幻灯片上使用的图片。例如,我通常会把展示研讨会主题进展的截图放在我的个人幻灯片上。 + +现在,你只需要知道你需要将背景图片存储在一个子目录(`backgrounds`)中,并将你计划在幻灯片中使用的图片存储在 `images` 目录中。 + +#### index.html 文件 + +现在你已经把这两个文件整理好了,剩下的时间你就可以在 HTML 文件中创建幻灯片了,从 `index.html` 开始。为了让你的研讨会网站开始成形,请注意这个文件中的以下三个部分。 + + * `head `部分,在这里你可以设置标题、作者和描述。 + * `body` 部分,你可以在这里找到要设计的单个幻灯片。 + * 你可以在每个 `section` 中定义各个幻灯片的内容。 + +从 `head` 部分开始,因为它在顶部。模板项目有三个占位符行供你更新。 + +``` +INSERT-YOUR-TITLE-HERE + + +``` + +`title` 标签包含文件打开时显示在浏览器选项卡中的文字。请将其改为与你的研讨会的标题相关的内容(或研讨会的某个部分),但记得要简短,因为标签页的标题空间有限。`description` 元标签包含了对你的工作坊的简短描述,而 `author` 元标签是你应该把你的名字(如果你是为别人写的,则是工作坊创建者的名字)。 + +现在继续到 `body` 部分。你会注意到它被分成了许多 `section` 标签。`body` 的开头包含了一个注释,说明你正在为每个标有 `section` 的打开和关闭的标签创建幻灯片。 + + +``` + +
+ + +
+``` + +接下来,创建你的各个幻灯片,每张幻灯片都用 `section` 标签封装起来。这个模板包括了一些幻灯片来帮助你开始制作。例如,这里是第一张幻灯片。 + +``` +
+
+

Beginners guide

+

to automated workshops

+
+
+ Brought to you by,
+ YOUR-NAME
+
+ +
+``` + +这张幻灯片有两个区域,用 `div` 标签划分。用空格隔开了标题和作者。 + +如果你有一定的 HTML 使用知识,可以尝试各种东西来开发你的研讨会。你使用浏览器预览结果的时候真的很方便。有些 IDE 提供了本地查看修改,但你也可以打开 `index.html` 文件查看你的修改,然后再推送到资源库中。 + +一旦你对你的研讨会感到满意,推送你的修改,然后等待它们通过持续集成管道。它们将像模板项目一样被托管在 。 + +### 了解更多 + +要了解更多关于这个工作流程可以做什么,请查看下面的示例研讨会和托管了研讨会集合的网站。所有这些都是基于本文中描述的工作流程。 + +研讨会的例子: + + * [Red Hat Process Automation Manage workshop][6] + * [JBoss Travel Agency BPM Suite online workshop][7] + +研讨会集合: + + * [Rule the world: Practical decisions & process automation development workshops][8] + * [Application development in the cloud workshop][9] + * [Portfolio architecture: Workshops for creating impactful architectural diagrams][10] + +我希望这本新手指南和模板研讨会项目能让你看到,在开发和维护工作室网站的过程中,可以轻松、无痛地完成。我也希望这个工作流程能让你的研讨会受众几乎在任何设备上都能完全访问你的内容,这样他们就能从你分享的知识中学习到你的知识。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/create-web-tutorial-git + +作者:[Eric D. Schabell][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/eschabell +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) +[2]: https://asciidoctor.org/ +[3]: https://opensource.com/resources/what-is-git +[4]: https://revealjs.com/#/ +[5]: https://www.jetbrains.com/ruby/ +[6]: https://gitlab.com/bpmworkshop/rhpam-devops-workshop +[7]: https://gitlab.com/bpmworkshop/presentation-bpmworkshop-travel-agency +[8]: https://bpmworkshop.gitlab.io/ +[9]: https://appdevcloudworkshop.gitlab.io/ +[10]: https://redhatdemocentral.gitlab.io/portfolio-architecture-workshops From 922028b9965298a064c4d789014727487ba34ed0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 12 Apr 2020 00:54:36 +0800 Subject: [PATCH 050/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200411=20New=20?= =?UTF-8?q?Linux=20integrity=20checker=20from=20Microsoft,=20Raspberry=20P?= =?UTF-8?q?i=C2=A0smart=20TV=20replacement=20from=20KDE,=20and=20more=20op?= =?UTF-8?q?en=20source=20news?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md --- ...ent from KDE, and more open source news.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md diff --git a/sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md b/sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md new file mode 100644 index 0000000000..bdff5b8ce2 --- /dev/null +++ b/sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (New Linux integrity checker from Microsoft, Raspberry Pi smart TV replacement from KDE, and more open source news) +[#]: via: (https://opensource.com/article/20/4/news-april-11) +[#]: author: (Ben Cotton https://opensource.com/users/bcotton) + +New Linux integrity checker from Microsoft, Raspberry Pi smart TV replacement from KDE, and more open source news +====== +Catch up on the biggest open source headlines from the past two weeks. +![][1] + +In this edition of our open source news roundup, we take a look at GNOME Foundation's new contributor program, a new Linux integrity checker from Microsoft, a free software alternative to smart TVs, and more! + +### GNOME Foundation launches a new contributor program + +A key part of keeping open source communities vibrant and healthy is bringing in new contributors. To help promote this, the GNOME Foundation and Endless teamed up to launch the inaugural [Community Engagement Challenge][2]. Phase one launched this week by opening the call for submitting project applications. Candidate projects should be aimed at bringing beginners into open source and encouraging ongoing participation in open source communities. Projects don’t have to be coding, they can also be games, videos, written materials, and so on. + +A panel of judges will select 20 projects to participate in phase two, where ideas will be turned into proofs of concept. At each phase, cash prizes will be awarded. [Proposals][3] are due July 1, 2020. + +### Microsoft announces code integrity checker for Linux + +When you run a program, you want it to be the one you think you’re running. This week, Microsoft announced [Integrity Policy Enforcement][4] (IPE), a Linux Security Model released under the GPLv2. + +IPE is targeted toward specific-purpose devices like network firewalls, not for general-purpose computing. It provides runtime verification that the code being executed matches the desired version. This allows administrators to detect and block altered binaries. + +IPE is currently in the Request for Comments stage on the [linux-security-module][5] mailing list. + +### KDE announces Plasma Bigscreen + +I recently bought a new TV and, if you haven’t been in the market lately, it’s hard to find “dumb” televisions. I didn’t want a smart TV because I worry about the manufacturer abandoning the software and what the device might do with my data. So KDE’s recent [Plasma Bigscreen][6] announcement caught my eye. + +Plasma Bigscreen takes the KDE Plasma interface I use every day and combines it with [Mycroft AI][7] to turn single-board computers into a smart TV. The beta, released last month, includes support for the Raspberry Pi 4 (Model B). + +### In other news + + * [IVPN for Android is now available on F-Droid][8] + * [IBM gives Outreachy $50,000 grant][9] + * [Warren For President Tech Team open source many of their projects][10] + * [Firefox 75.0 is released with a redesigned address bar and distribution via Flatpak][11] + * [LineageOS releases version 17.1 based on Android 10][12] + * [Linux kernel 5.6 released][13] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/news-april-11 + +作者:[Ben Cotton][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/bcotton +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd +[2]: https://www.gnome.org/challenge +[3]: https://surveys.gnome.org/index.php/986379?lang=en +[4]: https://microsoft.github.io/ipe/ +[5]: https://lore.kernel.org/linux-security-module/20200406181045.1024164-1-deven.desai@linux.microsoft.com/T/#m297116cd00666428c2ae3e627ff39653ebb691fb +[6]: https://dot.kde.org/2020/03/26/plasma-tv-presenting-plasma-bigscreen +[7]: https://mycroft.ai/ +[8]: https://www.ivpn.net/blog/ivpn-for-android-is-now-available-on-f-droid +[9]: https://developer.ibm.com/blogs/ibm-second-open-source-community-grant-outreachy/ +[10]: https://medium.com/@teamwarren/open-source-tools-from-the-warren-for-president-tech-team-f1f27d2c7551 +[11]: https://www.mozilla.org/en-US/firefox/75.0/releasenotes/ +[12]: https://lineageos.org/Changelog-24/ +[13]: https://lore.kernel.org/lkml/CAHk-=wi9ZT7Stg-uSpX0UWQzam6OP9Jzz6Xu1CkYu1cicpD5OA@mail.gmail.com/ From 214660e8f4ad1d48c22fe5e9045ccb5e5700084f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 12 Apr 2020 00:56:13 +0800 Subject: [PATCH 051/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200411=205=20op?= =?UTF-8?q?en=20source=20activities=20while=20you=20work=20from=20home?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200411 5 open source activities while you work from home.md --- ...rce activities while you work from home.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20200411 5 open source activities while you work from home.md diff --git a/sources/tech/20200411 5 open source activities while you work from home.md b/sources/tech/20200411 5 open source activities while you work from home.md new file mode 100644 index 0000000000..c52818f909 --- /dev/null +++ b/sources/tech/20200411 5 open source activities while you work from home.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (5 open source activities while you work from home) +[#]: via: (https://opensource.com/article/20/4/open-source-activities) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +5 open source activities while you work from home +====== +Work-life balance is important whether you're working from home +temporarily or it's your usual mode of earning a living. +![Person in a field of dandelions][1] + +The mythos of the remote home office or the exciting archetype of the digital nomad are as appealing as they are dangerous. It's great to be able to avoid a commute, to be able to stay comfortable at home while getting lots of work done, and to be master of your own schedule. But along with those liberties, you inherit the responsibility of remembering to be a normal, functioning human being. Believe it or not, the two aren't mutually exclusive. You can do both, but you have to work at it. Here are some ideas on how. + +### Plant something + +![Seeeduino in the garden][2] + +You may have an abundance of little ones to care for during the day, and if you do, you should read our [article][3] about fun open source projects for kids and parents. If you don't, or if you're just keen to try caring for something that's quiet, then you might find it satisfying to plant something. + +I used to think gardening was something you did as a way to establish a routine: each morning, you wake up and tend to your plants before you start your day, each evening you might pull weeds, and so on. Now that I have a garden, I realize that it's more like a low-stress puzzle. Learning to tend to plants is a little like learning to program. You learn the basics first, you learn to debug (literally, in the case of aphids), and then you learn how to optimize growth and maybe even [how to automate plant care][4]. + +If you're not attracted to gardening, there are plenty of other [outdoor projects][5] that are useful in getting you outdoors with a purpose and encouraging you to go back out for more. + +### Go for a walk + +![Walking][6] + +The phrases "go for a walk" or "get some fresh air" are so common that they seem trite, but that doesn't make the result any less valid. Getting outside your usual workspace is vital for clarity and drive, but sometimes going outside feels a little pointless. You can only walk around the block so many times before the journey loses excitement. + +If you need a goal for ambling around your neighborhood, you can download a handy app called [StreetComplete][7]. It's a quest-based app that presents you with points of interest in your area with incomplete [Open Street Map][8] data. You can help crowdsource better open source maps by verifying and providing information through the app. Suddenly, that aimless meandering you don't really want to do is a fun quest for you and your family. + +### Diversify + +![Mini stapler][9] + +Being in an office can present exciting challenges, whether it's because you're in a dynamic industry or in a petty fight with a colleague over ownership of a stapler. When you work from home, your daily routine can get pretty, well, routine. If that's the case, it might be time to diversify. + +If you've been meaning to [get involved with open source][10], now's a great time for it. + +If you suspect you might be artistic (or even if you're convinced you're not, but you have something you want to express), then maybe it's time to finally learn how to create some [digital imagery][11]. + +Or maybe you're curious about programming. It might be easier than you think and given enough free time, you might even end up with [your own game written in Python][12]. + +### Make some music + +![Music keyboardas][13] + +Artistic expression is important, whether you're working from home or living with someone who's bored at home. The great thing about music is that you don't need to be _musical_ to [make some really cool noise][14]. In fact, you can make some [wild sounds on a Raspberry Pi][15], if you have one lying around. + +If you happen to be musical, though, you can have a go at a digital audio workstation like [Qtractor][16] or [Rosegarden][17]. For inspiration, read about a [professional composer][18] and the music festival he created. + +### Refurbish + +![Old computers][19] + +I don't like it when good things go to waste, especially computers. Read about [refurbishing old computers][20] and [really old computers][21], and then rummage around in your attic to find one for your own experiments. + +### Meet the challenge + +Being stuck at home for long periods of time, whether it's for a few weeks or the better part of your career, can be challenging. However, open source is a vast landscape of opportunity. Explore and find the parts of it that appeal to you. You can build a hobby, and maybe even a career, out of all the fun things you can do with other people's toys. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-activities + +作者:[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/OSDC_dandelion_520x292.png?itok=-xhFQvUj (Person in a field of dandelions) +[2]: https://opensource.com/sites/default/files/uploads/diversions_seeeduino.jpg (Seeeduino in the garden) +[3]: https://opensource.com/article/19/12/kids-students-education +[4]: https://opensource.com/article/17/3/arduino-garden-projects +[5]: https://opensource.com/article/19/5/hardware-outdoors +[6]: https://opensource.com/sites/default/files/uploads/diversions_walk.jpg (Walking) +[7]: https://opensource.com/article/20/1/streetcomplete-crowdsource-maps +[8]: https://opensource.com/article/17/8/openstreetmap +[9]: https://opensource.com/sites/default/files/uploads/diversions_stapler.jpg (Mini stapler) +[10]: https://opensource.com/article/17/10/open-source-cats +[11]: https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers +[12]: https://opensource.com/article/17/10/python-101 +[13]: https://opensource.com/sites/default/files/uploads/diversions_keyboards.jpg (Music keyboards) +[14]: https://opensource.com/life/16/2/linux-multimedia-studio +[15]: https://opensource.com/article/20/3/sonic-pi +[16]: https://opensource.com/article/17/6/qtractor-audio +[17]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden +[18]: https://opensource.com/article/20/2/linux-open-source-music +[19]: https://opensource.com/sites/default/files/uploads/diversions_old-computers.jpg (Old computers) +[20]: https://opensource.com/article/19/7/how-make-old-computer-useful-again +[21]: https://opensource.com/article/20/2/restore-old-computer-linux From 6c049aa4788b428aaf306ae0b23bef4e7d7ddd3c Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 12 Apr 2020 09:14:09 +0800 Subject: [PATCH 052/394] Rename sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md to sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md --- ...Pi-smart TV replacement from KDE, and more open source news.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md (100%) diff --git a/sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md b/sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md similarity index 100% rename from sources/tech/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md rename to sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md From 4c9e392b2cb4396cf114c06071f5545d8a5efc0f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 12 Apr 2020 09:14:56 +0800 Subject: [PATCH 053/394] Rename sources/tech/20200411 5 open source activities while you work from home.md to sources/talk/20200411 5 open source activities while you work from home.md --- .../20200411 5 open source activities while you work from home.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200411 5 open source activities while you work from home.md (100%) diff --git a/sources/tech/20200411 5 open source activities while you work from home.md b/sources/talk/20200411 5 open source activities while you work from home.md similarity index 100% rename from sources/tech/20200411 5 open source activities while you work from home.md rename to sources/talk/20200411 5 open source activities while you work from home.md From 2b4f0b373fe060082219a38dfc6328d659ad2975 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 09:35:28 +0800 Subject: [PATCH 054/394] PRF @geekpi --- ...from spreadsheets in Fedora with Python.md | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md b/translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md index abd3f63cf8..864c42c760 100644 --- a/translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md +++ b/translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md @@ -1,22 +1,22 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Using data from spreadsheets in Fedora with Python) [#]: via: (https://fedoramagazine.org/using-data-from-spreadsheets-in-fedora-with-python/) [#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) -在 Fedora 中使用 Python 读取电子表格中的数据 +使用 Python 读取电子表格中的数据 ====== ![][1] -[Python][2] 是最流行、功能最强大的编程语言之一。由于它是免费和开源的,因此每个人都可以使用。大多数 Fedora 系统都已安装了该语言。Python 可用于多种任务,其中包括处理逗号分隔值(**CSV**)数据。CSV 文件通常作为表格启动。本文介绍了如何在 Python 3 中处理 CSV 数据。 +[Python][2] 是最流行、功能最强大的编程语言之一。由于它是自由开源的,因此每个人都可以使用。大多数 Fedora 系统都已安装了该语言。Python 可用于多种任务,其中包括处理逗号分隔值(CSV)数据。CSV文件一开始往往是以表格或电子表格的形式出现。本文介绍了如何在 Python 3 中处理 CSV 数据。 -CSV 数据正是它听起来的样子。CSV 文件一次包含一行数据,数值之间用逗号分隔。每行由相同的_字段_定义。简短的 CSV 文件通常易于阅读和理解。但是较长的数据或具有更多字段的数据文件可能很难用肉眼解析,因此在这种情况下计算机做得更好。 +CSV 数据正如其名。CSV 文件按行放置数据,数值之间用逗号分隔。每行由相同的*字段*定义。简短的 CSV 文件通常易于阅读和理解。但是较长的数据文件或具有更多字段的数据文件可能很难用肉眼解析,因此在这种情况下计算机做得更好。 -这是一个简单的示例,其中的字段是 _Name _、_ Email_ 和 _Country_。在此例中,CSV 数据将字段定义作为第一行,尽管并非总是如此。 +这是一个简单的示例,其中的字段是 `Name`、`Email` 和 `Country`。在此例中,CSV 数据将字段定义作为第一行,尽管并非总是如此。 ``` Name,Email,Country @@ -27,9 +27,9 @@ Bernard Jones,bjones@example.com,UK ### 从电子表格读取 CSV -Python 包含了一个 _csv_ 模块,它可读取和写入 CSV 数据。大多数电子表格应用,无论是原生(例如 Excel 或 Numbers)还是基于 Web 的(例如 Google Sheet),都可以导出 CSV 数据。实际上,许多其他可发布表格报告的服务也将导出为 CSV(例如,PayPal)。 +Python 包含了一个 `csv` 模块,它可读取和写入 CSV 数据。大多数电子表格应用,无论是原生(例如 Excel 或 Numbers)还是基于 Web 的(例如 Google Sheet),都可以导出 CSV 数据。实际上,许多其他可发布表格报告的服务也可以导出为 CSV(例如,PayPal)。 -Python _csv_ 模块有一个名为 _DictReader_ 的内置读取器方法,它可以将每个数据行作为有序字典 (OrderedDict) 处理。它需要一个文件对象访问 CSV 数据。因此,如果上面的文件在当前目录中为 _example.csv_,那么以下代码段是获取此数据的一种方法: +Python `csv` 模块有一个名为 `DictReader` 的内置读取器方法,它可以将每个数据行作为有序字典 (`OrderedDict`) 处理。它需要一个文件对象访问 CSV 数据。因此,如果上面的文件在当前目录中为 `example.csv`,那么以下代码段是获取此数据的一种方法: ``` f = open('example.csv', 'r') @@ -40,7 +40,7 @@ for row in d: data.append(row) ``` -现在,内存中的 _data_ 对象是 OrderedDict 对象的列表: +现在,内存中的 `data` 对象是 `OrderedDict` 对象的列表: ``` [OrderedDict([('Name', 'John Q. Smith'), @@ -63,7 +63,7 @@ USA bjones@example.com ``` -顺便说一句,如果你需要处理没有字段名标题行的 CSV 文件,那么 _DictReader_ 类可以让你定义它们。在上面的示例中,添加 _fieldnames_ 参数并传递一系列名称: +顺便说一句,如果你需要处理没有字段名标题行的 CSV 文件,那么 `DictReader` 类可以让你定义它们。在上面的示例中,添加 `fieldnames` 参数并传递一系列名称: ``` d = DictReader(f, fieldnames=['Name', 'Email', 'Country']) @@ -71,9 +71,9 @@ d = DictReader(f, fieldnames=['Name', 'Email', 'Country']) ### 真实例子 -我最近想从一长串人中随机选择一名赢家。我从电子表格中提取的 CSV 数据是一个简单的名称和邮件地址列表。 +我最近想从一长串人员名单中随机选择一个中奖者。我从电子表格中提取的 CSV 数据是一个简单的名字和邮件地址列表。 -幸运的是,Python 有一个有用的 _random_ 模块,可以很好地生成随机值。该模块 _Random_ 类中的 _randrange_ 函数正是我需要的。你可以给它一个常规的数字范围(例如整数),以及它们之间的步长值。然后,该函数会生成一个随机结果,这意味着我可以在数据的总行数范围内获得一个随机整数(或行号!)。 +幸运的是,Python 有一个有用的 `random` 模块,可以很好地生成随机值。该模块 `Random` 类中的 `randrange` 函数正是我需要的。你可以给它一个常规的数字范围(例如整数),以及它们之间的步长值。然后,该函数会生成一个随机结果,这意味着我可以在数据的总行数范围内获得一个随机整数(或者说是行号)。 这个小程序运行良好: @@ -94,9 +94,7 @@ print('Email address:', winner['Email']) 显然,这个例子非常简单。电子表格本身包含了复杂的分析数据的方法。但是,如果你想在电子表格应用之外做某事,Python 或许是一种技巧! -* * * - -_由 [Isaac Smith][3] 拍摄,发表于 [U​​nsplash][4]。_ +题图由 [Isaac Smith][3] 拍摄,发表于 [U​​nsplash][4]。 -------------------------------------------------------------------------------- @@ -105,7 +103,7 @@ via: https://fedoramagazine.org/using-data-from-spreadsheets-in-fedora-with-pyth 作者:[Paul W. Frields][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 059aac98dd2c9230035ad63892a068ae77f55c21 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 09:35:58 +0800 Subject: [PATCH 055/394] PUB @geekpi https://linux.cn/article-12099-1.html --- ...0330 Using data from spreadsheets in Fedora with Python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200330 Using data from spreadsheets in Fedora with Python.md (98%) diff --git a/translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md b/published/20200330 Using data from spreadsheets in Fedora with Python.md similarity index 98% rename from translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md rename to published/20200330 Using data from spreadsheets in Fedora with Python.md index 864c42c760..9cff11bd8f 100644 --- a/translated/tech/20200330 Using data from spreadsheets in Fedora with Python.md +++ b/published/20200330 Using data from spreadsheets in Fedora with Python.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12099-1.html) [#]: subject: (Using data from spreadsheets in Fedora with Python) [#]: via: (https://fedoramagazine.org/using-data-from-spreadsheets-in-fedora-with-python/) [#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) From c93cc62cf6f0010bafbdc325cf5dc8442243a05c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 11:15:29 +0800 Subject: [PATCH 056/394] APL --- sources/tech/20200211 Navigating man pages in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200211 Navigating man pages in Linux.md b/sources/tech/20200211 Navigating man pages in Linux.md index 662a1d48af..0d90822c52 100644 --- a/sources/tech/20200211 Navigating man pages in Linux.md +++ b/sources/tech/20200211 Navigating man pages in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 37b694ee849170a91c72aeacbed15599e50da453 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 11:59:48 +0800 Subject: [PATCH 057/394] TSL --- .../20200211 Navigating man pages in Linux.md | 179 ------------------ .../20200211 Navigating man pages in Linux.md | 172 +++++++++++++++++ 2 files changed, 172 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20200211 Navigating man pages in Linux.md create mode 100644 translated/tech/20200211 Navigating man pages in Linux.md diff --git a/sources/tech/20200211 Navigating man pages in Linux.md b/sources/tech/20200211 Navigating man pages in Linux.md deleted file mode 100644 index 0d90822c52..0000000000 --- a/sources/tech/20200211 Navigating man pages in Linux.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Navigating man pages in Linux) -[#]: via: (https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Navigating man pages in Linux -====== -The man pages on a Linux system can do more than provide information on particular commands. They can help discover commands you didn't realize were available. -[Hello I'm Nik][1] [(CC0)][2] - -Man pages provide essential information on Linux commands and many users refer to them often, but there’s a lot more to the man pages than many of us realize. - -You can always type a command like “man who” and get a nice description of how the man command works, but exploring commands that you might not know could be even more illuminating. For example, you can use the man command to help identify commands to handle some unusually challenging task or to show options that can help you use a command you already know in new and better ways. - -Let’s navigate through some options and see where we end up. - -[MORE ON NETWORK WORLD: Linux: Best desktop distros for newbies][3] - -### Using man to identify commands - -The man command can help you find commands by topic. If you’re looking for a command to count the lines in a file, for example, you can provide a keyword. In the example below, we’ve put the keyword in quotes and added blanks so that we don’t get commands that deal with “accounts” or “accounting” along with those that do some counting for us. - -``` -$ man -k ' count ' -anvil (8postfix) - Postfix session count and request rate control -cksum (1) - checksum and count the bytes in a file -sum (1) - checksum and count the blocks in a file -timer_getoverrun (2) - get overrun count for a POSIX per-process timer -``` - -To show commands that relate to new user accounts, we might try a command like this: - -``` -$ man -k "new user" -newusers (8) - update and create new users in batch -useradd (8) - create a new user or update default new user information -zshroadmap (1) - informal introduction to the zsh manual The Zsh Manual, … -``` - -Just to be clear, the third item in the list above makes a reference to “new users” liking the material and is not a command for setting up, removing or configuring user accounts. The man command is simply matching words in the command description, acting very much like the apropos command. Notice the numbers in parentheses after each command listed above. These relate to the man page sections that contain the commands. - -### Identifying the manual sections - -The man command sections divide the commands into categories. To list these categories, type “man man” and look for descriptions like those below. You very likely won’t have Section 9 commands on your system. - -[][4] - -``` -1 Executable programs or shell commands -2 System calls (functions provided by the kernel) -3 Library calls (functions within program libraries) -4 Special files (usually found in /dev) -5 File formats and conventions eg /etc/passwd -6 Games -7 Miscellaneous (including macro packages and conventions), e.g. - man(7), groff(7) -8 System administration commands (usually only for root) -9 Kernel routines [Non standard] -``` - -Man pages cover more than what we typically think of as “commands”. As you can see from the above descriptions, they cover system calls, library calls, special files and more. - -The listing below shows where man pages are actually stored on Linux systems. The dates on these directories will vary because, with updates, some of these sections will get new content while others will not. - -``` -$ ls -ld /usr/share/man/man? -drwxr-xr-x 2 root root 98304 Feb 5 16:27 /usr/share/man/man1 -drwxr-xr-x 2 root root 65536 Oct 23 17:39 /usr/share/man/man2 -drwxr-xr-x 2 root root 270336 Nov 15 06:28 /usr/share/man/man3 -drwxr-xr-x 2 root root 4096 Feb 4 10:16 /usr/share/man/man4 -drwxr-xr-x 2 root root 28672 Feb 5 16:25 /usr/share/man/man5 -drwxr-xr-x 2 root root 4096 Oct 23 17:40 /usr/share/man/man6 -drwxr-xr-x 2 root root 20480 Feb 5 16:25 /usr/share/man/man7 -drwxr-xr-x 2 root root 57344 Feb 5 16:25 /usr/share/man/man8 -``` - -Note that the man page files are generally **gzipped** to save space. The man command unzips them as needed whenever you use the man command. - -``` -$ ls -l /usr/share/man/man1 | head -10 -total 12632 -lrwxrwxrwx 1 root root 9 Sep 5 06:38 [.1.gz -> test.1.gz --rw-r--r-- 1 root root 563 Nov 7 05:07 2to3-2.7.1.gz --rw-r--r-- 1 root root 592 Apr 23 2016 411toppm.1.gz --rw-r--r-- 1 root root 2866 Aug 14 10:36 a2query.1.gz --rw-r--r-- 1 root root 2361 Sep 9 15:13 aa-enabled.1.gz --rw-r--r-- 1 root root 2675 Sep 9 15:13 aa-exec.1.gz --rw-r--r-- 1 root root 1142 Apr 3 2018 aaflip.1.gz --rw-r--r-- 1 root root 3847 Aug 14 10:36 ab.1.gz --rw-r--r-- 1 root root 2378 Aug 23 2018 ac.1.gz -``` - -### Listing man pages by section - -Even just looking at the first 10 man pages in Section 1 (as shown above), you are likely to see some commands that are new to you – maybe **a2query** or **aaflip** (shown above). - -An even better strategy for exploring commands is to list commands by section without looking at the files themselves but, instead, using a man command that shows you the commands and provides a brief description of each. - -In the command below, the **-s 1** instructs man to display information on commands in section 1. The **-k .** makes the command work for all commands rather than specifying a particular keyword; without this, the man command would come back and ask “What manual page do you want?” So, use a keyword to select a group of related commands or a dot to show all commands in a section. - -``` -$ man -s 1 -k . -2to3-2.7 (1) - Python2 to Python3 converter -411toppm (1) - convert Sony Mavica .411 image to ppm -as (1) - the portable GNU assembler. -baobab (1) - A graphical tool to analyze disk usage -busybox (1) - The Swiss Army Knife of Embedded Linux -cmatrix (1) - simulates the display from "The Matrix" -expect_dislocate (1) - disconnect and reconnect processes -red (1) - line-oriented text editor -enchant (1) - a spellchecker -… -``` - -### How many man pages are there? - -If you’re curious about how many man pages there are in each section, you can count them by section with a command like this: - -``` -$ for num in {1..8} -> do -> man -s $num -k . | wc -l -> done -2382 -493 -2935 -53 -441 -11 -245 -919 -``` - -The exact number may vary, but most Linux systems will have a similar number of commands. If we use a command that adds these numbers together, we can see that the system that this command is running on has nearly 7,500 man pages. That’s a lot of commands, system calls, etc. - -``` -$ for num in {1..8} -> do -> num=`man -s $num -k . | wc -l` -> tot=`expr $num + $tot` -> echo $tot -> done -2382 -2875 -5810 -5863 -6304 -6315 -6560 -7479 <=== total -``` - -There’s a lot you can learn by reading man pages, but exploring them in other ways can help you become aware of commands you may not have known were available on your system. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html - -作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://unsplash.com/photos/YiRQIglwYig -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/slideshow/153439/linux-best-desktop-distros-for-newbies.html#tk.nww-infsb -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/translated/tech/20200211 Navigating man pages in Linux.md b/translated/tech/20200211 Navigating man pages in Linux.md new file mode 100644 index 0000000000..5a160269e9 --- /dev/null +++ b/translated/tech/20200211 Navigating man pages in Linux.md @@ -0,0 +1,172 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Navigating man pages in Linux) +[#]: via: (https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +在 Linux 中遨游手册页的海洋 +====== + +> Linux 系统上的手册页可以做的不仅仅是提供特定命令的信息。它们可以帮助你发现你没有意识到的命令。 + +[Hello I'm Nik][1] [(CC0)][2] + +手册页提供了关于 Linux 命令的基本信息,很多用户经常参考它,但手册页的内容比我们很多人意识到的要多得多。 + +你总是可以输入一个像 `man who` 这样的命令,然后得到 `who` 命令的工作原理的漂亮描述,但是探索你可能不知道的命令可能会更有启发。例如,你可以使用 `man` 命令来帮助确定处理一些非常具有挑战性的任务的命令,或者显示一些选项,这些选项可以帮助你以新的更好的方式使用你已经知道的命令。 + +让我们来浏览一些选项,看看最终的结果是什么。 + +### 用 man 去识别命令 + +`man` 命令可以帮助你按主题查找命令。例如,如果你要找一个计算文件中的行数的命令,你可以提供一个关键字。在下面的例子中,我们把关键字 “count” 放在了引号中,并添加了空格,这样我们就不会得到与 “accounts” 或 “accounting” 相关的命令,而是得到那些可以为我们做一些计算的命令。 + +``` +$ man -k ' count ' +anvil (8postfix) - Postfix session count and request rate control +cksum (1) - checksum and count the bytes in a file +sum (1) - checksum and count the blocks in a file +timer_getoverrun (2) - get overrun count for a POSIX per-process timer +``` + +为了显示与新用户账户相关的命令,我们可以尝试使用这样的命令。 + +``` +$ man -k "new user" +newusers (8) - update and create new users in batch +useradd (8) - create a new user or update default new user information +zshroadmap (1) - informal introduction to the zsh manual The Zsh Manual, … +``` + +需要说明的是,上面的第三项只是提到 “new users” 类似的内容,并不是设置、删除或配置用户账号的命令。`man` 命令只是在命令描述中匹配了一些词,作用很像 `apropos` 命令。注意上面列出的每个命令后面的括号中的数字。这些数字与包含这些命令的手册页的部分有关。 + +### 确定手册页的部分 + +`man` 命令部分将命令划分为不同的类别。要列出这些类别,请键入 `man man`,并查看类似下面的描述。你的系统中很可能没有第 9 部分的命令。 + +- `1`:可执行程序或 shell 命令 +- `2`:系统调用(内核提供的函数) +- `3`:库调用(程序库内的函数) +- `4`:特殊文件(通常在可以 `/dev` 中找到) +- `5`:文件格式和惯例,例如 `/etc/passwd` +- `6`:游戏 +- `7`:杂项(包括宏包和约定),例如 `man`(7)、`groff`(7) +- `8`:系统管理命令(通常只由 root 用户使用) +- `9`:内核例程(非标准) + +手册页涵盖了比我们通常认为的“命令”更多的内容。从上面的描述中可以看到,它们涵盖了系统调用、库调用、特殊文件等等。 + +下面的列表显示了 Linux 系统中的手册页的实际存储位置。这些目录上的日期会有所不同,因为随着更新,其中一些部分会有新的内容,而另一些则不会。 + +``` +$ ls -ld /usr/share/man/man? +drwxr-xr-x 2 root root 98304 Feb 5 16:27 /usr/share/man/man1 +drwxr-xr-x 2 root root 65536 Oct 23 17:39 /usr/share/man/man2 +drwxr-xr-x 2 root root 270336 Nov 15 06:28 /usr/share/man/man3 +drwxr-xr-x 2 root root 4096 Feb 4 10:16 /usr/share/man/man4 +drwxr-xr-x 2 root root 28672 Feb 5 16:25 /usr/share/man/man5 +drwxr-xr-x 2 root root 4096 Oct 23 17:40 /usr/share/man/man6 +drwxr-xr-x 2 root root 20480 Feb 5 16:25 /usr/share/man/man7 +drwxr-xr-x 2 root root 57344 Feb 5 16:25 /usr/share/man/man8 +``` + +注意,为了节省空间,手册页文件一般都是 gzip 压缩的。每当你使用 `man` 命令时,`man` 命令会根据需要解压。 + +``` +$ ls -l /usr/share/man/man1 | head -10 +total 12632 +lrwxrwxrwx 1 root root 9 Sep 5 06:38 [.1.gz -> test.1.gz +-rw-r--r-- 1 root root 563 Nov 7 05:07 2to3-2.7.1.gz +-rw-r--r-- 1 root root 592 Apr 23 2016 411toppm.1.gz +-rw-r--r-- 1 root root 2866 Aug 14 10:36 a2query.1.gz +-rw-r--r-- 1 root root 2361 Sep 9 15:13 aa-enabled.1.gz +-rw-r--r-- 1 root root 2675 Sep 9 15:13 aa-exec.1.gz +-rw-r--r-- 1 root root 1142 Apr 3 2018 aaflip.1.gz +-rw-r--r-- 1 root root 3847 Aug 14 10:36 ab.1.gz +-rw-r--r-- 1 root root 2378 Aug 23 2018 ac.1.gz +``` + +### 按部分列出的手册页 + +即使只看第 1 部分的前 10 个手册页(如上所示),你也可能会看到一些新的命令 —— 也许是 `a2query` 或 `aaflip`(如上所示)。 + +探索命令的更好策略是按节列出命令,不查看文件本身,而是使用 `man` 命令向你显示命令并提供每个命令的简要说明。 + +在下面的命令中,`-s 1` 指示 `man` 显示第 1 部分中的命令信息。`-k .` 使该命令对所有命令都有效,而不是指定一个特定的关键字;如果没有这个,`man` 命令就会回过头来问:“你想要什么手册页?”所以,使用关键字来选择一组相关的命令,或者使用点来显示一个部分中的所有命令。 + +``` +$ man -s 1 -k . +2to3-2.7 (1) - Python2 to Python3 converter +411toppm (1) - convert Sony Mavica .411 image to ppm +as (1) - the portable GNU assembler. +baobab (1) - A graphical tool to analyze disk usage +busybox (1) - The Swiss Army Knife of Embedded Linux +cmatrix (1) - simulates the display from "The Matrix" +expect_dislocate (1) - disconnect and reconnect processes +red (1) - line-oriented text editor +enchant (1) - a spellchecker +… +``` + +### 有几本手册页? + +如果你对每个部分中有多少手册页感到好奇,可以使用以下命令按部分对它们进行计数: + +``` +$ for num in {1..8} +> do +> man -s $num -k . | wc -l +> done +2382 +493 +2935 +53 +441 +11 +245 +919 +``` + +确切的数量可能有所不同,但是大多数 Linux 系统的命令数量差不多。如果我们使用命令将这些数字加在一起,我们可以看到运行该命令的系统上有将近 7500 个手册页。有很多命令,系统调用等。 + +``` +$ for num in {1..8} +> do +> num=`man -s $num -k . | wc -l` +> tot=`expr $num + $tot` +> echo $tot +> done +2382 +2875 +5810 +5863 +6304 +6315 +6560 +7479 <=== total +``` + +阅读手册页可以学到很多东西,但是以其他方式浏览手册页可以帮助你了解系统上可能不知道的命令。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html + +作者:[Sandra Henry-Stocker][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://unsplash.com/photos/YiRQIglwYig +[2]: https://creativecommons.org/publicdomain/zero/1.0/ +[3]: https://www.networkworld.com/slideshow/153439/linux-best-desktop-distros-for-newbies.html#tk.nww-infsb +[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 15a4fb2a6e1e2d42a75143f627597d62f8703001 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 12:30:46 +0800 Subject: [PATCH 058/394] PRF @tinyeyeser --- ...ontrol the firewall at the command line.md | 54 +++++++++---------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/translated/tech/20200320 Control the firewall at the command line.md b/translated/tech/20200320 Control the firewall at the command line.md index d496e169a1..e9b0699347 100644 --- a/translated/tech/20200320 Control the firewall at the command line.md +++ b/translated/tech/20200320 Control the firewall at the command line.md @@ -1,47 +1,47 @@ [#]: collector: "lujun9972" -[#]: translator: "tinyeyeser " -[#]: reviewer: " " +[#]: translator: "tinyeyeser" +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "Control the firewall at the command line" [#]: via: "https://fedoramagazine.org/control-the-firewall-at-the-command-line/" [#]: author: "Paul W. Frields https://fedoramagazine.org/author/pfrields/" -命令行下玩转防火墙(Fedora) +在 Fedora 命令行下玩转防火墙 ====== -![][1] +![](https://img.linux.net.cn/data/attachment/album/202004/12/123040ghxuicphyhsoppch.jpg) 网络防火墙,顾名思义:为了阻止不需要的网络连接而设置的防护性屏障。在与外界建立连接或是提供网络服务时常常会用到。例如,在学校或是咖啡厅里使用笔记本电脑时,你一定不想某个陌生人窥探你的电脑。 -每个 Fedora 系统都内置了一款防火墙。这是 Linux 内核网络功能的一部分。本文介绍如何通过 *firewall-cmd* 命令修改防火墙的配置。 +每个 Fedora 系统都内置了一款防火墙。这是 Linux 内核网络功能的一部分。本文介绍如何通过 `firewall-cmd` 命令修改防火墙的配置。 ### 网络基础 本文并不教授计算机网络的[所有知识][2],但还是会简单介绍一些网络基础。 -网络中的所有计算机都有一个 *IP 地址*,可以把它想象成一个邮箱地址,有了邮箱地址,邮件才知道发往何处。每台计算机还会拥有一组*端口*,端口号范围从0到65535。同样的,你可以把这些端口想象成用来连接邮箱地址的连接点。 +网络中的所有计算机都有一个 *IP 地址*,可以把它想象成一个邮箱地址,有了邮箱地址,邮件才知道发往何处。每台计算机还会拥有一组*端口*,端口号范围从 0 到 65535。同样的,你可以把这些端口想象成用来连接邮箱地址的连接点。 -通常情况下,端口会是一个标准端口号或是根据应用程序的应答要求选定的一个端口范围。例如,一台 web server 通常会保留 80 端口用于 HTTP 通信,443 端口用于 HTTPS。小于1024的端口主要用于系统或常见用途,1024-49151端口用于注册,49152及以上端口多为临时使用(只短时间启用)。 +通常情况下,端口会是一个标准端口号或是根据应用程序的应答要求选定的一个端口范围。例如,一台 Web 服务器通常会保留 80 端口用于 HTTP 通信,443 端口用于 HTTPS。小于 1024 的端口主要用于系统或常见用途,1024-49151 端口是已经注册的,49152 及以上端口多为临时使用(只限短时间使用)。 -互联网传输中最常见的两个协议,[TCP][4] 和 [UDP][5]。当要传输的数据很重要,不能有丢包时,就使用TCP协议,如果数据包没有按顺序到达,还需要重组为正确的顺序。UDP协议则更多用于对时间敏感的服务,为了保证时效性,有时允许丢失部分数据。 +互联网传输中最常见的两个协议,[TCP][4] 和 [UDP][5]。当要传输的数据很重要,不能有丢包时,就使用 TCP 协议,如果数据包没有按顺序到达,还需要重组为正确的顺序。UDP 协议则更多用于对时间敏感的服务,为了保证时效性,有时允许丢失部分数据。 -系统中运行的应用,例如 web server,会保留一些端口(例如上文提到的80和443)。在网络传输过程中,主机会为传输的两端建立一个链接,一端是源地址和源端口,另一端是目的地址和目的端口。 +系统中运行的应用,例如 Web 服务器,会保留一些端口(例如上文提到的 80 和 443)。在网络传输过程中,主机会为传输的两端建立一个链接,一端是源地址和源端口,另一端是目的地址和目的端口。 -网络防火墙就是基于地址、端口及其他标准的一组规则集,来对网络数据的传输进行屏蔽或阻断的。通过 *fire-cmd* 命令,我们就可以查看或修改防火墙的工作配置。 +网络防火墙就是基于地址、端口及其他标准的一组规则集,来对网络数据的传输进行屏蔽或阻断的。通过 `firewall-cmd` 命令,我们就可以查看或修改防火墙的工作配置。 ### 防火墙域(zone) -为了验证防火墙是否开启,使用 *firewall-cmd* 命令,输入时要加上[sudo](https://fedoramagazine.org/howto-use-sudo/)。(通常,在运行了[PolicyKit](https://en.wikipedia.org/wiki/Polkit)的环境中,你也可以不加 *sudo*) +为了验证防火墙是否开启,使用 `firewall-cmd` 命令,输入时要加上 [sudo](https://fedoramagazine.org/howto-use-sudo/)。(通常,在运行了 [PolicyKit](https://en.wikipedia.org/wiki/Polkit) 的环境中,你也可以不加 `sudo`) ``` $ sudo firewall-cmd --state running ``` -firewalld 服务支持任意数量的域。每个域都可以拥有独立的配置和防护规则。一台 Fedora 工作站的外部接口(例如 WIFI 或有线网卡)其默认域为 *FedoraWorkstation*。 +firewalld 服务支持任意数量的域。每个域都可以拥有独立的配置和防护规则。一台 Fedora 工作站的外部接口(例如 WIFI 或有线网卡)其默认域为 `FedoraWorkstation`。 -要看有哪些域是激活状态,可以使用 *–get-active-zones* 选项。在本示例中,有两个网卡,有线以太网卡 *wlp2s0* 和虚拟( libvirt )桥接网卡 *virbr0* : +要看有哪些域是激活状态,可以使用 `-–get-active-zones` 选项。在本示例中,有两个网卡,有线以太网卡 `wlp2s0` 和虚拟(libvirt)桥接网卡 `virbr0`: ``` $ sudo firewall-cmd --get-active-zones @@ -60,58 +60,54 @@ $ sudo firewall-cmd --get-zones FedoraServer FedoraWorkstation block dmz drop external home internal libvirt public trusted work ``` -查询默认域中防火墙放行了哪些系统,使用 *–list-services* 选项。下例给出了一个定制系统的查询结果,你可以看到与常见的结果有些不同。 +查询默认域中防火墙放行了哪些系统,使用 `-–list-services` 选项。下例给出了一个定制系统的查询结果,你可以看到与常见的结果有些不同。 ``` $ sudo firewall-cmd --list-services dhcpv6-client mdns samba-client ssh ``` -该系统对外开启了四个服务。每个服务都对应一个常见端口。例如 *ssh* 服务对应 22 端口。 +该系统对外开启了四个服务。每个服务都对应一个常见端口。例如 `ssh` 服务对应 22 端口。 -如果要查看当前域中防火墙还开启了哪些端口,可以使用 *list-ports* 选项。当然,你也可以随时对其他域进行查询: +如果要查看当前域中防火墙还开启了哪些端口,可以使用 `--list-ports` 选项。当然,你也可以随时对其他域进行查询: ``` $ sudo firewall-cmd --list-ports --zone=FedoraWorkstation 1025-65535/udp 1025-65535/tcp ``` -结果表明,从 1025 到 65535 端口(包含UDP和TCP)默认都是开启的。 +结果表明,从 1025 到 65535 端口(包含 UDP 和 TCP)默认都是开启的。 ### 修改域、端口及服务 -以上的配置都是预先设计好的防火墙策略(design decision*)。是为了确保新手用户安装的应用都能够正常访问网络。如果你确定自己心里有数,想要一个保护性更强的策略,可以将接口放入 _FedoraServer_ 域,明确禁止所有端口的访问。_(**警告**:如果你的服务器之前是联网状态,这么做可能会导致连接中断,那你就得到机房里去修改更多的配置项!)_ +以上的配置都是预先设计好的防火墙策略。是为了确保新手用户安装的应用都能够正常访问网络。如果你确定自己心里有数,想要一个保护性更强的策略,可以将接口放入 `FedoraServer` 域,明确禁止所有端口的访问。(**警告**:如果你的服务器之前是联网状态,这么做可能会导致连接中断,那你就得到机房里去修改更多的配置项!) ``` $ sudo firewall-cmd --change-interface= --zone=FedoraServer success ``` -* _*本文并不讨论如何制定防火墙策略,Fedora社区里已经有很多讨论了。你大可以按照自身需要来修改配置。_ +**本文并不讨论如何制定防火墙策略,Fedora 社区里已经有很多讨论了。你大可以按照自身需要来修改配置。** -如果你想要开放某个服务的常见端口,可以将该服务加入默认域(或使用 _-zone_ 指定一个不同的域)。还可以一次性将其加入多个域。下例开放了 HTTP 和 HTTPS 的常见端口80、443: +如果你想要开放某个服务的常见端口,可以将该服务加入默认域(或使用 `--zone` 指定一个不同的域)。还可以一次性将其加入多个域。下例开放了 HTTP 和 HTTPS 的常见端口 80、443: ``` $ sudo firewall-cmd --add-service=http --add-service=https success ``` -并非所有的服务都有默认端口,不过大部分都是有的。使用 _–get-services_ 选项可以查看完整列表。 +并非所有的服务都有默认端口,不过大部分都是有的。使用 `-–get-services` 选项可以查看完整列表。 -如果你想指定某个特定端口号,可以直接用数字和协议进行配置。(多数情况下,_–add-service_ 和 _–add-port_ 这两个选项是合在一起使用的)下例开启的是UDP协议的网络启动服务: +如果你想指定某个特定端口号,可以直接用数字和协议进行配置。(多数情况下,`-–add-service` 和 `-–add-port` 这两个选项是合在一起使用的)下例开启的是 UDP 协议的网络启动服务: ``` $ sudo firewall-cmd --add-port=67/udp success ``` -**重要**:如果想要在系统重启或是 firewalld 服务重启后,配置仍然生效,**必须**在命令中加上 _–permanent_ 选项。本文中的例子只是临时修改了配置,下次遇到系统重启或是 firewalld 服务重启,这些配置就失效了。 +**重要**:如果想要在系统重启或是 firewalld 服务重启后,配置仍然生效,**必须**在命令中加上 `-–permanent` 选项。本文中的例子只是临时修改了配置,下次遇到系统重启或是 firewalld 服务重启,这些配置就失效了。 -以上只是 _firewall-cmd_ 和 firewalld 服务诸多功能中的一小部分。firewalld 项目的[主页][8]还有更多信息值得你去探索和尝试。 - -* * * - -_Photo by [Jakob Braun][9] on [Unsplash][10]._ +以上只是 `firewall-cmd` 和 firewalld 服务诸多功能中的一小部分。firewalld 项目的[主页][8]还有更多信息值得你去探索和尝试。 -------------------------------------------------------------------------------- @@ -120,7 +116,7 @@ via: https://fedoramagazine.org/control-the-firewall-at-the-command-line/ 作者:[Paul W. Frields][a] 选题:[lujun9972][b] 译者:[tinyeyeser](https://github.com/tinyeyeser) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a9fb67ea1394d254a1deb9fa503a223aa956c0e2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 12:31:20 +0800 Subject: [PATCH 059/394] PUB @tinyeyeser https://linux.cn/article-12103-1.html --- .../20200320 Control the firewall at the command line.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200320 Control the firewall at the command line.md (99%) diff --git a/translated/tech/20200320 Control the firewall at the command line.md b/published/20200320 Control the firewall at the command line.md similarity index 99% rename from translated/tech/20200320 Control the firewall at the command line.md rename to published/20200320 Control the firewall at the command line.md index e9b0699347..4cf7283963 100644 --- a/translated/tech/20200320 Control the firewall at the command line.md +++ b/published/20200320 Control the firewall at the command line.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "tinyeyeser" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-12103-1.html" [#]: subject: "Control the firewall at the command line" [#]: via: "https://fedoramagazine.org/control-the-firewall-at-the-command-line/" [#]: author: "Paul W. Frields https://fedoramagazine.org/author/pfrields/" From ff81e894c258a510c3ef11ed4aff836cb191881b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 21:09:07 +0800 Subject: [PATCH 060/394] APL --- ...5 years of Git- How to get started or learn something new.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20200407 15 years of Git- How to get started or learn something new.md b/sources/talk/20200407 15 years of Git- How to get started or learn something new.md index e4db52398b..2518866c9b 100644 --- a/sources/talk/20200407 15 years of Git- How to get started or learn something new.md +++ b/sources/talk/20200407 15 years of Git- How to get started or learn something new.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 92aa6de737d649b1880bec44059ac17dc667db65 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 12 Apr 2020 22:42:43 +0800 Subject: [PATCH 061/394] TSL --- ...w to get started or learn something new.md | 74 ------------------- ...w to get started or learn something new.md | 74 +++++++++++++++++++ 2 files changed, 74 insertions(+), 74 deletions(-) delete mode 100644 sources/talk/20200407 15 years of Git- How to get started or learn something new.md create mode 100644 translated/talk/20200407 15 years of Git- How to get started or learn something new.md diff --git a/sources/talk/20200407 15 years of Git- How to get started or learn something new.md b/sources/talk/20200407 15 years of Git- How to get started or learn something new.md deleted file mode 100644 index 2518866c9b..0000000000 --- a/sources/talk/20200407 15 years of Git- How to get started or learn something new.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (15 years of Git: How to get started or learn something new) -[#]: via: (https://opensource.com/article/20/4/get-started-git) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -15 years of Git: How to get started or learn something new -====== -On Git's 15th anniversary, learn why it is a major component in keeping -the software industry running. -![Scissors cutting open access to files][1] - -If there's anything that's changed software in the past two decades, [Git][2] is at the top of the list. - -If you don't use Git personally, you might think it's just a tech fad, an incidental darling among developers just because it was created by the same person who started the [Linux][3] project itself. There may be some truth to that, but Git does manage to achieve some feats that no other industry has managed. With Git, developers spread all over the world are able to work on the same code, literally at the same time, with a history of every change made, and then merge all the work together to result in a finished product. The complexity is enormous, and so the tool itself can get complex, but in the end, it's a major component in keeping the software industry running. - -Whether you know Git or not, you'll very likely encounter it should you dig deep enough into open source software or enter into computer science. Whether you use Git to just download an installer package or whether you interface with it daily to manage code, learning more about it is elucidating and empowering. - -### Git terminology - -As with any specialized tool, there's a lot of jargon in Git. Terms like "clone" and "merge" and "rebase" are mysterious at best, and at worst can feel almost exclusionary. Trying to understand what all of these terms mean can be overwhelming, but not if you take a little guidance from Matthew Broberg's excellent [Git Terminology 101][4] article. In just one quick read, you'll be able to listen in on conversations about Git with real comprehension. - -### Getting started with Git - -If you need to know how to use Git, then my own [introductory article series about using Git][5] is a great place to start. The articles are several years old now, but as with so many Linux and UNIX technologies, the interface hasn't changed significantly, so the articles are as relevant today as they were when I wrote them. The series introduces you to the most basic concepts of Git, and steps you through the process of creating a repository, committing files, restoring files, merging branches, and much more. - -### Common Git services - -One of the most common uses of Git is a public Git hosting service, such as GitLab and GitHub. In his [How to clone, modify, add, and delete files in Git][6] article, Kedar Vijay Kulkarni demonstrates the everyday tasks most developers perform with Git. This isn't required reading for non-developers, but it's a must for anyone who wants to contribute to a project on a public Git hosting service. This article addresses Github specifically because it's one of the most common platforms today, but the principles apply to any web front-end for Git, including popular open source frameworks like [GitLab][7], [Gogs][8], and [Gitea][9]. - -### Try this Git walkthrough - -Do you prefer a guided tour to aimless exploration? Sometimes the easiest way to learn something is to mimic someone else's exact steps. You know the end result is a guaranteed success, so you have confidence while performing the exercise, and your brain and fingers get the benefit of repetition, which builds memory. If that's your learning style, then follow along with Alan Formy-Duvall's [practical learning exercise for Git][10] and find out what a successful Git session feels like. - -### Git apps - -Believe it or not, Git has more interfaces than text you type into a terminal. Obviously there are the web interfaces of Git hosts online, but you can use Git clients on your computer, too. For just a light layer of assistance, read Jesse Duffield's article about [Lazygit][11] or Olaf Anders' article about [Tig][12]. For the full graphical application experience, read my article about [Git-cola][13], [Sparkleshare][14], and [still others][15]. And yes, there are even [interfaces for your mobile devices][16]! - -### Learn more about Git - -Knowledge is power, so don't let Git be a mystery to you. Whether you use it directly or you only know it by name or you'd never heard of it before, now's a great time to learn about Git. There are great resources out there to help you understand how it works, why it works, and why people love it so much.  Dive in, take it at your own pace, and learn to love Git! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/get-started-git - -作者:[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/document_free_access_cut_security.png?itok=ocvCv8G2 (Scissors cutting open access to files) -[2]: https://en.wikipedia.org/wiki/Git -[3]: https://opensource.com/resources/linux -[4]: https://opensource.com/article/19/2/git-terminology -[5]: https://opensource.com/life/16/7/stumbling-git -[6]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files -[7]: https://about.gitlab.com/install/ -[8]: https://gogs.io/ -[9]: https://gitea.io/en-us/ -[10]: https://opensource.com/article/19/5/practical-learning-exercise-git -[11]: https://opensource.com/article/20/3/lazygit -[12]: https://opensource.com/article/19/6/what-tig -[13]: https://opensource.com/article/20/3/git-cola -[14]: https://opensource.com/article/19/4/file-sharing-git -[15]: https://opensource.com/life/16/8/graphical-tools-git -[16]: https://opensource.com/article/19/4/calendar-git#mobile diff --git a/translated/talk/20200407 15 years of Git- How to get started or learn something new.md b/translated/talk/20200407 15 years of Git- How to get started or learn something new.md new file mode 100644 index 0000000000..0c68509dd5 --- /dev/null +++ b/translated/talk/20200407 15 years of Git- How to get started or learn something new.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (15 years of Git: How to get started or learn something new) +[#]: via: (https://opensource.com/article/20/4/get-started-git) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +15 岁的 Git:如何入门或学习点新东西 +====== +> 在 Git 15 周年之际,了解为什么 Git 是保持软件行业运行的重要组成部分。 + +![Scissors cutting open access to files][1] + +如果说过去二十年来有什么东西改变了软件,那么 [Git][2] 位列榜首。 + +如果你没有亲自使用过 Git,你可能会认为它只是一种技术时尚,只是因为它是由 [Linux][3] 项目的创始人创建的,所以在开发者中只是一个偶然的宠儿。这或许有一定的道理,但 Git 确实取得了一些其他行业所没有的成就。有了 Git,分布在世界各地的开发者们可以在同一时间对同一段代码进行工作,并记录下每一次修改的历史,然后将所有的工作合并到一起,形成一个成品。由于这件事情非常复杂,所以这个工具本身也会变得很复杂,但归根结底,它是维持软件行业运行的重要组成部分。 + +无论你是否了解 Git,如果你足够深入的研究开源软件,或者进入计算机科学领域,都有可能遇到它。无论你使用 Git 只是为了下载一个安装包,还是每天与它交互来管理代码,了解更多关于它的知识,都会对你有很大的启发和帮助。 + +### Git 术语 + +与任何专业工具一样,Git 中也有很多行话。像“克隆clone”、“合并merge”和“变基rebase”这样的术语,充其量是神秘的,而最坏的情况下,会让人感觉到几乎是排斥性的。试图理解这些术语的含义可能会让人不知所措,但如果你从 Matthew Broberg 的优秀文章《[Git 术语基础][4]》中得到一点指导,就不会这样了。只需快速阅读一下,你就能真正理解地听懂关于 Git 的对话。 + +### Git 入门 + +如果你需要知道如何使用 Git,那么我自己的[关于使用 Git 的入门文章系列][5]是一个很好的开始。这些文章已经有几年的历史了,但就像许多 Linux 和 UNIX 技术一样,它的界面并没有发生很大的变化,所以这些文章和我写这些文章那时一样,在今天还是很有意义的。这一系列文章向你介绍了 Git 最基本的概念,并带领你完成创建仓库、提交文件、恢复文件、合并分支等过程。 + +### 常见的Git服务 + +Git 最常见的用途之一是公共的 Git 托管服务,比如 GitLab 和 GitHub。Kedar Vijay Kulkarni 在他的《[如何在 Git 中克隆、修改、添加和删除文件][6]》一文中,演示了大多数开发者使用 Git 执行的日常任务。这不是非开发者的必读书目,但对于任何想在公共 Git 托管服务上为项目做贡献的人来说,这篇文章是必读的。这篇文章专门针对的是 Github,因为它是当今最常见的平台之一,但其原理也适用于任何 Git 的 Web 前端,包括 [GitLab][7]、[Gogs][8] 和 [Gitea][9] 等流行的开源框架。 + +### 试试这个 Git 演练 + +与其漫无目的的探索,你是不是更喜欢在导游的带领下学习?有时候,学习一件事最简单的方法就是模仿别人的准确步骤。你知道最终的结果是成功的保证,所以你在进行练习的时候会有信心,而你的大脑和手指也会得到重复的好处,从而建立起记忆。如果这是你的学习风格,那就跟着 Alan Formy-Duvall 的《[Git 的实用学习练习][10]》,找出成功的 Git 课程的感觉。 + +### Git 应用程序 + +信不信由你,Git 的界面比你在终端输入的文字更多。显然,在线托管的 Git 有 Web 界面,但是你也可以在计算机上使用 Git 客户端。如果想获得更多的帮助,请阅读 Jesse Duffield 关于 [Lazygit][11] 的文章或 Olaf Anders 关于 [Tig][12] 的文章。要获得完整的图形应用程序体验,请阅读我有关 [Git-cola][13]、[Sparkleshare][14] 以及[其它应用][15]的文章。是的,甚至还有[用于你的移动设备的界面][16]! + +### 了解更多关于 Git 的信息 + +知识就是力量,所以不要让 Git 对你来说是个谜。无论你是直接使用它,还是只知道它的名字,或者你以前从未听说过它,现在都是了解 Git 的好时机。这里有很多资源可以帮助你了解它的工作原理、工作原理以及人们为什么这么喜欢它。潜入其中,按照自己的节奏来学习,并学会爱上 Git 吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/get-started-git + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/document_free_access_cut_security.png?itok=ocvCv8G2 (Scissors cutting open access to files) +[2]: https://en.wikipedia.org/wiki/Git +[3]: https://opensource.com/resources/linux +[4]: https://opensource.com/article/19/2/git-terminology +[5]: https://opensource.com/life/16/7/stumbling-git +[6]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files +[7]: https://about.gitlab.com/install/ +[8]: https://gogs.io/ +[9]: https://gitea.io/en-us/ +[10]: https://opensource.com/article/19/5/practical-learning-exercise-git +[11]: https://opensource.com/article/20/3/lazygit +[12]: https://opensource.com/article/19/6/what-tig +[13]: https://opensource.com/article/20/3/git-cola +[14]: https://opensource.com/article/19/4/file-sharing-git +[15]: https://opensource.com/life/16/8/graphical-tools-git +[16]: https://opensource.com/article/19/4/calendar-git#mobile From 2df2462f5089120a37e90c459d047821f5449f93 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 12 Apr 2020 22:50:39 +0800 Subject: [PATCH 062/394] Update 20190814 9 open source cloud native projects to consider.md --- ... source cloud native projects to consider.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index 7e844d2605..5a0ea56b9e 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -257,11 +257,18 @@ Etcd is a distributed, reliable key-value store for the most critical data in a * Speed (benchmarked at 10,000 writes per second) * Reliability (distributed using Raft) +Etcd是用于分布式系统中最关键数据的分布式的,可靠的键值存储。 其主要特性有: + *定义明确的,面向用户的API(gRPC) + *客户端证书验证可选的自动TLS + *速度(可达每秒10,000次写入) + *可靠性(使用Raft实现分布式) Etcd is used as a built-in default data storage for Kubernetes and many other technologies. That said, it is rarely run independently or as a separate service; instead, it utilizes the one integrated into Kubernetes, OKD/OpenShift, or another service. There is also an [etcd Operator][35] to manage its lifecycle and unlock its API management capabilities: +Etcd是Kubernetes和许多其他技术的默认的内置数据存储方案。也就是说,它很少独立运行或作为单独的服务运行; 相反,它利用了集成到Kubernetes,OKD / OpenShift或其他服务中的一个。 还有[etcd Operator][35]来管理其生命周期并解锁其API管理功能: You can learn more in [etcd’s documentation][36] and access its [source code][16] on GitHub. +您可以在[etcd文档][36]中了解更多信息,并在GitHub上访问其[源码][16]。 ### CRI-O @@ -272,21 +279,27 @@ CRI-O is an Open Container Initiative (OCI)-compliant implementation of the Kube * Storage and management of image layers using containers/storage * Networking support through the Container Network Interface (CNI) +CRI-O是Kubernetes运行时接口的兼容开放容器倡议(OCI)实现。 CRI-O用于各种功能,包括: + *使用runc(或遵从OCI运行时规范的任何实现)和OCI运行时工具运行 + *使用容器/镜像进行镜像管理 + *使用容器/存储来存储和管理镜像层 + *通过容器网络接口(CNI)来提供网络支持 CRI-O provides plenty of [documentation][37], including guides, tutorials, articles, and even podcasts, and you can also access its [GitHub page][17]. +CRI-O提供了大量的[文档][37],包括指南,教程,文章,甚至播客,您还可以访问其[GitHub页面][17]。 * * * Did I miss an interesting open source cloud-native project? Please let me know in the comments. - +我错过了其他有趣且开源的云原生项目吗? 请在评论中提醒我。 -------------------------------------------------------------------------------- via: https://opensource.com/article/19/8/cloud-native-projects 作者:[Bryant Son][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[messon007](https://github.com/messon007) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 89e7c33235403407b11c5bc31e4499ca32100dd0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 13 Apr 2020 00:59:35 +0800 Subject: [PATCH 063/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200413=20How=20?= =?UTF-8?q?to=20Add=20Multiple=20Time=20Zones=20in=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md --- ...ow to Add Multiple Time Zones in Ubuntu.md | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md diff --git a/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md b/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md new file mode 100644 index 0000000000..3dc42a5247 --- /dev/null +++ b/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md @@ -0,0 +1,92 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Add Multiple Time Zones in Ubuntu) +[#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Add Multiple Time Zones in Ubuntu +====== + +_**This quick tutorial shows the steps for adding additional clocks for multiple time zones in Ubuntu and other distributions using GNOME desktop environment.**_ + +If you have family members or colleagues in another country or if you live in a country with multiple time zones, keeping a track of the time difference becomes important. After all, you don’t want to disturb someone by calling at 4’o clock in the morning. + +Some Linux users also keep a tab on the [UTC time][1] because an overwhelming majority of servers use UTC. + +Situations like these can be managed better if you have multiple clocks. You can set one clock to your local time and sync other clock(s) to other time zone(s). It makes keep an eye on the different times easier. + +In this quick tutorial, I’ll show you how to add additional clocks in Ubuntu and other Linux distributions that use GNOME desktop environment. + +### Adding multiple time zone clocks in Ubuntu (and other Linux using GNOME) + +Please [check which desktop environment you are using][2]. This tutorial is suitable for GNOME desktop only. + +To add additional clocks, you can use a nifty little app unsurprisingly called [GNOME Clocks][3]. + +GNOME Clocks is a simple application that shows the time and date in multiple locations. You can also use it to set alarms or timers. Stopwatch feature is also included. + +GNOME Clocks is available in the universe repository in Ubuntu. So please make sure to [enable universe repository][4] first. + +You can search for GNOME Clocks in Software Center and install it from there. + +![Gnome Clocks Ubuntu Software Center][5] + +Alternatively, you can open a terminal and use the following command to install GNOME Clocks: + +``` +sudo apt install gnome-clocks +``` + +If you are using some other Linux distribution, please use your distribution’s software center or package manager to install this application. + +Once you have installed it, search for it by pressing the super key (Windows key) and typing clocks: + +![Gnome Clocks App Search Ubuntu][6] + +Start the application and you should see an interface that provides you a few options like adding world clock, setting alarms, use stopwatch and timer. + +Click on the + sign in the top left corner it will give you an option to search for a geographical location. Search it, select it and add it. + +![Adding additional clocks][7] + +Once you have added the required time zone(s) via its geographical location, you can see that this new clock is now added in the message try. It also shows the time difference between your local time and other time zones. + +![Multiple clocks for multiple time zones][8] + +You can use Super + M keys to quickly open the message tray. There are some more [useful Ubuntu shortcuts][9] you may master and save your time. + +If you want to remove the additional clocks, you can do that from the GNOME Clocks application interface: + +![Remove Additional Clocks][10] + +You cannot delete your current time zone and set it to something else. There are other ways [to change your current time zone in Linux][11]. + +I hope you liked this quick tip. Questions and suggestions are always welcome. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/add-multiple-time-zones-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://en.wikipedia.org/wiki/Coordinated_Universal_Time +[2]: https://itsfoss.com/find-desktop-environment/ +[3]: https://wiki.gnome.org/Apps/Clocks +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-ubuntu-software-center.jpg?ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-app-search-ubuntu.jpg?ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/add-multiple-time-zones-gnome.jpg?ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/multiple-clocks-ubuntu.jpg?ssl=1 +[9]: https://itsfoss.com/ubuntu-shortcuts/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/remove-additional-clocks-ubuntu.jpg?ssl=1 +[11]: https://itsfoss.com/change-timezone-ubuntu/ From a01d8a0b4bf2ea624ab088afe0f5bc8b2ab6c935 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 13 Apr 2020 01:01:31 +0800 Subject: [PATCH 064/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200412=20Use=20?= =?UTF-8?q?this=20helpful=20Bash=20script=20when=20stargazing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200412 Use this helpful Bash script when stargazing.md --- ...his helpful Bash script when stargazing.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20200412 Use this helpful Bash script when stargazing.md diff --git a/sources/tech/20200412 Use this helpful Bash script when stargazing.md b/sources/tech/20200412 Use this helpful Bash script when stargazing.md new file mode 100644 index 0000000000..f9e39e5632 --- /dev/null +++ b/sources/tech/20200412 Use this helpful Bash script when stargazing.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Use this helpful Bash script when stargazing) +[#]: via: (https://opensource.com/article/20/4/linux-astronomy) +[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) + +Use this helpful Bash script when stargazing +====== +Keep your eyes on the stars by putting your Linux machine in night +vision mode with xcalib. +![Computer laptop in space][1] + +We often talk about [Linux][2] being used on servers and by developers, but it is used in many other fields too, including astronomy. There are a lot of astronomy tools available for Linux, such as sky maps, star charts, and interfaces to telescope drive systems for controlling your telescope. But one challenge for astronomers is using a computer while keeping their eyes working in the dark. + +When working out in the field at night, astronomers need to preserve their night vision. It can take up to 30 minutes for the human eye to fully dilate and adjust to low light levels, and doing things like checking a phone or laptop at the regular color and brightness levels can cause the eyes to lose their adjustment. This reduces the ability to see in the dark. An example anyone can understand: if you're reading something on your phone in bed at night and get up to go to the bathroom, you know how difficult it can be to see any obstacles that might be in your way. + +### A solution + +I'd like to present a nifty little script to help the astronomer in your family keep "their eyes" in the dark. It relies on a utility called [xcalib][3], a "tiny monitor calibration loader for X.org." It can be installed easily using your Linux package manager. + +On Fedora, for example: + + +``` +$ sudo dnf info xcalib +$ sudo dnf install xcalib +``` + +Or Ubuntu: + + +``` +`$ sudo apt-get install xcalib` +``` + +The xcalib application works only with X11, so it is not functional on Wayland systems. But Wayland has this functionality built-in, so you can get the same results through GNOME Settings. If you're using X11, xcalib is an easy way to change the color temperature of your display. + +### The script + +I discovered [Redscreen][4], a night vision filter script written by Jeff Jahr in 2014. The original script is written for the C shell, but Bash is the common default these days. In fact, the C shell is not installed by default on my current Fedora Linux workstation. So, I decided to write an updated version of the Redscreen script aimed at the newest Bash syntax, but I made one major change: utilizing a case statement. + + +``` +#!/usr/bin/bash +# redscreen.sh Fri Feb 28 11:36 EST 2020 Alan Formy-Duval +# Turn screen red - Useful to Astronomers +# Inspired by redscreen.csh created by Jeff Jahr 2014 +# () + +# This program is free software: you can redistribute it +# and/or modify it under the terms of the GNU General +# Public License as published by the Free Software Foundation, +# either version 3 of the License, or (at your option) any +# later version. + +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE.  See the GNU General Public License for +# more details. + +# You should have received a copy of the GNU General Public +# License along with this program.   +# If not, see <[http://www.gnu.org/licenses/\>][5]. + +case $1 in +            on) +            # adjust color, gamma, brightness, contrast +            xcalib -green .1 0 1 -blue .1 0 1 -red 0.5 1 40 -alter +            exit 1 +        ;; +        off) +                xcalib -clear +            exit 1 +            ;; +        inv) +            # Invert screen +                xcalib -i -a +                    exit 1 +        ;; +        dim) +            # Make the screen darker +                xcalib -clear +            xcalib -co 30 -alter +            exit 1       +        ;; +        *) +                echo "$0 [on | dim | inv | off]" +                    exit 1 +        ;; +esac +``` + +![Skychart for Linux Version 4.2.1 on Fedora workstation][6] + +A lot of astronomy programs include a "night-mode" function, but not all do. Also, this script provides a way to affect the entire screen, not just a specific application. This allows you to use your Linux system out in the field at night for other things than just stargazing—such as checking email or reading Opensource.com—without ruining your night vision. + +Whether you are an astronomer or just an amateur stargazer, you can spend all night admiring the heavens using Linux and open source! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/linux-astronomy + +作者:[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/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) +[2]: https://opensource.com/resources/linux +[3]: http://xcalib.sourceforge.net/ +[4]: http://www.jeffrika.com/~malakai/redscreen/index.html +[5]: http://www.gnu.org/licenses/\> +[6]: https://opensource.com/sites/default/files/uploads/starchart_in_red.png (A star chart displayed in red screen mode) From af4f9e85c3ff671907b2f57a119ddfe0ef80ed84 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 13 Apr 2020 03:50:16 +0800 Subject: [PATCH 065/394] =?UTF-8?q?Revert=20"=E7=94=B3=E9=A2=86=E6=96=87?= =?UTF-8?q?=E7=AB=A0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3c8e24aa2c82750fdf5a754e2c4f7b452c69923d. --- .../talk/20200306 How I learned about burnout the hard way.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/talk/20200306 How I learned about burnout the hard way.md b/sources/talk/20200306 How I learned about burnout the hard way.md index cce3324e7e..ce9af6fb52 100644 --- a/sources/talk/20200306 How I learned about burnout the hard way.md +++ b/sources/talk/20200306 How I learned about burnout the hard way.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (chuan-325) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 78cf93465826fccafb0f59a885a80dfd3ef95fc5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Apr 2020 08:34:46 +0800 Subject: [PATCH 066/394] translated --- ...- A Free - Open Source Password Manager.md | 114 ----------------- ...- A Free - Open Source Password Manager.md | 115 ++++++++++++++++++ 2 files changed, 115 insertions(+), 114 deletions(-) delete mode 100644 sources/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md create mode 100644 translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md diff --git a/sources/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md b/sources/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md deleted file mode 100644 index bac49804f7..0000000000 --- a/sources/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bitwarden: A Free & Open Source Password Manager) -[#]: via: (https://itsfoss.com/bitwarden/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Bitwarden: A Free & Open Source Password Manager -====== - -_**Brief:** Bitwarden is a popular open-source password manager. Here, we take a look at what it has to offer._ - -![][1] - -[Bitwarden][2] is a free and open-source password manager. You might remember that earlier we listed it as one of the [best password managers available for Linux][3]. - -Personally, I’ve been using Bitwarden as my password manager across multiple devices for several months now. So, in this article, I’ll be mentioning the features it offers along with my experience with it. - -**Note:** _In case you have questions about how secure the service is, check out their official security [FAQ page][4] to explore about it._ - -### Features of Bitwarden password manager - -![][5] - -[Bitwarden][2] is an impressive alternative to a lot of other convenient password managers out there. - -Here’s a breakdown of the features: - - * Free & Paid options available - * Available for Teams (Enterprise) and Individuals - * Open source - * Self-hosting support - * Ability to use it as an authenticator app (like Google Authenticator) - * Cross-platform support (Android, iOS, Linux, Windows, & macOS) - * Browser extensions available (Firefox, Chrome, Opera, Edge, Safari) - * Offers command-line tools - * Offers a Web Vault - * Ability to Import/Export Passwords - * [Password Generator][6] - * Auto-fill password - * Two-step authentication - - - -Technically, Bitwarden is completely free to use – however, it also offers some paid plans (Personal pricing plans & Business plans). - -With the premium plans, you get the ability to share the passwords with more users, get API access (business use), and more such premium perks. - -Here’s how the pricing looks like (at the time of writing this article): - -![][7] - -For most individuals, the premium personal plan of **$10/year** shouldn’t be an issue considering the fact that you will be supporting an open-source project. Of course, you can also choose to use it for free with no essential restrictions. - -### Installing Bitwarden on Linux - -![][8] - -It’s quite easy to get Bitwarden installed on your Linux system because it offers an .**AppImage** file. You can refer to our guide on [how to use AppImage][9] files, if you didn’t know it already. - -If you don’t prefer using AppImage – you can opt for the [snap package][10] or simply download the **.deb** or **.rpm** file available on their [official download page][11]. You can also check out their [GitHub page][12] for more information. - -[Download Bitwarden][2] - -You can also utilize the browser extensions if you’re not interested in using the desktop app. - -### My experience with Bitwarden - -Before Bitwarden, I was using [LastPass][13] as my password manager. Even though that’s not a bad option – it’s not an open-source software. - -So, I decided to switch to Bitwarden as soon as I found out about it. - -To start with, I simply exported my data from LastPass and imported it to Bitwarden without any hiccups. I didn’t lose any data in the process. - -In addition to the desktop app, I’ve been using Bitwarden the Firefox add-on, and the Android app. I haven’t had any issues with it after over six months of usage. So, I’d definitely give it thumbs up from my side if you’re willing to try it out! - -### Wrapping Up - -I’d say that Bitwarden is a complete solution for Linux users who want a password manager that works everywhere and syncs easily across multiple devices. - -You can get started for free but if you can, please go for the premium plan of **$10/year** to support this open-source project. - -You may also check our list of [top 5 password managers for Linux][3] should come in handy if you’re looking for more options. - -Have you tried Bitwarden yet? If not, give it a try! Also, what is your favorite password manager? Let me know in the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/bitwarden/ - -作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-screenshot.jpg?ssl=1 -[2]: https://bitwarden.com/ -[3]: https://itsfoss.com/password-managers-linux/ -[4]: https://help.bitwarden.com/security/ -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-dark-mode.jpg?ssl=1 -[6]: https://itsfoss.com/password-generators-linux/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-pricing.jpg?ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-settings.png?ssl=1 -[9]: https://itsfoss.com/use-appimage-linux/ -[10]: https://snapcraft.io/bitwarden -[11]: https://bitwarden.com/#download -[12]: https://github.com/bitwarden -[13]: https://www.lastpass.com/ diff --git a/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md b/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md new file mode 100644 index 0000000000..d14a896277 --- /dev/null +++ b/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md @@ -0,0 +1,115 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Bitwarden: A Free & Open Source Password Manager) +[#]: via: (https://itsfoss.com/bitwarden/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Bitwarden:一个免费的开源密码管理器 +====== + +_ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我们来看看它提供了什么。 + +![][1] + +[Bitwarden][2] 是一个免费的开源密码管理器。 你可能还记得,我们之前将它列为 [Linux 中的最佳密码管理器][3]之一。 + +就个人而言,几个月来我一直在多个设备上使用 Bitwarden 作为我的密码管理器。 因此,在本文中,我将说明它提供的功能以及我的使用经验。 + +**注意:** _ 如果你对服务的安全性有疑问,请查看其官方安全性[常见问题页面][4]。 + +### Bitwarden 密码管理器的特性 + +![][5] + +[Bitwarden][2] 是许多其他方便的密码管理器的不错替代品。 + +以下是它的特性: + + * 提供免费和付费选择 + * 适用于团队(企业)和个人 + * 开源 + * 支持自托管 + * 能够作为身份验证器应用(像 Google 身份验证器) + * 跨平台支持(安卓、iOS、Linux、Windows 和 macOS) + * 提供浏览器扩展(Firefox,、Chrome、Opera、Edge、Safari) + * 提供命令行工具 + * 提供网页保管库 + * 能够导入/导出密码 + * [密码生成器][6] + * 自动填充密码 + * 两步身份验证 + + + + +从技术上讲,Bitwarden 使用完全免费。然而,它也提供了一些付费计划(个人付费和商务付费计划)。 + +通过高级计划,你可以与更多用户共享密码、获取 API 访问权限(业务使用)以及更多此类高级功能。 + +以下是定价(在编写本文时): + +![][7] + +对于大多数个人来说,考虑到支持开源项目,10 美元/年的高级个人计划不应成为问题。当然,你也可以选择没有限制地免费使用。 + +### 在 Linux 上安装 Bitwarden + +![][8] + +很容易将 Bitwarden 安装到你的 Linux 系统上,因为它提供了一个 .**AppImage** 文件。如果你还不知道[如何使用 AppImage][9] 文件,你可以参考我们的指南。 + +如果你不喜欢使用 AppImage , 你可以选择 [snap 包][10]或在其[官方下载页面][11]上下载 **.deb** 或者 **.rpm** 文件。你还可以查看其 [GitHub 页面][12]了解更多信息。 + +[Download Bitwarden][2] + +如果你对使用桌面应用不感兴趣,也可以使用浏览器扩展。 + +### 我使用 Bitwarden 的体验 + +在 Bitwarden 之前,我使用 [LastPass][13] 作为密码管理器。尽管这不是一个糟糕的选择,但它不是开源软件。 + +所以,在我发现 Bitwarden 后就决定使用它。 + +首先,我从 LastPass 导出我的数据,并导入到 Bitwarden 没有困难。在此过程中我没有丢失任何数据。 + +除了桌面应用,我一直在使用 Bitwarden 的火狐插件,和 Android 应用。使用六个多月后,我没有遇到任何问题。所以,如果你愿意试试看,我一定会给它好评! + +### 总结 + +我想说,对于那些想要一个可以到处工作,并且跨设备轻松同步的密码管理器的用户而言,Bitwarden 是一个完整的解决方案。 + +你可以免费入门,但如果可以,请购买 **10 美元/年**的高级计划来支持这个开源项目。 + +如果你正在寻找更多选择,你也可以查看我们的 [Linux 中 5 个最佳密码管理器][5]。 + +你试过 Bitwarden 了吗?如果没有,请试试看!此外,你最喜欢的密码管理器是什么?让我在下面的评论中知道! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/bitwarden/ + +作者:[Ankush Das][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/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-screenshot.jpg?ssl=1 +[2]: https://bitwarden.com/ +[3]: https://itsfoss.com/password-managers-linux/ +[4]: https://help.bitwarden.com/security/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-dark-mode.jpg?ssl=1 +[6]: https://itsfoss.com/password-generators-linux/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-pricing.jpg?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-settings.png?ssl=1 +[9]: https://itsfoss.com/use-appimage-linux/ +[10]: https://snapcraft.io/bitwarden +[11]: https://bitwarden.com/#download +[12]: https://github.com/bitwarden +[13]: https://www.lastpass.com/ From e52ec8d120490e48871cf45594962723042743ae Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 13 Apr 2020 08:39:18 +0800 Subject: [PATCH 067/394] translating --- ...s How to Find Out Which Desktop Environment You are Using.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md index 3a8576fc49..0cedfc9709 100644 --- a/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md +++ b/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8161e4f651efc0f03bc6e14264d6f5dfb2d09560 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 09:14:39 +0800 Subject: [PATCH 068/394] PRF @wxy --- ...w to get started or learn something new.md | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/translated/talk/20200407 15 years of Git- How to get started or learn something new.md b/translated/talk/20200407 15 years of Git- How to get started or learn something new.md index 0c68509dd5..231fd609d0 100644 --- a/translated/talk/20200407 15 years of Git- How to get started or learn something new.md +++ b/translated/talk/20200407 15 years of Git- How to get started or learn something new.md @@ -1,19 +1,20 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (15 years of Git: How to get started or learn something new) [#]: via: (https://opensource.com/article/20/4/get-started-git) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -15 岁的 Git:如何入门或学习点新东西 +Git 都 15 岁了,如何入门或学习点新东西 ====== + > 在 Git 15 周年之际,了解为什么 Git 是保持软件行业运行的重要组成部分。 -![Scissors cutting open access to files][1] +![](https://img.linux.net.cn/data/attachment/album/202004/13/091410k80er3mttrznc22e.jpg) -如果说过去二十年来有什么东西改变了软件,那么 [Git][2] 位列榜首。 +如果说过去二十年来有什么东西改变了软件,那么 [Git][2] 肯定位列榜首。 如果你没有亲自使用过 Git,你可能会认为它只是一种技术时尚,只是因为它是由 [Linux][3] 项目的创始人创建的,所以在开发者中只是一个偶然的宠儿。这或许有一定的道理,但 Git 确实取得了一些其他行业所没有的成就。有了 Git,分布在世界各地的开发者们可以在同一时间对同一段代码进行工作,并记录下每一次修改的历史,然后将所有的工作合并到一起,形成一个成品。由于这件事情非常复杂,所以这个工具本身也会变得很复杂,但归根结底,它是维持软件行业运行的重要组成部分。 @@ -21,19 +22,19 @@ ### Git 术语 -与任何专业工具一样,Git 中也有很多行话。像“克隆clone”、“合并merge”和“变基rebase”这样的术语,充其量是神秘的,而最坏的情况下,会让人感觉到几乎是排斥性的。试图理解这些术语的含义可能会让人不知所措,但如果你从 Matthew Broberg 的优秀文章《[Git 术语基础][4]》中得到一点指导,就不会这样了。只需快速阅读一下,你就能真正理解地听懂关于 Git 的对话。 +与任何专业工具一样,Git 中也有很多行话。像“克隆clone”、“合并merge”和“变基rebase”这样的术语,最起码也是神秘的,而更糟的情况下会令人感到排斥。试图理解这些术语的含义可能会让人不知所措,但如果你从 Matthew Broberg 的优秀文章《[Git 术语基础][4]》中得到一点指导,就不会这样了。只需快速阅读一下,你就能真正理解地听懂关于 Git 的对话。 ### Git 入门 如果你需要知道如何使用 Git,那么我自己的[关于使用 Git 的入门文章系列][5]是一个很好的开始。这些文章已经有几年的历史了,但就像许多 Linux 和 UNIX 技术一样,它的界面并没有发生很大的变化,所以这些文章和我写这些文章那时一样,在今天还是很有意义的。这一系列文章向你介绍了 Git 最基本的概念,并带领你完成创建仓库、提交文件、恢复文件、合并分支等过程。 -### 常见的Git服务 +### 常见的 Git 服务 -Git 最常见的用途之一是公共的 Git 托管服务,比如 GitLab 和 GitHub。Kedar Vijay Kulkarni 在他的《[如何在 Git 中克隆、修改、添加和删除文件][6]》一文中,演示了大多数开发者使用 Git 执行的日常任务。这不是非开发者的必读书目,但对于任何想在公共 Git 托管服务上为项目做贡献的人来说,这篇文章是必读的。这篇文章专门针对的是 Github,因为它是当今最常见的平台之一,但其原理也适用于任何 Git 的 Web 前端,包括 [GitLab][7]、[Gogs][8] 和 [Gitea][9] 等流行的开源框架。 +Git 最常见的用途之一是公共的 Git 托管服务,比如 GitLab 和 GitHub。Kedar Vijay Kulkarni 在他的《[如何在 Git 中克隆、修改、添加和删除文件][6]》一文中,演示了大多数开发者使用 Git 执行的日常任务。这不是非开发者的必读书目,但对于任何想在公共 Git 托管服务上为项目做贡献的人来说,这篇文章是必读的。这篇文章专门针对的是 Github,因为它是当今最常见的平台之一,但其原理也适用于任何 Git 服务的 Web 前端,包括 [GitLab][7]、[Gogs][8] 和 [Gitea][9] 等流行的开源框架。 ### 试试这个 Git 演练 -与其漫无目的的探索,你是不是更喜欢在导游的带领下学习?有时候,学习一件事最简单的方法就是模仿别人的准确步骤。你知道最终的结果是成功的保证,所以你在进行练习的时候会有信心,而你的大脑和手指也会得到重复的好处,从而建立起记忆。如果这是你的学习风格,那就跟着 Alan Formy-Duvall 的《[Git 的实用学习练习][10]》,找出成功的 Git 课程的感觉。 +与其漫无目的的探索,你是不是更喜欢在导游的带领下学习?有时候,学习一件事最简单的方法就是模仿别人的准确步骤。你知道最终的结果是肯定成功的,所以你在进行练习的时候会有信心,而你的大脑和手指也会得到重复的好处,从而建立起记忆。如果这是你的学习风格,那就跟着 Alan Formy-Duvall 的《[Git 的实用学习练习][10]》,找出成功的 Git 课程的感觉。 ### Git 应用程序 @@ -41,7 +42,7 @@ Git 最常见的用途之一是公共的 Git 托管服务,比如 GitLab 和 Gi ### 了解更多关于 Git 的信息 -知识就是力量,所以不要让 Git 对你来说是个谜。无论你是直接使用它,还是只知道它的名字,或者你以前从未听说过它,现在都是了解 Git 的好时机。这里有很多资源可以帮助你了解它的工作原理、工作原理以及人们为什么这么喜欢它。潜入其中,按照自己的节奏来学习,并学会爱上 Git 吧! +知识就是力量,所以不要让 Git 对你来说像个谜。无论你是直接使用它,还是只知道它的名字,或者你以前从未听说过它,现在都是了解 Git 的好时机。这里有很多资源可以帮助你了解它的工作原理、工作原理以及人们为什么这么喜欢它。潜入其中,按照自己的节奏来学习,并学会爱上 Git 吧! -------------------------------------------------------------------------------- @@ -50,7 +51,7 @@ via: https://opensource.com/article/20/4/get-started-git 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a23816006df1c0c7a3d538ab6e910059fe6d2a21 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 09:15:08 +0800 Subject: [PATCH 069/394] PUB @wxy https://linux.cn/article-12104-1.html --- ...years of Git- How to get started or learn something new.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20200407 15 years of Git- How to get started or learn something new.md (98%) diff --git a/translated/talk/20200407 15 years of Git- How to get started or learn something new.md b/published/20200407 15 years of Git- How to get started or learn something new.md similarity index 98% rename from translated/talk/20200407 15 years of Git- How to get started or learn something new.md rename to published/20200407 15 years of Git- How to get started or learn something new.md index 231fd609d0..d08342b3e7 100644 --- a/translated/talk/20200407 15 years of Git- How to get started or learn something new.md +++ b/published/20200407 15 years of Git- How to get started or learn something new.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12104-1.html) [#]: subject: (15 years of Git: How to get started or learn something new) [#]: via: (https://opensource.com/article/20/4/get-started-git) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 9cf014af0a57ed174df403f6f186bfab7b0a539a Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 13 Apr 2020 14:59:39 +0800 Subject: [PATCH 070/394] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...20190107 Different Ways To Update Linux Kernel For Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md b/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md index 32a6a7dd3e..65b9911601 100644 --- a/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md +++ b/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (mr-ping) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From dc0da89287555b166e76aa59194b6519acde9447 Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 13 Apr 2020 15:01:13 +0800 Subject: [PATCH 071/394] Complete tranlation of 20190107 Different Ways To Update Linux Kernel For Ubuntu.md --- ... Ways To Update Linux Kernel For Ubuntu.md | 161 +++++++++--------- 1 file changed, 79 insertions(+), 82 deletions(-) diff --git a/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md b/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md index 65b9911601..fbc0c67658 100644 --- a/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md +++ b/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md @@ -1,69 +1,68 @@ -[#]: collector: (lujun9972) -[#]: translator: (mr-ping) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Different Ways To Update Linux Kernel For Ubuntu) -[#]: via: (https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/) -[#]: author: (SK https://www.ostechnix.com/author/sk/) +[#]: collector: "lujun9972" +[#]: translator: "mr-ping" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Different Ways To Update Linux Kernel For Ubuntu" +[#]: via: "https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/" +[#]: author: "SK https://www.ostechnix.com/author/sk/" -Different Ways To Update Linux Kernel For Ubuntu + +升级Ubuntu Linux核心的几种不同方法 ====== ![](https://www.ostechnix.com/wp-content/uploads/2019/01/ubuntu-linux-kernel-720x340.png) -In this guide, we have given 7 different ways to update Linux kernel for Ubuntu. Among the 7 methods, five methods requires system reboot to apply the new Kernel and two methods don’t. Before updating Linux Kernel, it is **highly recommended to backup your important data!** All methods mentioned here are tested on Ubuntu OS only. We are not sure if they will work on other Ubuntu flavors (Eg. Xubuntu) and Ubuntu derivatives (Eg. Linux Mint). +这个指南里介绍了7种为Ubuntu升级Linux核心的不同方法。这7种方法里,有5种需要重启系统来使新核心生效,其他两种则不用。升级之前,**强烈建议您将重要数据进行备份!** 这里提到的所有方法只在Ubuntu中测试过。我们并不确定这些方法是不是也能适用于其他Ubuntu的特色发行版(如:Xubuntu)和衍生发行版(如:Linux Mint)。 -### Part A – Kernel Updates with reboot +### 第一部分: 需要重启的核心升级 -The following methods requires you to reboot your system to apply the new Linux Kernel. All of the following methods are recommended for personal or testing systems. Again, please backup your important data, configuration files and any other important stuff from your Ubuntu system. +以下方法需要您重启系统以便新的核心生效。所有方法都建议在个人系统或测试系统中进行。重要的事儿再说一遍,请备份好您Ubuntu中的重要数据、配置文件和其他重要的东西。 -#### Method 1 – Update the Linux Kernel with dpkg (The manual way) +### 方法1 - 使用dpkg升级Linux核心(手动方式) -This method helps you to manually download and install the latest available Linux kernel from **[kernel.ubuntu.com][1]** website. If you want to install most recent version (either stable or release candidate), this method will help. Download the Linux kernel version from the above link. As of writing this guide, the latest available version was **5.0-rc1** and latest stable version was **v4.20**. +这个方法里会帮助你手动从**[kernel.ubuntu.com][1]**网站下载可用的最新Linux核心。如果你打算安装最新版(而不是稳定版或者正式发布版),那这种方法对你会很有用。从以上链接下载Linux核心版本。编写这个指南的时候,最新的可用版本是**5.0-rc1**,最新的稳定版是**v4.20**. ![][3] -Click on the Linux Kernel version link of your choice and find the section for your architecture (‘Build for XXX’). In that section, download the two files with these patterns (where X.Y.Z is the highest version): +基于你的选择,点击相应的Linux核心版本链接,找到你对应的架构(‘Build for XXX’)的那部分。然后下载符合以下格式的两个文件(其中 X.Y.Z 是最高版本号): 1. linux-image-*X.Y.Z*-generic-*.deb 2. linux-modules-X.Y.Z*-generic-*.deb - - -In a terminal, change directory to where the files are and run this command to manually install the kernel: +在终端中修改文件所在的目录,然后执行命令,手动安装核心: ``` $ sudo dpkg --install *.deb ``` -Reboot to use the new kernel: +重启系统,使用新核心: ``` $ sudo reboot ``` -Check the kernel is as expected: +检查是否如你所愿: ``` $ uname -r ``` -For step by step instructions, please check the section titled under “Install Linux Kernel 4.15 LTS On DEB based systems” in the following guide. +对于分步的说明,请查看以下名为“Install Linux Kernel 4.15 LTS On DEB based systems”的文章。 + [Install Linux Kernel 4.15 In RPM And DEB Based Systems](https://www.ostechnix.com/install-linux-kernel-4-15-rpm-deb-based-systems/) -The above guide is specifically written for 4.15 version. However, all the steps are same for installing latest versions too. +以上的指南是针对的是4.15版本,不过安装最新版本的所有的步骤都是一样的。 -**Pros:** No internet needed (You can download the Linux Kernel from any system). +**优势:** 不必联网(你可以从任何系统中下载Linux核心来使用) -**Cons:** Manual update. Reboot necessary. +**缺点:** 手动更新,需要重启系统。 -#### Method 2 – Update the Linux Kernel with apt-get (The recommended method) +#### 方法2 - 用apt-get来升级Linux核心(推荐方法) -This is the recommended way to install latest Linux kernel on Ubuntu-like systems. Unlike the previous method, this method will download and install latest Kernel version from Ubuntu official repositories instead of **kernel.ubuntu.com** website.. +这是在类Ubuntu系统中升级Linux核心的推荐方法。不同于上一个方法,这种方法会从Ubuntu官方仓库下载、安装核心版本而不是从 **kernel.ubuntu.com**网站。 -To update the whole system including the Kernel, just do: +要升级包括核心的整个系统,只需要执行: ``` $ sudo apt-get update @@ -71,87 +70,84 @@ $ sudo apt-get update $ sudo apt-get upgrade ``` -If you want to update the Kernel only, run: +如果只希望升级核心,运行: ``` $ sudo apt-get upgrade linux-image-generic ``` -**Pros:** Simple. Recommended method. +**优势:** 简单。推荐方法。 -**Cons:** Internet necessary. Reboot necessary. +**缺点:** 需要联网,需要重启。 -Updating Kernel from official repositories will mostly work out of the box without any problems. If it is the production system, this is the recommended way to update the Kernel. +从官方库中升级核心是最接近开箱即用的方法,并且不会出什么问题。如果是生产环境的系统,这是最为推荐的升级Linux核心的方法。 -Method 1 and 2 requires user intervention to update Linux Kernels. The following methods (3, 4 & 5) are mostly automated. +方法1和方法2都需要用户去介入到升级Linux核心的过程中。而下边的方法(3、 4、 5)则几乎是全自动的。 -#### Method 3 – Update the Linux Kernel with Ukuu +#### 方法3 - 使用Ukuu升级Linux核心 -**Ukuu** is a Gtk GUI and command line tool that downloads the latest main line Linux kernel from **kernel.ubuntu.com** , and install it automatically in your Ubuntu desktop and server editions. Ukku is not only simplifies the process of manually downloading and installing new Kernels, but also helps you to safely remove the old and unnecessary Kernels. For more details, refer the following guide. +**Ukuu**是一个用于从**kernel.ubuntu.com**下载Linux核心,并且将其自动安装到Ubuntu桌面系统和服务器系统中的Gtk图形化界面和命令行工具。Ukku并不是单单简化了手动下载、安装新核心的过程,同时也会帮助你移除旧的和不再需要的核心。更多细节可以参照以下指南。 + [Ukuu – An Easy Way To Install And Upgrade Linux Kernel In Ubuntu-based Systems](https://www.ostechnix.com/ukuu-an-easy-way-to-install-and-upgrade-linux-kernel-in-ubuntu-based-systems/) -**Pros:** Easy to install and use. Automatically installs main line Kernel. +**优势:** 易于安装使用。自动安装主线核心。 -**Cons:** Internet necessary. Reboot necessary. +**缺点:** 需要联网,需要重启。 -#### Method 4 – Update the Linux Kernel with UKTools +#### 方法4 - 使用UKTools升级Linux核心 -Just like Ukuu, the **UKTools** also fetches the latest stable Kernel from from **kernel.ubuntu.com** site and installs it automatically on Ubuntu and its derivatives like Linux Mint. More details about UKTools can be found in the link given below. +跟Ukuu差不多,**UKTools**也会从**kernel.ubuntu.com**网站获取最新的核心并且自动安装到Ubuntu以及类似于Linux Mint的延伸发行版中。 + [UKTools – Upgrade Latest Linux Kernel In Ubuntu And Derivatives](https://www.ostechnix.com/uktools-upgrade-latest-linux-kernel-in-ubuntu-and-derivatives/) -**Pros:** Simple. Automated. +**优势:** 简单,自动 -**Cons:** Internet necessary. Reboot necessary. +**缺点:** 需要联网,需要重启。 -#### Method 5 – Update the Linux Kernel with Linux Kernel Utilities +#### 方法5 - 使用Linux核心工具集(Linux Kernel Utilities)安装Linux核心 -**Linux Kernel Utilities** is yet another program that makes the process of updating Linux kernel easy in Ubuntu-like systems. It is actually a set of BASH shell scripts used to compile and/or update latest Linux kernels for Debian and derivatives. It consists of three utilities, one for manually compiling and installing Kernel from source from [**http://www.kernel.org**][4] website, another for downloading and installing pre-compiled Kernels from from **** website. and third script is for removing the old kernels. For more details, please have a look at the following link. +**Linux Kernel Utilities**是目前另一个用于升级类Ubuntu系统Linux核心的程序。实质上,它是一个由一系列Bash脚本构成的合集,用于编译并且可以选择性地为Debian(译者注:Ubuntu的上游发行版)及其衍生发行版升级核心。它包含三个工具集,一个用于手动编译、安装来自于 [**http://www.kernel.org**][4] 网站的源码核心,另一个用于安装来自****网站的事先编译好的核心,第三个脚本用于移除旧核心。更多细节请浏览以下链接。 + [Linux Kernel Utilities – Scripts To Compile And Update Latest Linux Kernel For Debian And Derivatives](https://www.ostechnix.com/linux-kernel-utilities-scripts-compile-update-latest-linux-kernel-debian-derivatives/) -**Pros:** Simple. Automated. +**优势:** 简单,自动 -**Cons:** Internet necessary. Reboot necessary. +**缺点:** 需要联网,需要重启。 +### 第二部分 – Kernel Updates without reboot -### Part B – Kernel Updates without reboot +我之前说过,上边所有的方法都需要你去重启服务器(译者注:也可以是桌面版)来启用新核心。如果是个人系统或者测试系统,可以这么办。但对于无法停机的生产环境系统该怎么办呢?一点问题没有,这时候**实时补丁(livepatching)**就派上用场了。 -As I already said, all of above methods need you to reboot the server before the new kernel is active. If they are personal systems or testing machines, you could simply reboot and start using the new Kernel. But, what if they are production systems that requires zero downtime? No problem. This is where **Livepatching** comes in handy! +**实时补丁**(或者叫热补丁)允许你在不需要重启的情况下安装Linux升级或补丁来保证你的服务器处于最新的安全等级之下。这对web主机、游戏服务器这类需要不间断在线的服务器来说是很有价值的。事实上,任何情况下,服务器都应该保持在不间断运行的状态下。由于Linux供应商只会在出于修复安全漏洞的目的下维护补丁,所以如果安全性是你的点,这种方式再适合不过了。 -The **livepatching** (or hot patching) allows you to install Linux updates or patches without rebooting, keeping your server at the latest security level, without any downtime. This is attractive for ‘always-on’ servers, such as web hosts, gaming servers, in fact, any situation where the server needs to stay on all the time. Linux vendors maintain patches only for security fixes, so this approach is best when security is your main concern. +以下两种方法可以在不需要重启的情况下为生产环境和执行关键任务的Ubuntu服务器更新Linux核心。 -The following two methods doesn’t require system reboot and useful for updating Linux Kernel on production and mission-critical Ubuntu servers. - -#### Method 6 – Update the Linux Kernel Canonical Livepatch Service +#### 方法6 – 使用Canonical实时补丁服务(Canonical Livepatch Service)来更新Linux核心 ![][5] -[**Canonical Livepatch Service**][6] applies Kernel updates, patches and security hotfixes automatically without rebooting the Ubuntu systems. It reduces the Ubuntu systems downtime and keep them secure. Canonical Livepatch Service can be set up either during or after installation. If you are using desktop Ubuntu, the Software Updater will automatically check for kernel patches and notify you. In a console-based system, it is up to you to run apt-get update regularly. It will install kernel security patches only when you run the command “apt-get upgrade”, hence is semi-automatic. +[**Canonical Livepatch Service**][6] 可以在不需要重启Ubuntu系统的情况下执行核心升级、补丁和安全的热修复等操作,在减少服务器宕机的情况下保障其安全。Canonical Livepatch Service 可以在安装过程当中或安装之后尽心设置. 如果你使用的是Ubuntu桌面版,软件更新器会自动检查核心补丁的更新,并且通知你。在基于控制台的系统中,则需要你主动运行apt-get update命令来进行升级。由于需要你手动运行“apt-get upgrade”命令它才会安装核心的安全补丁,所以算是半自动的。 -Livepatch is free for three systems. If you have more than three, you need to upgrade to enterprise support solution named **Ubuntu Advantage** suite. This suite includes **Kernel Livepatching** and other services such as, +Livepatch对三个及以下系统免费,如果多于三个,你需要升级成名为**Ubuntu Advantage**的企业支持方案套件。这个套件包括**Kernel Livepatching**及以下服务: - * Extended Security Maintenance – critical security updates after Ubuntu end-of-life. - * Landscape – the systems management tool for using Ubuntu at scale. - * Knowledge Base – A private collection of articles and tutorials written by Ubuntu experts. - * Phone and web-based support. + * Extended Security Maintenance – Ubuntu生命周期后的重要安全更新 + * Landscape – 针对大规模使用Ubuntu的系统管理工具 + * Knowledge Base – 由Ubuntu专家撰写的私人文章和教程 + * 电话和网站支持 +**价格** +Ubuntu Advantage包含三种付费计划, 必备(Essential), 标准(Standard)和 高级(Advanced).最基础的计划(Essential 计划)从 **单物理节点 225 美元/年**和**单VPS 75美元/年**开始计价。看上去应该不支持针对Ubuntu服务器版和桌面版的按月订阅。你可以在 [**此处**][7]浏览所有计划的细节信息。 -**Cost** +**优势:** 简单。半自动化。无需重启。支持三个免费系统。 -Ubuntu Advantage includes three paid plans namely, Essential, Standard and Advanced. The basic plan (Essential plan) starts from **225 USD per year for one physical node** and **75 USD per year for one VPS**. It seems there is no monthly subscription for Ubuntu servers and desktops. You can view detailed information on all plans [**here**][7]. +**缺点:** 4个以上主机的话非常昂贵. 没有补丁回滚。 -**Pros:** Simple. Semi-automatic. No reboot necessary. Free for 3 systems. +**开启 Canonical Livepatch Service** -**Cons:** Expensive for 4 or more hosts. No patch rollback. +如果你想在安装后设置实时补丁服务,依照以下方法逐步执行: -**Enable Canonical Livepatch Service** - -If you want to setup Livepatch service after installation, just do the following steps. - -Get a key at [**https://auth.livepatch.canonical.com/**][8]. +从 [**https://auth.livepatch.canonical.com/**][8] 获取一个秘钥. ``` $ sudo snap install canonical-livepatch @@ -159,29 +155,29 @@ $ sudo snap install canonical-livepatch $ sudo canonical-livepatch enable your-key ``` -#### Method 7 – Update the Linux Kernel with KernelCare +#### 方法7- 使用KernelCare升级Linux内核 ![][9] -[**KernelCare**][10] is the newest of all the live patching solutions. It is the product of [CloudLinux][11]. KernelCare runs on Ubuntu and other flavors of Linux. It checks for patch releases every 4 hours and will install them without confirmation. Patches can be rolled back if there are problems. +[**KernelCare**][10] 是所有实时补丁方案中最新的一个. 它是 [CloudLinux][11]推出的产品. KernelCare 可以运行在Ubuntu和其他的Linux特殊发行版中. 它每四个小时检查一遍补丁的发布,并在无需确认的情况下安装它们. 如果更新后存在问题,可以将补丁进行回滚。 -**Cost** +**价格** -Fees, per server: **4 USD per month** , **45 USD per year**. +费用,每台服务器:**4 美元/月** , **45 美元/年**. -Compared to Ubuntu Livepatch, kernelCare seems very cheap and affordable. Good thing is **monthly subscriptions are also available**. Another notable feature is it supports other Linux distributions, such as Red Hat, CentOS, Debian, Oracle Linux, Amazon Linux and virtualization platforms like OpenVZ, Proxmox etc. +跟Ubuntu Livepatch相比,kernelCare看起来非常便宜、实惠。好的方面在于**也可以按月订阅**。另一个前者不具备的功能是支持如Red Hat, CentOS, Debian, Oracle Linux, Amazon Linux 以及 OpenVZ, Proxmox 这种虚拟平台等等的其他Linux发行版。 -You can read all the features and benefits of KernelCare [**here**][12] and check all available plan details [**here**][13]. +你可以在 [**此处**][12] 了解KernelCare的所有特性和简介,以及所有的付费计划的细节。 -**Pros:** Simple. Fully automated. Wide OS coverage. Patch rollback. No reboot necessary. Free license for non-profit organizations. Low cost. +**优势:** 简单。全自动化。范围更广的操作系统覆盖。补丁回滚。无需重启。对非盈利组织提供免费许可。价格低廉。 -**Cons:** Not free (except for 30 day trial). +**缺点:** 除了30天试用外无免费计划。 -**Enable KernelCare Service** +**开启 KernelCare Service** -Get a 30-day trial key at [**https://cloudlinux.com/kernelcare-free-trial5**][14]. +此处 [**https://cloudlinux.com/kernelcare-free-trial5**][14] 获取30天免费试用秘钥。 -Run the following commands to enable KernelCare and register the key. +执行以下命令开启KernelCare并注册秘钥。 ``` $ sudo wget -qq -O - https://repo.cloudlinux.com/kernelcare/kernelcare_install.sh | bash @@ -189,15 +185,16 @@ $ sudo wget -qq -O - https://repo.cloudlinux.com/kernelcare/kernelcare_install.s $ sudo /usr/bin/kcarectl --register KEY ``` -If you’re looking for an affordable and reliable commercial service to keep the Linux Kernel updated on your Linux servers, KernelCare is good to go. +如果你的目标是价格实惠,并且通过可靠的社区服务来保障你的Linux服务器核心的更新,那KernelCare是个不错的选择。 -*with inputs from **Paul A. Jacobs** , a Technical Evangelist and Content Writer from Cloud Linux.* -**Suggested read:** +*由来自Cloud Linux的技术撰稿人和内容作者**Paul A. Jacobs**撰写。* -And, that’s all for now. Hope this was useful. If you believe any other tools/methods should include in this list, feel free to let us know in the comment section below. I will check and update this guide accordingly. +**推荐阅读:** -More good stuffs to come. Stay tuned! +到此,希望这边文章能对你有所帮助。如果你觉得还有其他的工具和方法需要列在这里,可以在留言区给我们留言。我会根据反馈检查和更新这篇指南的。 + +接下来会有更多好东西给大家呈现,敬请期待。 Cheers! @@ -209,7 +206,7 @@ via: https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/ 作者:[SK][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[mr-ping](https://github.com/mr-ping) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6beae407f522c37b864c1d461c8f8610991634fb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 15:32:44 +0800 Subject: [PATCH 072/394] PRF @wxy --- .../20200312 Make SSL certs easy with k3s.md | 74 +++++++++---------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/translated/tech/20200312 Make SSL certs easy with k3s.md b/translated/tech/20200312 Make SSL certs easy with k3s.md index 241f8891f5..230476352e 100644 --- a/translated/tech/20200312 Make SSL certs easy with k3s.md +++ b/translated/tech/20200312 Make SSL certs easy with k3s.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Make SSL certs easy with k3s) @@ -12,31 +12,31 @@ > 如何在树莓派上使用 k3s 和 Let's Encrypt 来加密你的网站。 -![Files in a folder][1] +![](https://img.linux.net.cn/data/attachment/album/202004/13/153032ncp8q55pjwdj8ppj.jpg) -在[上一篇文章][2]中,我们在 k3s 集群上部署了几个简单的网站。那些是未加密的网站。很好,它们可以工作,但是未加密的网站有点太过时了!如今,大多数网站都是加密的。在本文中,我们将安装 [cert-manager][3] 并将其用于在集群上以部署采用 TLS 加密的网站。这些网站不仅会被加密,而且还会使用有效的公共证书,这些证书会从 [Let's Encrypt][4] 自动获取和更新!让我们开始吧! +在[上一篇文章][2]中,我们在 k3s 集群上部署了几个简单的网站。那些是未加密的网站。不错,它们可以工作,但是未加密的网站有点太过时了!如今,大多数网站都是加密的。在本文中,我们将安装 [cert-manager][3] 并将其用于在集群上以部署采用 TLS 加密的网站。这些网站不仅会被加密,而且还会使用有效的公共证书,这些证书会从 [Let's Encrypt][4] 自动获取和更新!让我们开始吧! -### 所需材料 +### 准备 -要继续阅读本文,你将需要我们在上一篇文章中构建的 [k3s 树莓派集群][5]。另外,你需要拥有一个公用静态 IP 地址,并有一个可以为其创建 DNS 记录的域名。如果你有一个动态 DNS 提供程序为你提供域名,可能也行。但是,在本文中,我们将使用静态 IP 和 [CloudFlare][6] 来手动创建 DNS 的 A 记录。 +要继续阅读本文,你将需要我们在上一篇文章中构建的 [k3s 树莓派集群][5]。另外,你需要拥有一个公用静态 IP 地址,并有一个可以为其创建 DNS 记录的域名。如果你有一个动态 DNS 提供程序为你提供域名,可能也行。但是,在本文中,我们使用静态 IP 和 [CloudFlare][6] 来手动创建 DNS 的 A 记录。 我们在本文中创建配置文件时,如果你不想键入它们,则可以在[此处][7]进行下载。 ### 我们为什么使用 cert-manager? -Traefik(预先捆绑了 k3s)实际上具有内置的 Let's Encrypt 支持,因此你可能想知道为什么我们要安装第三方软件包来做同样的事情。在撰写本文时,Traefik 中的 Let's Encrypt 支持检索证书并将其存储在文件中。cert-manager 会检索证书并将其存储在 Kubernetes 的 “机密信息secrets” 中。我认为,“机密信息”可以简单地按名称引用,因此更易于使用。这就是我们在本文中使用 cert-manager 的主要原因。 +Traefik(在 k3s 预先捆绑了)实际上具有内置的 Let's Encrypt 支持,因此你可能想知道为什么我们要安装第三方软件包来做同样的事情。在撰写本文时,Traefik 中的 Let's Encrypt 支持检索证书并将其存储在文件中。而 cert-manager 会检索证书并将其存储在 Kubernetes 的 “机密信息secret” 中。我认为,“机密信息”可以简单地按名称引用,因此更易于使用。这就是我们在本文中使用 cert-manager 的主要原因。 ### 安装 cert-manager 通常,我们只是遵循 cert-manager 的[文档][8]在 Kubernetes 上进行安装。但是,由于我们使用的是 ARM 体系结构,因此我们需要进行一些更改,以便我们可以完成这个操作。 -第一步是创建 cert-manager 命名空间。命名空间有助于将 cert-manager 的吊舱Pod排除在我们的默认命名空间之外,因此当我们使用自己的“吊舱”执行 `kubectl get pods` 之类的操作时,我们不必看到它们。创建名称空间很简单: +第一步是创建 cert-manager 命名空间。命名空间有助于将 cert-manager 的 Pod 排除在我们的默认命名空间之外,因此当我们使用自己的 Pod 执行 `kubectl get pods` 之类的操作时,我们不必看到它们。创建名称空间很简单: ``` kubectl create namespace cert-manager ``` -这份安装说明会告诉你下载 cert-manager 的 YAML 配置文件并将其一步全部应用到你的集群。我们需要将其分为两个步骤,以便为基于 ARM 的树莓派修改文件。我们将下载文件并一步一步进行转换: +安装说明会让你下载 cert-manager 的 YAML 配置文件并将其一步全部应用到你的集群。我们需要将其分为两个步骤,以便为基于 ARM 的树莓派修改文件。我们将下载文件并一步一步进行转换: ``` curl -sL \ @@ -44,8 +44,7 @@ https://github.com/jetstack/cert-manager/releases/download/v0.11.0/cert-manager. sed -r 's/(image:.*):(v.*)$/\1-arm:\2/g' > cert-manager-arm.yaml ``` -这会下载配置文件,并将所有包含的 docker 镜像更新为 ARM 版本。来检查一下它做了什么: - +这会下载配置文件,并将包含的所有 docker 镜像更新为 ARM 版本。来检查一下它做了什么: ``` $ grep image: cert-manager-arm.yaml @@ -54,23 +53,23 @@ $ grep image: cert-manager-arm.yaml           image: "quay.io/jetstack/cert-manager-webhook-arm:v0.11.0" ``` -如我们所见,三个镜像现在在镜像名称上添加了 `-arm`。现在我们有了正确的文件,我们只需将其应用于集群: +如我们所见,三个镜像现在在镜像名称上添加了 `-arm`。现在我们有了正确的文件,我们只需将其应用于集群: ``` kubectl apply -f cert-manager-arm.yaml ``` -这将安装所有的 cert-manager。我们可以通过 `kubectl --namespace cert-manager get pods` 来检查安装何时完成,直到所有“吊舱”都处于 `Running` 状态。 +这将安装 cert-manager 的全部。我们可以通过 `kubectl --namespace cert-manager get pods` 来检查安装何时完成,直到所有 Pod 都处于 `Running` 状态。 -这实际上就完成了 cert-manager 的安装! +这就完成了 cert-manager 的安装! ### Let's Encrypt 概述 -Let's Encrypt 的好处是,它们免费为我们提供了经过公共验证的 TLS 证书!这意味着我们可以拥有一个完全有效的、可供任何人访问的 TLS 加密网站,这些家庭或业余的爱好活动挣不到钱,也无需自己掏腰包购买 TLS 证书!以及,当通过 cert-manager 使用 Let's Encrypt 的证书时,获得证书的整个过程是自动化的,证书的续订也是自动的! +Let's Encrypt 的好处是,它免费为我们提供了经过公共验证的 TLS 证书!这意味着我们可以拥有一个完全有效的、可供任何人访问的 TLS 加密网站,这些家庭或业余的爱好活动挣不到钱,也无需自己掏腰包购买 TLS 证书!以及,当通过 cert-manager 使用 Let's Encrypt 的证书时,获得证书的整个过程是自动化的,证书的续订也是自动的! -但它是如何工作的?下面是该过程的简化说明。我们(或代表我们的 cert-manager)向 Let's Encrypt 发出我们拥有的域名的证书请求。Let's Encrypt 通过使用 ACME DNS 或 HTTP 验证机制来验证我们是否拥有该域。如果验证成功,则 Let's Encrypt 将向我们提供证书,这些证书将由 cert-manager 安装在我们的网站(或其他 TLS 加密的终结点)中。在需要重复此过程之前,这些证书可以使用 90 天。但是,cert-manager 会自动为我们更新证书。 +但它是如何工作的?下面是该过程的简化说明。我们(或代表我们的 cert-manager)向 Let's Encrypt 发出我们拥有的域名的证书请求。Let's Encrypt 通过使用 ACME DNS 或 HTTP 验证机制来验证我们是否拥有该域。如果验证成功,则 Let's Encrypt 将向我们提供证书,这些证书将由 cert-manager 安装在我们的网站(或其他 TLS 加密的端点)中。在需要重复此过程之前,这些证书可以使用 90 天。但是,cert-manager 会自动为我们更新证书。 -在本文中,我们将使用 HTTP 验证方法,因为它更易于设置并且适用于大多数情况。以下是幕后将发生的基本过程。cert-manager 将向 Let's Encrypt 发出证书请求。作为回应,Let's Encrypt 将发出所有权验证的质询challenges。这个质询是将一个 HTTP 资源放在请求证书的域名下的一个特定 URL 上。从理论上讲,如果我们可以将该资源放在该 URL 上,并且让 Let's Encrypt 可以远程获取它,那么我们实际上必须是该域的所有者。否则,要么我们无法将资源放置在正确的位置,要么我们无法操纵 DNS 以使 Let's Encrypt 访问它。在这种情况下,cert-manager 会将资源放在正确的位置,并自动创建一个临时的 `Ingress` 记录,以将流量路由到正确的位置。如果 Let's Encrypt 可以读到该质询要求的资源并正确无误,它将把证书发回给 cert-manager。然后,cert-manager 将证书存储为“机密信息”,然后我们的网站(或其他任何网站)将使用这些证书通过 TLS 保护我们的流量。 +在本文中,我们将使用 HTTP 验证方法,因为它更易于设置并且适用于大多数情况。以下是幕后发生的基本过程。cert-manager 向 Let's Encrypt 发出证书请求。作为回应,Let's Encrypt 发出所有权验证的质询challenges。这个质询是将一个 HTTP 资源放在请求证书的域名下的一个特定 URL 上。从理论上讲,如果我们可以将该资源放在该 URL 上,并且让 Let's Encrypt 可以远程获取它,那么我们实际上必须是该域的所有者。否则,要么我们无法将资源放置在正确的位置,要么我们无法操纵 DNS 以使 Let's Encrypt 访问它。在这种情况下,cert-manager 会将资源放在正确的位置,并自动创建一个临时的 `Ingress` 记录,以将流量路由到正确的位置。如果 Let's Encrypt 可以读到该质询要求的资源并正确无误,它将把证书发回给 cert-manager。cert-manager 将证书存储为“机密信息”,然后我们的网站(或其他任何网站)将使用这些证书通过 TLS 保护我们的流量。 ### 为该质询设置网络 @@ -78,11 +77,11 @@ Let's Encrypt 的好处是,它们免费为我们提供了经过公共验证的 为了使质询过程正常运行,我们需要一个我们要申请证书的域名,以将其路由到端口 80 上的 k3s 集群。为此,我们需要告诉世界上的 DNS 系统它的位置。因此,我们需要将域名映射到我们的公共 IP 地址。如果你不知道你的公共 IP 地址是什么,可以访问 [WhatsMyIP][9] 之类的地方,它会告诉你。接下来,我们需要输入 DNS 的 A 记录,该记录将我们的域名映射到我们的公共 IP 地址。为了使此功能可靠地工作,你需要一个静态的公共 IP 地址,或者你可以使用动态 DNS 提供商。一些动态 DNS 提供商会向你颁发一个域名,你可以按照以下说明使用它。我没有尝试过,所以不能肯定地说它适用于所有提供商。 -对于本文,我们将假设有一个静态公共 IP 并使用 CloudFlare 来设置 DNS 的 A 记录。如果愿意,可以使用自己的 DNS 提供程序。重要的是你可以设置 A 记录。 +对于本文,我们假设有一个静态公共 IP,并使用 CloudFlare 来设置 DNS 的 A 记录。如果愿意,可以使用自己的 DNS 服务器。重要的是你可以设置 A 记录。 -在本文的其余部分中,我将使用 [k3s.carpie.net][10] 作为示例域,因为这是我拥有的域。你显然会用自己拥有的任何域替换它。 +在本文的其余部分中,我将使用 [k3s.carpie.net][10] 作为示例域名,因为这是我拥有的域。你显然会用自己拥有的任何域名替换它。 -为示例起见,假设我们的公共 IP 地址是 198.51.100.42。我们将转到我们的 DNS 提供商的 DNS 记录部分,并添加一个名为 [k3s.carpie.net][10] 的类型为 `A` 的记录(CloudFlare 已经假定了域的部分,因此我们只需输入 `k3s`),然后输入 `198.51.100.42` 作为 IPv4 地址。 +为示例起见,假设我们的公共 IP 地址是 198.51.100.42。我们转到我们的 DNS 提供商的 DNS 记录部分,并添加一个名为 [k3s.carpie.net][10] 的类型为 `A` 的记录(CloudFlare 已经假定了域的部分,因此我们只需输入 `k3s`),然后输入 `198.51.100.42` 作为 IPv4 地址。 ![][11] @@ -95,17 +94,17 @@ $ dig +short k3s.carpie.net 198.51.100.42 ``` -继续运行以上命令,直到可以返回 IP 才行。关于 CloudFlare 有个小注释:ClouldFlare 提供了通过代理流量来隐藏你的实际 IP 的服务。在这种情况下,我们取回的是 CloudFlare 的 IP,而不是我们的 IP。 但对于我们的目的,这应该可以正常工作。 +继续运行以上命令,直到可以返回 IP 才行。关于 CloudFlare 有个小注释:ClouldFlare 提供了通过代理流量来隐藏你的实际 IP 的服务。在这种情况下,我们取回的是 CloudFlare 的 IP,而不是我们的 IP。但对于我们的目的,这应该可以正常工作。 网络配置的最后一步是配置路由器,以将端口 80 和 443 上的传入流量路由到我们的 k3s 集群。可悲的是,路由器配置页面的差异很大,因此我无法确切地说明你的外观是什么样子。大多数时候,我们需要的管理页面位于“端口转发”或类似内容下。我甚至看到过它列在“游戏”之下(显然是端口转发主要用于的游戏)!让我们看看我的路由器的配置如何。 ![][12] -如果你和我的设置一样,则转到 192.168.0.1 登录到路由器管理应用程序。对于此路由器,它位于 “ NAT / QoS” -> “端口转发”。在这里,我们将端口 80/TCP 协议设置为转发到 192.168.0.50(主节点 `kmaster` 的 IP)的端口 80。我们还将端口 443 设置为也映射到 `kmaster`。从技术上讲,这对于质询来说并不是必需的,但是在本文的结尾,我们将部署一个启用 TLS 的网站,并且需要映射 443 来进行访问。因此,现在进行映射很方便。我们保存并应用更改,应该一切顺利! +如果你和我的环境一样,则转到 192.168.0.1 登录到路由器管理应用程序。对于此路由器,它位于 “ NAT/QoS” -> “端口转发”。在这里,我们将端口 80/TCP 协议设置为转发到 192.168.0.50(主节点 `kmaster` 的 IP)的端口 80。我们还设置端口 443 也映射到 `kmaster`。从技术上讲,这对于质询来说并不是必需的,但是在本文的结尾,我们将部署一个启用 TLS 的网站,并且需要映射 443 来进行访问。因此,现在进行映射很方便。我们保存并应用更改,应该一切顺利! ### 配置 cert-manager 来使用 Let's Encrypt(暂存环境) -现在,我们需要配置 cert-manager 来通过 Let's Encrypt 颁发证书。Let's Encrypt 为我们提供了一个暂存(例如用于测试)环境,以便审视我们的配置。这样它更能容忍错误和请求的频率。如果我们对生产环境做了错误的操作,我们很快就好发现自己被暂时禁止访问了!因此,我们将使用暂存环境手动测试请求。 +现在,我们需要配置 cert-manager 来通过 Let's Encrypt 颁发证书。Let's Encrypt 为我们提供了一个暂存(例如用于测试)环境,以便审视我们的配置。这样它更能容忍错误和请求的频率。如果我们对生产环境做了错误的操作,我们很快就会发现自己被暂时禁止访问了!因此,我们将使用暂存环境手动测试请求。 创建一个文件 `letsencrypt-issuer-staging.yaml`,内容如下: @@ -132,7 +131,7 @@ spec: 请确保将电子邮件地址更新为你的地址。如果出现问题或我们弄坏了一些东西,这就是 Let's Encrypt 与我们联系的方式! -现在,我们使用以下方法创建发行者: +现在,我们使用以下方法创建发行者issuer: ``` kubectl apply -f letsencrypt-issuer-staging.yaml @@ -150,7 +149,6 @@ kubectl get clusterissuers 创建一个包含以下内容的证书请求文件 `le-test-certificate.yaml`: - ``` apiVersion: cert-manager.io/v1alpha2 kind: Certificate @@ -167,7 +165,7 @@ spec: - k3s.carpie.net ``` -该记录仅表示我们要使用名为 `letsencrypt-staging`(我们在上一步中创建的)的 `ClusterIssuer` 来请求域 [k3s.carpie.net][10] 的证书,并在 Kubernetes 的机密信息中名为 `k3s-carpie-net-tls` 文件中存储该证书。 +该记录仅表示我们要使用名为 `letsencrypt-staging`(我们在上一步中创建的)的 `ClusterIssuer` 来请求域 [k3s.carpie.net][10] 的证书,并在 Kubernetes 的机密信息中名为 `k3s-carpie-net-tls` 的文件中存储该证书。 像平常一样应用它: @@ -188,11 +186,11 @@ NAME                    READY   SECRET                  AGE k3s-carpie-net          True    k3s-carpie-net-tls      30s ``` -我们走在幸福之路!(这里的关键是`READY` 是 `True`)。 +我们走在幸福之路!(这里的关键是 `READY` 应该是 `True`)。 ### 解决证书颁发问题 -上面是幸福的道路。如果 `READY` 为 `False`,我们可以等等它,然后再次花点时间检查状态。如果它一直是 `False`,那么我们就有一个需要解决的问题。此时,我们可以遍历 Kubernetes 资源链,直到找到一条告诉我们问题的状态消息。 +上面是幸福的道路。如果 `READY` 为 `False`,我们可以等等它,然后再次花点时间检查状态。如果它一直是 `False`,那么我们就有需要解决的问题。此时,我们可以遍历 Kubernetes 资源链,直到找到一条告诉我们问题的状态消息。 假设我们执行了上面的请求,而 `READY` 为 `False`。我们可以从以下方面开始故障排除: @@ -200,7 +198,7 @@ k3s-carpie-net          True    k3s-carpie-net-tls      30s kubectl describe certificates k3s-carpie-net ``` -这将返回很多信息。通常,有用的内容位于 `Events:` 部分,该部分通常位于底部。假设最后一个事件是 `Created new CertificateRequest resource "k3s-carpie-net-1256631848`。然后我们描述 describe一些该请求: +这将返回很多信息。通常,有用的内容位于 `Events:` 部分,该部分通常位于底部。假设最后一个事件是 `Created new CertificateRequest resource "k3s-carpie-net-1256631848`。然后我们描述describe一下该请求: ``` kubectl describe certificaterequest k3s-carpie-net-1256631848 @@ -211,7 +209,7 @@ kubectl describe certificaterequest k3s-carpie-net-1256631848 那么,我们可以描述该顺序: ``` -`kubectl describe orders default/k3s-carpie-net-1256631848-2342473830` +kubectl describe orders default/k3s-carpie-net-1256631848-2342473830 ``` 假设有一个事件,事件为 `Created Challenge resource "k3s-carpie-net-1256631848-2342473830-1892150396" for domain "k3s.carpie.net"`。让我们描述一下该质询: @@ -220,7 +218,7 @@ kubectl describe certificaterequest k3s-carpie-net-1256631848 kubectl describe challenges k3s-carpie-net-1256631848-2342473830-1892150396 ``` -从这里返回的最后一个事件是 `Presented challenge using http-01 challenge mechanism`。看起来没问题,因此我们浏览一下描述的输出,并看到一条消息 `Waiting for http-01 challenge propagation: failed to perform self check GET request … no such host`。终于!我们发现了问题!在这种情况下,`no such host` 意味着 DNS 查找失败,因此我们需要返回并手动检查我们的 DNS 设置,正确解析域的 DNS,并进行所需的任何更改。 +从这里返回的最后一个事件是 `Presented challenge using http-01 challenge mechanism`。看起来没问题,因此我们浏览一下描述的输出,并看到一条消息 `Waiting for http-01 challenge propagation: failed to perform self check GET request ... no such host`。终于!我们发现了问题!在这种情况下,`no such host` 意味着 DNS 查找失败,因此我们需要返回并手动检查我们的 DNS 设置,正确解析域的 DNS,并进行所需的任何更改。 ### 清理我们的测试证书 @@ -231,9 +229,9 @@ kubectl delete certificates k3s-carpie-net kubectl delete secrets k3s-carpie-net-tls ``` -### 配置 cert-manager 以使用 Let's Encrypt(生产环境) +### 配置 cert-manager 以使用 Let's Encrypt(生产环境) -现在我们已经有了测试证书,是时候移动到生产环境了。就像我们在 Let's Encrypt 暂存环境中配置 cert-manager 一样,我们现在也需要对生产环境进行同样的操作。创建一个名为 `letsencrypt-issuer-production.yaml` 的文件(如果需要,可以复制和修改暂存环境的文件),其内容如下: +现在我们已经有了测试证书,是时候移动到生产环境了。就像我们在 Let's Encrypt 暂存环境中配置 cert-manager 一样,我们现在也需要对生产环境进行同样的操作。创建一个名为 `letsencrypt-issuer-production.yaml` 的文件(如果需要,可以复制和修改暂存环境的文件),其内容如下: ``` apiVersion: cert-manager.io/v1alpha2 @@ -266,7 +264,7 @@ kubectl apply -f letsencrypt-issuer-production.yaml ### 申请我们网站的证书 -重要的是要注意,我们到目前为止完成的所有步骤都是一次性设置的!对于将来的任何其他申请,我们可以从这个说明开始! +重要的是需要注意,我们到目前为止完成的所有步骤都只需要进行一次!而对于将来的任何其他申请,我们可以从这个说明开始! 让我们部署在[上一篇文章][13]中部署的同样站点。(如果仍然可用,则可以修改 YAML 文件。如果没有,则可能需要重新创建并重新部署它)。 @@ -296,7 +294,7 @@ spec: secretName: k3s-carpie-net-tls ``` -请注意,上面仅显示了 `mysite.yaml` 的 `Ingress` 部分。所做的更改是添加了注释 `cert-manager.io/cluster-issuer: letsencrypt-prod`。这告诉 traefik 创建证书时使用哪个发行者。 唯一的其他增加是 `tls:` 块。这告诉 traefik 我们希望在主机 [k3s.carpie.net][10] 上具有 TLS 功能,并且我们希望 TLS 证书文件存储在机密信息 `k3s-carpie-net-tls` 中。 +请注意,上面仅显示了 `mysite.yaml` 的 `Ingress` 部分。所做的更改是添加了注解 `cert-manager.io/cluster-issuer: letsencrypt-prod`。这告诉 traefik 创建证书时使用哪个发行者。 其他唯一增加的是 `tls:` 块。这告诉 traefik 我们希望在主机 [k3s.carpie.net][10] 上具有 TLS 功能,并且我们希望 TLS 证书文件存储在机密信息 `k3s-carpie-net-tls` 中。 请记住,我们没有创建这些证书!(好吧,我们创建了名称相似的测试证书,但我们删除了这些证书。)Traefik 将读取这些配置并继续寻找机密信息。当找不到时,它会看到注释说我们想使用 `letsencrypt-prod` 发行者来获取它。由此,它将提出请求并为我们安装证书到机密信息之中! @@ -311,17 +309,17 @@ via: https://opensource.com/article/20/3/ssl-letsencrypt-k3s 作者:[Lee Carpenter][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://opensource.com/users/carpie [b]: https://github.com/lujun9972 [1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) -[2]: https://carpie.net/articles/ingressing-with-k3s +[2]: https://linux.cn/article-12081-1.html [3]: https://cert-manager.io/ [4]: https://letsencrypt.org/ -[5]: https://opensource.com/article/20/3/kubernetes-raspberry-pi-k3s +[5]: https://linux.cn/article-12049-1.html [6]: https://cloudflare.com/ [7]: https://gitlab.com/carpie/k3s_using_certmanager/-/archive/master/k3s_using_certmanager-master.zip [8]: https://cert-manager.io/docs/installation/kubernetes/ @@ -329,5 +327,5 @@ via: https://opensource.com/article/20/3/ssl-letsencrypt-k3s [10]: http://k3s.carpie.net [11]: https://opensource.com/sites/default/files/uploads/ep011_dns_example.png [12]: https://opensource.com/sites/default/files/uploads/ep011_router.png -[13]: https://carpie.net/articles/ingressing-with-k3s#deploying-a-simple-website +[13]:https://linux.cn/article-12081-1.html [14]: http://cert-manager.io/cluster-issuer From 746c5223003983228d464f6024a142b6b82b03f7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 15:33:11 +0800 Subject: [PATCH 073/394] PUB @wxy https://linux.cn/article-12106-1.html --- .../20200312 Make SSL certs easy with k3s.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200312 Make SSL certs easy with k3s.md (99%) diff --git a/translated/tech/20200312 Make SSL certs easy with k3s.md b/published/20200312 Make SSL certs easy with k3s.md similarity index 99% rename from translated/tech/20200312 Make SSL certs easy with k3s.md rename to published/20200312 Make SSL certs easy with k3s.md index 230476352e..657d88123f 100644 --- a/translated/tech/20200312 Make SSL certs easy with k3s.md +++ b/published/20200312 Make SSL certs easy with k3s.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12106-1.html) [#]: subject: (Make SSL certs easy with k3s) [#]: via: (https://opensource.com/article/20/3/ssl-letsencrypt-k3s) [#]: author: (Lee Carpenter https://opensource.com/users/carpie) From ee52bbfabbe2620e6e68802ec699c58544ca8fc9 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 13 Apr 2020 15:42:51 +0800 Subject: [PATCH 074/394] Rename sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md to translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md --- .../20190107 Different Ways To Update Linux Kernel For Ubuntu.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md (100%) diff --git a/sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md b/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md similarity index 100% rename from sources/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md rename to translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md From 4835064a97994bd2ec46166b1f8bedaaf1cc4838 Mon Sep 17 00:00:00 2001 From: Ping Date: Mon, 13 Apr 2020 16:36:09 +0800 Subject: [PATCH 075/394] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E7=BF=BB=E8=AF=91:?= =?UTF-8?q?=2020200410=20Get=20started=20with=20Bash=20programming.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sources/tech/20200410 Get started with Bash programming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200410 Get started with Bash programming.md b/sources/tech/20200410 Get started with Bash programming.md index 875adb9876..cadcef4c71 100644 --- a/sources/tech/20200410 Get started with Bash programming.md +++ b/sources/tech/20200410 Get started with Bash programming.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (mr-ping) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 458f5144f31e0f211d74c41131e0edf4afc90b18 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 20:23:47 +0800 Subject: [PATCH 076/394] PRF @geekpi --- ...ow to Use AUR on Arch and Manjaro Linux.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md index 5a44bc4fef..6a56e84993 100644 --- a/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md +++ b/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md @@ -1,13 +1,13 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?) [#]: via: (https://itsfoss.com/aur-arch-linux/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) -什么是 Arch 用户仓库(AUR)?如何在 Arch 和 Manjaro Linux 上使用 AUR? +什么是 Arch 用户仓库(AUR)以及如何使用? ====== 如果你一直在使用 [Arch Linux][1] 或其他基于 Arch 的发行版,如 Manjaro,那么可能会遇到 AUR。你尝试安装新软件,有人建议从 AUR 中安装它。这让你感到困惑。 @@ -18,15 +18,15 @@ ![][2] -AUR 表示 Arch 用户仓库 (Arch User Repository)。它是针对基于 Arch 的 Linux 发行版用户的社区驱动的仓库。它包含名为 [PKGBUILDs][3] 的包描述,它可让你使用 [makepkg][4] 从源代码编译软件包,然后通过 [pacman][5](Arch Linux 中的软件包管理器)安装。 +AUR 表示Arch 用户仓库Arch User Repository。它是针对基于 Arch 的 Linux 发行版用户的社区驱动的仓库。它包含名为 [PKGBUILD][3] 的包描述,它可让你使用 [makepkg][4] 从源代码编译软件包,然后通过 [pacman][5](Arch Linux 中的软件包管理器)安装。 创建 AUR 的目的是组织和共享社区中的新软件包,并帮助加速将流行的软件包纳入[社区仓库][6]。 进入官方仓库的大量新软件包都从 AUR 开始。在 AUR 中,用户可以贡献自己的软件包构建(PKGBUILD 和相关文件)。 -AUR 社区可以对 AUR 中的软件包进行投票。如果一个软件包变得足够流行(假设它具有兼容的许可证和良好的打包技术),那么可以将其加入 pacman 直接访问的社区仓库中。 +AUR 社区可以对 AUR 中的软件包进行投票。如果一个软件包变得足够流行(假设它具有兼容的许可证和良好的打包技术),那么可以将其加入 `pacman` 直接访问的社区仓库中。 -简而言之,AUR 是开发人员在 Arch 仓库中正式包含新软件之前向 Arch Linux 用户提供新软件的一种方式。 +> 简而言之,AUR 是开发人员在 Arch 仓库中正式包含新软件之前向 Arch Linux 用户提供新软件的一种方式。 ### 你应该使用 AUR 吗?有什么风险? @@ -34,21 +34,21 @@ AUR 社区可以对 AUR 中的软件包进行投票。如果一个软件包变 如果你刚接触 Linux,建议你在建立有关 Arch/Manjaro 和 Linux 的基础知识之前不要使用 AUR。 -的确,任何人都可以将软件包上传到 AUR,但[受信任用户][7] (TU) 负责监视上传的内容。尽管 TU 对上传的软件包执行质量控制,但不能保证 AUR 中的软件包格式正确或没有恶意。 +的确,任何人都可以将软件包上传到 AUR,但[受信任用户][7](TU)负责监视上传的内容。尽管 TU 对上传的软件包执行质量控制,但不能保证 AUR 中的软件包格式正确或没有恶意。 -在实践中,AUR 似乎很安全,但理论上讲它可以造成一定程度的损害,但前提是你不小心。从 AUR 构建软件包时,聪明的 Arch 用户**总是**检查 PKGBUILD 和 *.install 文件。 +在实践中,AUR 似乎很安全,但理论上讲它可以造成一定程度的损害,但前提是你不小心。从 AUR 构建软件包时,聪明的 Arch 用户**总是**检查 `PKGBUILD` 和 `*.install` 文件。 -此外,TU(受信任用户)还删除了 AUR 中包含在 core/extra/community 中的软件包,因此它们之间不应存在命名冲突。AUR 通常会包含软件包的开发版本 (cvs/svn/git 等),但它们的名称会被修改,例如 foo-git。 +此外,TU(受信任用户)还会删除 AUR 中包含在 core/extra/community 中的软件包,因此它们之间不应存在命名冲突。AUR 通常会包含软件包的开发版本(cvs/svn/git 等),但它们的名称会被修改,例如 foo-git。 -对于 AUR软 件包,pacman 会处理依赖关系并检测文件冲突,因此,除非你默认使用 “–force” 选项,否则你不必担心用另一个包中的文件会覆盖另一个包的文件。如果这么做了,你可能会遇到比文件冲突更严重的问题。 +对于 AUR 软件包,`pacman` 会处理依赖关系并检测文件冲突,因此,除非你默认使用 `–force` 选项,否则你不必担心用另一个包中的文件会覆盖另一个包的文件。如果这么做了,你可能会遇到比文件冲突更严重的问题。 ### 如何使用 AUR? -使用 AUR 的最简单方法是通过 AUR helper。 [AUR helper][8] 是一个命令行工具(有些还有 GUI),可让你搜索在 AUR 上发布的软件包并安装。 +使用 AUR 的最简单方法是通过 AUR 助手。 [AUR 助手][8] 是一个命令行工具(有些还有 GUI),可让你搜索在 AUR 上发布的软件包并安装。 -##### 在 Arch Linux 上安装 AUR helper +#### 在 Arch Linux 上安装 AUR 助手 -假设你要使用 [Yay AUR helper][9]。确保在 Linux 上安装了 git。然后克隆仓库,进入目录并构建软件包。 +假设你要使用 [Yay AUR 助手][9]。确保在 Linux 上安装了 git。然后克隆仓库,进入目录并构建软件包。 依次使用以下命令: @@ -59,17 +59,17 @@ cd yay makepkg -si ``` -安装后,你可以使用 yay 命令来安装软件包: +安装后,你可以使用 `yay` 命令来安装软件包: ``` yay -S package_name ``` -并非必须使用 AUR helper 来从 AUR 安装软件包。从以下文章解如何在没有 AUR helper 的情况下使用 AUR。 +并非必须使用 AUR 助手来从 AUR 安装软件包。从以下文章解如何在没有 AUR 助手的情况下使用 AUR。 -##### 不使用 AUR helper 安装 AUR 软件包 +#### 不使用 AUR 助手安装 AUR 软件包 -如果你不想使用 AUR helper,那么也可以自行从 AUR 安装软件包。 +如果你不想使用 AUR 助手,那么也可以自行从 AUR 安装软件包。 在 [AUR 页面][10]上找到要安装的软件包后,建议确认“许可证”、“流行程度”、“最新更新”、“依赖项”等,作为额外的质量控制步骤。 @@ -89,17 +89,17 @@ makepkg -si #### 在 Manjaro Linux 中启用 AUR 支持 -它默认情况下未启用 AUR,你必须通过 pamac 启用它。我的笔记本电脑运行 [Manjaro][12] Cinnamon,但是所有 Manjaro 变种的步骤都相同。 +它默认情况下未启用 AUR,你必须通过 `pamac` 启用它。我的笔记本电脑运行 [Manjaro][12] Cinnamon,但是所有 Manjaro 变种的步骤都相同。 -打开 Pamac(列为 “Add/Remove Software”): +打开 Pamac(显示为 “Add/Remove Software”): ![][13] -进入 pamac 后,请进入如下所示的首选项。 +进入 Pamac 后,请进入如下所示的首选项preferences。 ![][14] -在首选项对话框中,进入 AUR 选项卡,启用 AUR 支持,启用检查更新并关闭对话框。 +在首选项对话框中,进入 “AUR” 选项卡,启用 AUR 支持,启用检查更新,并关闭对话框。 ![][15] @@ -116,7 +116,7 @@ via: https://itsfoss.com/aur-arch-linux/ 作者:[Dimitrios Savvopoulos][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f9f6a48a67fb3be30f342c534df53d804dc89827 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 20:29:37 +0800 Subject: [PATCH 077/394] PUB @geekpi https://linux.cn/article-12107-1.html --- ...ository (AUR)- How to Use AUR on Arch and Manjaro Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md (98%) diff --git a/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/published/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md similarity index 98% rename from translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md rename to published/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md index 6a56e84993..df0074259a 100644 --- a/translated/tech/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md +++ b/published/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12107-1.html) [#]: subject: (What is Arch User Repository (AUR)? How to Use AUR on Arch and Manjaro Linux?) [#]: via: (https://itsfoss.com/aur-arch-linux/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) From e232ab3c4a5bd21ecb30897c3b92cd0da768abf6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 20:58:14 +0800 Subject: [PATCH 078/394] APL --- ... using AI to translate -wash your hands- in 500 languages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md index a18d557337..562ea35c72 100644 --- a/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md +++ b/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c2e05718dd93795a51b3dad22e679ccc5526b076 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 13 Apr 2020 23:53:20 +0800 Subject: [PATCH 079/394] TSL --- ...late -wash your hands- in 500 languages.md | 136 ----------------- ...late -wash your hands- in 500 languages.md | 137 ++++++++++++++++++ 2 files changed, 137 insertions(+), 136 deletions(-) delete mode 100644 sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md create mode 100644 translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md diff --git a/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md deleted file mode 100644 index 562ea35c72..0000000000 --- a/sources/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md +++ /dev/null @@ -1,136 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages) -[#]: via: (https://opensource.com/article/20/4/ai-translation) -[#]: author: (Daniel Whitenack https://opensource.com/users/datadan) - -How I'm using AI to translate 'wash your hands' in 500 languages -====== -By using both human and machine-generated translations, key health -phrases can be translated into local languages spoken all over the -world. -![Two diverse hands holding a globe][1] - -You might not know, but there are currently [7,117 languages spoken in the world][2]. Not dialects, but living languages! However, much of the world's digital media is available in only a couple dozen languages, and translation platforms like Google Translate only support around 100 languages. This reality means that there are billions of people around the world that are marginalized due to a lack of timely access to information. The current coronavirus (COVID-19) pandemic has made this painfully clear, and it has stressed the need for immediate, rapid translation of health-related phrases (like "wash your hands" or "keep your distance") into the long tail of languages. - -To this end, I applied state-of-the-art AI techniques to construct something close to the phrase "wash your hands" in 544 languages and counting (my GPUs are still running). Multilingual Unsupervised and Supervised Embeddings (MUSE) methods are used to train cross-lingual word embeddings between each of 544 languages and English. These embeddings then allow for the extraction of a phrase similar to the target phrase from existing documents. - -I performed this work in collaboration with my colleagues at SIL International, who have gathered even more human translations of the phrase. The combination of these human translations and some of my machine translations can be searched on [this Ethnologue guide page][3] (machine-generated phrases are indicated with a little robot icon), and more translations will be added as they are generated/gathered. - -### Leveraging existing corpora - -SIL International has done linguistic work in over 2000 languages and is currently managing over 1600 language projects. Thus, as I approached this particular problem, I knew that we had likely already translated the phrase "wash your hands" and/or similar phrases many times into hundreds of languages, and that guess paid off in spades. I was able to quickly gather documents (mostly completed shell book templates, educational materials, and Bibles) from our archives in over 900 languages. Each of these documents has an English parallel, which necessarily includes the phrase "wash your hands" and/or similar phrases like "wash your face." Moreover, each of these documents is very high quality and translated and checked in cooperation with the local language communities. - -That is quite the multilingual data set. However, there are two problems to overcome. First, this data included thousands of samples for most languages, which is in contrast to the millions used to train machine translation models. Second, even if the documents include the phrase "wash your hands" in the target language, we don't know the exact location of the phrase within the surrounding text. - -We could certainly exploit some of the latest tricks in [machine translation for low resource languages][4], but it would take some time to tune automated methods for rapidly adapting translation models in each language pair. Moreover, many of the languages we are targeting have no existing baseline with which we could compare evaluation metrics, e.g., [BLEU score][5]. Given the pressing concerns about the Coronavirus pandemic, we wanted to move a bit faster than that (although we plan to return to this problem in the future). - -I opted to try and construct the phrase "wash your hands" by finding the phrase itself or components of the phrase (like "wash your" or "your hands") in existing documents. To find these, I trained cross-lingual embedding for each {English, Target Language} pair using [Multilingual Unsupervised and Supervised Embedding (MUSE)][6] from Facebook Research. MUSE takes monolingual word embeddings as input (I used [_fasttext_][7] to generate these) and learns a mapping from the English to the target embedding space using adversarial methods. The output of this process is cross-lingual word embeddings. - -![Using fasttext along with MUSE to perform cross-language embedding][8] - -Once the cross-lingual embeddings are generated, we can get to finding the phrase components in the target language documents. As it turns out, the phrase "wash your face" was most clearly used throughout the documents along with instances of "hands," "wash your," etc. in isolation. For each of the languages, I search through n-grams in areas where I expected the phrase to appear (based on its usage in the English parallel). N-grams were vectorized using the cross-lingual embedding and compared with vectorized versions of the English phrases using various distance metrics. The n-grams that were "closest" to the English phrases in the embedding space were determined to be the target language matches. - -Finally, component phrases matching their English counterparts were combined to generate the phrase "wash your hands" in the target language. This combination utilizes the cross-lingual embedding again to make sure that the components are combined in an appropriate manner. For example, if we matched the phrase "wash your feet" in the target language, the n-gram corresponding to "feet" must be replaced with the n-gram corresponding to "hands." Here's an example for Belize Kriol English: - -![][9] - -There were, of course, some assumptions that were made during this matching process, and it is entirely possible that this procedure does not produce grammatically correct predictions. For example, I assumed that in most languages, the word for "hands" and the word for "feet" are both one token long (with tokens being separated by spaces and punctuation). This is certainly not always the case. This could create a bad word salad something like "and wash the and hand you" or similar. Hopefully, we can overcome some of these limitations and extend the system in the future, but, for now, we chose to reinforce the idea with graphics. - -We adapted the World Health Organization's hand washing instructions into a template PNG image. We then took our translated and generated phrases and rendered them into the hand washing image using a combination of Bash and Go scripts. In this way, the idea of proper hand washing is emphasized in both text and imagery (just in case our generated translations are awkward). - -![][10] - -### Results - -Thus far, I've been able to train cross-lingual embeddings for 544 languages. I used the above-discussed method to try and construct "wash your hands" for all of these languages. Because I don't have aligned data for many of the language pairs, I used separate holdout documents also containing components of "wash your hands" to help validate the tokens in the constructed phrase. This gives us some confidence in the translations that we publicly release (at least that they contain information indicating washing and/or hands). In addition, I compared the method with language pairs that are also supported by Google Translate and/or have available human translations. Here's a sample of the translations with language stats from [the Ethnologue][11]: - -#### Language: Italian [ita] - -Location: Italy -Population: 68,000,000 -Our system: "làvati la mani" -Google Translate: "Lavati le mani" - -#### Language: Bulgarian [bul] - -Location: Bulgaria -Population: 8,000,000 -Our system: "умий ръцете" -Google Translate: "Измий си ръцете" - -#### Language: Dutch [nld] - -Location: Netherlands -Population: 24,000,000 -Our system: "wast uw handen" -Google Translate: "Was je handen" - -#### Language: Pijin [pis] - -Location: Solomon Islands -Population: 550,000 -Our system: "wasim han" -Google Translate: Not supported - -#### Language: Tikar [tik] - -Location: Cameroon -Population: 110,000 -Our system: "ɓɔsi fyàʼ" -Google Translate: Not supported - -#### Language: Waffa [waj] - -Location: Papua New Guinea -Population: 1,300 -Our system: "yaakuuvaitana nnikiiyauvaa fini" -Google Translate: Not supported - -The constructed phrases are similar to reference translations or appear to be alternative ways of saying "wash your hands." For example, in Bulgarian, I predict "умий ръцете," and Google Translate predicts "Измий си ръцете." However, if I back-translate my prediction using Google Translate, I still get "wash your hands." There is some uncertainty where I can't compare to reference translations (e.g., Pijin [pis] from the Solomon Islands) or human-annotated spans, but I can still validate that the word for wash (wasim) and the word for hands (han) are used in other reference documents that are necessarily talking about washing, or hands, respectively. About 15% of the translations could be validated using this method, and I hope to validate more as I gather reference dictionaries. - -Note, I used at most about 7,000 sentences in each language to get the above translations, even for high-resource languages like Italian. I also did not rely on aligned sentences between the language pairs. Despite this very data-scarce, unsupervised scenario, I was still able to obtain phrases similar to that of Google Translate for languages supported by both systems. This demonstrates the potential utility of this sort of "hybrid" approach (unsupervised alignment of word embeddings + rule-based matching) for translating short phrases into languages where very little data exists. - -Note—I'm definitely not saying that this is a solution to the problem of information spread about Coronavirus and other health-related issues. There are still a lot of things to explore and formally evaluate here, and we are working on that. In many cases, this approach won't be able to help construct important informational material in hundreds of languages. However, I think that we should all be trying to develop creative solutions to problems related to the current crisis. Maybe this is one piece of a very large puzzle. - -You can view the complete list of validated translations plus human translations on [this Ethnologue guide page][3]. In addition, a more thorough description and analysis of the system in paper form is forthcoming. We welcome feedback from the public on the translations to help fine-tune the system and, most of all, to make sure that health information gets out to marginalized language communities around the world. - -### Create your own hand washing posters - -We have open sourced [the code used to render complex scripts and generate the hand washing posters][12]. This methodology should be able to handle almost all languages and scripts. You can add your own translation of "wash your hands" to a poster to help spread the word or tailor the translations for your own local context. Be sure to share your generated posters on social media with the hashtag #WashYourHands. - -### Develop your AI skills - -There are so many exciting AI problems out there that can make a huge impact in the world. If you want to solve problems like the one above with AI or if you think your business might need to start leveraging AI for other things (supply chain optimization, recommendation, customer service automation, etc.), don't miss the [_AI Classroom_ training event this May][13]. _AI Classroom_ is an immersive, three-day virtual training event for anyone with at least some programming experience and foundational understanding of mathematics. The training provides a practical baseline for realistic AI development using Python and open source frameworks like TensorFlow and PyTorch. After completing the course, participants will have the confidence to start developing and deploying their own AI solutions. - -_This article was republished with permission from _ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/ai-translation - -作者:[Daniel Whitenack][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/datadan -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe) -[2]: https://www.ethnologue.com/guides/how-many-languages -[3]: https://www.ethnologue.com/guides/health -[4]: https://datadan.io/blog/resources-for-low-resource-machine-translation -[5]: https://en.wikipedia.org/wiki/BLEU -[6]: https://github.com/facebookresearch/MUSE -[7]: https://fasttext.cc/ -[8]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom.gif (Using fasttext along with MUSE to perform cross-language embedding) -[9]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom2.gif -[10]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom3.gif -[11]: https://www.ethnologue.com/ -[12]: https://github.com/sil-ai/wash-your-hands -[13]: https://datadan.io/ diff --git a/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md new file mode 100644 index 0000000000..28669c6c39 --- /dev/null +++ b/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md @@ -0,0 +1,137 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages) +[#]: via: (https://opensource.com/article/20/4/ai-translation) +[#]: author: (Daniel Whitenack https://opensource.com/users/datadan) + +我是如何用 AI 把 “请洗手”翻译成 500 种语言的? +====== + +> 通过使用人类和机器生成的翻译,可以将关键的健康短语翻译成世界各地的当地语言。 + +![Two diverse hands holding a globe][1] + +你可能不知道,目前世界上有 [7117 种语言][2],不是方言,而是在用的语言! 然而,世界上大部分的数字媒体只采用几十种语言,而像谷歌翻译这样的翻译平台只支持 100 种左右的语言。这样的现实意味着,由于缺乏及时获取信息的机会,全世界有数十亿人被边缘化。当前的冠状病毒(COVID-19)大流行已经让人痛苦地意识到了这一点,凸显了将健康相关的短语(如“请洗手wash your hands”或“保持距离”等)即时、快速翻译成小众语言的必要性。 + +为此,我应用了最先进的AI技术,用 544 种语言构建出了与“请洗手”相近的短语并进行了统计(我的 GPU 还在运行)。多语言无监督和监督嵌入Multilingual Unsupervised and Supervised Embeddings(MUSE)方法被用来训练这 544 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。 + +我与 SIL 国际公司的同事们合作完成了这项工作,他们收集了该短语的更多的人工翻译结果。这些人工翻译结果和我的一些机器翻译结果的组合可以在[这个民族语指南页面][3]上搜索到(机器生成的短语用一个小的机器人图标表示),更多的翻译将在生成/收集到的时候加入。 + +### 利用现有的语料库 + +SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文件(主要是完成的贝壳书模板、教材和圣经)。这些文件中的每一份文件都有一个英文的对应语,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文件的质量都很高,并与当地语言社区合作进行了翻译和检查。 + +这是相当多语言的数据集。然而,有两个问题需要克服。首先,这个数据包含了大多数语言的数千种样本,这与训练机器翻译模型所使用的数百万个样本形成了鲜明对比。其次,即使文档中包含目标语言中的“请洗手”这个短语,我们也不知道这个短语在周围文本中的确切位置。 + +我们当然可以利用[低资源语言的机器翻译][4]中的一些最新技巧,但要在每一对语言中快速调整翻译模型的自动化方法,还需要一些时间。此外,我们所针对的许多语言都没有现成的可以与之比较评估指标的基线,例如[BLEU 评分][5]。考虑到对冠状病毒大流行的迫切担忧,我们希望比这更快一点(尽管我们计划在将来再来解决这个问题)。 + +我选择通过在现有的文档中寻找短语本身或短语的组件(如“请洗”或“你的手”)来尝试构建“请洗手”这个短语。为了找到这些成分,我使用 Facebook Research 的 [多语言无监督和监督嵌入(MUSE)][6]对每个 {英语、目标语言} 对进行跨语言cross-lingual嵌入训练。MUSE 以单语言monolingual的单词嵌入作为输入(我使用 [fasttext][7] 来生成这些词),并使用对抗性方法学习从英语到目标嵌入空间的映射。这个过程的输出是跨语言cross-lingual的单词嵌入。 + +![Using fasttext along with MUSE to perform cross-language embedding][8] + +一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语成分。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-grams 搜索我预期该短语会出现的地方(根据其在英语平行语中的用法)。使用跨语言嵌入法对 n-grams 进行了矢量化,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-grams 被确定为目标语言匹配。 + +最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用跨语言嵌入,确保组件短语的组合方式合适。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是伯利兹·克里奥尔Belize Kriol英语的一个例子: + +![][9] + +当然,在这个匹配过程中,有一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个字元长的(字元由空格和标点符号隔开)。当然,情况肯定不一定是这样。这可能会造成类似于“和洗的和手你”或类似的不好的词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。 + +我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(只是为了防止我们生成的翻译有问题)。 + + +![][10] + +### 结果 + +到目前为止,我已经能够训练出 544 种语言的跨语言嵌入。我使用上述讨论过的方法尝试为所有这些语言构建“请洗手”这个短语。因为我没有许多语言对的对齐数据,所以我使用了同样包含“请洗手”成分的单独的保留文档来帮助验证构造短语中的字元。这让我们对公开发布的翻译版本有了一些信心(至少它们包含了表示“洗”和/或“手”的信息)。此外,我还将该方法与谷歌翻译支持的和/或有可用的人工翻译的语言对进行了比较。以下是来自 [Ethnologue][11] 带有语言统计的翻译样本。 + +**语言:意大利语 [Ita]** + +- 地点:意大利 +- 人口: 68,000,000 +- 我们的系统: làvati la mani +- 谷歌翻译: Lavati le mani + +**语言:保加利亚语 [bul]** + +- 地点:保加利亚 +- 人口:8,000,000 +- 我们的系统:умий ръцете +- 谷歌翻译:Измий си ръцете + +**语言: 荷兰语 [nld]** + +- 地点:荷兰 +- 人口:24,000,000,000 +- 我们的系统:wast uw handen +- 谷歌翻译:Was je handen + +**语言: Pijin [pis]** + +- 地点:所罗门群岛 +- 人口: 550,000 +- 我们的系统:wasim han +- 谷歌翻译:不支持 + +**语言:Tikar [tik]** + +- 地点:喀麦隆 +- 人口:110,000 +- 我们的系统:ɓɔsi fyàʼ +- 谷歌翻译:不支持 + +**语言:Waffa [waj]** + +- 地点:巴布亚新几内亚 +- 人口:1,300 +- 我们的系统:yaakuuvaitana nnikiiyauvaa fini +- 谷歌翻译:不支持 + +构建的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis])或人类注释的跨度进行比较,但我仍然可以验证“洗”(wasim)和“手”(han)分别用在其他必定是谈论洗或手的参考文件中。大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中,能验证更多的译文。 + +请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也没有依赖语言对之间的对齐句子。尽管在这种数据非常稀缺、无监督的情况下,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。 + +注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。 + +你可以在[这个民族语言指南][3]上查看经过验证的译文加上人工翻译的完整列表。此外,我们即将以论文的形式对这一系统进行更深入的描述和分析。我们欢迎公众对翻译进行反馈,以帮助系统进行微调,最重要的是,确保将健康信息传递给世界各地的边缘化语言社区。 + +### 制作自己的洗手海报 + +我们已经开源了[用于渲染复合的脚本和生成洗手海报的代码][12]。这种方法应该能够处理几乎所有的语言和脚本。你可以在海报中添加你自己的“请洗手”的翻译,以帮助传播,或者根据自己的本地语境进行翻译。请务必在社交媒体上以 #WashYourHands 为标签分享你生成的海报。 + +### 培养你的 AI 技能 + +有很多令人兴奋的 AI 问题,可以给世界带来巨大的影响。如果你想用人工智能解决像上面提到的问题,或者你认为你的企业可能需要开始利用人工智能来做其他事情(供应链优化、推荐、客户服务自动化等),那么不要错过今年 5 月的[AI 课堂培训活动][13]。*AI 课堂*是一个沉浸式的、为期三天的虚拟培训活动,适合至少有一定编程经验和数学基础知识的人参加。该培训提供了使用 Python 和开源框架(如 TensorFlow 和 PyTorch)进行现实的 AI 开发的实用基础知识。完成课程后,学员将有信心开始开发和部署自己的 AI 解决方案。 + +本文经许可转载自 https://datadan.io/blog/wash-your-hands + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/ai-translation + +作者:[Daniel Whitenack][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/datadan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe) +[2]: https://www.ethnologue.com/guides/how-many-languages +[3]: https://www.ethnologue.com/guides/health +[4]: https://datadan.io/blog/resources-for-low-resource-machine-translation +[5]: https://en.wikipedia.org/wiki/BLEU +[6]: https://github.com/facebookresearch/MUSE +[7]: https://fasttext.cc/ +[8]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom.gif (Using fasttext along with MUSE to perform cross-language embedding) +[9]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom2.gif +[10]: https://opensource.com/sites/default/files/uploads/ai-language-translation-wash-your-hands-opensourcedotcom3.gif +[11]: https://www.ethnologue.com/ +[12]: https://github.com/sil-ai/wash-your-hands +[13]: https://datadan.io/ From f0740a0c68ea58a4e265f4d4239e5c5b96566e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 14 Apr 2020 08:35:09 +0800 Subject: [PATCH 080/394] Translated --- ...ux on VirtualBox- Quickest - Safest Way.md | 146 ------------------ ...ux on VirtualBox- Quickest - Safest Way.md | 146 ++++++++++++++++++ 2 files changed, 146 insertions(+), 146 deletions(-) delete mode 100644 sources/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md create mode 100644 translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md diff --git a/sources/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md b/sources/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md deleted file mode 100644 index 3b7629d2a6..0000000000 --- a/sources/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way) -[#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Installing Kali Linux on VirtualBox: Quickest & Safest Way -====== - -_**This tutorial shows you how to install Kali Linux on Virtual Box in Windows and Linux in the quickest way possible.**_ - -[Kali Linux][1] is one of the [best Linux distributions for hacking][2] and security enthusiasts. - -Since it deals with a sensitive topic like hacking, it’s like a double-edged sword. We have discussed it in the detailed Kali Linux review in the past so I am not going to bore you with the same stuff again. - -While you can install Kali Linux by replacing the existing operating system, using it via a virtual machine would be a better and safer option. - -With Virtual Box, you can use Kali Linux as a regular application in your Windows/Linux system. It’s almost the same as running VLC or a game in your system. - -Using Kali Linux in a virtual machine is also safe. Whatever you do inside Kali Linux will NOT impact your ‘host system’ (i.e. your original Windows or Linux operating system). Your actual operating system will be untouched and your data in the host system will be safe. - -![][3] - -### How to install Kali Linux on VirtualBox - -I’ll be using [VirtualBox][4] here. It is a wonderful open source virtualization solution for just about anyone (professional or personal use). It’s available free of cost. - -In this tutorial, we will talk about Kali Linux in particular but you can install almost any other OS whose ISO file exists or a pre-built virtual machine save file is available. - -**Note:** _The same steps apply for Windows/Linux running VirtualBox._ - -As I already mentioned, you can have either Windows or Linux installed as your host. But, in this case, I have Windows 10 installed (don’t hate me!) where I try to install Kali Linux in VirtualBox step by step. - -And, the best part is – even if you happen to use a Linux distro as your primary OS, the same steps will be applicable! - -Wondering, how? Let’s see… - -[Subscribe to Our YouTube Channel for More Linux Videos][5] - -### Step by Step Guide to install Kali Linux on VirtualBox - -_We are going to use a custom Kali Linux image made for VirtualBox specifically. You can also download the ISO file for Kali Linux and create a new virtual machine – but why do that when you have an easy alternative?_ - -#### 1\. Download and install VirtualBox - -The first thing you need to do is to download and install VirtualBox from Oracle’s official website. - -[Download VirtualBox][6] - -Once you download the installer, just double click on it to install VirtualBox. It’s the same for [installing VirtualBox on Ubuntu][7]/Fedora Linux as well. - -#### 2\. Download ready-to-use virtual image of Kali Linux - -After installing it successfully, head to [Offensive Security’s download page][8] to download the VM image for VirtualBox. If you change your mind to utilize [VMware][9], that is available too. - -![][10] - -As you can see the file size is well over 3 GB, you should either use the torrent option or download it using a [download manager][11]. - -[Kali Linux Virtual Image][8] - -#### 3\. Install Kali Linux on Virtual Box - -Once you have installed VirtualBox and downloaded the Kali Linux image, you just need to import it to VirtualBox in order to make it work. - -Here’s how to import the VirtualBox image for Kali Linux: - -**Step 1** : Launch VirtualBox. You will notice an **Import** button – click on it - -![Click on Import button][12] - -**Step 2:** Next, browse the file you just downloaded and choose it to be imported (as you can see in the image below). The file name should start with ‘kali linux‘ and end with . **ova** extension. - -![Importing Kali Linux image][13] - -**S** Once selected, proceed by clicking on **Next**. - -**Step 3** : Now, you will be shown the settings for the virtual machine you are about to import. So, you can customize them or not – that is your choice. It is okay if you go with the default settings. - -You need to select a path where you have sufficient storage available. I would never recommend the **C:** drive on Windows. - -![Import hard drives as VDI][14] - -Here, the hard drives as VDI refer to virtually mount the hard drives by allocating the storage space set. - -After you are done with the settings, hit **Import** and wait for a while. - -**Step 4:** You will now see it listed. So, just hit **Start** to launch it. - -You might get an error at first for USB port 2.0 controller support, you can disable it to resolve it or just follow the on-screen instruction of installing an additional package to fix it. And, you are done! - -![Kali Linux running in VirtualBox][15] - -The default username in Kali Linux is root and the default password is toor. You should be able to login to the system with it. - -Do note that you should [update Kali Linux][16] before trying to install a new applications or trying to hack your neighbor’s WiFi. - -I hope this guide helps you easily install Kali Linux on Virtual Box. Of course, Kali Linux has a lot of useful tools in it for penetration testing – good luck with that! - -**Tip** : Both Kali Linux and Ubuntu are Debian-based. If you face any issues or error with Kali Linux, you may follow the tutorials intended for Ubuntu or Debian on the internet. - -### Bonus: Free Kali Linux Guide Book - -If you are just starting with Kali Linux, it will be a good idea to know how to use Kali Linux. - -Offensive Security, the company behind Kali Linux, has created a guide book that explains the basics of Linux, basics of Kali Linux, configuration, setups. It also has a few chapters on penetration testing and security tools. - -Basically, it has everything you need to get started with Kali Linux. And the best thing is that the book is available to download for free. - -[Download Kali Linux Revealed for FREE][17] - -Let us know in the comments below if you face an issue or simply share your experience with Kali Linux on VirtualBox. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-kali-linux-virtualbox/ - -作者:[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://www.kali.org/ -[2]: https://itsfoss.com/linux-hacking-penetration-testing/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box.png?resize=800%2C450&ssl=1 -[4]: https://www.virtualbox.org/ -[5]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[6]: https://www.virtualbox.org/wiki/Downloads -[7]: https://itsfoss.com/install-virtualbox-ubuntu/ -[8]: https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/ -[9]: https://itsfoss.com/install-vmware-player-ubuntu-1310/ -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box-image.jpg?resize=800%2C347&ssl=1 -[11]: https://itsfoss.com/4-best-download-managers-for-linux/ -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-import-kali-linux.jpg?ssl=1 -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-linux-next.jpg?ssl=1 -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-kali-linux-settings.jpg?ssl=1 -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-on-windows-virtualbox.jpg?resize=800%2C429&ssl=1 -[16]: https://linuxhandbook.com/update-kali-linux/ -[17]: https://kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf diff --git a/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md b/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md new file mode 100644 index 0000000000..100d2ec246 --- /dev/null +++ b/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md @@ -0,0 +1,146 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way) +[#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +在 VirtualBox 上安装 Kali Linux : 最快速和最安全的方法 +====== + +_**这篇教程向你展示如何以最快的方式在 Windows 和 Linux 中的 Virtual Box 虚拟机上安装 Kali Linux 。**_ + +[Kali Linux][1] 是 [最适合黑客攻击和安全爱好者的 Linux 发行版][2] 之一。 + +因为它涉及一个像黑客之类的敏感话题,就像一把双刃剑。我们过去在详细的 Kali Linux 评论中讨论过,所以我不会使用同样的东西来烦你。 + +尽管你可以通过以替换现有的操作系统的形式安装 Kali Linux 。但是通过一台虚拟机来使用它可能会是更好更安全的选择。 + +使用 Virtual Box ,你可以在 Windows/Linux 系统中将 Kail Linux 作为常规应用程序使用。它几乎与在系统中运行 VLC 或游戏是一样的。 + +在一台虚拟机中使用 Kali Linux 是安全的。不管你在 Kali Linux 做什么都不会影响你的 ‘宿主系统’ (例如,你的原始的 Windows 或 Linux 操作系统)。你的实际操作系统将不会受到影响,并且在你的宿主系统中数据也将是安全的。 + +![][3] + +### 如何在 VirtualBox 中安装 Kali Linux + +在这里我将使用 [VirtualBox][4] 。它是一个非常好的开源虚拟化解决方案,几乎适合于任何人(专业使用或个人使用)。它是免费提供的。 + +在这篇文章中,我们将特别讨论 Kali Linux ,但是你也可以安装其它任何存在的 ISO 文件,或者一个可用的预先构建的虚拟机保存文件。 + +**注意:** _同样的步骤也适用于运行 VirtualBox 的 Windows/Linux 。_ + +如上所述,你可以安装 Windows 或 Linux 作为你的宿主系统。但是,在我已安装 Windows 10 的情况下(别仇恨我!),我将尝试在 VirtualBox 中一步一步地安装 Kali Linux 。 + +并且,最好的部分是,– 即使你碰巧使用一个 Linux 发行版作为你的主要操作系统,也将使用同样的步骤! + +很疑惑,如何做?让我们来看看… + +[更多 Linux 视频,订阅我们的 YouTube 频道][5] + +### 图解在 VirtualBox 上安装 Kali Linux + +_我们将使用专门为 VirtualBox 定制的 Kali Linux 镜像。你也可以下载 Kali Linux 的 ISO 文件,并创建一个新的虚拟机 – 但是为什么当你有一个简单的选择时还这样做呢?_ + +#### 1\. 下载和安装 VirtualBox + +第一件要做的事是从甲骨文的官方网站下载和安装 VirtualBox 。 + +[下载VirtualBox][6] + +在你下载安装器后,只需要双击它来安装 VirtualBox 。在 [Ubuntu][7] / Fedora Linux 安装 VirtualBox 也是一样的。 + +#### 2\. 下载 Kali Linux 的即时可用的虚拟镜像 + +在安装成功后,前往 [攻击性安全的下载页面][8] 来下载适用于 VirtualBox 的虚拟机镜像。如果您改变主意使用 [VMware][9] ,那也是可行的。 + +![][10] + +如你所见,文件大小大约 3 GB ,你应该使用一个 torrent 选项,或者使用一个 [下载管理器][11] 来下载它。 + +[Kali Linux 虚拟镜像][8] + +#### 3\. 在 Virtual Box 上安装 Kali Linux + +在你安装 VirtualBox 和下载 Kali Linux 镜像后,你只需要导入它到 VirtualBox 中以便使它工作。 + +这里是如何导入 Kali Linux 的 VirtualBox 镜像: + +**步骤 1** : 启动 VirtualBox 。你将注意到一个 **导入** 按钮 – 在它上面鼠标左键单击 + +![在 导入 按钮上鼠标左键单击][12] + +**步骤 2:** 接下来,浏览到你更改下载的文件,并选择它来导入 (如你在下面的图像中所见)。文件名称一个以 'kali linux' 开始并以 . **ova** 拓展名结束。 + +![导入 Kali Linux 镜像][13] + + 在选择后,通过在 **接下来** 上鼠标左键单击以继续。 + +**步骤 3** : 现在,将向你显示将要导入虚拟机的设置。所以,你可以自定义它们或者不自定义它们 – 这取决于你的选择。如果你使用默认设置也是可以的。 + +你需要选择一个有足够可用存储空间的路径。在 Windows 上,我从不建议使用 **C:** 盘。 + +![导入硬盘驱动器为 VDI][14] + +在这里,硬盘驱动器如同 VDI 一样通过分配存储器空间集来虚拟挂载硬盘驱动器。 + +在你完成设置后,单击 **导入** 并等待一段时间。 + +**步骤 4:** 你现在将看到它的列表。所以,只需点击 **开始** 来启动它。 + +在最开始的时候,你可能会得到一个 USB 2.0 端口控制器的错误,你可以禁用它来解决问题,或者只需按照屏幕上的指南来安装一个附加软件包修复问题。与此同时,你完成所有工作! + +![Kali Linux 运行在 VirtualBox 中][15] + +在 Kali Linux 中默认用户名是 root ,默认密码是 toor 。你可以使用用户名和密码来登录到系统中。 + +请注意,在尝试安装一个新的应用程序或尝试侵入你邻居家的 WiFi 之前,你应该 [更新Kali Linux][16] 。 + +我希望这篇指南能帮助您在 Virtual Box 上很容易地安装 Kali Linux 。当然,Kali Linux 有很多有用的渗透测试工具 – 祝你好运! + +**提示** : Kali Linux 和 Ubuntu 都是基于 Debian 的,如果你在使用 Kali Linux 时遇到一些问题或错误,你可以按照互联网上的 Ubuntu 和 Debian 的教程解决。 + +### 额外的好处: 免费的 Kali Linux 指南书 + +如果你刚刚开始使用 Kali Linux, 那么知晓如何使用Kali Linux 将是一个好主意。 + +Kali Linux 背后的公司 Offensive Security 创建了一本解释 Linux 基础知识,Kali Linux 基础知识,配置和设置的指南书,也有一些关于渗透测试和安全工具的章节。 + +基本上,它拥有你开始使用 Kali Linux 所需的一切东西。最好的事情是这本书可以免费下载。 + +[免费下载 Kali Linux 解密][17] + +如果你遇到问题或只是想分项在 VirtualBox 使用 Kali Linux 的经验,请在下面的评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-kali-linux-virtualbox/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者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://www.kali.org/ +[2]: https://itsfoss.com/linux-hacking-penetration-testing/ +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box.png?resize=800%2C450&ssl=1 +[4]: https://www.virtualbox.org/ +[5]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[6]: https://www.virtualbox.org/wiki/Downloads +[7]: https://itsfoss.com/install-virtualbox-ubuntu/ +[8]: https://www.offensive-security.com/kali-linux-vm-vmware-virtualbox-image-download/ +[9]: https://itsfoss.com/install-vmware-player-ubuntu-1310/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-virtual-box-image.jpg?resize=800%2C347&ssl=1 +[11]: https://itsfoss.com/4-best-download-managers-for-linux/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-import-kali-linux.jpg?ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-linux-next.jpg?ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/vmbox-kali-linux-settings.jpg?ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/kali-linux-on-windows-virtualbox.jpg?resize=800%2C429&ssl=1 +[16]: https://linuxhandbook.com/update-kali-linux/ +[17]: https://kali.training/downloads/Kali-Linux-Revealed-1st-edition.pdf From b6a0458f9dcde9c4e1d9f17ce88ff190aeeacc9e Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Apr 2020 08:43:30 +0800 Subject: [PATCH 081/394] translated --- ... The Beautiful Deepin Desktop to Ubuntu.md | 84 ------------------- ... The Beautiful Deepin Desktop to Ubuntu.md | 84 +++++++++++++++++++ 2 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md create mode 100644 translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md diff --git a/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md b/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md deleted file mode 100644 index b540f8995d..0000000000 --- a/sources/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu) -[#]: via: (https://itsfoss.com/ubuntudde/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu -====== - -Deepin is a beautiful desktop environment with an intuitive UI. UbuntuDDE project combines the power of Ubuntu and the beauty of Deepin. - -[Deepin Desktop Environment][1] (DDE) is a beautiful desktop environment created by the developers of [Deepin Linux][2]. Initially, Deepin Linux was based on [Ubuntu][3] but later they switched to [Debian][4]. - -![Deepin Desktop Environment in Ubuntu][5] - -One major problem with Deepin Linux is its slow servers. A regular system takes hours to download for the fact that they have all their servers in China and these servers are unfortunately extremely slow. - -If you want to use Deepin desktop, nothing stops you from installing it on your regular Ubuntu system. [UbuntuDDE][6] is trying to make it simpler by providing you an out of the box Deepin desktop experience on top of Ubuntu. This saves you time and effort in installing and configuring Deepin on Ubuntu. - -![Screenshot of UbuntuDDE][7] - -### Ubuntu DDE: Power of Ubuntu and beauty of Deepin desktop - -Please note that UbuntuDDE is not an official flavor of Ubuntu. UbuntuDDE developers are not associated with the Ubuntu team. UbuntuDDE is currently a Remix distribution and is aiming for getting recognized as Ubuntu’s official flavor in future releases. - -UbuntuDDE developers are helped by Alan Pope of Ubuntu’s Snapcraft team and teams of Ubuntu Budgie and [Ubuntu Cinnamon][8] and a few other developers. - -In a conversation with It’s FOSS, its lead developer Arun highlighted that the important aspect of this project is to regularly maintain the DDE packages for Ubuntu and help users enjoy the full taste of DDE (Deepin Desktop Environment). - -![Ubuntu Deepin Edition login screen][9] - -Arun also mentioned that this Ubuntu Deepin remix project started first by maintaining and packaging the packages to the latest release from the upstream i.e. Deepin Repository. Then, it eventually got spin with Ubuntu 20.04 focal resulting in an image file that everyone can install without the hassle to install regular Ubuntu first and then the Deepin Desktop. UbuntuDDE is not just the combo of DDE and Ubuntu but also the fusion of selective packages and design changes by the UbuntuDDE Team. - -![UbuntuDDE screenshot][10] - -Unlike Deepin Linux, UbuntuDDE doesn’t use Deepin Appstore. It uses Ubuntu Software Center instead. This should be a good news if you are spooked by the [spyware labeling of Wuhan-based Deepin Linux][11]. - -### Download UbuntuDDE 20.04 Beta - -UbuntuDDE is aiming to release its first official stable release with Ubuntu 20.04. Like [other Ubuntu flavors][12], UbuntuDDE 20.04 beta is also available for you to download and try. - -Warning! - -A word of warning. UbuntuDDE is a novice project under development. Please don’t use it on your main system. If you want to try it, use it in virtual machine or on a spare system. - -[Download Ubuntu 20.04 DDE Beta][13] - -![Installing UbuntuDDE][14] - -Since it is essentially Ubuntu, installing UbuntuDDE is the same as installing Ubuntu. You may refer to this tutorial showing [how to install Ubuntu inside VirtualBox][15]. - -I know you may think ‘not another Ubuntu’ or ‘it’s just Deepin on Ubuntu that anyone can do’ and you do have a point. But I also know there is a small segment of users who like projects like UbuntuDDE that makes thing easier for them. I mean that’s how many Ubuntu flavor came into existence. What do you think? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntudde/ - -作者:[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.deepin.org/en/dde/ -[2]: https://www.deepin.org/en/ -[3]: https://ubuntu.com/ -[4]: https://www.debian.org/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1 -[6]: https://ubuntudde.com/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1 -[8]: https://itsfoss.com/ubuntu-cinnamon/ -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1 -[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/ -[12]: https://itsfoss.com/which-ubuntu-install/ -[13]: https://ubuntudde.com/download/ -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1 -[15]: https://itsfoss.com/install-linux-in-virtualbox/ diff --git a/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md b/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md new file mode 100644 index 0000000000..254e3e09eb --- /dev/null +++ b/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md @@ -0,0 +1,84 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu) +[#]: via: (https://itsfoss.com/ubuntudde/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +新的 Linux 发行版 UbuntuDDE 将漂亮的 Deepin 桌面带到 Ubuntu +====== + +Deepin 是有直观 UI 的漂亮桌面环境。UbuntuDDE 项目结合了 Ubuntu 的强大和 Deepin 之美。 + +[Deepin 桌面环境][1](DDE)是由 [Deepin Linux][2] 的开发人员创建的漂亮桌面环境。最初,Deepin Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。 + +![Deepin Desktop Environment in Ubuntu][5] + +Deepin Linux 的一个主要问题是服务器速度较慢。常规系统需要花几个小时才能下载,因为它们的所有服务器都在中国,而且这些服务器非常慢。 + +如果你想使用 Deepin 桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的 Deepin 桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置 Deepin 的时间和精力。 + +![Screenshot of UbuntuDDE][7] + +### Ubuntu DDE:Ubuntu 的强大和 Deepin 桌面的漂亮 + +请注意,UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被公认为 Ubuntu 的官方变种。 + +UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope 以及 Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队以及其他开发者的帮助。 + +在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重要方面是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE(深度桌面环境)的全部乐趣。 + +![Ubuntu Deepin Edition login screen][9] + +Arun 还提到,这个 Ubuntu Deepin 混合项目首先是维护和打包来自上游(即 Deepin 仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu,然后再安装 Deepin Desktop。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队软件包选择和设计变更的融合。 + +![UbuntuDDE screenshot][10] + +与 Deepin Linux 不同,UbuntuDDE 不使用 Deepin Appstore。它改用 Ubuntu 软件中心。如果你对[基于武汉的 Deepin Linux 的间谍软件标签][11]感到不满意,这将是一个好消息。 + +### 下载 UbuntuDDE 20.04 Beta + +UbuntuDDE 的目标是与 Ubuntu 20.04 一起发布第一个正式的稳定版本。像[其他 Ubuntu 变种][12]一样,UbuntuDDE 20.04 beta 也可供你下载并尝试。 + +警告! + +一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。 + +[Download Ubuntu 20.04 DDE Beta][13] + +![Installing UbuntuDDE][14] + +由于本质上是 Ubuntu,因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考本教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。 + +我知道你可能会认为这“不是另一个 Ubuntu” 或者“只是 Ubuntu 上的 Deepin,任何人都可以做”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种出现了。你怎么看? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntudde/ + +作者:[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://www.deepin.org/en/dde/ +[2]: https://www.deepin.org/en/ +[3]: https://ubuntu.com/ +[4]: https://www.debian.org/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot.jpg?ssl=1 +[6]: https://ubuntudde.com/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-1.jpg?ssl=1 +[8]: https://itsfoss.com/ubuntu-cinnamon/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-5.jpg?ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-2.jpg?ssl=1 +[11]: https://www.deepin.org/en/2018/04/14/linux-deepin-is-not-spyware/ +[12]: https://itsfoss.com/which-ubuntu-install/ +[13]: https://ubuntudde.com/download/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-deepin-edition-screenshot-4.jpg?ssl=1 +[15]: https://itsfoss.com/install-linux-in-virtualbox/ From b55da20ffdec6213f6f385e126ddc6fdaf9b81b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 14 Apr 2020 08:47:22 +0800 Subject: [PATCH 082/394] Translating --- .../20191014 How to make a Halloween lantern with Inkscape.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md b/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md index 0f15fae6e6..25324f030e 100644 --- a/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md +++ b/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f980bc84c8d6d40f02e6e63c0c233fa9265d4caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Tue, 14 Apr 2020 08:48:31 +0800 Subject: [PATCH 083/394] Translating --- ...915 How to Configure SFTP Server with Chroot in Debian 10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md b/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md index 877845b87a..9d57192270 100644 --- a/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md +++ b/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 851f5e93a2411b45e49ab071fbf759b0b4f76b69 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 14 Apr 2020 08:48:38 +0800 Subject: [PATCH 084/394] translating --- .../tech/20200413 How to Add Multiple Time Zones in Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md b/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md index 3dc42a5247..f0d353455d 100644 --- a/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md +++ b/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d3f8a3daa4173a8346747cb74b137fcf554b3a53 Mon Sep 17 00:00:00 2001 From: bingzxy Date: Tue, 14 Apr 2020 10:09:48 +0800 Subject: [PATCH 085/394] request translation --- ...8 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md b/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md index 569981ebea..b777bbe74e 100644 --- a/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md +++ b/sources/tech/20200408 My Linux Story- From 8-bit enthusiast to Unix sysadmin.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (bingzxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) @@ -7,6 +7,7 @@ [#]: via: (https://opensource.com/article/20/4/linux-story) [#]: author: (James Farrell https://opensource.com/users/jamesf) +bingzxy is translating My Linux Story: From 8-bit enthusiast to Unix sysadmin ====== How my early interest in computers got me hooked on a career as a From 213ac9d52f0075603388eb9ee9d3484172fc2e31 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Apr 2020 18:36:28 +0800 Subject: [PATCH 086/394] PRF @wxy --- ...03 Take back your dotfiles with Chezmoi.md | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/translated/tech/20200403 Take back your dotfiles with Chezmoi.md b/translated/tech/20200403 Take back your dotfiles with Chezmoi.md index 100193493d..a4901c08a3 100644 --- a/translated/tech/20200403 Take back your dotfiles with Chezmoi.md +++ b/translated/tech/20200403 Take back your dotfiles with Chezmoi.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Take back your dotfiles with Chezmoi) @@ -10,19 +10,19 @@ 用 Chezmoi 取回你的点文件 ====== -![][1] +![](https://img.linux.net.cn/data/attachment/album/202004/14/183618dwkhe4ehx1kthxvw.jpg) -在 Linux 中,点文件是隐藏的文本文件,用于存储从 Bash、Git 到 i3 或 VSCode 等更复杂的许多应用程序的配置设置。 +在 Linux 中,点文件是隐藏的文本文件,从 Bash、Git 到 i3 或 VSCode 等更复杂的许多应用程序,都用它存储配置设置。 -这些文件大多数都放在 `~/.config` 目录中或用户主目录中。编辑这些文件使你可以自定义也许没有提供设置菜单的应用程序,并且它们可以跨设备甚至是跨其他 Linux 发行版移植。但是,Linux 发烧友社区中讨论的一个话题是如何管理这些点文件以及如何共享它们。 +这些文件大多数都放在 `~/.config` 目录中或用户主目录中。编辑这些文件使你可以自定义也许没有提供设置菜单的应用程序,并且它们可以跨设备甚至是跨其它 Linux 发行版移植。但是,整个 Linux 发烧友社区的讨论焦点是如何管理这些点文件以及如何共享它们。 -我们将展示一个名为 [Chezmoi][2] 的工具,该工具与其他工具略有不同。 +我们将展示一个名为 [Chezmoi][2] 的工具,该工具与其它工具略有不同。 ### 点文件管理的历史 -如果你在 [GitHub 上搜索“dotfile”][3],那么你将看到有超过 10 万个存储库在解决一个目标:将人们的点文件存储在可共享且可重复的领地中。但是,除了都在使用 Git 之外,它们存储文件的方式各有不同。 +如果你在 [GitHub 上搜索“dotfiles”][3],那么你将看到有超过 10 万个存储库在解决一个目标:将人们的点文件存储在可共享且可重复的领地中。但是,除了都在使用 Git 之外,它们存储文件的方式各有不同。 -虽然 Git 解决了代码管理问题,也将其转换为配置文件管理,但它并没有解决如何区分发行版、角色(例如家用计算机与工作计算机)、机密管理以及按设备配置的问题。 +虽然 Git 解决了代码管理问题,也将其转换为配置文件管理,但它并没有解决如何区分发行版、角色(例如家用计算机与工作计算机)、机密信息管理以及按设备配置的问题。 因此,许多用户决定制定自己的解决方案,多年来,社区已经做出了许多成果。本文将简要介绍已有的一些解决方案。 @@ -38,27 +38,27 @@ $ podman run --rm -it fedora #### 安装问题 -如果将点文件存储在 Git 存储库中,你肯定希望可以使更改轻松地自动应用到主目录之中,乍一看,最简单的方法是使用符号链接,例如 `ln -s ~/.dotfies/bashrc ~/.bashrc`。这将使你的更改在更新存储库时立即就绪。 +如果将点文件存储在 Git 存储库中,你肯定希望可以让更改轻松地自动应用到主目录之中,乍一看,最简单的方法是使用符号链接,例如 `ln -s ~/.dotfies/bashrc ~/.bashrc`。这可以使你的更改在更新存储库时立即就绪。 -符号链接的问题在于管理符号链接可能很麻烦。Stow 和 [RCM(在 Fedora 杂志上介绍过)][4]可以帮助你管理这些,但是这些并不是非常舒服的解决方案。下载后,需要对私有文件进行适当的修改和设置访问模式。如果你在一个系统上修改了点文件,然后将存储库下载到另一个系统,则可能会发生冲突并需要进行故障排除。 +符号链接的问题在于管理符号链接可能很麻烦。Stow 和 [RCM][4](在 Fedora 杂志上介绍过)可以帮助你管理这些,但是这些并不是非常舒服的解决方案。下载后,需要对私有文件进行适当的修改和设置访问模式。如果你在一个系统上修改了点文件,然后将存储库下载到另一个系统,则可能会发生冲突并需要进行故障排除。 -解决此问题的另一种方法是编写自己的安装脚本。这是最灵活的选项,但要权衡需要花费更多时间来构建自定义解决方案是否值得。 +解决此问题的另一种方法是编写自己的安装脚本。这是最灵活的选项,但要权衡花费更多时间来构建自定义解决方案是否值得。 -#### 机密问题 +#### 机密信息问题 -Git 旨在跟踪更改。如果你在 Git 存储库中存储密码或 API 密钥之类的机密信息,则会比较麻烦,并且需要重写 Git 历史记录以删除该机密信息。如果你的存储库是公开的,那么如果其他人下载了你的存储库,你的机密信息将不再保密。仅这个问题就会阻止许多人与公共世界共享其 dotfile。 +Git 旨在跟踪更改。如果你在 Git 存储库中存储密码或 API 密钥之类的机密信息,则会比较麻烦,并且需要重写 Git 历史记录以删除该机密信息。如果你的存储库是公开的,那么如果其他人下载了你的存储库,你的机密信息将不再保密。仅这个问题就会阻止许多人与公共世界共享其点文件。 #### 多设备配置问题 -问题不在于将配置拉到多个设备,而是当你有多个需要不同配置的设备时的问题。大多数人通过使用不同的文件夹或使用不同的复刻来处理此问题。这使得难以在不同设备和角色集之间共享配置。 +问题不在于如何将配置拉到多个设备,而是当你有多个需要不同配置的设备的问题。大多数人通过使用不同的文件夹或使用不同的复刻fork来处理此问题。这使得难以在不同设备和角色集之间共享配置。 ### Chezmoi 是如何干的 -Chezmoi 是一种考虑了以上问题的用于管理点文件的工具,它不会盲目地从存储库复制或符号链接文件。 Chezmoi 更像是模板引擎,可以根据系统变量、模板、机密管理器和 Chezmoi 自己的配置文件来生成你的点文件。 +Chezmoi 是一种考虑了以上问题的用于管理点文件的工具,它不会盲目地从存储库复制或符号链接文件。 Chezmoi 更像是模板引擎,可以根据系统变量、模板、机密信息管理器和 Chezmoi 自己的配置文件来生成你的点文件。 #### Chezmoi 入门 -目前,Chezmoi 不在 Fedora 的默认软件库中。你可以使用以下命令下载 Chezmoi 的当前版本。 +目前,Chezmoi 并不在 Fedora 的默认软件库中。你可以使用以下命令下载 Chezmoi 的当前版本。 ``` $ sudo dnf install https://github.com/twpayne/chezmoi/releases/download/v1.7.17/chezmoi-1.7.17-x86_64.rpm @@ -72,7 +72,7 @@ $ sudo dnf install https://github.com/twpayne/chezmoi/releases/download/v1.7.17/ $ chezmoi init ``` -它将在 `~/.local/share/chezmoi/` 中创建你的新存储库。你可以使用以下命令轻松地切换该目录: +它将在 `~/.local/share/chezmoi/` 中创建你的新存储库。你可以使用以下命令轻松地切换到该目录: ``` $ chezmoi cd @@ -86,7 +86,7 @@ chezmoi add ~/.bashrc 这将你的 `.bashrc` 文件添加到 chezmoi 存储库。 -注意:如果你的 `.bashrc` 文件实际上是一个符号链接,则需要添加 `-f` 标志以跟随它并读取实际文件的内容。 +注意:如果你的 `.bashrc` 文件实际上是一个符号链接,则需要添加 `-f` 标志以跟随它来读取实际文件的内容。 现在,你可以使用以下命令编辑该文件: @@ -106,7 +106,7 @@ Chezmoi 使用特殊的前缀来跟踪隐藏文件和私有文件,以解决 Gi $ chezmoi cd ``` -**请注意,标记为私有的文件实际上并不是私有的,它们仍会以纯文本格式保存在你的 Git 存储库中。稍后会解释更多。** +**请注意,标记为私有的文件实际上并不是私有的,它们仍会以纯文本格式保存在你的 Git 存储库中。稍后会进一步解释。** 你可以使用以下方法应用任何更改: @@ -144,7 +144,7 @@ $ chezmoi edit-config name = "Fedora Mcdora" ``` -保存文件,然后再次运行 `chezmoi data`。你将在底部看到你的电子邮件和姓名现已添加。现在,你可以将这些与 Chezmoi 的模板一起使用。运行: +保存文件,然后再次运行 `chezmoi data`。你将在底部看到你的电子邮件和姓名已经添加成功。现在,你可以将这些与 Chezmoi 的模板一起使用。运行: ``` $ chezmoi add -T --autotemplate ~/.gitconfig @@ -166,7 +166,7 @@ $ chezmoi add -T --autotemplate ~/.gitconfig $ chezmoi edit ~/.gitconfig ``` -然后使用 +然后使用: ``` $ chezmoi cat ~/.gitconfig @@ -176,17 +176,17 @@ $ chezmoi cat ~/.gitconfig ``` [root@a6e273a8d010 ~]# chezmoi cat ~/.gitconfig - [user] - email = "fedorauser@example.com" - name = "Fedora Mcdora" - [root@a6e273a8d010 ~]# +[user] + email = "fedorauser@example.com" + name = "Fedora Mcdora" +[root@a6e273a8d010 ~]# ``` 它将在我们的 Chezmoi 配置中生成一个充满变量的文件。你也可以使用变量执行简单的逻辑语句。一个例子是: ``` {{- if eq .chezmoi.hostname "fsteel" }} -# this will only be included if the host name is equal to "fsteel" +# 如果主机名为 "fsteel" 才包括此部分 {{- end }} ``` @@ -224,7 +224,7 @@ $ chezmoi doctor [root@a6e273a8d010 ~]# ``` -您可以使用这些客户端,也可以使用[通用客户端][6],也可以使用系统的[密钥环][7]。 +你可以使用这些客户端,也可以使用[通用客户端][6],也可以使用系统的[密钥环][7]。 对于 GPG,你需要使用以下命令将以下内容添加到配置中: @@ -243,9 +243,9 @@ $ chezmoi edit-config $ chezmoi add --encrypt ``` -来添加任何文件,这些文件将在你的源存储库中加密,并且不会以纯文本格式公开。Chezmoi 会在申请时自动将其解密。 +来添加任何文件,这些文件将在你的源存储库中加密,并且不会以纯文本格式公开。Chezmoi 会在应用时自动将其解密。 -我们也可以在模板中使用它们。例如,存储在 [Pass(已在 Fedora 杂志上介绍)][8]中的机密令牌。继续,生成你的机密信息。 +我们也可以在模板中使用它们。例如,存储在 [Pass][8](已在 Fedora 杂志上介绍)中的机密令牌。继续,生成你的机密信息。 在此示例中,它称为 `githubtoken`: @@ -291,7 +291,7 @@ via: https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/ 作者:[Ryan Walter][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ec32104a69b8bc9d6be7a7b84bfa1a723b234937 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Apr 2020 18:37:07 +0800 Subject: [PATCH 087/394] PUB @wxy https://linux.cn/article-12109-1.html --- .../20200403 Take back your dotfiles with Chezmoi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200403 Take back your dotfiles with Chezmoi.md (99%) diff --git a/translated/tech/20200403 Take back your dotfiles with Chezmoi.md b/published/20200403 Take back your dotfiles with Chezmoi.md similarity index 99% rename from translated/tech/20200403 Take back your dotfiles with Chezmoi.md rename to published/20200403 Take back your dotfiles with Chezmoi.md index a4901c08a3..caded6c08c 100644 --- a/translated/tech/20200403 Take back your dotfiles with Chezmoi.md +++ b/published/20200403 Take back your dotfiles with Chezmoi.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12109-1.html) [#]: subject: (Take back your dotfiles with Chezmoi) [#]: via: (https://fedoramagazine.org/take-back-your-dotfiles-with-chezmoi/) [#]: author: (Ryan Walter https://fedoramagazine.org/author/rwaltr/) From 73184c5e3ec294b901320578eb0c159d7ac0127b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Apr 2020 22:57:45 +0800 Subject: [PATCH 088/394] PRF @geekpi --- ...- A Free - Open Source Password Manager.md | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md b/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md index d14a896277..53d7b21dff 100644 --- a/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md +++ b/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md @@ -1,24 +1,24 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Bitwarden: A Free & Open Source Password Manager) [#]: via: (https://itsfoss.com/bitwarden/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -Bitwarden:一个免费的开源密码管理器 +Bitwarden:一个自由开源的密码管理器 ====== -_ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我们来看看它提供了什么。 +> Bitwarden 是流行的开源密码管理器。在这里,我们来看看它提供了什么。 ![][1] -[Bitwarden][2] 是一个免费的开源密码管理器。 你可能还记得,我们之前将它列为 [Linux 中的最佳密码管理器][3]之一。 +[Bitwarden][2] 是一个自由开源的密码管理器。你可能还记得,我们之前将它列为 [Linux 中的最佳密码管理器][3]之一。 -就个人而言,几个月来我一直在多个设备上使用 Bitwarden 作为我的密码管理器。 因此,在本文中,我将说明它提供的功能以及我的使用经验。 +就个人而言,几个月来我一直在多个设备上使用 Bitwarden 作为我的密码管理器。因此,在本文中,我将说明它提供的功能以及我的使用经验。 -**注意:** _ 如果你对服务的安全性有疑问,请查看其官方安全性[常见问题页面][4]。 +**注意:** 如果你对服务的安全性有疑问,请查看其官方安全性[常见问题页面][4]。 ### Bitwarden 密码管理器的特性 @@ -32,7 +32,7 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我 * 适用于团队(企业)和个人 * 开源 * 支持自托管 - * 能够作为身份验证器应用(像 Google 身份验证器) + * 能够作为身份验证器应用(如 Google 身份验证器) * 跨平台支持(安卓、iOS、Linux、Windows 和 macOS) * 提供浏览器扩展(Firefox,、Chrome、Opera、Edge、Safari) * 提供命令行工具 @@ -42,12 +42,9 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我 * 自动填充密码 * 两步身份验证 - - - 从技术上讲,Bitwarden 使用完全免费。然而,它也提供了一些付费计划(个人付费和商务付费计划)。 -通过高级计划,你可以与更多用户共享密码、获取 API 访问权限(业务使用)以及更多此类高级功能。 +通过付费计划,你可以与更多用户共享密码、获取 API 访问权限(业务使用)以及更多此类高级功能。 以下是定价(在编写本文时): @@ -59,11 +56,11 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我 ![][8] -很容易将 Bitwarden 安装到你的 Linux 系统上,因为它提供了一个 .**AppImage** 文件。如果你还不知道[如何使用 AppImage][9] 文件,你可以参考我们的指南。 +很容易将 Bitwarden 安装到你的 Linux 系统上,因为它提供了一个 .AppImage 文件。如果你还不知道[如何使用 AppImage][9] 文件,你可以参考我们的指南。 -如果你不喜欢使用 AppImage , 你可以选择 [snap 包][10]或在其[官方下载页面][11]上下载 **.deb** 或者 **.rpm** 文件。你还可以查看其 [GitHub 页面][12]了解更多信息。 +如果你不喜欢使用 AppImage,你可以选择 [snap 包][10]或在其[官方下载页面][11]上下载 .deb 或者 .rpm 文件。你还可以查看其 [GitHub 页面][12]了解更多信息。 -[Download Bitwarden][2] +- [下载 Bitwarden][2] 如果你对使用桌面应用不感兴趣,也可以使用浏览器扩展。 @@ -73,9 +70,9 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我 所以,在我发现 Bitwarden 后就决定使用它。 -首先,我从 LastPass 导出我的数据,并导入到 Bitwarden 没有困难。在此过程中我没有丢失任何数据。 +首先,我从 LastPass 导出我的数据,并导入到 Bitwarden 没有遇到困难。在此过程中我没有丢失任何数据。 -除了桌面应用,我一直在使用 Bitwarden 的火狐插件,和 Android 应用。使用六个多月后,我没有遇到任何问题。所以,如果你愿意试试看,我一定会给它好评! +除了桌面应用,我一直在使用 Bitwarden 的火狐插件和 Android 应用。使用六个多月后,我没有遇到任何问题。所以,如果你愿意试试看,我一定会给它好评! ### 总结 @@ -83,7 +80,7 @@ _ **简述:** Bitwarden 是流行的开源密码管理器。 在这里,我 你可以免费入门,但如果可以,请购买 **10 美元/年**的高级计划来支持这个开源项目。 -如果你正在寻找更多选择,你也可以查看我们的 [Linux 中 5 个最佳密码管理器][5]。 +如果你正在寻找更多选择,你也可以查看我们的 [Linux 中 5 个最佳密码管理器][3]。 你试过 Bitwarden 了吗?如果没有,请试试看!此外,你最喜欢的密码管理器是什么?让我在下面的评论中知道! @@ -94,7 +91,7 @@ via: https://itsfoss.com/bitwarden/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -102,7 +99,7 @@ via: https://itsfoss.com/bitwarden/ [b]: https://github.com/lujun9972 [1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-screenshot.jpg?ssl=1 [2]: https://bitwarden.com/ -[3]: https://itsfoss.com/password-managers-linux/ +[3]: https://linux.cn/article-11531-1.html [4]: https://help.bitwarden.com/security/ [5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/bitwarden-dark-mode.jpg?ssl=1 [6]: https://itsfoss.com/password-generators-linux/ From 221af56fbbe57db895ce7b8d6c6548128deee128 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 14 Apr 2020 22:58:29 +0800 Subject: [PATCH 089/394] PUB @geekpi https://linux.cn/article-12111-1.html --- ...200407 Bitwarden- A Free - Open Source Password Manager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200407 Bitwarden- A Free - Open Source Password Manager.md (98%) diff --git a/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md b/published/20200407 Bitwarden- A Free - Open Source Password Manager.md similarity index 98% rename from translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md rename to published/20200407 Bitwarden- A Free - Open Source Password Manager.md index 53d7b21dff..5341efed3d 100644 --- a/translated/tech/20200407 Bitwarden- A Free - Open Source Password Manager.md +++ b/published/20200407 Bitwarden- A Free - Open Source Password Manager.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12111-1.html) [#]: subject: (Bitwarden: A Free & Open Source Password Manager) [#]: via: (https://itsfoss.com/bitwarden/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 142c2170130be96ef43df958300352abd1ce58a0 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Wed, 15 Apr 2020 00:31:57 +0800 Subject: [PATCH 090/394] translating by lxbwolf --- ...200320 Build a private social network with a Raspberry Pi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200320 Build a private social network with a Raspberry Pi.md b/sources/tech/20200320 Build a private social network with a Raspberry Pi.md index 7917add925..f95096bff7 100644 --- a/sources/tech/20200320 Build a private social network with a Raspberry Pi.md +++ b/sources/tech/20200320 Build a private social network with a Raspberry Pi.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 4472cd8902dc1f80253b29fc66c87a061b676f6d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:04:42 +0800 Subject: [PATCH 091/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20How=20?= =?UTF-8?q?to=20Open=20Files=20and=20Folders=20as=20Administrator=20in=20N?= =?UTF-8?q?autilus=20File=20Manager=20in=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md --- ...rator in Nautilus File Manager in Linux.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md diff --git a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md new file mode 100644 index 0000000000..d8a9211b64 --- /dev/null +++ b/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md @@ -0,0 +1,89 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) +[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Open Files and Folders as Administrator in Nautilus File Manager in Linux +====== + +_**Learn to add an “Open as Administrator” option in the right click context menu in Nautilus file manager in Ubuntu and other Linux distributions.**_ + +If you want to open or edit a file as root, you can always do that in the terminal. I know a few people don’t feel too comfortable with the command line. + +The desktop Linux often provides ways to avoid the command line for terminal-fearing people. + +If you are in a situation where you have to access a folder as root or edit a file with root privilege, you can do that graphically in [Nautilus file manager][1]. + +A neat Nautilus hack allows you to open a files and folders as administrator i.e. root. Let me show you how. + +**Recommended Read:** + +![][2] + +#### [Root User in Ubuntu: Important Things You Should Know][3] + +Root user is essential to any Linux distribution. Learn why Ubuntu locks the root user and how can you use it in this Ubuntu beginner series. + +### Add ‘open as administrator’ option in right click context menu in Nautilus file manager + +_**A word of warning! Please don’t go around opening and editing random files as root as you might mess up with wrong files and end up with a broken system. Use it only in the cases where it is required.**_ + +I am showing the installation steps for Ubuntu. You can change it as per your distribution’s package manager. + +You’ll have to use terminal (even if you don’t like it) for installing the Nautilus plugin. Please [make sure that you have the universe repository enabled][4]: + +``` +sudo apt install nautilus-admin +``` + +Close and open Nautilus file manager again to see the changes in effect. + +![Right clock to see the “Open as Administrator” option][5] + +You can also edit files as root the same way. Just select the file, right click on it and choose the “Edit as Administrator” option. + +![Edit Files As Root Ubuntu][6] + +In both cases, you’ll be prompted to enter your account’s password: + +![You need to enter your password, of course][7] + +That’s pretty much it. You can enjoy the comfort of GUI. + +In case you don’t want to run Nautilus as root anymore, you can remove this plugin. It’s always good to remove additional things you installed but you don’t use anymore. + +In the terminal (yes, again), use the following command to remove the Nautilus plugin. + +``` +sudo apt remove nautilus-admin +``` + +By the way, if you are using [Ubuntu MATE][8], you can use caja-admin, instead of nautilus-admin. Other file managers may or may not provide such a feature. + +I hope you find this quick tip helpful. Questions and suggestions are always welcome. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/open-nautilus-as-administrator/ + +作者:[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://wiki.gnome.org/Apps/Files +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/root_user_ubuntu.png?fit=800%2C450&ssl=1 +[3]: https://itsfoss.com/root-user-ubuntu/ +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1 +[8]: https://ubuntu-mate.org/ From f8da93b28b5e58cc4cda59b87fb98eb68082c0e5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:37:22 +0800 Subject: [PATCH 092/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200414=20How=20?= =?UTF-8?q?young=20people=20can=20help=20fight=20COVID-19=20with=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200414 How young people can help fight COVID-19 with code.md --- ...eople can help fight COVID-19 with code.md | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 sources/tech/20200414 How young people can help fight COVID-19 with code.md diff --git a/sources/tech/20200414 How young people can help fight COVID-19 with code.md b/sources/tech/20200414 How young people can help fight COVID-19 with code.md new file mode 100644 index 0000000000..73705b5a62 --- /dev/null +++ b/sources/tech/20200414 How young people can help fight COVID-19 with code.md @@ -0,0 +1,139 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How young people can help fight COVID-19 with code) +[#]: via: (https://opensource.com/article/20/4/covid19-hackathon) +[#]: author: (Melissa Sasi https://opensource.com/users/mesassi) + +How young people can help fight COVID-19 with code +====== +Youth developers are invited to submit ideas by April 15 to counter the +educational, informational, social, and health challenges uncovered by +the COVID-19 pandemic. +![woman on laptop sitting at the window][1] + +More than 91% of students around the world are impacted by school closures due to COVID-19, and most governments have temporarily closed academic institutions. That's nearly [1.6 billion young people in 188 countries][2]. Also, most of the learning platforms available online today aren't practical, engaging, or interactive, and lack true virtual collaboration. + +This big and wicked challenge got me thinking about how these circumstances are impacting my children, their friends, and my passions of empowering youth, fostering tech entrepreneurship, and inspiring under-represented communities to find their purpose through building digital skills. These all came together in [CodeTheCurve][3], "a global, virtual hackathon for students, educators, teachers, and the research community to build tech skills, entrepreneurial spirit, and professional competencies to build digital creativity and cooperation to mobilize the world." + +We hope you'll want to participate, but you need to act fast: the deadline to submit proposals is April 15. + +### My story + +The passions mentioned above stem from a deeply personal journey: My children and I are victims of parental kidnapping, and access to the internet and digital literacy are my pathways to being a mother from afar. My children, Zahra (age 13), Zahran (15), and Youmna (18), are safe and healthy, and we are frequently connected. They're living the same life youth all over the world are living these days, trying to social distance and remain in good health while figuring out this school thing (or lack thereof)—only one of my children has access to formal virtual learning during to COVID-19 school closures. The other two, without school-driven online learning options, tend to stay up all night playing Fortnight and making TikTok videos. + +I have always been passionate about digital inclusion and empowering the world through computer science, and the effects of COVID-19 have increased my desire to make a difference. About four years ago, I created a non-profit organization, [MentorNations][4], to inspire youth and the world via technology. My non-profit has taught tens of thousands of young people in 12 countries to code. In my work at IBM as a developer advocate, I focus on empowering early-stage entrepreneurs, developers, and students with access to tech skills, professional development, and entrepreneurial thinking. My major focus areas include inspiring students to discover their career potential in enterprise computing while recognizing that we are all ANDs and not ORs. + +Teaching the next generation about the power of collaboration, teamwork, problem-solving, and critical thinking that happen through open source code and principles empowers them to be creators and innovators who focus on solving relevant and real-world problems. + +Looking through the lens of my children, my non-profit work, my roles within a variety of United Nations Task Forces, and my position as IEEE Chair over the Digital Skills Working Group, I wondered, _**what can I do to make a difference with open source technology?**_ So I reached out to my network, and the world responded in a much bigger way than I had ever imagined. + +### CodeTheCurve + +In response, we launched UNESCO's [CodeTheCurve][3] hackathon in collaboration with 14 partners, including UN EQUALS, SAP, iHackOnline, Angel Hack, Internet Society, and YPO. Participants are invited to bring their open source ideas to combat the current and future environment and challenges relating to COVID-19. This initiative is centered around youth empowerment, gender inclusion, and making the world a better place for our communities, including for people we may not directly encounter daily. + +CodeTheCurve is for anyone above the age of 16. To ensure gender, age, and experience diversity, teams must include a developer or data scientist (early-stage chops are fine); at least one person under the age of 25; and at least one male and one female. The 40 teams selected to participate in CodeTheCurve will have access to more than 80 business and technical mentors (experts!) from around the world to help turn their ideas into reality. + +My vision for this hackathon is to train young talent; enable them with free, online resources and access to real people with real answers; and encourage the creation of real-world problem solving in real-time. The results of the hackathon, I hope, will be open source utilities and information that can be used, in some way, to combat COVID-19. + +#### Week-long learning, bootcamp, and hacking experience + +CodeTheCurve is a three-day virtual hackathon experience guided by expert business and technical mentors. Before the hackathon proper, participants begin with two days of self-paced, online learning from content curated by CodeTheCurve collaborators, followed by a two-day, instructor-led learning journey where the 40 selected teams will collaborate in virtual breakout rooms with activity kits, hands-on computing resources in machine learning, and expert-guided plenary sessions. + +#### CodeTheCurve hackathon themes + +CodeTheCurve includes three themes: + + * Education + * Information and data management + * Current and post-COVID-19 health and social issues + + + +#### Professional development, entrepreneurship, and hands-on open source skills + +The 40 teams will be empowered with expert-guided, engaging activities, including the following skill-building opportunities: + + * **Hand-on tech skills** + * Using Jupyter Notebooks for data science + * Data protection, privacy, security, and encryption + * Machine learning and artificial intelligence + * Architectural diagrams and frameworks + * Technical roadmaps + * **Professional development** + * Design thinking + * Personal branding + * Communication skills + * How not to feel like an imposter + * Conflict resolution + * Working in global, virtual teams + * Media literacy + * Ethics in machine learning and artificial intelligence + * **Entrepreneurship** + * Problem statements + * Mission and vision statements + * Value propositions + * Audience and target markets + * Business model canvassing + * Pitch decks + * Pitch practice + + + +### April 15: CodeTheCurve deadline + +Did I mention that the initial application deadline is April 15? Here's the full timeline: + + * Video submission deadline: **April 15** + * 40 selected teams announced: **April 20** + * Learning resources for pre-collaboration: **April 20-21** + * Instructor-led learning: **April 22-23** + * Hacking: **April 24-26** + * CodeTheCurve winners announced: **April 30** + + + +#### Prizes. Prizes. Prizes. + +Prizes include free access to [IBM LinuxONE Community Cloud][5] for one year, free training courses from SAP, four pitch opportunities at IBM and SAP events, free access to enterprise-grade IBM Z and its machine learning suite for six months, and one-on-one technical and business mentorship for a full year with industry experts. + +### How to apply + +Interested in applying? Know someone who should apply? Simply [submit a video][6] of your **amazing** open source idea, the problem you're trying to solve, and who you expect to reach. + +If you'd like to learn more, here are some other articles about CodeTheCurve: + + * [UN News CodeTheCurve article][7] + * [UNESCO CodeTheCurve blog][8] + * [Forbes CodeTheCurve article][9] + * [IBM CodeTheCurve blog][10] + + + +I cannot wait to see all the amazing open source ideas the world brings our way! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/covid19-hackathon + +作者:[Melissa Sasi][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/mesassi +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://en.unesco.org/covid19/educationresponse +[3]: https://www.codethecurve.org/ +[4]: https://mentornations.org/ +[5]: https://developer.ibm.com/linuxone/ +[6]: http://ibm.biz/codethecurve-apply +[7]: https://news.un.org/en/story/2020/04/1061142 +[8]: http://ibm.biz/unesco-pr +[9]: https://www.forbes.com/sites/danielnewman/2020/04/10/digital-transformation-for-good-shines-as-we-fight-covid-19/#78d51a4c4946 +[10]: http://ibm.biz/codethecurve From 364dcaf390904a1740967f8bccfd8cca56c5d7ac Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:38:00 +0800 Subject: [PATCH 093/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200414=20How=20?= =?UTF-8?q?I=20containerize=20a=20build=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200414 How I containerize a build system.md --- ...00414 How I containerize a build system.md | 166 ++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 sources/tech/20200414 How I containerize a build system.md diff --git a/sources/tech/20200414 How I containerize a build system.md b/sources/tech/20200414 How I containerize a build system.md new file mode 100644 index 0000000000..b45168c55f --- /dev/null +++ b/sources/tech/20200414 How I containerize a build system.md @@ -0,0 +1,166 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I containerize a build system) +[#]: via: (https://opensource.com/article/20/4/how-containerize-build-system) +[#]: author: (Ravi Chandran https://opensource.com/users/ravichandran) + +How I containerize a build system +====== +Building a repeatable structure to deliver applications as containers +can be complicated. Here is one way to do it effectively. +![Containers on a ship on the ocean][1] + +A build system is comprised of the tools and processes used to transition from source code to a running application. This transition also involves changing the code's audience from the software developer to the end user, whether the end user is a colleague in operations or a deployment system. + +After creating a few build systems using containers, I think I have a decent, repeatable approach that's worth sharing. These build systems were used for generating loadable software images for embedded hardware and compiling machine learning algorithms, but the approach is abstract enough to be used in any container-based build system. + +This approach is about creating or organizing the build system in a way that makes it easy to use and maintain. It's not about the tricks needed to deal with containerizing any particular software compilers or tools. It applies to the common use case of software developers building software to hand off a maintainable image to other technical users (whether they are sysadmins, DevOps engineers, or some other title). The build system is abstracted away from the end users so that they can focus on the software. + +### Why containerize a build system? + +Creating a repeatable, container-based build system can provide a number of benefits to a software team: + + * **Focus:** I want to focus on writing my application. When I call a tool to "build," I want the toolset to deliver a ready-to-use binary. I don't want to spend time troubleshooting the build system. In fact, I'd rather not know or care about the build system. + * **Identical build behavior:** Whatever the use case, I want to ensure that the entire team uses the same versions of the toolset and gets the same results when building. Otherwise, I am constantly dealing with the case of "it works on my PC but not yours." Using the same toolset version and getting identical output for a given input source file set is critical in a team project. + * **Easy setup and future migration:** Even if a detailed set of instructions is given to everyone to install a toolset for a project, chances are someone will get it wrong. Or there could be issues due to how each person has customized their Linux environment. This can be further compounded by the use of different Linux distributions across the team (or other operating systems). The issues can get uglier quickly when it comes time for moving to the next version of the toolset. Using containers and the guidelines in this article will make migration to newer versions much easier. + + + +Containerizing the build systems that I use on my projects has certainly been valuable in my experience, as it has alleviated the problems above. I tend to use Docker for my container tooling, but there can still be issues due to the installation and network configuration being unique environment to environment, especially if you work in a corporate environment involving some complex proxy settings. But at least now I have fewer build system problems to deal with. + +### Walking through a containerized build system + +I created a [tutorial repository][2] you can clone and examine at a later time or follow along through this article. I'll be walking through all the files in the repository. The build system is deliberately trivial (it runs **gcc**) to keep the focus on the build system architecture. + +### Build system requirements + +Two key aspects that I think are desirable in a build system are: + + * **Standard build invocation:** I want to be able to build code by pointing to some work directory whose path is **/path/to/workdir**. I want to invoke the build as: [code]`./build.sh /path/to/workdir`[/code] To keep the example architecture simple (for the sake of explanation), I'll assume that the output is also generated somewhere within **/path/to/workdir**. (Otherwise, it would increase the number of volumes exposed to the container, which is not difficult, but more cumbersome to explain.) + * **Custom build invocation via shell:** Sometimes, the toolset needs to be used in unforeseen ways. In addition to the standard **build.sh** to invoke the toolset, some of these could be added as options to **build.sh**, if needed. But I always want to be able to get to a shell where I can invoke toolset commands directly. In this trivial example, say I sometimes want to try out different **gcc** optimization options to see the effects. To achieve this, I want to invoke: [code]`./shell.sh /path/to/workdir`[/code] This should get me to a Bash shell inside the container with access to the toolset and to my **workdir**, so I can experiment as I please with the toolset. + + + +### Build system architecture + +To comply with the basic requirements above, here is how I architect the build system: + +![Container build system architecture][3] + +At the bottom, the **workdir** represents any software source code that needs to be built by the software developer end users. Typically, this **workdir** will be a source-code repository. The end users can manipulate this source code repository in any way they want before invoking a build. For example, if they're using **git** for version control, they could **git checkout** the feature branch they are working on and add or modify files. This keeps the build system independent of the **workdir**. + +The three blocks at the top collectively represent the containerized build system. The left-most (yellow) block at the top represents the scripts (**build.sh** and **shell.sh**) that the end user will use to interact with the build system. + +In the middle (the red block) is the Dockerfile and the associated script **build_docker_image.sh**. The development operations people (me, in this case) will typically execute this script and generate the container image. (In fact, I'll execute this many, many times until I get everything working right, but that's another story.) And then I would distribute the image to the end users, such as through a container trusted registry. The end users will need this image. In addition, they will clone the build system repository (i.e., one that is equivalent to the [tutorial repository][2]). + +The **run_build.sh** script on the right is executed inside the container when the end user invokes either **build.sh** or **shell.sh**. I'll explain these scripts in detail next. The key here is that the end user does not need to know anything about the red or blue blocks or how a container works in order to use any of this. + +### Build system details + +The tutorial repository's file structure maps to this architecture. I've used this prototype structure for relatively complex build systems, so its simplicity is not a limitation in any way. Below, I've listed the tree structure of the relevant files from the repository. The **dockerize-tutorial** folder could be replaced with any other name corresponding to a build system. From within this folder, I invoke either **build.sh** or **shell.sh** with the one argument that is the path to the **workdir**. + + +``` +dockerize-tutorial/ +├── build.sh +├── shell.sh +└── swbuilder +    ├── build_docker_image.sh +    ├── install_swbuilder.dockerfile +    └── scripts +        └── run_build.sh +``` + +Note that I've deliberately excluded the **example_workdir** above, which you'll find in the tutorial repository. Actual source code would typically reside in a separate repository and not be part of the build tool repository; I included it in this repository, so I didn't have to deal with two repositories in the tutorial. + +Doing the tutorial is not necessary if you're only interested in the concepts, as I'll explain all the files. But if you want to follow along (and have Docker installed), first build the container image **swbuilder:v1** with: + + +``` +cd dockerize-tutorial/swbuilder/ +./build_docker_image.sh +docker image ls  # resulting image will be swbuilder:v1 +``` + +Then invoke **build.sh** as: + + +``` +cd dockerize-tutorial +./build.sh ~/repos/dockerize-tutorial/example_workdir +``` + +The code for [build.sh][4] is below. This script instantiates a container from the container image **swbuilder:v1**. It performs two volume mappings: one from the **example_workdir** folder to a volume inside the container at path **/workdir**, and the second from **dockerize-tutorial/swbuilder/scripts** outside the container to **/scripts** inside the container. + + +``` +docker container run                              \ +    --volume $(pwd)/swbuilder/scripts:/scripts    \ +    --volume $1:/workdir                          \ +    --user $(id -u ${USER}):$(id -g ${USER})      \ +    --rm -it --name build_swbuilder swbuilder:v1  \ +    build +``` + +In addition, the **build.sh** also invokes the container to run with your username (and group, which the tutorial assumes to be the same) so that you will not have issues with file permissions when accessing the generated build output. + +Note that [**shell.sh**][5] is identical except for two things: **build.sh** creates a container named **build_swbuilder** while **shell.sh** creates one named **shell_swbuilder**. This is so that there are no conflicts if either script is invoked while the other one is running. + +The other key difference between the two scripts is the last argument: **build.sh** passes in the argument **build** while **shell.sh** passes in the argument **shell**. If you look at the [Dockerfile][6] that is used to create the container image, the last line contains the following **ENTRYPOINT**. This means that the **docker container run** invocation above will result in executing the **run_build.sh** script with either **build** or **shell** as the sole input argument. + + +``` +# run bash script and process the input command +ENTRYPOINT [ "/bin/bash", "/scripts/run_build.sh"] +``` + +[**run_build.sh**][7] uses this input argument to either start the Bash shell or invoke **gcc** to perform the build of the trivial **helloworld.c** project. A real build system would typically invoke a Makefile and not run **gcc** directly. + + +``` +cd /workdir + +if [ $1 = "shell" ]; then     +    echo "Starting Bash Shell" +    /bin/bash +elif [ $1 = "build" ]; then +    echo "Performing SW Build" +    gcc helloworld.c -o helloworld -Wall +fi +``` + +You could certainly pass more than one argument if your use case demands it. For the build systems I've dealt with, the build is usually for a given project with a specific **make** invocation. In the case of a build system where the build invocation is complex, you can have **run_build.sh** call a specific script inside **workdir** that the end user has to write. + +### A note about the scripts folder + +You may be wondering why the **scripts** folder is located deep in the tree structure rather than at the top level of the repository. Either approach would work, but I didn't want to encourage the end user to poke around and change things there. Placing it deeper is a way to make it more difficult to poke around. Also, I could have added a **.dockerignore** file to ignore the **scripts** folder, as it doesn't need to be part of the container context. But since it's tiny, I didn't bother. + +### Simple yet flexible + +While the approach is simple, I've used it for a few rather different build systems and found it to be quite flexible. The aspects that are going to be relatively stable (e.g., a given toolset that changes only a few times a year) are fixed inside the container image. The aspects that are more fluid are kept outside the container image as scripts. This allows me to easily modify how the toolset is invoked by updating the script and pushing the changes to the build system repository. All the user needs to do is to pull the changes to their local build system repository, which is typically quite fast (unlike updating a Docker image). The structure lends itself to having as many volumes and scripts as are needed while abstracting the complexity away from the end user. + +How will you need to modify your application to optimize it for a containerized environment? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/how-containerize-build-system + +作者:[Ravi Chandran][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/ravichandran +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_2015-3-osdc-lead.png?itok=O6aivM_W (Containers on a ship on the ocean) +[2]: https://github.com/ravi-chandran/dockerize-tutorial +[3]: https://opensource.com/sites/default/files/uploads/build_sys_arch.jpg (Container build system architecture) +[4]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/build.sh +[5]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/shell.sh +[6]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/swbuilder/install_swbuilder.dockerfile +[7]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/swbuilder/scripts/run_build.sh From cc791915cc223b21e5739fa545ee6ae90ce293b8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:38:31 +0800 Subject: [PATCH 094/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200414=20Try=20?= =?UTF-8?q?this=20Kubernetes=20HTTP=20router=20and=20reverse=20proxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md --- ...ubernetes HTTP router and reverse proxy.md | 196 ++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md diff --git a/sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md b/sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md new file mode 100644 index 0000000000..fc78ee9bce --- /dev/null +++ b/sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md @@ -0,0 +1,196 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Try this Kubernetes HTTP router and reverse proxy) +[#]: via: (https://opensource.com/article/20/4/http-kubernetes-skipper) +[#]: author: (Sandor Szücs https://opensource.com/users/sszuecs) + +Try this Kubernetes HTTP router and reverse proxy +====== +Skipper is designed to handle large numbers of HTTP route definitions, +beyond what you would want to manage in Nginx or Apache. +![Traffic circle with arrows pointing which way to go][1] + +Skipper is an open source HTTP router and reverse proxy for service composition. As its [GitHub page][2] states, it's designed to handle large amounts of dynamically configured HTTP route definitions (>600,000 routes) with detailed lookup conditions and flexible augmentation of the request flow with filters. It can be used out of the box or extended with custom lookup, filter logic, and configuration sources. + +### Proxies + +When some people think of a proxy, they imagine a webpage that serves as a gateway to an intranet or a suspicious-looking webpage designed to unblock social media sites on a school or work network. A forward proxy is one that operators of desktop infrastructure use to save internet bandwidth, enforce parental controls, or limit social media access. Another kind of proxy is one in which an individual user navigates to a page, provides credentials, and is then forwarded to a protected intranet resource. The inverse of that kind of proxy is the reverse proxy, which accepts all traffic and forwards it to a specific resource, like a server or container. That's the kind of work Skipper does for infrastructure. + +When I read [Matt Klein's post][3] on modern network load balancing and proxying, I realized that we, as [Skipper][4] maintainers, should explain more features and details about why and how you can leverage HTTP proxies. In this article, I will treat the terminology "HTTP (reverse) proxy" and "HTTP router" as the same. + +### HTTP routing + +According to [Wikipedia][5]: "Routing is the process of selecting a path for traffic in a network." This definition refers to routing at [OSI layer 3][6], most commonly based on [IP][7] with routing protocols like [BGP][8] or [OSPF][9]. Since this article isn't about one of those, I will try to explain what HTTP routers are about. But first, I want to introduce Skipper, an [OSI layer 7][10] HTTP router library written in [Go][11] and a core component of retailer [Zalando][12]'s e-commerce shop and the [Kubernetes][13] Ingress infrastructure. + +At Zalando, we use Skipper as a [Kubernetes Ingress][14] controller to support our users with visibility, reliability, security, and additional features to offload common applications. + +Any organization running HTTP services, often in a microservice architecture, needs to route HTTP requests to the right applications. HTTP routers route based on information provided by the HTTP request. For example, the following shows an HTTP/1.1 request. + + +``` +GET /details HTTP/1.1 +Host: [www.zalando.de][15] +User-Agent: curl/7.49.0 +Accept: */* +Authorization: Bearer <token> +... +``` + +We can route based on the method **GET**, the path **/details**, the **Host** header [**www.zalando.de**][16], or any arbitrary part of the request. + +One common problem an application owner faces is splitting an API into multiple applications, so you need to split the responsibility of a component into subcomponents. Another common task is to support refactoring; maybe you have rewritten one part of your app, and you want to deploy it separately now. + +For example, imagine you you have a store that has a list of products and their details, and you need to split it into _shop_ and _product_ backend applications. At **/**, your shop shows the list of products, and at **/details**, it shows product details, such as color, size, sustainability, and price. + +![Figure 1: shop][17] + +You need to split the responsibility of the product detail into its own application, such that **/** stays in the _shop_ application and **/details** is refactored to the _product_ application. + +![Figure 2: product and shop][18] + +To make sure an HTTP proxy finds the right backend for an incoming request, it uses a routing table to check the destination to make sure it's correct. + +### Routing tables + +In Skipper, the routing table is created by pulling information generated by [dataclients][19] from different sources. One source can be a [routes file][20], similar to what you may see in more popular HTTP servers, like Apache or Nginx. + +Depending on the size of your organization—or better, the number of backend applications—the routing table can grow quite large. Skipper implements the routing table as a tree that can scale beyond 600,000 routes (far more than you'd want to manage in an Nginx or Apache config). + +Following along with the example application above, Table 1 shows the routing table from [Figure 2][21]. The store **/** should be routed to **shop,** and the **/detail** routed to the **product** application. + +path | app +---|--- +/ | shop +/detail | product + +Table 1: Routing table + +The available dataclients in Skipper fetch routes from different sources and what a route consists of. + +### Dataclient + +The routing configuration in Skipper's routes file [dataclient][22] is similar to what you might know from HTTP proxies in Nginx or Apache. In Skipper, a routes file specifies all routes in [eskip][23] syntax, as shown in Figure 3. + + +``` +r1: P1() && P2() && .. && PN() +    -> f1() +    -> f2() +    ... +    -> fN() +    -> <backend>; +r2: ... +... +``` + +Figure 3: Routes file in eskip + +In the above: + + * **r1, r2, ...** are unique routeIDs. + * **P1, P2,..,PN** are predicates that define the matching. + * **f1, f2,..,fN** are filters that are applied after the route was selected. Filters can change the request and response. + * Finally, the Skipper backend is defined. This can be a single URL, a list of load-balanced URLs, and others for special cases such as [direct response][24]. + + + +The [routes string][25] is another dataclient that is handy for tests. For example, if you need a pseudo backend for your demo that replies a green background with HTML, you could use: + + +``` +$ skipper -routes-string='* +-> inlineContent( +      "<html><body style=\"background-color: green;\"></body></html>" +   )' +``` + +Skipper's most popular dataclient, by far, is the Kubernetes dataclient, which is used to fetch information from a [Kubernetes API server][26] and create a routing table from [Skipper Ingress][27] resources and the [RouteGroup][28] custom resource definition (CRD). + +To summarize the above, dataclients fetch information from different providers to build Skipper's routing table. Table 1 shows a routing table for the shop/description example, and Skipper uses predicates to select the route to process the request. + +### Predicates + +In Skipper, an incoming request is matched to [predicates][29] of all the routes to find the best matching route for an incoming request. Predicates are functions that match based on the incoming request. In the example from Figure 2 and Table 1, Skipper would have a routing table similar to Figure 4: + + +``` +shop: Path("/") +    -> ""; +product: Path("/detail") +    -> ""; +``` + +Figure 4: Skipper routing table + +This means HTTP requests with a path **/** would be matched by the **Path("/")** predicate, such that Skipper will execute the shop route. Requests with a path **/detail** would be matched by **Path("/detail")** and routed to the product application. + +In general, routing behavior can be changed by predicates. There are a lot of predicates you can choose from. For example, **Method("POST")** will be true only if a POST request would be passed. A route with more predicates is considered more specific. Also, a route with more predicates has more weight in the route selection than one that has less. + +Special cases are **Path()** and **PathSubtree()**, which is matched first in a tree and reduces the number of routes, which are scanned as a list. For example, the tree structure shown in Figure 5 helps to scale the number of routes to more than 600,000 in one of Zalando's production setups. + +![Skipper tree example][30] + +### Filters + +After a route is selected, the request [filters][31] are applied. Filters work on request or response; they can change the incoming request to the backend, and they can change the response to the client. + +For example, **setRequestHeader("Foo", "bar")** sets the HTTP header **"Foo"** to the value **"bar"**, such that the backend sees this header in the request. + +The response filter **responseCookie("keks", "val", 3600)** sets a Cookie named **"keks"** in the response to the caller, which might be a browser in this case. The cookie would have the value **"val"** and is valid for one hour. + +One filter that works on request and response is **enableAccessLog(40, 5)**. This would do access logs for all responses from the backend with status codes 40x or 5xx. + +As you can see from the examples, filters can change the request or the response or just do some work based on it. Another filter example is **auth filters** or **ratelimits**. These would stop requests from passing to the backend if the request should not be allowed to pass. For example, to serve static content from a directory called **/var/www**, you can use the filter **static("/var/www")**. + +### Learn more + +This article provided a basic overview of Skipper and its capabilities. For more information, consult [Skipper's documentation][32], and please share your questions or feedback in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/http-kubernetes-skipper + +作者:[Sandor Szücs][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/sszuecs +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=Cd2PmDWf (Traffic circle with arrows pointing which way to go) +[2]: https://github.com/zalando/skipper +[3]: https://blog.envoyproxy.io/introduction-to-modern-network-load-balancing-and-proxying-a57f6ff80236 +[4]: https://opensource.zalando.com/skipper +[5]: https://en.wikipedia.org/wiki/Routing +[6]: https://en.wikipedia.org/wiki/OSI_model#Layer_3:_Network_Layer +[7]: https://en.wikipedia.org/wiki/Internet_Protocol +[8]: https://en.wikipedia.org/wiki/Border_Gateway_Protocol +[9]: https://en.wikipedia.org/wiki/Open_Shortest_Path_First +[10]: https://en.wikipedia.org/wiki/OSI_model#Layer_7:_Application_Layer +[11]: https://golang.org/ +[12]: https://en.zalando.de/ +[13]: https://kubernetes.io +[14]: https://kubernetes.io/docs/concepts/services-networking/ingress/ +[15]: http://www.zalando.de +[16]: https://en.zalando.de/?_rfl=de +[17]: https://opensource.com/sites/default/files/uploads/skipper_1_shop.png (Figure 1: shop) +[18]: https://opensource.com/sites/default/files/uploads/skipper_2_product-shop.png (Figure 2: product and shop) +[19]: https://opensource.zalando.com/skipper/reference/backends/ +[20]: https://opensource.zalando.com/skipper/data-clients/eskip-file/ +[21]: tmp.ftM58r5YpM#fig2 +[22]: https://opensource.zalando.com/skipper/tutorials/development/#dataclients +[23]: https://godoc.org/github.com/zalando/skipper/eskip +[24]: https://opensource.zalando.com/skipper/reference/backends/#shunt-backend +[25]: https://opensource.zalando.com/skipper/data-clients/route-string/ +[26]: https://kubernetes.io/docs/concepts/overview/components/#kube-apiserver +[27]: https://opensource.zalando.com/skipper/kubernetes/ingress-usage/ +[28]: https://opensource.zalando.com/skipper/kubernetes/routegroups/ +[29]: https://opensource.zalando.com/skipper/reference/predicates/ +[30]: https://opensource.com/sites/default/files/uploads/skipper_5_tree.png (Skipper tree example) +[31]: https://opensource.zalando.com/skipper/reference/filters/ +[32]: https://opensource.zalando.com/skipper/ From c3832709e6919eb7614a12418849cc7b0dbf36f8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:39:12 +0800 Subject: [PATCH 095/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200414=20How=20?= =?UTF-8?q?World=20of=20Warcraft=20introduced=20me=20to=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200414 How World of Warcraft introduced me to Linux.md --- ...orld of Warcraft introduced me to Linux.md | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 sources/tech/20200414 How World of Warcraft introduced me to Linux.md diff --git a/sources/tech/20200414 How World of Warcraft introduced me to Linux.md b/sources/tech/20200414 How World of Warcraft introduced me to Linux.md new file mode 100644 index 0000000000..b1836ccb43 --- /dev/null +++ b/sources/tech/20200414 How World of Warcraft introduced me to Linux.md @@ -0,0 +1,82 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How World of Warcraft introduced me to Linux) +[#]: via: (https://opensource.com/article/20/4/wow-linux) +[#]: author: (Luke Rawlins, RHCE https://opensource.com/users/sudoluke) + +How World of Warcraft introduced me to Linux +====== +One Linux sysadmin traces his journey from video-gaming car mechanic to +a new career in IT. +![Gaming with penguin pawns][1] + +The story behind my career with [Linux][2] is a bit unusual. It starts back in 2005; I was working as an auto mechanic at a Nissan dealership in Toledo, Ohio. I had never used a computer for anything other than checking email, browsing the web, and playing World of Warcraft. + +I had never heard of Linux, I didn't know the term "open source," I probably couldn't even have walked you through how to copy a file from one place to another, and I certainly never thought that I would eventually find myself working in IT or running a website. + +### The "Blue Screen of Death" that changed my life + +I mentioned that I liked to play World of Warcraft (I still do, you can find me on my Mage "Elodinn—Twisting Nether" most of the time). This game was a huge hit in the early 2000s, and it consumed an enormous amount of my time (truth be told, probably a little too much of my time). + +You can imagine my horror one evening when I boot up my PC to be greeted by a blue screen with lots of cryptic messages, including "A problem has been detected…" Hmm weird, maybe I'll just unplug it and plug it back in—that works around the shop sometimes. No such luck, the same message comes up. Over and over, to no avail. + +### How do you fix this? + +So I called a friend and explained the problem. [Big blue screen][3]. Lots of little white letters. I'm going to miss the raid! + +He wasn't sure but said something about drivers, or maybe a hardware problem. I ended up calling around to a few computer repair shops to see if they could fix it. They all said the same thing after I read the message on the screen, and explained the problem to them. "I really can't be sure over the phone, but it sounds like the motherboard is bad. It's going to be $95 for diagnostics and I should be able to get it back to you in about a week." + +There was no way I was going to pay $95 for a diagnostic on an old crappy computer just to be told that either I needed a new one, or that the repair was going to be even more money on top of the diagnostic fee. So I thought to myself, if I can fix a car, then I can definitely fix this little computer. It was broken anyway; what was the worst that could happen? I end up breaking it more and need a new one? I was already in that situation. + +So I spent the next couple of days at work doing some research on computer parts, in between cars. I found out that replacing the motherboard meant that I was probably going to need a new processor. I found a motherboard/processor combo on Newegg for a decent price that I was fairly confident would work on my computer. Great! + +I ordered the parts, and a few days later, after printing out a few instructions, I had swapped out the motherboard and replaced it with my new hardware from Newegg. I was incredibly proud of my new found skills and naturally assumed that I was some kind of elite hacker. That is, until I started the computer up. + +I don't know if you know this, but Windows XP didn't like it when you replaced a lot of parts in your computer. I didn't know it at the time either, but now I had spent probably $150 because I didn't want to pay $95 for a diagnostic, and my computer was still broken. + +### The deep dark web has all the answers + +The next day, once again, I'm using all my breaks to research what went wrong. Pretty quickly I realized that my problem was tied to the fact that I needed a new Windows license. I also realized that there was no way I was going to purchase the software. I'd get a new computer before I purchased a new Windows license. But I wasn't quite ready to give up yet. + +One click leads to another, and I end up on a computer repair forum with someone complaining about a similar problem. All the replies are basically the same—buy a Windows license or buy a new PC—but one. Near the bottom of the forum, some unknown hero of the internet says, "You can always give Ubuntu a try." and leaves it at that. + +"What's Ubuntu?" I said to myself, "and how on earth do you even pronounce that word?" + +Anyway, after some more intensive searching, I found out that Ubuntu is a free operating system that is widely considered to be one of the most user-friendly Linux distributions (whatever that is) that you can get. What's more, I found a book that included an installation CD available at the Barnes and Noble bookstore that I passed on my way home from work. Why not give Ubuntu a try? After all, the computer was already broken, and the book was only $18.99. + +### This story is already too long + +I wish I still had that book. I think I sold it with a box full of old books at a garage sale when we moved a few years ago. I wanted to share my Linux story because it's different than many of the other stories I read about. I was not a college graduate at the time, I didn't learn to code as a child, and I am not an exceptionally intelligent person. I was, at best, an average student, a recently separated Marine, and I assumed that fixing computers couldn't be much different from fixing cars. At the end of the day, you're still just swapping out different parts, right? Different tools, different parts, same job—no problem. + +Along the way I ran into a lot of problems, the first one was the discovery that after all that work, I still couldn't play World of Warcraft. Eventually, I discovered WineHQ and Open Office, and all the incredible things that have come out of the open-source world. That mysterious blue screen and my World of Warcraft obsession redirected the course of my entire working life, for the better. That's an odd thing to admit, but it's probably true. + +### How does the story end? + +Well, it's not over, and I still have a lot to learn. After some frustrating trial and error, I did eventually learn how to install World of Warcraft using Wine. I missed a few weeks in the game, but I didn't lose my raid spot in the guild, and all things considered, I was no worse for the wear. At the time, I was playing a Druid, and everyone always had room for a healer when it came time to battle Ragnaros, the Fire Lord! + +Up to this point, however, my little computer repair project has turned into a wonderful career as a Linux systems administrator, a bachelor's degree, a whole bunch of IT certifications, including the Red Hat Certified Engineer certification, and a [blog][4] that I use as my way of giving back to the community that has given me so much. + +So, if you are like me, a person who is at best moderately intelligent, persistent, incredibly cheap, and not afraid to break a few things, go ahead and try out Linux the next time your computer breaks. + +I'm excited. I mean really excited. Excited to the point that I can hardly think. I'm talking six-... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/wow-linux + +作者:[Luke Rawlins, RHCE][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/sudoluke +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) +[2]: https://opensource.com/resources/linux +[3]: https://en.wikipedia.org/wiki/Blue_screen_of_death +[4]: https://sudoedit.com From f5ec3a7fd37bbb7f6ad44d4af316101f1aa6e8a8 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:40:16 +0800 Subject: [PATCH 096/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200413=209=20op?= =?UTF-8?q?en=20source=20CSS=20frameworks=20for=20frontend=20web=20develop?= =?UTF-8?q?ment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200413 9 open source CSS frameworks for frontend web development.md --- ...frameworks for frontend web development.md | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 sources/tech/20200413 9 open source CSS frameworks for frontend web development.md diff --git a/sources/tech/20200413 9 open source CSS frameworks for frontend web development.md b/sources/tech/20200413 9 open source CSS frameworks for frontend web development.md new file mode 100644 index 0000000000..0d2bd7ddc1 --- /dev/null +++ b/sources/tech/20200413 9 open source CSS frameworks for frontend web development.md @@ -0,0 +1,254 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (9 open source CSS frameworks for frontend web development) +[#]: via: (https://opensource.com/article/20/4/open-source-css-frameworks) +[#]: author: (Bryant Son https://opensource.com/users/brson) + +9 open source CSS frameworks for frontend web development +====== +Explore open source CSS frameworks and find the right one for your +project. +![Digital creative of a browser on the internet][1] + +When most people think about web development, HTML or JavaScript usually come to mind. They usually forget about the technology that has far more impact on the ability to enjoy a website: [cascading style sheets (CSS)][2]. CSS is both one of the most important and the most often forgotten parts of any webpage, even though it's one of the three cornerstone technologies of the World Wide Web, according to Wikipedia. + +This article explores nine popular, powerful, and open source frameworks that make CSS development straightforward for building beautiful website frontends. + +Name | What It Is | License +---|---|--- +[Bootstrap][3] | The most popular CSS framework; by Twitter | MIT +[PatternFly][4] | Open source framework; by Red Hat | MIT +[Material Components for the web][5] | Open source framework; by Google | MIT +[Pure][6] | Open source framework; by Yahoo | BSD +[Foundation][7] | Frontend framework; by Zurb Foundation | MIT +[Bulma][8] | Modern CSS framework based on Flexbox | MIT +[Skeleton][9] | Lightweight CSS framework | MIT +[Materialize][10] | CSS framework based on Material Design | MIT +[Bootflat][11] | Open source Flat UI kit based on Bootstrap 3.3.0 | MIT + +  + +If you prefer to follow along as I explore this live, you can watch my video. + +### Bootstrap + +[Bootstrap][12] is easily the most popular CSS framework, and it is the one that started all frontend web design. Developed by Twitter, Bootstrap offers usability, functionality, and extensibility. + +![Bootstrap homepage][13] + +Bootstrap also offers plenty of [examples][14] to get you started. + +![Bootstrap examples][15] + +With Bootstrap, you can stitch together different components and layouts to create an interesting page design. It also offers plenty of detailed documentation. + +![Bootstrap documentation][16] + +Bootstrap's [GitHub][3] repository lists more than 19,000 commits and 1,100 contributors. It is based on the MIT License, so (as with all of the frameworks on this list) you can jump in and contribute as well. + +![Bootstrap GitHub][17] + +### PatternFly + +[PatternFly][18] is an open source (under the MIT License) CSS framework by Red Hat. PatternFly takes a different approach than Bootstrap: While Bootstrap is meant for anyone interested in creating a beautiful website, PatternFly is primarily focused on enterprise application developers and provides components, such as bars, charts, and navigations, that are very appealing for creating powerful, metrics-driven dashboards. In fact, Red Hat uses this CSS framework for the design of its products, such as OpenShift. + +![PatternFly homepage][19] + +In addition to static HTML, PatternFly also supports the ReactJS framework, a popular JavaScript framework developed by Facebook. + +![PatternFly ReactJS support][20] + +PatternFly has many advanced components, such as bars, charts, [modals][21], and layouts, that are suitable for enterprise-level applications. + +![PatternFly chart component][22] + +PatternFly's [GitHub][4] page lists more than 1,050 commits and 44 contributors. PatternFly is getting a lot of attention, and you are more than welcome to contribute. + +![PatternFly GitHub][23] + +### Material Components for the web + +With its highly successful Android platform, Google set its own standard design guidelines with a concept called [Material Design][24]. The Material Design standards are intended to be reflected across all Google products, and they are also available to the general public and open source under the MIT License. + +![Material Design homepage][25] + +Material Design has a number of [Components][26], "interactive building blocks for creating a user interface." These buttons, cards, backdrops, and more can be used to create any type of user interface for a website or mobile application. + +![Material Components webpage][27] + +The maintainers provide thorough documentation for different platforms. + +![Material Design documentation][28] + +There are also step-by-step tutorials with exercises for accomplishing different goals. + +![Material Design tutorial][29] + +The Material Components GitHub page hosts repos for different platforms, including [Material Components for the web (MDC Web)][5] for website development. MDC Web has more than 5,700 commits and 349 contributors. + +![MDC Web GitHub][30] + +### Pure + +Bootstrap, Patternfly, and MDC Web are very powerful CSS frameworks, yet they can be quite heavy and complex. If you want a lightweight CSS framework that it is closer to coding CSS yourself yet helps you build a nice web page, try [Pure.css][31]. Pure is a lightweight CSS framework with a minimal footprint. It was developed by Yahoo and is open source under the BSD License. + +![Pure.css homepage][32] + +Despite its small size, Pure offers plenty of the components necessary to build a good-looking webpage. + +![Pure.css components][33] + +Pure's [GitHub][6] page shows more than 565 commits and 59 contributors. + +![Pure.css GitHub][34] + +### Foundation + +[Foundation][35] claims to be the most advanced responsive frontend framework in the world. It provides advanced features and tutorials for building professional websites. + +![Foundation homepage][36] + +The framework is [used][37] by many companies, organizations, and even politicians, and it has plenty of documentation available. + +![Foundation documentation][38] + +Foundation's [GitHub][7] page shows nearly 17,000 commits and 1,000 contributors. Like most of the other frameworks on this list, it's available under the MIT License. + +![Foundation GitHub][39] + +### Bulma + +[Bulma][40] is an open source framework based on Flexbox and available under the MIT License. Bulma is a pretty lightweight framework, as it requires only one CSS file. + +![Bulma homepage][41] + +Bulma has clean and simple docs that make it easy to choose the topics you want to explore. It also has a number of web components you can just pick up and use in your design. + +![Bulma documentation][42] + +Bulma's [GitHub][8] page lists more than 1,400 commits and 300 contributors. + +![Bulma GitHub][43] + +### Skeleton + +If even Pure is too heavy for you, there is an even lighter-weight framework called [Skeleton][44]. The Skeleton library is only about 400 lines long, and the framework provides only the essential components to start your CSS framework journey. + +![Skeleton homepage][45] + +Despite its simplicity, Skeleton offers detailed docs to help you get started right away. + +![Skeleton documentation][46] + +Skeleton's [GitHub][9] lists 167 commits and 22 contributors. However, it's not the most active project; its last update was in 2014, so it may need some maintenance before using it. Since it is released under the MIT License, feel free to do that yourself. + +![Skeleton GitHub][47] + +### Materialize + +[Materialize][48] is a responsive frontend framework based on Google's Material Design with additional themes and components developed by Materialize's contributors. + +![Materialize homepage][49] + +Materialize's documentation page is comprehensive and pretty easy to follow. Its components page includes buttons, cards, navigations, and more. + +![Materialize documentation][50] + +Materialize is an open source project under the MIT License, and its [GitHub][10] lists more than 3,800 commits and 250 contributors. + +![Materialize GitHub][51] + +### Bootflat + +[Bootflat][52] is an open source CSS framework derived from Twitter's Bootstrap. Compared to Bootstrap, Bootflat is simpler, with lighter-weight framework components. + +![Bootflat homepage][53] + +Bootflat's [documentation][54] almost seems inspired by IKEA—it shows an image of each component without much text. + +![Bootflat docs][55] + +Bootflat is available under the MIT License, and its [GitHub][11] page includes 159 commits and eight contributors, as of this writing. + +![Bootflat GitHub][56] + +### Which CSS framework should you choose? + +You have many options for open source CSS frameworks, depending on how feature-rich or simple you want the tooling to be. Like all technology decisions, there is no single right answer for everything or everyone; there is only the right choice for the given time and the given project. + +Give a few of these a spin and see which one you want to use in your next project. Also, did I miss any interesting open source CSS frameworks? Please share your feedback and ideas in the comments below. + +Which frontend framework should you pick for your next web app? Pam Selle will address this... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-css-frameworks + +作者:[Bryant Son][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/brson +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://en.wikipedia.org/wiki/Cascading_Style_Sheets +[3]: https://github.com/twbs/bootstrap +[4]: https://github.com/patternfly/patternfly +[5]: https://github.com/material-components/material-components-web +[6]: https://github.com/pure-css/pure +[7]: https://github.com/foundation/foundation-sites +[8]: https://github.com/jgthms/bulma +[9]: https://github.com/dhg/Skeleton +[10]: https://github.com/Dogfalo/materialize +[11]: https://github.com/bootflat/bootflat.github.io +[12]: https://getbootstrap.com +[13]: https://opensource.com/sites/default/files/uploads/2_bootstrapscreenshot.jpg (Bootstrap homepage) +[14]: https://getbootstrap.com/docs/4.4/examples/ +[15]: https://opensource.com/sites/default/files/uploads/3_bootstrapsamples.jpg (Bootstrap examples) +[16]: https://opensource.com/sites/default/files/uploads/4_bootstrapdocs.jpg (Bootstrap documentation) +[17]: https://opensource.com/sites/default/files/uploads/5_bootstrapgithub.jpg (Bootstrap GitHub) +[18]: https://www.patternfly.org +[19]: https://opensource.com/sites/default/files/uploads/6_patternflyhomepage.jpg (PatternFly homepage) +[20]: https://opensource.com/sites/default/files/uploads/7_patternflyreactjs.jpg (PatternFly ReactJS support) +[21]: https://en.wikipedia.org/wiki/Modal_window +[22]: https://opensource.com/sites/default/files/uploads/8_patternflycomponents.jpg (PatternFly chart component) +[23]: https://opensource.com/sites/default/files/uploads/9_patternflygithub.jpg (PatternFly GitHub) +[24]: https://material.io +[25]: https://opensource.com/sites/default/files/uploads/10_materialhome.jpg (Material Design homepage) +[26]: https://material.io/components/ +[27]: https://opensource.com/sites/default/files/uploads/11_materialcomponents.jpg (Material Components webpage) +[28]: https://opensource.com/sites/default/files/uploads/12_materialdocs.jpg (Material Design documentation) +[29]: https://opensource.com/sites/default/files/uploads/13_materialtutorial.jpg (Material Design tutorial) +[30]: https://opensource.com/sites/default/files/uploads/15_materialgithub.jpg (MDC Web GitHub) +[31]: https://purecss.io +[32]: https://opensource.com/sites/default/files/uploads/16_purehome.jpg (Pure.css homepage) +[33]: https://opensource.com/sites/default/files/uploads/17_purecomponents.jpg (Pure.css components) +[34]: https://opensource.com/sites/default/files/uploads/18_puregithub.jpg (Pure.css GitHub) +[35]: https://get.foundation +[36]: https://opensource.com/sites/default/files/uploads/19_foundationhome.jpg (Foundation homepage) +[37]: https://zurb.com/responsive +[38]: https://opensource.com/sites/default/files/uploads/21_foundationdocs.jpg (Foundation documentation) +[39]: https://opensource.com/sites/default/files/uploads/22_foundationgithub.jpg (Foundation GitHub) +[40]: https://bulma.io +[41]: https://opensource.com/sites/default/files/uploads/23_bulmahome.jpg (Bulma homepage) +[42]: https://opensource.com/sites/default/files/uploads/24_bulmadoc.jpg (Bulma documentation) +[43]: https://opensource.com/sites/default/files/uploads/25_bulmagithub.jpg (Bulma GitHub) +[44]: http://getskeleton.com +[45]: https://opensource.com/sites/default/files/uploads/26_skeletonhome.jpg (Skeleton homepage) +[46]: https://opensource.com/sites/default/files/uploads/27_skeletondocs.jpg (Skeleton documentation) +[47]: https://opensource.com/sites/default/files/uploads/28_skeletongithub.jpg (Skeleton GitHub) +[48]: https://materializecss.com +[49]: https://opensource.com/sites/default/files/uploads/29_materializehome.jpg (Materialize homepage) +[50]: https://opensource.com/sites/default/files/uploads/30_materializedocs.jpg (Materialize documentation) +[51]: https://opensource.com/sites/default/files/uploads/31_materializegithub.jpg (Materialize GitHub) +[52]: http://bootflat.github.io +[53]: https://opensource.com/sites/default/files/uploads/32_bootflathome.jpg (Bootflat homepage) +[54]: http://bootflat.github.io/documentation.html +[55]: https://opensource.com/sites/default/files/uploads/33_bootflatdocs.jpg (Bootflat docs) +[56]: https://opensource.com/sites/default/files/uploads/34_bootflatgithub.jpg (Bootflat GitHub) From c364dcc33dffd38d20892b089cfd85c4c4dfb479 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:41:26 +0800 Subject: [PATCH 097/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200413=20A=20ha?= =?UTF-8?q?ndy=20utility=20for=20creating=20Raspberry=20Pi=20SD=20card=20i?= =?UTF-8?q?mages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md --- ...or creating Raspberry Pi SD card images.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md diff --git a/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md b/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md new file mode 100644 index 0000000000..7d0eadb90c --- /dev/null +++ b/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md @@ -0,0 +1,75 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A handy utility for creating Raspberry Pi SD card images) +[#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac) +[#]: author: (James Farrell https://opensource.com/users/jamesf) + +A handy utility for creating Raspberry Pi SD card images +====== +Getting started with Raspberry Pi Imager on a Mac. +![Raspberries with pi symbol overlay][1] + +There are many ways to buy a Raspberry Pi, and depending on who you buy it from, it may or may not come with an operating system already installed on it. Getting an OS onto a Raspberry Pi is a matter of "flashing" an SD card with an OS image. To make this as easy as possible, the [Raspberry Pi Foundation][2] has introduced a Raspberry Pi Imager application, and you can download it for all major platforms. Here's a quick intro to this helpful new utility. + +### Install the Imager + +You can find the Raspberry Pi Imager over at the usual [Raspberry Pi Downloads][3] page. Versions exist for Mac, Ubuntu, and Windows. I will download and demonstrate the Mac version. + +Installation on Mac consists of the usual DMG image that mounts to your desktop, and then a typical installer window appears: + +![Raspberry Pi Imager installer][4] + +Simply drag the cute raspberry icon to the Application folder, and you are done. Invoke that from Launchpad, and you are presented with a series of simple buttons and menus to choose from. It really cannot be simpler than this: + +![Raspberry Pi Imager home screen][5] + +### Images and options available + +The default options contain a variety of images for various Raspberry Pi models. Raspbian is the top choice with two available options for smaller "Lite" and fatter "Full" versions available. The LibreELEC Kodi entertainment system is available in various model-specific builds. Ubuntu 18 and 19 have 32-bit and 64-bit builds available for different Pi models. There is an RPi 4 EEPROM recovery utility and a function to format your card using FAT32. Finally, a generic image installer option is available that I will try out a little later. Pretty handy for a simple and compact utility. + +### Install some images + +I had a 16g micro SD card that I decided to play with. I selected the default Raspbian image, chose my attached USB/SD device, and pressed WRITE. Here is a brief demo: + +![Raspberry Pi Imager demo][6] + +I didn't post the entire sequence there. I believe it downloaded the image as it was writing and took a few minutes on my wireless connection to finish. The process goes through a write and then a verify cycle before it is finished. When it was done, I ejected the device, popped the card into my RPi 3, and was treated to the usual graphical Raspbian setup wizard and desktop environment. + +That wasn't quite enough for me; I get plenty of Linux on a daily basis and was looking for a little more today. I went back to the [Raspberry Pi Downloads][3] page and pulled down the RISC OS image. This process was nearly as easy. Download the RISCOSPi.5.24.zip file, extract it, and find the ro524-1875M.img file. From the Operating System button, I selected the Use Custom option and selected the desired image file. The process was pretty much the same; the only real difference being I had to hunt around my Downloads directory and select an image. Once the file was finished writing, back into the Pi 3, and RISC OS was ready to go. + +### Gripes on USB C + +This is just a silly aside, but how many of you are a bit frustrated with the total inconvenience of USB C these days? I'm using a MacBook Pro, which only has USB C ports, and I am subject to a never-ending swap of adapters to get things done. Take a look at this: + +![USB C adapter][7] + +Yes, that is a USB C to USB A adapter, then a USB to SD card reader, and an SD to micro SD adapter inside. I probably could have found something online to simplify this, but these are the parts I had on hand to support my family's myriad Mac, Windows, and Linux hosts. Enough about that, but I hope you got a chuckle from that insanity. + +### Summary + +The new Raspberry Pi Imager is a simple and effective tool for getting off the ground quickly with Raspberry Pi images. [BalenaEtcher][8] is a similar tool for imaging your removable devices, but this new Raspberry Pi Imager makes the process of common RPi OS installations (like Raspbian) a bit easier by eliminating the steps to fetch those common images. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/raspberry-pi-imager-mac + +作者:[James Farrell][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/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay) +[2]: https://www.raspberrypi.org/ +[3]: https://www.raspberrypi.org/downloads/ +[4]: https://opensource.com/sites/default/files/uploads/install_1.png (Raspberry Pi Imager installer) +[5]: https://opensource.com/sites/default/files/uploads/screen_2_0.png (Raspberry Pi Imager home screen) +[6]: https://opensource.com/sites/default/files/uploads/demo_3.gif (Raspberry Pi Imager demo) +[7]: https://opensource.com/sites/default/files/uploads/adapter_4.png (USB C adapter) +[8]: https://www.balena.io/etcher/ From 31ee0efa834f7be4f51d8c10c4a9492e2623f33b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 15 Apr 2020 01:42:25 +0800 Subject: [PATCH 098/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200413=20How=20?= =?UTF-8?q?to=20install=20Python=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200413 How to install Python on Linux.md --- ...20200413 How to install Python on Linux.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20200413 How to install Python on Linux.md diff --git a/sources/tech/20200413 How to install Python on Linux.md b/sources/tech/20200413 How to install Python on Linux.md new file mode 100644 index 0000000000..cc46e86ef4 --- /dev/null +++ b/sources/tech/20200413 How to install Python on Linux.md @@ -0,0 +1,159 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Python on Linux) +[#]: via: (https://opensource.com/article/20/4/install-python-linux) +[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor) + +How to install Python on Linux +====== +Step-by-step instructions for installing the latest Python instead of +(or alongside) an older version on Linux. +![OpenStack source code \(Python\) in VIM][1] + +[Python][2] is now the [most popular][3], most used programming language. Python's simple syntax and low learning curve make it the ultimate choice for beginners as well as professional developers. Python is also a very versatile programming language. It's used nearly everywhere—from web development to artificial intelligence—really anywhere other than mobile development. + +If you're using Python, there's a good chance you're a developer (or want to become one), and Linux is a great platform for creating software. But when you're working with Python every day, you sometimes want to stay up to date with the very latest version. You may not want to replace the default install of Python on your system just to test drive the latest one, so this article explains how to install the latest version of Python 3 on Linux without replacing the version provided by your distribution. + +Use the **python --version terminal** command to check whether Python is already installed and, if so, which version you have. If Python is not installed on your Linux system, or you want to install an updated version, follow the steps below. + +### Step-by-step installation instructions + +#### **Step 1:** First, install development packages required to build Python. + +#### On Debian: + + +``` +$ sudo apt update +$ sudo apt install build-essential zlib1g-dev \ +libncurses5-dev libgdbm-dev libnss3-dev \ +libssl-dev libreadline-dev libffi-dev curl +``` + +#### On Fedora: + + +``` +`$ sudo dnf groupinstall development` +``` + +#### Step 2: Download the stable latest release of Python 3 + +Visit the [official Python website][4] and download the latest version of Python 3. After the download is complete, you hav a **.tar.xz** archive file (a "tarball") containing the source code of Python. + +#### Step 3: Extract the tarball + +Once the download is complete, extract the tarball by either using the extractor application of your choice or the [Linux **tar** command][5], for example: + + +``` +`$ tar -xf Python-3.?.?.tar.xz` +``` + +#### Step 4: Configure the script + +Once the Python tarball has been extracted, navigate to the configure script and execute it in your Linux terminal with: + + +``` +$ cd Python-3.* +./configure +``` + +The configuration may take some time. Wait until it is successfully finishes before proceeding. + +#### Step 5: Start the build process + +If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command: + + +``` +`$ sudo make altinstall` +``` + +The build process may take some time. + +If you want to replace your current version of Python with this new version, you should uninstall your current Python package using your package manager (such as **apt** or **dnf**) and then install: + + +``` +`$ sudo make install` +``` + +However, it's generally preferable to install software as a package (such as a **.deb** or **.rpm** file) so your system can track and update it for you. Because this article assumes the latest Python isn't yet packaged yet, though, you probably don't have that option. In that case, you can either install Python with **altinstall** as suggested, or rebuild an existing Python package using the latest source code. That's an advanced topic and specific to your distribution, so it's out of scope for this article. + +#### Step 6: Verify the installation + +If you haven't encountered any errors, the latest Python is now installed on your Linux system. To verify it, write one of these commands in your terminal: + + +``` +`python3 --version` +``` + +or + + +``` +`python --version` +``` + +If the output says **Python 3.x**, Python 3 has been successfully installed. + +### Create a virtual environment (optional) + +Python provides a package known as **venv** (virtual environment), which helps you isolate a program directory or package from other ones. + +To create a virtual environment, enter the following in the Python terminal (in this example, assume the version of Python you've installed is in the **3.8** series): + + +``` +`python3.8 -m venv example` +``` + +This command creates a new directory (which I've named **example**), with some subdirectories. + +To activate the virtual environment, enter: + + +``` +$ source example/bin/activate +(example) $ +``` + +Notice that your terminal prompt (**$**) is now preceeded by an environment name. + +To deactivate the virtual environment, use the **deactivate** command: + + +``` +`(example) $ deactivate` +``` + +### Conclusion + +Python is a fun language that's developed and improved frequently. Getting familiar with new features is easy, once you understand how to install the latest release without interfering with the stable version provided from your distribution. + +If you have any feedback or questions, please leave them in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/install-python-linux + +作者:[Vijay Singh Khatri][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/vijaytechnicalauthor +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openstack_python_vim_1.jpg?itok=lHQK5zpm (OpenStack source code (Python) in VIM) +[2]: https://www.python.org/ +[3]: http://pypl.github.io/PYPL.html +[4]: http://python.org +[5]: https://opensource.com/article/17/7/how-unzip-targz-file From 0fe304fb3c181d1b4dd66bd4da82b2ab7176a076 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Apr 2020 08:52:06 +0800 Subject: [PATCH 099/394] translated --- ...Which Desktop Environment You are Using.md | 111 ------------------ ...Which Desktop Environment You are Using.md | 111 ++++++++++++++++++ 2 files changed, 111 insertions(+), 111 deletions(-) delete mode 100644 sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md create mode 100644 translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md diff --git a/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md deleted file mode 100644 index 0cedfc9709..0000000000 --- a/sources/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md +++ /dev/null @@ -1,111 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using) -[#]: via: (https://itsfoss.com/find-desktop-environment/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Here’s How to Find Out Which Desktop Environment You are Using -====== - -If you are a new Linux user and seeking help in one of the Linux forums, you may be asked this question: - -_**“Which desktop environment are you using?”**_ - -You have an idea about what a desktop environment is but how do you know which one are you using? I’ll tell you how to find it out. I’ll show the command line method first because that is applicable to [all kind of Linux distributions][1]. I’ll also show the graphical way of getting this information. - -### Check which desktop environment you are using - -![][2] - -You can [use the echo command in Linux][3] to display the value of XDG_CURRENT_DESKTOP variable in the terminal. - -Open the terminal and copy paste this command: - -``` -echo $XDG_CURRENT_DESKTOP -``` - -For example, it shows that I am using [GNOME desktop][4] in [Ubuntu 20.04][5]: - -``` -[email protected]:~$ echo $XDG_CURRENT_DESKTOP -ubuntu:GNOME -``` - -While this command quickly tells you which desktop environment is being used, it doesn’t give any other information. - -Knowing the version of desktop environment (also called DE) could be important in some cases. Each new version of a software brings new features or removes some. [GNOME 3.36][6] introduces a ‘Do Not Disturb’ option to toggle off all the desktop notifications. - -Suppose you read about this new Do Not Disturb feature. You verify that you are using GNOME and yet you don’t see this option in your GNOME desktop. If you could check the GNOME desktop version you have installed on your system, that could make things clear for you. - -I’ll show you the commands to check the desktop environment’s version first because you can use it in any Linux, running desktop environment. - -### How to get desktop environment version - -Unlike getting the name of desktop environment. getting its version number is not straightforward because there is no standard command or environment variable that could give this information. - -One way to get the desktop environment information in Linux is by using a tool like [Screenfetch][7]. This [command line tool displays the logo of your Linux distribution in ascii format][8] along with a few basic system information. Desktop environment version is one of them. - -In Ubuntu based distributions, you can install Screenfetch by [enabling Universe repository][9] and then using this command: - -``` -sudo apt install screenfetch -``` - -For other Linux distributions, please use your system’s package manager to install this program. - -Once installed, simply type screenfetch in the terminal and it should show the desktop environment version along with other system information. - -![Check Desktop Environment Version][10] - -As you can see in the above image, my system is using GNOME 3.36.1 (basically GNOME 3.36). You can also [check the Linux kernel version][11] and other details here. - -Please keep in mind that it is not necessary that Screenfetch will display the desktop environment version. I checked its source code and it has lots of if-else code to get the version information from a number of sources and parameters in various desktop environments. If it can find nothing on version, it just displays the DE name. - -### Using GUI to check desktop environment version - -Almost all desktop environments provide basic system details in their Settings-About section. - -The one major problem is that most DEs look different and thus I cannot show the exact steps for each of them. I am going to show it for GNOME and I let you discover it in your desktop. - -So, search for Settings in the menu (press Windows key and search): - -![Search for Settings application][12] - -In here, go to the bottom to find the About section. Click on it and you should have the desktop environment along with its version. - -![Check Desktop Environment in Ubuntu][13] - -As you can see, it shows that my system is using GNOME 3.36. - -I hope you find this quick beginner tip useful. If you have questions or suggestions, please leave a comment below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/find-desktop-environment/ - -作者:[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/what-is-linux/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1 -[3]: https://linuxhandbook.com/echo-command/ -[4]: https://www.gnome.org/ -[5]: https://itsfoss.com/ubuntu-20-04-release-features/ -[6]: https://itsfoss.com/gnome-3-36-release/ -[7]: https://github.com/KittyKatt/screenFetch -[8]: https://itsfoss.com/display-linux-logo-in-ascii/ -[9]: https://itsfoss.com/ubuntu-repositories/ -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1 -[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1 diff --git a/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md new file mode 100644 index 0000000000..4345d5cff8 --- /dev/null +++ b/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md @@ -0,0 +1,111 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using) +[#]: via: (https://itsfoss.com/find-desktop-environment/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +这是找出你所使用的桌面环境的方法 +====== + +如果你是 Linux 新用户,并在一个 Linux 论坛中寻求帮助,那么你可能会被问以下问题: + +_**“你使用的是哪个桌面环境?”**_ + +你知道什么是桌面环境,但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。 + +### 检查你使用的是哪个桌面环境 + +![][2] + +你可以[在 Linux 中使用 echo 命令][3]在终端中显示 XDG_CURRENT_DESKTOP 变量的值。 + +打开终端并复制粘贴此命令: + +``` +echo $XDG_CURRENT_DESKTOP +``` + +例如,这表明我在 [Ubuntu 20.04][5] 中使用了 [GNOME 桌面][4]: + +``` +[email protected]:~$ echo $XDG_CURRENT_DESKTOP +ubuntu:GNOME +``` + +尽管此命令可以快速告诉你正在使用哪个桌面环境,但它不会提供任何其他信息。 + +在某些情况下,了解桌面环境版本(也称为 DE)可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。 + +假设你了解了此新的“请勿打扰”功能。你确认自己正在使用 GNOME,但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。 + +我将先向你展示命令检查桌面环境版本,因为你可以在任何运行桌面环境的 Linux 中使用它。 + +### 如何获取桌面环境版本 + +与获取桌面环境的名称不同。获取其版本号并不直接,因为它没有标准的命令或环境变量可以提供此信息。 + +在 Linux 中获取桌面环境信息的一种方法是使用 [Screenfetch][7] 之类的工具。此[命令行工具以 ascii 格式显示 Linux 发行版的 logo][8] 以及一些基本的系统信息。桌面环境版本就是其中之一。 + +在基于 Ubuntu 的发行版中,你可以通过[启用 Universe 仓库][9]安装 Screenfetch,然后使用以下命令: + +``` +sudo apt install screenfetch +``` + +对于其他 Linux 发行版,请使用系统的软件包管理器来安装此程序。 + +安装后,只需在终端中输入 screenfetch 即可,它应该显示桌面环境版本以及其他系统信息。 + +![Check Desktop Environment Version][10] + +如上图所示,我的系统使用 GNOME 3.36.1(基本版本是 GNOME 3.36)。你也可以这样[检查 Linux 内核版本][11]和其他详细信息。 + +请记住,Screenfetch 不一定显示桌面环境版本。我查看了它的源码,它有许多 if-else 代码,可以从各种桌面环境中的许多源和参数获取版本信息。如果找不到任何版本,那么仅显示桌面环境名称。 + +### 使用 GUI 检查桌面环境版本 + +几乎所有桌面环境在其 “Settings-About” 部分中都提供了基本的系统详细信息。 + +一个主要问题是,大多数桌面环境看起来都不同,因此我无法展示每个桌面环境的确切步骤。我将展示 GNOME 的,让你在桌面上发现它。 + +在菜单中搜索 “Settings”(按 Windows 键并搜索): + +![Search for Settings application][12] + +在这里,找到底部的 “About” 部分。单击它,你应该就能看到桌面环境及其版本。 + +![Check Desktop Environment in Ubuntu][13] + +如你所见,这表明我的系统正在使用 GNOME 3.36。 + +我希望这个快速入门技巧对你有所帮助。如果你有任何疑问或建议,请在下面发表评论。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/find-desktop-environment/ + +作者:[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/what-is-linux/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment.jpg?ssl=1 +[3]: https://linuxhandbook.com/echo-command/ +[4]: https://www.gnome.org/ +[5]: https://itsfoss.com/ubuntu-20-04-release-features/ +[6]: https://itsfoss.com/gnome-3-36-release/ +[7]: https://github.com/KittyKatt/screenFetch +[8]: https://itsfoss.com/display-linux-logo-in-ascii/ +[9]: https://itsfoss.com/ubuntu-repositories/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-version.jpg?ssl=1 +[11]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/08/applications_menu_settings.jpg?ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/check-desktop-environment-ubuntu.jpg?ssl=1 From 10055a639247f422ca2fd815d1c848c8eb7091d1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 15 Apr 2020 08:56:05 +0800 Subject: [PATCH 100/394] translating --- ...olders as Administrator in Nautilus File Manager in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md index d8a9211b64..5dc6cd023a 100644 --- a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md +++ b/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 932f6d4ee1b790034b5f9b464cd92af92bb36a69 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 15 Apr 2020 09:04:41 +0800 Subject: [PATCH 101/394] Rename sources/tech/20200414 How World of Warcraft introduced me to Linux.md to sources/talk/20200414 How World of Warcraft introduced me to Linux.md --- .../20200414 How World of Warcraft introduced me to Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200414 How World of Warcraft introduced me to Linux.md (100%) diff --git a/sources/tech/20200414 How World of Warcraft introduced me to Linux.md b/sources/talk/20200414 How World of Warcraft introduced me to Linux.md similarity index 100% rename from sources/tech/20200414 How World of Warcraft introduced me to Linux.md rename to sources/talk/20200414 How World of Warcraft introduced me to Linux.md From 0f5d421cdff7c53e527d7ad880009fc28314091d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Apr 2020 12:46:29 +0800 Subject: [PATCH 102/394] PRF @robsean --- ...ux on VirtualBox- Quickest - Safest Way.md | 108 ++++++++++-------- 1 file changed, 59 insertions(+), 49 deletions(-) diff --git a/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md b/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md index 100d2ec246..81398484ca 100644 --- a/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md +++ b/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md @@ -1,118 +1,128 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way) [#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -在 VirtualBox 上安装 Kali Linux : 最快速和最安全的方法 +在 VirtualBox 上安装 Kali Linux:最快速和最安全的方法 ====== -_**这篇教程向你展示如何以最快的方式在 Windows 和 Linux 中的 Virtual Box 虚拟机上安装 Kali Linux 。**_ +> 这篇教程向你展示如何在 Windows 和 Linux 中以最快的方式在 VirtualBox 上安装 Kali Linux。 -[Kali Linux][1] 是 [最适合黑客攻击和安全爱好者的 Linux 发行版][2] 之一。 +[Kali Linux][1] 是 [最适合脆弱性测试和安全爱好者的 Linux 发行版][2] 之一。 -因为它涉及一个像黑客之类的敏感话题,就像一把双刃剑。我们过去在详细的 Kali Linux 评论中讨论过,所以我不会使用同样的东西来烦你。 +因为它涉及一个像黑客之类的敏感话题,就像一把双刃剑。我们过去在详细的 Kali Linux 评论中讨论过,所以我不会再次赘述。 -尽管你可以通过以替换现有的操作系统的形式安装 Kali Linux 。但是通过一台虚拟机来使用它可能会是更好更安全的选择。 +虽然你可以通过替换现有的操作系统的形式安装 Kali Linux,但是通过虚拟机来使用它可能会是更好、更安全的选择。 -使用 Virtual Box ,你可以在 Windows/Linux 系统中将 Kail Linux 作为常规应用程序使用。它几乎与在系统中运行 VLC 或游戏是一样的。 +使用 VirtualBox,你可以在 Windows/Linux 系统中将 Kail Linux 作为常规应用程序使用。这和在系统中运行 VLC 或游戏几乎是一样的。 -在一台虚拟机中使用 Kali Linux 是安全的。不管你在 Kali Linux 做什么都不会影响你的 ‘宿主系统’ (例如,你的原始的 Windows 或 Linux 操作系统)。你的实际操作系统将不会受到影响,并且在你的宿主系统中数据也将是安全的。 +在虚拟机中使用 Kali Linux 是安全的。不管你在 Kali Linux 做什么都不会影响你的 ‘宿主系统’(即你原来的 Windows 或 Linux 操作系统)。你的实际操作系统将不会受到影响,并且在你的宿主系统中数据也是安全的。 ![][3] ### 如何在 VirtualBox 中安装 Kali Linux -在这里我将使用 [VirtualBox][4] 。它是一个非常好的开源虚拟化解决方案,几乎适合于任何人(专业使用或个人使用)。它是免费提供的。 +在这里我会使用 [VirtualBox][4]。它是一个非常好的开源虚拟化解决方案,几乎适合于任何人,无论是专业使用或个人使用。它是免费提供的。 -在这篇文章中,我们将特别讨论 Kali Linux ,但是你也可以安装其它任何存在的 ISO 文件,或者一个可用的预先构建的虚拟机保存文件。 +在这篇文章中,我们将特别讨论 Kali Linux,但你也可以安装几乎任何其他的操作系统,只要有 ISO 文件或预建的虚拟机保存文件就可以安装。 -**注意:** _同样的步骤也适用于运行 VirtualBox 的 Windows/Linux 。_ +**注意:**同样的步骤适用于运行 VirtualBox 的 Windows 或 Linux。 -如上所述,你可以安装 Windows 或 Linux 作为你的宿主系统。但是,在我已安装 Windows 10 的情况下(别仇恨我!),我将尝试在 VirtualBox 中一步一步地安装 Kali Linux 。 +如上所述 ,你可以安装 Windows 或 Linux 作为你的宿主系统。但是,在我已安装 Windows 10 的情况下(别仇恨我!),我会尝试着在其上的 VirtualBox 中一步步地安装 Kali Linux 。 -并且,最好的部分是,– 即使你碰巧使用一个 Linux 发行版作为你的主要操作系统,也将使用同样的步骤! +并且,最棒的是,即使你碰巧使用一个 Linux 发行版作为你的主要操作系统,也将使用同样的步骤! -很疑惑,如何做?让我们来看看… +想知道如何做?让我们来看看… -[更多 Linux 视频,订阅我们的 YouTube 频道][5] +- [video](https://youtu.be/TGOiAsSdADs) -### 图解在 VirtualBox 上安装 Kali Linux +### 在 VirtualBox 上安装 Kali Linux 的分步指南 -_我们将使用专门为 VirtualBox 定制的 Kali Linux 镜像。你也可以下载 Kali Linux 的 ISO 文件,并创建一个新的虚拟机 – 但是为什么当你有一个简单的选择时还这样做呢?_ +我们将使用一个专门为 VirtualBox 定制的 Kali Linux 镜像。你也可以下载 Kali Linux 的 ISO 文件,并创建一个新的虚拟机,但是当你有一个简单的选择时,为什么还这样做呢? -#### 1\. 下载和安装 VirtualBox +#### 1、下载并安装 VirtualBox -第一件要做的事是从甲骨文的官方网站下载和安装 VirtualBox 。 +第一件要做的事是从甲骨文的官方网站下载和安装 VirtualBox。 -[下载VirtualBox][6] +- [下载 VirtualBox][6] -在你下载安装器后,只需要双击它来安装 VirtualBox 。在 [Ubuntu][7] / Fedora Linux 安装 VirtualBox 也是一样的。 +在你下载了安装器之后,只需要双击它来安装 VirtualBox。在 [Ubuntu][7]/Fedora Linux 安装 VirtualBox 也是一样的方式。 -#### 2\. 下载 Kali Linux 的即时可用的虚拟镜像 +#### 2、下载即用型的 Kali Linux 虚拟镜像 -在安装成功后,前往 [攻击性安全的下载页面][8] 来下载适用于 VirtualBox 的虚拟机镜像。如果您改变主意使用 [VMware][9] ,那也是可行的。 +在安装成功后,前往 [Offensive Security 的下载页面][8] 来下载适用于 VirtualBox 的虚拟机镜像。如果你改变主意使用 [VMware][9],那里也有适用的。 ![][10] -如你所见,文件大小大约 3 GB ,你应该使用一个 torrent 选项,或者使用一个 [下载管理器][11] 来下载它。 +如你所见,文件大小大约 3 GB,你应该使用 torrent 方式,或者使用一个[下载管理器][11]来下载它。 -[Kali Linux 虚拟镜像][8] +- [下载 Kali Linux 虚拟镜像][8] -#### 3\. 在 Virtual Box 上安装 Kali Linux +#### 3、在 Virtual Box 上安装 Kali Linux -在你安装 VirtualBox 和下载 Kali Linux 镜像后,你只需要导入它到 VirtualBox 中以便使它工作。 +当你安装 VirtualBox 并下载 Kali Linux 镜像后,你只需要将其导入到 VirtualBox 中就可以使其正常工作。 这里是如何导入 Kali Linux 的 VirtualBox 镜像: -**步骤 1** : 启动 VirtualBox 。你将注意到一个 **导入** 按钮 – 在它上面鼠标左键单击 +##### 步骤 1 -![在 导入 按钮上鼠标左键单击][12] +启动 VirtualBox。你会看到一个导入Import 按钮,点击它。 -**步骤 2:** 接下来,浏览到你更改下载的文件,并选择它来导入 (如你在下面的图像中所见)。文件名称一个以 'kali linux' 开始并以 . **ova** 拓展名结束。 +![点击导入按钮][12] + +##### 步骤 2 + +接下来,浏览刚刚下载的文件,选择要导入的文件(如下图所示)。文件名应该以“kali linux”开始,以 .ova 扩展名结束。 ![导入 Kali Linux 镜像][13] - 在选择后,通过在 **接下来** 上鼠标左键单击以继续。 +选择后,单击下一步Next继续进行。 -**步骤 3** : 现在,将向你显示将要导入虚拟机的设置。所以,你可以自定义它们或者不自定义它们 – 这取决于你的选择。如果你使用默认设置也是可以的。 +##### 步骤 3 -你需要选择一个有足够可用存储空间的路径。在 Windows 上,我从不建议使用 **C:** 盘。 +现在,你会看到要导入的虚拟机的设置。所以,你可以自定义它们或者不自定义,这是你的选择。采用默认设置也是可以的。 -![导入硬盘驱动器为 VDI][14] +你需要选择一个有足够可用存储空间的路径。在 Windows 上,我绝不建议使用 C: 盘。 -在这里,硬盘驱动器如同 VDI 一样通过分配存储器空间集来虚拟挂载硬盘驱动器。 +![将硬盘驱动器导入为 VDI][14] -在你完成设置后,单击 **导入** 并等待一段时间。 +在这里,“将硬盘驱动器导入为 VDI”指的是通过分配存储器空间集来虚拟挂载硬盘驱动器。 -**步骤 4:** 你现在将看到它的列表。所以,只需点击 **开始** 来启动它。 +在你完成设置后,单击导入Import,等待一段时间。 -在最开始的时候,你可能会得到一个 USB 2.0 端口控制器的错误,你可以禁用它来解决问题,或者只需按照屏幕上的指南来安装一个附加软件包修复问题。与此同时,你完成所有工作! +##### 步骤 4 + +你现在将看到它被列在虚拟机列表中。所以,只需点击开始Start来启动它。 + +你可能会在开始时得到一个 USB 2.0 端口控制器的错误,你可以禁用它来解决问题,或者只需按照屏幕上的指示来安装一个附加软件包修复问题。然后就大功告成了! ![Kali Linux 运行在 VirtualBox 中][15] -在 Kali Linux 中默认用户名是 root ,默认密码是 toor 。你可以使用用户名和密码来登录到系统中。 +以前 Kali Linux 中的默认用户名是 root,默认密码是 toor。但从 2020 年 1 月起,Kali Linux 就不使用 root 账号了。现在,默认账号和密码都是 kali。 -请注意,在尝试安装一个新的应用程序或尝试侵入你邻居家的 WiFi 之前,你应该 [更新Kali Linux][16] 。 +你应该可以用它来登录系统了。 -我希望这篇指南能帮助您在 Virtual Box 上很容易地安装 Kali Linux 。当然,Kali Linux 有很多有用的渗透测试工具 – 祝你好运! +请注意,在尝试安装一个新的应用程序或尝试破解 WiFi 密码之前,请先[更新 Kali Linux][16] 。 -**提示** : Kali Linux 和 Ubuntu 都是基于 Debian 的,如果你在使用 Kali Linux 时遇到一些问题或错误,你可以按照互联网上的 Ubuntu 和 Debian 的教程解决。 +我希望这篇指南能帮助您在 VirtualBox 上很容易地安装 Kali Linux。当然,Kali Linux 有很多有用的渗透测试工具 – 祝你好运! -### 额外的好处: 免费的 Kali Linux 指南书 +**提示** : Kali Linux 和 Ubuntu 都是基于 Debian 的,如果你在使用 Kali Linux 时遇到任何问题或错误,你可以按照互联网上的 Ubuntu 和 Debian 的教程解决。 -如果你刚刚开始使用 Kali Linux, 那么知晓如何使用Kali Linux 将是一个好主意。 +### 奖励: 免费的 Kali Linux 指南书 -Kali Linux 背后的公司 Offensive Security 创建了一本解释 Linux 基础知识,Kali Linux 基础知识,配置和设置的指南书,也有一些关于渗透测试和安全工具的章节。 +如果你刚刚开始使用 Kali Linux, 那么了解如何使用 Kali Linux 就很有必要了。 -基本上,它拥有你开始使用 Kali Linux 所需的一切东西。最好的事情是这本书可以免费下载。 +Kali Linux 背后的公司 Offensive Security 制作了一本指南书,讲解了 Linux 的基础知识、Kali Linux 的基础知识、配置和设置,书中还有一些关于渗透测试和安全工具的章节。 -[免费下载 Kali Linux 解密][17] +基本上,它包含你上手 Kali Linux 所需要的一切东西。更重要的是,这本书可以免费下载。 -如果你遇到问题或只是想分项在 VirtualBox 使用 Kali Linux 的经验,请在下面的评论中告诉我们。 +- [免费下载《揭秘 Kali Linux》][17] + +如果你在 VirtualBox 上使用 Kali Linux 时遇到问题,请在下面的评论中告诉我们,或者直接分享你的经验。 -------------------------------------------------------------------------------- @@ -121,7 +131,7 @@ via: https://itsfoss.com/install-kali-linux-virtualbox/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 36f3ee1877fdbb141d60a9cff10302758baa8efd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Apr 2020 12:47:33 +0800 Subject: [PATCH 103/394] PUB @robsean https://linux.cn/article-12113-1.html --- ...talling Kali Linux on VirtualBox- Quickest - Safest Way.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md (99%) diff --git a/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md b/published/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md similarity index 99% rename from translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md rename to published/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md index 81398484ca..31ce0c27f0 100644 --- a/translated/tech/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md +++ b/published/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12113-1.html) [#]: subject: (Installing Kali Linux on VirtualBox: Quickest & Safest Way) [#]: via: (https://itsfoss.com/install-kali-linux-virtualbox/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 352386c4b762c15c59ea5413e8cd806f7db42c97 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Apr 2020 15:46:37 +0800 Subject: [PATCH 104/394] APL --- .../tech/20191216 Relive Linux history with the ROX desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20191216 Relive Linux history with the ROX desktop.md b/sources/tech/20191216 Relive Linux history with the ROX desktop.md index 215006514f..36c94d71a8 100644 --- a/sources/tech/20191216 Relive Linux history with the ROX desktop.md +++ b/sources/tech/20191216 Relive Linux history with the ROX desktop.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From bfc9f0f1c96bd1eac9c8c9525d09393ea08394a2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Apr 2020 16:44:44 +0800 Subject: [PATCH 105/394] TSL --- ...live Linux history with the ROX desktop.md | 104 ------------------ ...live Linux history with the ROX desktop.md | 103 +++++++++++++++++ 2 files changed, 103 insertions(+), 104 deletions(-) delete mode 100644 sources/tech/20191216 Relive Linux history with the ROX desktop.md create mode 100644 translated/tech/20191216 Relive Linux history with the ROX desktop.md diff --git a/sources/tech/20191216 Relive Linux history with the ROX desktop.md b/sources/tech/20191216 Relive Linux history with the ROX desktop.md deleted file mode 100644 index 36c94d71a8..0000000000 --- a/sources/tech/20191216 Relive Linux history with the ROX desktop.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Relive Linux history with the ROX desktop) -[#]: via: (https://opensource.com/article/19/12/linux-rox-desktop) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Relive Linux history with the ROX desktop -====== -This article is part of a special series of 24 days of Linux desktops. -If you're looking for a fun trip back in time, the ROX desktop is well -worth a go. -![Person typing on a 1980's computer][1] - -The [ROX][2] desktop is no longer being actively developed, but its legacy resounds today, and even when it was active, it was a unique take on what a Linux desktop could be. While other desktops felt roughly similar to old Unix or Windows interfaces, ROX belongs solidly in the BeOS, AmigaOS, and [RISC OS][3] desktop camps. - -It focuses on drag-and-drop actions (which makes its accessibility non-optimal for some users), point-and-click actions, pop-up contextual menus, and a unique system of app directories for running local applications with no installation required. - -### Installing ROX - -Today, ROX is mostly abandoned and left in fragments that the user is left to sort out. Luckily, the puzzle is relatively easy to solve, but don't get confused when you find bits and pieces of the ROX desktop in your distribution's repository—but not _every_ bit of the ROX desktop. The popular parts of ROX—the file manager ([ROX-Filer][4]) and the terminal ([ROXTerm][5])—seem to have endured in most of the popular distribution repositories, and you can install (and use) them as standalone applications. However, to run the ROX desktop, you must also install ROX-Session and the libraries it depends on. - -I installed ROX on Slackware 14.2, but it should work on any Linux or BSD system. - -First, you must install [ROX-lib2][6] from its repository. True to its philosophy of minimal installs, all you have to do to install ROX-lib2 is download the tarball, [unarchive it][7], and move the **ROX-Lib** directory to **/usr/local/lib**. - -Next, you have to install [ROX-Session][8]. This probably needs to be compiled from source code, as it's not likely to be in your software repository. The compile process requires build tools, which ship by default on Slackware but are often omitted in other distributions to save space on the initial download. The names of the packages you must install to build from source code vary depending on your distro, so refer to the documentation for specifics. For example, on Debian-based distributions, you can learn about build requirements in [Debian's wiki][9], and on Fedora-based distributions, refer to [Fedora's docs][10]. Once you have the build tools installed, execute the custom ROX-Session build script: - - -``` -`$ ./AppRun` -``` - -This manages its own build and installation and prompts you for root permissions to add itself as an option on your login screen. - -If you have not installed ROX-Filer from your software repository, do that before continuing. - -Together, these components create a complete ROX desktop. To log into your new desktop, log out of your current desktop session. By default, your session manager (KDM, GDM, LightDM, or XDM, depending on your setup) will continue to log you into your previous desktop, so you must override that before logging in. - -With SDDM: - -![][11] - -With GDM: - -![][12] - -### ROX desktop features - -The ROX desktop is simple by default, with a single panel at the bottom of the screen and a shortcut icon to your home directory on the desktop. The panel contains shortcuts to common locations. That's all there is to the ROX desktop, at least as it's configured out of the box. If you want a clock or a calendar or a system tray, you need to find applications that provide them. - -![Default ROX desktop][13] - -There is no taskbar, as such, but when you minimize a window, it becomes a temporary icon on your desktop. You can click the icon to bring its window back to its former size and placement. - -The panel can be modified some, as well. You can place different shortcuts into it and even create your own applets. - -There's no application menu, either, nor are there shortcuts to applications in a contextual menu. Instead, you can navigate manually to **/usr/share/applications**, or you can add your application directory or directories to the ROX panel. - -![ROX desktop][14] - -The ROX desktop's workflow concentrates on being mouse-driven, reminiscent of Mac OS 7.5 and 8. With ROX-filer, you can manage permissions, file management, introspection, script launching, background setting, and nearly anything else you can think of, provided that you're patient enough for the point-and-click style of interaction. For power users, this seems slow, but ROX manages to make it relatively painless and very intuitive. - -### App directories, AppRun, and AppImage - -The ROX desktop has an elegant convention by which a directory containing a script named **AppRun** is executed as if it were an application. This means that in order to make a ROX app, all you have to do is compile code into a directory, place a script called **AppRun** at the root of that directory to execute the binary you've compiled, and then mark the directory executable. ROX-Filer displays a directory configured in the manner you set with a special icon and color. When you click on an app directory, ROX-Filer automatically runs the **AppRun** script inside. It looks and behaves exactly like an application that has been installed, but it's local to the user's home directory and requires no special permissions. - -This is a convenience feature, but it's one of those small features that feels great when you use it because it's so easy to implement. It's by no means essential, and it's only a few steps ahead of building an application locally, hiding the directory somewhere out of the way, and drumming up a quick **.desktop** file to act as your launcher. However, the concept of an application directory has been [cited][15] as an inspiration for the [AppImage][16] packaging system. - -### Why you should try ROX desktop - -Getting ROX set up and usable is somewhat difficult, and it appears to truly be abandoned. However, its legacy lives on in many ways today, and it's a fascinating and fun bit of Linux history. It may not become your primary desktop, but if you're looking for a fun trip back in time, then ROX is well worth a go. Explore it, customize it, and see what clever ideas it contains. There may yet be hidden gems that the open source community can benefit from. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/12/linux-rox-desktop - -作者:[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/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer) -[2]: http://rox.sourceforge.net/desktop/ -[3]: https://www.riscosopen.org/content/ -[4]: http://rox.sourceforge.net/desktop/ROX-Filer -[5]: http://roxterm.sourceforge.net/ -[6]: http://rox.sourceforge.net/desktop/ROX-Lib -[7]: https://opensource.com/article/17/7/how-unzip-targz-file -[8]: http://rox.sourceforge.net/desktop/ROX-Session.html -[9]: https://wiki.debian.org/BuildingTutorial -[10]: https://docs.pagure.org/docs-fedora/installing-software-from-source.html -[11]: https://opensource.com/sites/default/files/advent-kdm_0.jpg -[12]: https://opensource.com/sites/default/files/advent-gdm_1.jpg -[13]: https://opensource.com/sites/default/files/uploads/advent-rox.jpg (Default ROX desktop) -[14]: https://opensource.com/sites/default/files/uploads/advent-rox-custom.jpg (ROX desktop) -[15]: https://github.com/AppImage/AppImageKit/wiki/AppDir -[16]: https://appimage.org/ diff --git a/translated/tech/20191216 Relive Linux history with the ROX desktop.md b/translated/tech/20191216 Relive Linux history with the ROX desktop.md new file mode 100644 index 0000000000..42b9c52dde --- /dev/null +++ b/translated/tech/20191216 Relive Linux history with the ROX desktop.md @@ -0,0 +1,103 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Relive Linux history with the ROX desktop) +[#]: via: (https://opensource.com/article/19/12/linux-rox-desktop) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +用 ROX 桌面版重温 Linux 历史 +====== + +> 这篇文章是 Linux 桌面 24 天特别系列的一部分。如果你想来一次有趣的时光之旅,ROX 桌面非常值得一试。 + +![Person typing on a 1980's computer][1] + +[ROX][2] 桌面已经不再积极开发,而它的遗留问题至今仍然存在,即使在它活跃开发的时候,它也是一个另类的 Linux 桌面。当其他的桌面感觉与旧的 Unix 或 Windows 界面大致相似时,ROX 则属于 BeOS、AmigaOS 和 [RISC OS][3] 桌面阵营。 + +它专注于拖放式操作(这使得它的可访问性对某些用户来说并不理想)、点击式操作、弹出式上下文菜单,以及一个独特的应用程序目录系统,无需安装即可运行本地应用程序。 + +### 安装 ROX + +如今,ROX 基本上都被遗弃了,只剩下一点残渣碎片留给用户自己去收集整理。幸运的是,这个难题相对来说比较容易解决,但是当你在发行版的软件仓库中找到 ROX 桌面的碎片时,不要被迷惑了,因为那并不是 ROX 桌面所有的碎片。ROX 常用的部分 —— 文件管理器([ROX-Filer][4])和终端([ROXTerm][5]) —— 似乎在大多数流行的发行版软件仓库中都有存在,你可以将它们作为独立的应用程序安装(和使用)。然而,要运行 ROX 桌面,你必须同时安装 ROX-Session 和它所依赖的库。 + +我在 Slackware 14.2 上安装了 ROX,但它应该可以在任何 Linux 或 BSD 系统上运行。 + +首先,你必须从其版本库中安装 [ROX-lib2][6]。按照它的理念,你要安装 ROX-lib2,只需下载tarball、[解压][7],然后将 `ROX-lib` 目录移动到 `/usr/local/lib` 下。 + +接下来,你要安装 [ROX-Session][8]。这可能需要从源码中编译,因为它很可能不在你的软件仓库中。编译过程需要编译工具,这些工具在 Slackware 上是默认提供的,但在其他发行版中往往会被省略,以节省初始下载空间。根据你的发行版不同,你必须安装的包的名称也不同,所以请参考文档来了解具体内容。例如,在 Debian 发行版中,你可以在 [Debian 的 wiki][9] 中了解构建需求,而在 Fedora 发行版中,请参考 [Fedora 的文档][10]。安装了构建工具后,执行自定义的 ROX-Session 构建脚本。 + +``` +$ ./AppRun +``` + +这个脚本会自己管理构建和安装,并提示你需要 root 权限,以在你的登录屏上将其添加为一个选项。 + +如果你还没有从你的软件库中安装 ROX-Filer,请在继续之前安装。 + +这些组件共同组成了一个完整的 ROX 桌面。要登录到新桌面,请从当前桌面会话中注销。默认情况下,你的会话管理器(KDM、GDM、LightDM 或 XDM,视你的设置而定)会继续登录到您之前的桌面,所以在登录前必须覆盖。 + +使用 SDDM: + +![][11] + +使用 GDM: + +![][12] + +### ROX桌面特性 + +ROX 桌面默认情况下很简单,屏幕底部有一个面板,桌面上有一个通往主目录的快捷方式图标。面板中包含了一些常用位置的快捷方式。这就是 ROX 桌面的全部功能,至少在安装后就是这样。如果你想要时钟或日历或系统托盘,你需要找到提供这些功能的应用程序。 + +![Default ROX desktop][13] + +虽然没有任务栏,但当你将窗口最小化时,它就会成为桌面上的一个临时图标。你可以点击该图标,将其窗口恢复到以前的大小和位置。 + +面板也可以进行一些修改。你可以在其中放置不同的快捷方式,甚至可以创建自己的小程序。 + +没有应用菜单,也没有上下文菜单中的应用快捷方式。相反,你可以手动导航到 `/usr/share/applications`,或者你可以将你的应用目录或目录添加到 ROX 面板中。 + +![ROX desktop][14] + +ROX 桌面的工作流程集中在鼠标驱动上,让人联想到 Mac OS 7.5 和 8 系统。通过 ROX-filer,你可以管理权限、文件管理、内省introspection、脚本启动、后台设置,以及几乎所有你能想到的东西,只要你有足够的耐心,就可以实现点击式的交互。对于高级用户来说,这似乎很慢,但 ROX 设法让它变得相对无痛,而且非常直观。 + +### 应用程序目录、AppRun 和 AppImage + +ROX 桌面有一个优雅的惯例,在这个惯例中,包含一个名为 `AppRun` 的脚本的目录就可以像一个应用程序一样被执行。这意味着,要制作一个 ROX 应用程序,你所要做的就是将代码编译到一个目录中,将一个名为`AppRun` 的脚本放在该目录的根目录下,执行你所编译的二进制文件,然后将该目录标记为可执行。ROX-Filer 会按照你设置的方式来显示一个目录,并以特殊的图标和颜色显示一个目录。当你点击一个应用程序目录,ROX-Filer 会自动运行里面的 `AppRun` 脚本。它的外观和行为就像一个已经安装好的应用程序,但它是在用户的主目录下的本地目录,不需要特殊的权限。 + +这是一个方便的功能,但它是那些你使用时感觉很好的小功能之一,因为它很容易做到。它绝不是必要的,它只是比在本地建立一个应用程序,将目录隐藏在某个不显眼的地方,并建立一个快速的 `.desktop` 文件作为你的启动器,要领先了几步。然而,应用程序目录的概念已经当做灵感被 [AppImage][16] 打包系统所 [借鉴][15] 。 + +### 为什么应该试试 ROX 桌面 + +把 ROX 设置好并使用是有些困难的,它似乎真的被抛弃了。然而,它的遗产在今天以多种方式继续存在,它是 Linux 历史上的一段迷人而有趣的历史。它可能不会成为你的主要桌面,但如果你想来一次有趣的回溯之旅,那么 ROX 非常值得一试。探索它、定制它,看看它包含了哪些巧妙的想法。也许还有一些隐藏的宝石可以让开源社区受益。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/12/linux-rox-desktop + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer) +[2]: http://rox.sourceforge.net/desktop/ +[3]: https://www.riscosopen.org/content/ +[4]: http://rox.sourceforge.net/desktop/ROX-Filer +[5]: http://roxterm.sourceforge.net/ +[6]: http://rox.sourceforge.net/desktop/ROX-Lib +[7]: https://opensource.com/article/17/7/how-unzip-targz-file +[8]: http://rox.sourceforge.net/desktop/ROX-Session.html +[9]: https://wiki.debian.org/BuildingTutorial +[10]: https://docs.pagure.org/docs-fedora/installing-software-from-source.html +[11]: https://opensource.com/sites/default/files/advent-kdm_0.jpg +[12]: https://opensource.com/sites/default/files/advent-gdm_1.jpg +[13]: https://opensource.com/sites/default/files/uploads/advent-rox.jpg (Default ROX desktop) +[14]: https://opensource.com/sites/default/files/uploads/advent-rox-custom.jpg (ROX desktop) +[15]: https://github.com/AppImage/AppImageKit/wiki/AppDir +[16]: https://appimage.org/ From 7233ba0593a6ecda4d34ad480df05a9ee94d5e2f Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Wed, 15 Apr 2020 16:54:31 +0800 Subject: [PATCH 106/394] Update 20200320 Build a private social network with a Raspberry Pi.md --- ...0 Build a private social network with a Raspberry Pi.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sources/tech/20200320 Build a private social network with a Raspberry Pi.md b/sources/tech/20200320 Build a private social network with a Raspberry Pi.md index f95096bff7..935132b29e 100644 --- a/sources/tech/20200320 Build a private social network with a Raspberry Pi.md +++ b/sources/tech/20200320 Build a private social network with a Raspberry Pi.md @@ -7,13 +7,12 @@ [#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social) [#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) -Build a private social network with a Raspberry Pi +用树莓派搭建一个私人社交网络 ====== -Step-by-step instructions on how to create your own social network with -low-cost hardware and simple setup. +手把手教你怎样以低硬件成本和简易步骤搭建自己的社交网络。 ![Team of people around the world][1] -Social networks have revolutionized people's lives in the last several years. People use social channels every day to stay connected with friends and family. But a common question remains regarding privacy and data security. Even if social networks have created complex privacy policies to protect users, maintaining your data in your own server is always the best option if you don't want to make them available to the public. +近年来,社交网络已经革新了人们的生活习惯。为了维持与朋友和加人的联系,人们每天都会使用社交频道。但是涉及到隐私和数据安全时,仍有一些普遍问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息公之于众,最好的办法还是把数据保存在自己的服务器上。 Again, a Raspberry Pi—Raspbian Lite version can be very versatile to help you put a number of useful home services (see also my [Raspberry Pi projects][2] article) in place. Some addictive features can be achieved by searching for open source software and testing it with this fantastic device. An interesting example to try is installing OpenSource Social Network in your Raspberry Pi. From 8c087166c1b10b0f42cf619647a4228a5441e878 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Apr 2020 19:32:09 +0800 Subject: [PATCH 107/394] PRF @geekpi --- ... The Beautiful Deepin Desktop to Ubuntu.md | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md b/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md index 254e3e09eb..07c422b65f 100644 --- a/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md +++ b/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md @@ -1,58 +1,58 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu) [#]: via: (https://itsfoss.com/ubuntudde/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -新的 Linux 发行版 UbuntuDDE 将漂亮的 Deepin 桌面带到 Ubuntu +新的 Linux 发行版 UbuntuDDE 将漂亮的深度桌面带到 Ubuntu ====== -Deepin 是有直观 UI 的漂亮桌面环境。UbuntuDDE 项目结合了 Ubuntu 的强大和 Deepin 之美。 +深度是一个漂亮桌面环境,拥有直观的 UI。UbuntuDDE 项目结合了 Ubuntu 的强大和深度之美。 -[Deepin 桌面环境][1](DDE)是由 [Deepin Linux][2] 的开发人员创建的漂亮桌面环境。最初,Deepin Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。 +[深度桌面环境][1](DDE)是由[深度 Linux][2] 的开发人员创建的漂亮桌面环境。最初,深度 Linux 基于 [Ubuntu][3],但后来他们切换到了 [Debian][4]。 ![Deepin Desktop Environment in Ubuntu][5] -Deepin Linux 的一个主要问题是服务器速度较慢。常规系统需要花几个小时才能下载,因为它们的所有服务器都在中国,而且这些服务器非常慢。 +深度 Linux 的一个主要问题是它的下载服务器速度较慢。常规系统需要花几个小时才能下载,因为他们的所有服务器都在中国,而这些服务器很不幸的是速度极慢。 -如果你想使用 Deepin 桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的 Deepin 桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置 Deepin 的时间和精力。 +如果你想使用深度桌面,那没有什么可以阻止你将其安装在常规 Ubuntu 系统上。[UbuntuDDE][6] 试图通过在 Ubuntu 之上为你提供开箱即用的深度桌面体验来使其更简单。这样可以节省你在 Ubuntu 上安装和配置深度桌面的时间和精力。 ![Screenshot of UbuntuDDE][7] -### Ubuntu DDE:Ubuntu 的强大和 Deepin 桌面的漂亮 +### Ubuntu DDE:Ubuntu 的强大和深度桌面的漂亮 -请注意,UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被公认为 Ubuntu 的官方变种。 +请注意,UbuntuDDE 不是 Ubuntu 的官方变种。UbuntuDDE 的开发人员与 Ubuntu 团队无关。UbuntuDDE 目前一个混合发行版,其目标是在未来的发行版中被接纳为 Ubuntu 的官方变种。 -UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope 以及 Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队以及其他开发者的帮助。 +UbuntuDDE 开发人员得到了 Ubuntu Snapcraft 团队的 Alan Pope、Ubuntu Budgie 团队和 [Ubuntu Cinnamon][8] 团队,以及其他开发者,如 Hualet Wang 和 Felix Yan 的帮助。 -在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重要方面是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE(深度桌面环境)的全部乐趣。 +在与 FOSS 的对话中,其主要开发人员 Arun 强调说,该项目的重点是定期维护 Ubuntu 的 DDE 软件包,并帮助用户享受 DDE(深度桌面环境)的全部乐趣。 ![Ubuntu Deepin Edition login screen][9] -Arun 还提到,这个 Ubuntu Deepin 混合项目首先是维护和打包来自上游(即 Deepin 仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu,然后再安装 Deepin Desktop。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队软件包选择和设计变更的融合。 +Arun 还提到,这个 Ubuntu 和深度的混合项目首先是维护和打包来自上游(即深度仓库)的最新版本。然后,它最终与 Ubuntu 20.04 focal 结合,生成了一个镜像文件,每个人都可以安装,而不必麻烦地先安装常规的 Ubuntu,然后再安装深度桌面。UbuntuDDE 不仅是 DDE 和 Ubuntu 的组合,而且还是 UbuntuDDE 团队的软件包选择和设计变更的融合。 ![UbuntuDDE screenshot][10] -与 Deepin Linux 不同,UbuntuDDE 不使用 Deepin Appstore。它改用 Ubuntu 软件中心。如果你对[基于武汉的 Deepin Linux 的间谍软件标签][11]感到不满意,这将是一个好消息。 +与 Deepin Linux 不同,UbuntuDDE 不使用深度应用商店。它改用 Ubuntu 软件中心。如果你被[这个来自武汉的深度 Linux 的间谍软件谣言][11]吓到了,这应该是一个好消息。 ### 下载 UbuntuDDE 20.04 Beta UbuntuDDE 的目标是与 Ubuntu 20.04 一起发布第一个正式的稳定版本。像[其他 Ubuntu 变种][12]一样,UbuntuDDE 20.04 beta 也可供你下载并尝试。 -警告! +> 警告! +> +> 一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主用系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。 -一句话警告。 UbuntuDDE 是正在开发的新手项目。请不要在你的主系统上使用它。如果要尝试,请在虚拟机或备用系统中使用它。 - -[Download Ubuntu 20.04 DDE Beta][13] +- [下载 Ubuntu 20.04 DDE Beta][13] ![Installing UbuntuDDE][14] -由于本质上是 Ubuntu,因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考本教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。 +由于本质上是 Ubuntu,因此安装 UbuntuDDE 与安装 Ubuntu 相同。你可以参考这篇教程,其中展示了[如何在 VirtualBox 内安装 Ubuntu][15]。 -我知道你可能会认为这“不是另一个 Ubuntu” 或者“只是 Ubuntu 上的 Deepin,任何人都可以做”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种出现了。你怎么看? +我知道你可能会认为这“不过是另一个 Ubuntu” 或者“只是 Ubuntu 上的深度,任何人都可以做到的”。但是我也知道有一小部分用户喜欢像 UbuntuDDE 这样的项目,这对他们来说使事情变得容易。我的意思是有许多 Ubuntu 变种就是这样出现的。你怎么看? -------------------------------------------------------------------------------- @@ -61,7 +61,7 @@ via: https://itsfoss.com/ubuntudde/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From e1446f5d07c8160925d91907dafd1b0514de6f3a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 15 Apr 2020 19:32:36 +0800 Subject: [PATCH 108/394] PUB @geekpi https://linux.cn/article-12114-1.html --- ...UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md (98%) diff --git a/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md b/published/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md similarity index 98% rename from translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md rename to published/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md index 07c422b65f..87410d1362 100644 --- a/translated/tech/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md +++ b/published/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12114-1.html) [#]: subject: (New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu) [#]: via: (https://itsfoss.com/ubuntudde/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 1d4165a7ce7903f9159741a917eba5898a51f7ef Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Wed, 15 Apr 2020 23:54:53 +0800 Subject: [PATCH 109/394] TSL 20200320 Build a private social network with a Raspberry Pi.md --- ...vate social network with a Raspberry Pi.md | 372 ++++++++++++++++++ 1 file changed, 372 insertions(+) create mode 100644 translated/tech/20200320 Build a private social network with a Raspberry Pi.md diff --git a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md b/translated/tech/20200320 Build a private social network with a Raspberry Pi.md new file mode 100644 index 0000000000..f965751d90 --- /dev/null +++ b/translated/tech/20200320 Build a private social network with a Raspberry Pi.md @@ -0,0 +1,372 @@ +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Build a private social network with a Raspberry Pi" +[#]: via: "https://opensource.com/article/20/3/raspberry-pi-open-source-social" +[#]: author: "Giuseppe Cassibba https://opensource.com/users/peppe8o" + +用树莓派搭建一个私人社交网络 +====== +手把手教你怎样以低硬件成本和简易步骤搭建自己的社交网络。 +![Team of people around the world][1] + +近年来,社交网络已经革新了人们的生活习惯。为了维持与朋友和家人的联系,人们每天都会使用社交频道。但是涉及到隐私和数据安全时,仍有一些普遍问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息被泄露,最好的办法还是把数据保存在自己的服务器上。 + +一个树莓派 — 多才多艺的 Raspbian Lite 版本就可以让你搭建很多有用的家庭服务(参照我的文章[树莓派项目][2])。通过搜索开源软件你就可以实现一些令人痴迷的功能,你也可以用这个神奇的设备来感受那些功能。其中一个有趣的尝试就是在你的树莓派上安装 OSSN(译注:OpenSource Social Network)。 + +### OSSN是什么? + +[OSSN][3] 是用 PHP 写的一个快速开发社交网络软件,让你可以搭建自己的社交网站。OSSN 可以用来搭建不同类型的社交应用,如: + + * 私人内部网 + * 公用/公开网络 + * 社区 + + + +OSSN 支持的功能: + + * 照片 + * 个人资料 + * 朋友圈 + * 表情 + * 搜索 + * 聊天 + + + +OSSN 运行在 LAMP 服务器上。硬件需求很简单,却能提供强大的用户界面,也友好支持移动端。 + +### 我们需要准备什么 + +这个项目很简单,而且由于我们只安装远程 web 服务,因此我们只需要一些便宜的零件就够了。我使用的是树莓派 3B+,但是用树莓派 3A+ 或其他更新的板应该也可以。 + +硬件: + + * 带有电源模块的树莓派 3B+ + * 一张 SD 卡(最好是性能好点的卡,至少 16 GB) + * 一台有 SFTP 软件(如免费的 [Filezilla][4])的桌面 PC,用来把安装包传到你的树莓派上 + + + +### 操作步骤 + +我们首先搭建一个传统的 LAMP 服务器,然后配置数据库用户和安装 OSSN。 + +#### 1\. 安装 Raspbian Buster Lite 操作系统 + +你可以直接参照我的文章[在你的树莓派上安装 Raspbian Buster Lite][5]。 + +为了确保你的系统是最新的,ssh 登录到树莓派后在终端输入下面的命令: + + +```bash +sudo apt-get update +sudo apt-get upgrade +``` + +#### 2\. 安装 LAMP 服务 + +LAMP(Linux–Apache–Mysql–Php)服务通常与 MySQL 数据库配合。在我们的项目中,我们选择 MariaDB,因为它更轻量,完美支持树莓派。 + +#### 3\. 安装 Apache 服务: + + +``` +`sudo apt-get install apache2 -y` +``` + +你可以通过在浏览器输入 `http://<>` 来检查 Apache 是否安装正确: + +![][6] + +#### 4\. 安装 PHP: + + +``` +`sudo apt-get install php -y` +``` + +#### 5\. 安装 MariaDB 服务和 PHP connector: + + +``` +`sudo apt-get install mariadb-server php-mysql -y` +``` + +#### 6\. 安装 phpMyAdmin: + +在 OSSN 中 phpMyAdmin 不是强制安装的,但我建议你安装,因为它可以简化数据库的管理。 + + +``` +`sudo apt-get install phpmyadmin` +``` + +在 phpMyAdmin 配置界面,执行以下步骤: + + * 按下空格和 OK 选择 apache(强制)。 + * 在 dbconfig-common 选择是,配置 phpMyAdmin 的数据库。 + * 输入想设置的密码,按下 OK。 + * 再次输入 phpMyAdmin 密码来确认,按下 OK。 + + + +#### 7\. 为 phpMyAdmin 用户添加数据库权限来管理数据库: + +我们用 root 用户连接 MariaDB(默认没有密码)来设置权限。 + + +``` +sudo mysql -uroot -p +grant all privileges on *.* to 'phpmyadmin'@'localhost'; +flush privileges; +quit +``` + +#### 8\. 最后,重启 Apache 服务: + + +``` +`sudo systemctl restart apache2.service` +``` + +在浏览器输入 `http://<>/phpmyadmin/` 来检查 phpMyAdmin 是否正常: + +![][7] + +默认的 phpMyAdmin 登录凭证: + + * 用户名:phpmyadmin + * 密码:在 phpMyAdmin 安装步骤中你设置的密码 + + + +### 安装 OSSN 所需的其他包和配置 PHP + +在第一次配置 OSSN 前,我们还需要在系统上安装一些所需的包: + + * PHP 版本 5.6,7.0 或 7.1 + * MYSQL 5 及以上 + * APACHE + * MOD_REWRITE + * 需要打开 PHP 扩展 cURL 和 Mcrypt + * PHP GD 扩展 + * PHP ZIP 扩展 + * 打开 PHP 设置 allow_url_fopen + * PHP JSON 支持 + * PHP XML 支持 + * PHP OpenSSL + + + +在终端输入以下命令来安装上述包: + + +``` +`sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml` +``` + +#### 1\. 打开 MOD_REWRITE: + + +``` +`sudo a2enmod rewrite` +``` + +#### 2\. 修改默认的 Apache 配置,使用 mod_rewrite: + + +``` +`sudo nano /etc/apache2/sites-available/000-default.conf` +``` + +#### 3\. 在 **000-default.conf** 文件中添加下面的内容: + + +```ini + + ServerAdmin webmaster@localhost + DocumentRoot /var/www/html + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + # SECTION TO ADD -------------------------------- + + Options Indexes FollowSymLinks MultiViews + AllowOverride All + Require all granted + + # END SECTION TO ADD -------------------------------- + +``` + +#### 4\. 安装 Mcrypt: + + +```bash +sudo apt install php-dev libmcrypt-dev php-pear +sudo pecl channel-update pecl.php.net +sudo pecl install mcrypt-1.0.2 +``` + +#### 5\. 在 `/etc/php/7.3/apache2/php.ini` 文件中添加 `extension=mcrypt.so`(或取消注释)打开 Mcrypt 模块: + + +```bash +sudo nano /etc/php/7.3/apache2/php.ini +``` + +**allow_url_fopen** 应该已经在 `/etc/php/7.3/apache2/php.ini` 文件中打开了。OpenSSL 应该在 php7.3 中安装了。 + +#### 6\. 我建议的另一个设置是把 PHP 最大上传文件数修改为 16 MB: + + +``` +`sudo nano /etc/php/7.3/apache2/php.ini` +``` + +#### 7\. 搜索到 **upload_max_filesize** 所在的行,参照下面的设置: + + +``` +`upload_max_filesize = 16M` +``` + +#### 8\. 保存并退出,重启 Apache: + + +``` +`sudo systemctl restart apache2.service` +``` + +### 安装 OSSN + +#### 1\. 创建数据库,设置用户: + +回到 phpmyadmin web页面(浏览器输入 `http://<>/phpmyadmin/`)并登录: + +用户名: phpmyadmin + +密码:在 phpMyAdmin 安装步骤中你设置的密码 + +点击数据库标签页: + +![][8] + +创建一个数据库,记下数据库的名字,因为在之后的安装过程中,你要手动输入它。 + +![][9] + +现在为 OSSN 创建一个数据库用户,我使用下面的凭证: + +用户名: ossn_db_user + +密码: ossn_db_password + +在终端输入下面的命令(如果你没有修改过密码,root 密码应该仍然是空): + + +```bash +sudo mysql -uroot -p +CREATE USER 'ossn_db_user'@'localhost' IDENTIFIED BY 'ossn_db_password'; +GRANT ALL PRIVILEGES ON ossn_db.* TO 'ossn_db_user'@'localhost'; +flush privileges; +quit +``` + +#### 2\. 安装 OSSN 软件: + +在你 PC 上从 [OSSN 下载页面][10] 下载 OSSN 安装压缩文件,保存为文件 `ossn-v5.2-1577836800.zip`。 + +使用你习惯的 SFTP 软件把整个压缩文件通过 SFTP 传到树莓派的新目录 `/home/pi/download` 下。常用的(默认)SFP 连接参数是: + + * 主机:你树莓派的 IP 地址 + * 用户名:pi + * 密码:raspberry(如果没有修改过默认密码) + * 端口: 22 + + + +在终端输入: + + +```bash +cd /home/pi/download/ #Enter directory where OSSN installation files have been transferred +unzip ossn-v5.2-1577836800.zip #Extracts all files from zip +cd /var/www/html/ #Enter Apache web directory +sudo rm index.html #Removes Apache default page - we'll use OSSN one +sudo cp -R /home/pi/download/ossn-v5.2-1577836800/* ./ #Copy installation files to web directory +sudo chown -R www-data:www-data ./ +``` + +创建数据文件夹:OSSN 需要一个文件夹来存放数据。出于安全目的,OSSN 建议这个文件夹创建在公开文档根目录之外。所以,我们在 `/opt` 下创建。 + + +```bash +sudo mkdir /opt/ossn_data +sudo chown -R www-data:www-data /opt/ossn_data/ +``` + +在浏览器输入 `http://<>` 来开始安装向导。 + +![][11] + +所有项都检查完后,点击页面最下面的下一步按钮。 + +![][12] + +阅读证书验证并点击页面最下面的下一步按钮来接受证书。 + +![][13] + +输入数据库用户名,密码和你选择的数据库名字,记得也要输入 OSSN 数据文件夹名称。点击安装。 + +![][14] + +输入你的管理员账号信息,点击创建按钮。 + +![][15] + +现在所有的工作应该都完成了。点击结束,进入管理员首页。 + +![][16] + +你可以通过 URL `http://<>/administrator` 进入管理员控制面板,普通用户可以访问链接是 `http://<>`。 + +![][17] + +*本文首发在 [peppe8o.com][18]。已获得转载授权。* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/raspberry-pi-open-source-social + +作者:[Giuseppe Cassibba][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/peppe8o +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 "Team of people around the world" +[2]: https://peppe8o.com/2019/04/best-raspberry-pi-projects-with-open-source-software/ +[3]: https://www.opensource-socialnetwork.org/ +[4]: https://filezilla-project.org/ +[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/ +[6]: https://opensource.com/sites/default/files/uploads/ossn_1_0.jpg +[7]: https://opensource.com/sites/default/files/uploads/ossn_2.jpg +[8]: https://opensource.com/sites/default/files/uploads/ossn_3.jpg +[9]: https://opensource.com/sites/default/files/uploads/ossn_4.jpg +[10]: https://www.opensource-socialnetwork.org/download +[11]: https://opensource.com/sites/default/files/uploads/ossn_5.jpg +[12]: https://opensource.com/sites/default/files/uploads/ossn_6.jpg +[13]: https://opensource.com/sites/default/files/uploads/ossn_7.jpg +[14]: https://opensource.com/sites/default/files/uploads/ossn_8.jpg +[15]: https://opensource.com/sites/default/files/uploads/ossn_9.jpg +[16]: https://opensource.com/sites/default/files/uploads/ossn_10.jpg +[17]: https://opensource.com/sites/default/files/uploads/ossn_11.jpg +[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/ \ No newline at end of file From 7c9e8536a38506d7f0b6feffa83347a1057d9c0c Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Wed, 15 Apr 2020 23:59:52 +0800 Subject: [PATCH 110/394] TSL 20200320 Build a private social network with a Raspberry Pi.md --- ...vate social network with a Raspberry Pi.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md b/translated/tech/20200320 Build a private social network with a Raspberry Pi.md index f965751d90..5325d7e67f 100644 --- a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md +++ b/translated/tech/20200320 Build a private social network with a Raspberry Pi.md @@ -1,11 +1,11 @@ -[#]: collector: "lujun9972" -[#]: translator: "lxbwolf" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "Build a private social network with a Raspberry Pi" -[#]: via: "https://opensource.com/article/20/3/raspberry-pi-open-source-social" -[#]: author: "Giuseppe Cassibba https://opensource.com/users/peppe8o" +[#]: collector: (lujun9972) +[#]: translator: (lxbwolf) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Build a private social network with a Raspberry Pi) +[#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social) +[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) 用树莓派搭建一个私人社交网络 ====== @@ -352,7 +352,7 @@ via: https://opensource.com/article/20/3/raspberry-pi-open-source-social [a]: https://opensource.com/users/peppe8o [b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 "Team of people around the world" +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 (Team of people around the world) [2]: https://peppe8o.com/2019/04/best-raspberry-pi-projects-with-open-source-software/ [3]: https://www.opensource-socialnetwork.org/ [4]: https://filezilla-project.org/ @@ -369,4 +369,4 @@ via: https://opensource.com/article/20/3/raspberry-pi-open-source-social [15]: https://opensource.com/sites/default/files/uploads/ossn_9.jpg [16]: https://opensource.com/sites/default/files/uploads/ossn_10.jpg [17]: https://opensource.com/sites/default/files/uploads/ossn_11.jpg -[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/ \ No newline at end of file +[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/ From 05bbd40796f0eba23c812417fdedd87ebff08ca1 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Thu, 16 Apr 2020 00:08:18 +0800 Subject: [PATCH 111/394] TSL --- ...vate social network with a Raspberry Pi.md | 372 ------------------ 1 file changed, 372 deletions(-) delete mode 100644 sources/tech/20200320 Build a private social network with a Raspberry Pi.md diff --git a/sources/tech/20200320 Build a private social network with a Raspberry Pi.md b/sources/tech/20200320 Build a private social network with a Raspberry Pi.md deleted file mode 100644 index 935132b29e..0000000000 --- a/sources/tech/20200320 Build a private social network with a Raspberry Pi.md +++ /dev/null @@ -1,372 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Build a private social network with a Raspberry Pi) -[#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social) -[#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) - -用树莓派搭建一个私人社交网络 -====== -手把手教你怎样以低硬件成本和简易步骤搭建自己的社交网络。 -![Team of people around the world][1] - -近年来,社交网络已经革新了人们的生活习惯。为了维持与朋友和加人的联系,人们每天都会使用社交频道。但是涉及到隐私和数据安全时,仍有一些普遍问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息公之于众,最好的办法还是把数据保存在自己的服务器上。 - -Again, a Raspberry Pi—Raspbian Lite version can be very versatile to help you put a number of useful home services (see also my [Raspberry Pi projects][2] article) in place. Some addictive features can be achieved by searching for open source software and testing it with this fantastic device. An interesting example to try is installing OpenSource Social Network in your Raspberry Pi. - -### What Is OpenSource Social Network? - -[OpenSource Social Network][3] (OSSN) is a rapid-development social networking software written in PHP, that essentially allows you to make a social networking website. OSSN can be used to build different types of social apps, such as: - - * Private Intranets - * Public/Open Networks - * Community - - - -OSSN supports features like: - - * Photos - * Profile - * Friends - * Smileys - * Search - * Chat - - - -OSSN runs on a LAMP server. It has very poor hardware requirements, but an amazing user interface, which is also mobile-friendly. - -### What we need - -This project is very simple and, because we're installing only remote web services, we only need a few cheap parts. I'm going to use a Raspberry Pi 3 model B+, but it should also work with Raspberry Pi 3 model A+ or newer boards. - -Hardware: - - * Raspberry Pi 3 model B+ with its power supply - * a micro SD card (better if it is a performing card, at least 16GB) - * a Desktop PC with an SFTP software (for example, the free [Filezilla][4]) to transfer installation packages into your RPI. - - - -### Step-by-step procedure - -We'll start by setting up a classic LAMP server. We'll then set up database users and install OpenSource Social Network. - -#### 1\. Install Raspbian Buster Lite OS - -For this step, you can simply follow my [Install Raspbian Buster Lite in your Raspberry Pi][5] article. - -Make sure that your system is up to date. Connect via ssh terminal and type following commands: - - -``` -sudo apt-get update -sudo apt-get upgrade -``` - -2\. Install LAMP server - -LAMP (Linux–Apache–Mysql–Php) servers usually come with the MySQL database. In our project, we'll use MariaDB instead, because it is lighter and works with Raspberry Pi.  - -#### 3\. Install Apache server: - - -``` -`sudo apt-get install apache2 -y` -``` - -You should now be able to check that Apache installation has gone correctly by browsing http://<<YouRpiIPAddress>>: - -![][6] - -#### 4\. Install PHP: - - -``` -`sudo apt-get install php -y` -``` - -5\. Install MariaDB server and PHP connector: - - -``` -`sudo apt-get install mariadb-server php-mysql -y` -``` - -6\. Install PhpMyAdmin: - -PhpMyAdmin is not mandatory in OpenSource Social Network, but I suggest that you install it because it simplifies database management. - - -``` -`sudo apt-get install phpmyadmin` -``` - -In the phpMyAdmin setup screen, take the following steps: - - * Select apache (mandatory) with space and press OK. - * Select Yes to configure the database for phpMyAdmin with dbconfig-common. - * Enter your favorite phpMyAdmin password and press OK. - * Enter your phpMyAdmin password again to confirm and press OK - - - -#### 7\. Grant phpMyAdmin user DB privileges to manage DBs: - -We'll connect to MariaDB with root user (default password is empty) to grant permissions. Remember to use semicolons at the end of each command row as shown below: - - -``` -sudo mysql -uroot -p -grant all privileges on *.* to 'phpmyadmin'@'localhost'; -flush privileges; -quit -``` - -8\. Finally, restart Apache service: - - -``` -`sudo systemctl restart apache2.service` -``` - -And check that phpMyAdmin is working by browsing http://<<YouRpiIPAddress>>/phpmyadmin/.  - -![][7] - -Default phpMyAdmin login credentials are: - - * user: phpmyadmin - * password: the one you set up in the phpMyAdmin installation step - - - -### Installing other open source social network-required packages and setting up PHP - -We need to prepare our system for OpenSource Social Network's first setup wizard. Required packages are: - - * PHP version any of 5.6, 7.0, 7.1 - * MYSQL 5 OR > - * APACHE - * MOD_REWRITE - * PHP Extensions cURL & Mcrypt should be enabled - * PHP GD Extension - * PHP ZIP Extension - * PHP settings allow_url_fopen enabled - * PHP JSON Support - * PHP XML Support - * PHP OpenSSL - - - -So we'll install them with following terminal commands: - - -``` -`sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml` -``` - -#### 1\. Enable MOD_REWRITE: - - -``` -`sudo a2enmod rewrite` -``` - -2\. Edit default Apache config to use mod_rewrite: - - -``` -`sudo nano /etc/apache2/sites-available/000-default.conf` -``` - -3\. Add the section so that your **000-default.conf** file appears like the following (excluding comments): - - -``` -<VirtualHost *:80> -    ServerAdmin webmaster@localhost -    DocumentRoot /var/www/html -    ErrorLog ${APACHE_LOG_DIR}/error.log -    CustomLog ${APACHE_LOG_DIR}/access.log combined -    # SECTION TO ADD -------------------------------- -        <Directory /var/www/html> -            Options Indexes FollowSymLinks MultiViews -            AllowOverride All -            Require all granted -        </Directory> -    # END SECTION TO ADD -------------------------------- -</VirtualHost> -``` - -4\. Install Mcrypt: - - -``` -sudo apt install php-dev libmcrypt-dev php-pear -sudo pecl channel-update pecl.php.net -sudo pecl install mcrypt-1.0.2 -``` - -5\. Enable Mcrypt module by adding (or uncommenting) “extension=mcrypt.so" in "/etc/php/7.3/apache2/php.ini": - - -``` -`sudo nano /etc/php/7.3/apache2/php.ini` -``` - -**allow_url_fopen** should be already enabled in "/etc/php/7.3/apache2/php.ini". OpenSSL should be already installed in php7.3. - -#### 6\. Another setting that I suggest is editing the PHP max upload file size up to 16 MB: - - -``` -`sudo nano /etc/php/7.3/apache2/php.ini` -``` - -7\. Look for the row with the **upload_max_filesize** parameter and set it as the following: - - -``` -`upload_max_filesize = 16M` -``` - -8\. Save and exit. Restart Apache: - - -``` -`sudo systemctl restart apache2.service` -``` - -### Install OSSN - -#### 1\. Create DB and set up user: - -Go back to phpmyadmin web page (browse "http://<<YourRpiIPAddress>>/phpmyadmin/") and login: - -User: phpmyadmin - -Password: the one set up in phpmyadmin installation step - -Click on database tab: - -![][8] - -Create a database and take note of the database name, as you will be required to enter it later in the installation process. - -![][9] - -It's time to create a database user for OSSN. In this example, I'll use the following credentials: - -User: ossn_db_user - -Password: ossn_db_password - -So, terminal commands will be (root password is still empty, if not changed by you before): - - -``` -sudo mysql -uroot -p -CREATE USER 'ossn_db_user'@'localhost' IDENTIFIED BY 'ossn_db_password'; -GRANT ALL PRIVILEGES ON ossn_db.* TO 'ossn_db_user'@'localhost'; -flush privileges; -quit -``` - -2\. Install OSSN software: - -Download the OSSN installation zip file from the [OSSN download page][10] on your local PC. At the time of this writing, this file is named "ossn-v5.2-1577836800.zip." - -Using your favorite SFTP software, transfer the entire zip file via SFTP to a new folder in the path "/home/pi/download" on your Raspberry Pi. Common (default) SFP connection parameters are: - - * Host: your Raspberry Pi IP address - * User: pi - * Password: raspberry (if you didn't change the pi default password) - * Port: 22 - - - -Back to terminal: - - -``` -cd /home/pi/download/ #Enter directory where OSSN installation files have been transferred -unzip ossn-v5.2-1577836800.zip #Extracts all files from zip -cd /var/www/html/ #Enter Apache web directory -sudo rm index.html #Removes Apache default page - we'll use OSSN one -sudo cp -R /home/pi/download/ossn-v5.2-1577836800/* ./ #Copy installation files to web directory -sudo chown -R www-data:www-data ./ -``` - -Create a data folder:OSSN requires a folder to store data. OSSN suggests, for security reasons, to create this folder outside of the published document root. So, we'll create this opt-in folder and give grants: - - -``` -sudo mkdir /opt/ossn_data -sudo chown -R www-data:www-data /opt/ossn_data/ -``` - -Browse http://<<YourRpiIPAddress>> to start the installation wizard: - -![][11] - -All checks should be fine. Click the Next button at the end of the page. - -![][12] - -Read the license validation and click the Next button at the end of the page to accept. - -![][13] - -Enter the database user, password, and the DB name you chose. Remember also to enter the OSSN data folder. Press Install. - -![][14] - -Enter your admin account information and press the Create button. - -![][15] - -Everything should be fine now. Press Finish to access the administration dashboard. - -![][16] - -So, administration panel can be reached with URL "http://<<YourRpiIPAddress>>/administrator" while user link will be "http://<<YourRpiIPAddress>>". - -![][17] - -_This article was originally published at [peppe8o.com][18]. Reposted with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/raspberry-pi-open-source-social - -作者:[Giuseppe Cassibba][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/peppe8o -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_global_people_gis_location.png?itok=Rl2IKo12 (Team of people around the world) -[2]: https://peppe8o.com/2019/04/best-raspberry-pi-projects-with-open-source-software/ -[3]: https://www.opensource-socialnetwork.org/ -[4]: https://filezilla-project.org/ -[5]: https://peppe8o.com/2019/07/install-raspbian-buster-lite-in-your-raspberry-pi/ -[6]: https://opensource.com/sites/default/files/uploads/ossn_1_0.jpg -[7]: https://opensource.com/sites/default/files/uploads/ossn_2.jpg -[8]: https://opensource.com/sites/default/files/uploads/ossn_3.jpg -[9]: https://opensource.com/sites/default/files/uploads/ossn_4.jpg -[10]: https://www.opensource-socialnetwork.org/download -[11]: https://opensource.com/sites/default/files/uploads/ossn_5.jpg -[12]: https://opensource.com/sites/default/files/uploads/ossn_6.jpg -[13]: https://opensource.com/sites/default/files/uploads/ossn_7.jpg -[14]: https://opensource.com/sites/default/files/uploads/ossn_8.jpg -[15]: https://opensource.com/sites/default/files/uploads/ossn_9.jpg -[16]: https://opensource.com/sites/default/files/uploads/ossn_10.jpg -[17]: https://opensource.com/sites/default/files/uploads/ossn_11.jpg -[18]: https://peppe8o.com/private-social-network-with-raspberry-pi-and-opensource-social-network/ From 4db0a315b90fa5d86a1447ad46dfc7c040e3909a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 00:53:30 +0800 Subject: [PATCH 112/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20Fedora?= =?UTF-8?q?=20Origins=20=E2=80=93=20Part=2001?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200415 Fedora Origins - Part 01.md --- .../tech/20200415 Fedora Origins - Part 01.md | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 sources/tech/20200415 Fedora Origins - Part 01.md diff --git a/sources/tech/20200415 Fedora Origins - Part 01.md b/sources/tech/20200415 Fedora Origins - Part 01.md new file mode 100644 index 0000000000..43c381958e --- /dev/null +++ b/sources/tech/20200415 Fedora Origins - Part 01.md @@ -0,0 +1,126 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fedora Origins – Part 01) +[#]: via: (https://fedoramagazine.org/fedora-origins-part-01/) +[#]: author: (Sylvia Sánchez https://fedoramagazine.org/author/lailah/) + +Fedora Origins – Part 01 +====== + +![][1] + +_Editor’s comment:_ The format of this article is different from the usual article that Fedora Magazine has published: a Fedora origins story told from the point of view of a Fedora user. The author has chosen to tell a story, since to simply present the bare facts is akin to just reading the wiki page about it. + +### Hello World! + +Hello, I am… no, I’m not going to give my real name. Let’s say I’m female, probably shorter and older than you. I used to go by the nick of Isadora, more on that later. + +![Here you have one of the old RH boxes][2] + +Now some context. Back in the late ’90s, internet became popular and PCs started to be a thing. However, most people didn’t have either because it was very expensive and often you could do better with the traditional methods. Yes, computers were very basic back then. I used to play with these pocket games that were fascinating at the time, but totally lame now. Monochrome screens with pixelated flat animations. Not going to dive there, just giving an idea how it was. + +In the mid-90s a company named Red Hat emerged and slowly started to make a profit of its own by selling its own business-oriented distribution and software utilities. The name comes from one of its founders, Marc Ewing, who used to wear a red lacrosse in university so other students could spot him easily and ask him questions. +Of course, as it was a business-oriented distribution, and I was busy with multiple other things, I didn’t pay much attention to it. It lacked the software I needed and since I wasn’t a customer, I was nobody to ask for additions. However, it was Linux and as such Open Source. People started to package stuff for RHL and put it in repositories. I was invited to join the community project, Fedora.us. I promptly declined, misunderstanding the name. It was the second time I got invited that I asked ‘what is with the “US” there (in the name)?` Another user explained it was ‘us’ as in ‘we’ not as in the ‘United States.’ They explained a bit about how the community worked and I decided to give it a go. + +Then my studies got in the way, and I had to shelve it. + +![Login Screen in Fedora Core][3] + +### Press Return + +By the time I came back to Fedora.us it had changed its name to Fedora Project and was actively being worked on from within Red Hat. Now, I wasn’t there so my direct knowledge of how this happened is a bit foggy. Some say that Fedora existed separately and Red Hat added/invited them, some say that Fedora was completely RH’s idea, some say they existed independently and at some point met or joined. Choose the version you like, I’ll put some links down there so you can know more details and decide for yourself. As far as I’m concerned, they worked together. + +Well, as usual someone dropped some CDs with ISOs for me. If I had an euro for every ISO I’ve been offered, or had tossed at my desk, for me to try it, I would be rich. As a matter of fact, I’m not rich but I do have a big rack full of old distros. + +_Anyways_… + +Now it’s the early 2000s and things have changed dramatically. Computers’ prices have dropped and internet speed is increasing, plus a set of new technologies make it cheaper and more reliable. Computers now can do so much more than just a decade ago, and they’re smaller too. Screens are bigger, with better colors and resolution. Laptops are starting to become popular though still expensive and less powerful than desktop PCs. + +During this time, I tried both Fedora and Red Hat. Now, as has been said before, Red Hat focuses on businesses and companies. Their main concern is having exactly the software their customers need, with the features their customers need, delivered as rock solid stability and a reliable update & support cycle. A lot of customization, variety of options and many cool new features are not their main core. More software means more testing and development work and bigger chances of things failing. Yet the technology industry is constantly changing and innovating. Sticking too much to older versions or proven formulas can be fatal for a company. + +So what to do? Well, they solved it with Fedora. Fedora Project would be the innovative, looking ahead test bed, and Red Hat Enterprise Linux was the more conservative, rock solid operating system for businesses. Yes, they changed the name from Red Hat Linux to Red Hat _Enterprise_ Linux. Sounds better, doesn’t it? + +Unsurprisingly, Fedora had a fame of being difficult, unstable and for “hackers only”. Whenever I said I was using Fedora, they would give me odd looks or say something like “I want something stable” or “I’m not into _that_” (meaning they didn’t fancy programming/hacking activities). Countless individuals suggested I might want to use one of the other, beginner-friendly distributions, without themselves even giving Fedora a try! Many would disregard Linux as a whole as an amateur thing, only valid for playing but not good for serious work and companies. To each their own, I suppose. + +![Note the F and the bubble already there][4] + +### Yes, but why? + +Those early versions were called Fedora Core and had a very uncertain release pattern. The six months cycle came much later. Fedora Core got its name because there were two repositories, Core and Extras. Core had the essentials, so to speak, and was maintained by Red Hat. Extras was, well, everything else. Any software that most users would want or need was included there, and it was maintained by a wide range of contributors. + +From the beginning, one of the most powerful reasons for me to use it was the community and its core values. The _Four Foundations_ of Fedora, _Freedom, Features, First & Friends_ were lived and breathed and not just a catchy line on a website or a leaflet. Fedora Project strove (and still does) to deliver the newest features first, caring for freedom (of choice and software) and keeping a good open community, making friends as we contribute to the project. + +I also liked the fact that Fedora, as its purpose was testing for Red Hat, delivered a lot of new software and technologies; it was like opening the window to see the future today. + +The downside was its unreliable upgrade cycle. You could get a new version in a few months or next year… nobody knew, there was no agreed schedule. + +![Note how, despite being Fedora, RH’s logo and signature is omnipresent][5] + +### What was in the box + +Fedora Core kept this name up to the sixth version. From the start, it was meant to be a distribution you could use right after installing it, so it came with Gnome 2, KDE 3, OpenOffice and some browser I forgot, possibly Firefox. + +I remember it being the first to introduce SELinux and SystemD by default, and to replace LILO with GRUB. I also remember the hardware requirements were something at the time, although they now sound laughable: Pentium II 400MHz, 256MB RAM (yes, you read it right) and 2GB of space in disk. It even had an option for terminal only! This would require only 64MB RAM and Pentium II 200MHz. Amazing, isn’t it? + +It had codenames. Not publicly, but it had, and they were quite peculiar. Fedora Core 1 was code named «Yarrow» which is a medium size plant with yellow or white crown-like flowers. Core 2 was Tettnang which is a small town in Baden-Württemberg, Germany. Not sure about Core 3, I think it was Heidelberg, but maybe I’m mixing with later releases. Core 4 was Stentz, if I recall correctly (no idea what it means), Core 5 was a colour, I think Bordeaux, and Core 6 was Zod that _I think_ it was a comic character but I could be wrong. If there was a method in their madness I have no idea. I thought the names amusing but didn’t give a second thought to it as they didn’t affect anything, not even the design of each release. + +![Ah… good ol` genetic helix][6] + +### So what now? + +Well, of course, Fedora Project has evolved from where we have stopped. But that’s for later articles or this one will be too long. For now, I leave you with an extract of an interview with Matthew Miller, current Project Leader and some links in case you want to know more. + +_**Extracts to interview with Matthew Miller, Project Leader.**_ + +Matthew Miller tells about the beginnings in Eduard Lucena’s podcast (transcription [here][7]): _“Fedora started about 15 years ago, really. It actually started as a thing called Fedora.us.” Back in those days, there was Red Hat Linux.” “Meanwhile, there was this thing called Fedora.us which was basically a project to make additional software available to users of Red Hat Linux. Find things that weren’t part of Red Hat Linux, and package them up, and make them available to everybody. That was started as a community project.”_ + +_“Red Hat_ (then) _merged with this [Fedora.us][8] project to form Fedora Project that produces an upstream operating system that Red Hat Enterprise Linux is derived from but then moves on a slower pace.”_ + +_“We were then two parts, Fedora Core, which was basically inherited from the old Red Hat Linux and only Red Hat employees could do anything with and then Fedora Extras, where community could come together to add things on top of that Fedora Core. It took a little while to get off the ground but it was fairly successful”_ + +“_Around the time of Fedora Core 6, those were actually merged together into one big Fedora where all of the packages were all part of the same thing. There was no more distinction of Core and Extras, and everything was all together and, more importantly, all the community was all together._ + +_They invited the community to take ownership of the whole thing and for Red Hat to become part of the community rather than separate. That was a huge success.”_ + +_**Links of interest**_ + +**Fedora, a visual history** +[https://www.phoronix.com/scan.php?page=article&item=678&num=1][9] + +**Red Hat Videos – Fedora’s anniversary** + + +**Red Hat Videos – Default to open** + + +**Fedora’s Mission & Foundations** + + +**A short history of Fedora** + + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/fedora-origins-part-01/ + +作者:[Sylvia Sánchez][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://fedoramagazine.org/author/lailah/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/fedora-origins-816x352.png +[2]: https://fedoramagazine.org/wp-content/uploads/2020/03/IMG_0554-768x1024.jpeg +[3]: https://fedoramagazine.org/wp-content/uploads/2020/04/15112-1.png +[4]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_5.png +[5]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_3.png +[6]: https://fedoramagazine.org/wp-content/uploads/2020/04/Artwork_FC7Themes_Fc7ThemeProposalFlyingHigh_Fc7ThemeProposalFlyingHighRhgl_rhgb-core6-1.png +[7]: https://x3mboy.fedorapeople.org/podcast/transcripts/transcriptFedoraPodcastEpisode01.html +[8]: http://fedora.us/ +[9]: https://www.phoronix.com/scan.php?page=article&item=678&num=1 From a43913e2469e4ae909a69eb960b393e2c96015f7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 00:58:41 +0800 Subject: [PATCH 113/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=206=20op?= =?UTF-8?q?en=20source=20teaching=20tools=20for=20virtual=20classrooms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200415 6 open source teaching tools for virtual classrooms.md --- ...e teaching tools for virtual classrooms.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/tech/20200415 6 open source teaching tools for virtual classrooms.md diff --git a/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md b/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md new file mode 100644 index 0000000000..807ebfae3d --- /dev/null +++ b/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (6 open source teaching tools for virtual classrooms) +[#]: via: (https://opensource.com/article/20/4/open-source-remote-teaching-tools) +[#]: author: (Mathias Hoffmann https://opensource.com/users/mhopensource) + +6 open source teaching tools for virtual classrooms +====== +Create podcasts, online lectures, tutorials, and other teaching +resources for learning at home with open source tools. +![Person reading a book and digital copy][1] + +As schools and universities are shutting down around the globe due to COVID-19, many of us in academia are wondering how we can get up to speed and establish a stable workflow to get our podcasts, online lectures, and tutorials out there for our students. + +Open source software (OSS) has a key role to play in this situation for many reasons, including: + + * **Speed:** OSS can roll out quickly and in large numbers (e.g., to an army of teaching assistants for multiple tutorial sessions in big lectures) without licensing issues and in a decentralized manner. + * **Cost:** OSS does not cost anything upfront, which is important for financially stretched schools and universities that need solutions to complex challenges on very short notice. + + + +With everything going online, we need new ways to engage with students. Here is a list of tools that I have found useful to share my own lectures.  + +### Create podcasts, videos, or live streams with OBS + +[Open Broadcast Studio (OBS)][2] is a professional, open source audio and video recording tool that allows you to record, stream instantly, and do much more. OBS is available for all major platforms (Windows, macOS, and Linux), so interoperability with your colleagues and their various devices is ensured. + +Even if you're already using online conferencing software as a recording system, OBS can be a great backup solution. Since it records locally, you're protected against any network lags or disconnections. You also have complete control over your data, so many educational institutions may find it to be a more secure solution than some other options. + +Compatibility is also an advantage: OBS stores recordings in a standard intermediate format (MKV), which can be transferred to MP4 or other formats. Also, support for Nvidia graphics cards under OBS is great, as the company is one of the main sponsors of the OBS project. This allows you to make full use of your hardware and speed up the recording process. + +### Video and sound editing + +After you record your podcast or video, you may find that it needs editing. There are many reasons you may need to edit your audio or video. For example, many university online platforms restrict the size of files you can upload, so you may have to cut long videos. Or, the sound may be too quiet, or maybe it was too noisy when you recorded it, so you need to make adjustments to the audio. + +Two of the open source apps to explore are [OpenShot][3] and [Shotcut][4]. Of the two, Shotcut is a more advanced program, which implies a slightly steeper learning curve. Both are cross-platform and have full support for hardware encoding with NVidia and other graphics cards, which will substantially lower processing time compared to CPU-only processing. + +You can also extract a soundtrack in either program (although I have found it to be much faster with Shotcut) and export it to an audio-editing program. I find [Audacity][5], another open source, cross-platform (Mac, Linux, Windows) tool, to work extremely well. + +My typical workflow looks something like this: + + * Import the recording into Shotcut + * Extract the audio, save it to an audio file + * Import it into Audacity, normalize and amplify the audio, maybe do some noise reduction + * Save the audio to a new file + * Import the new audio file into Shotcut, align it with the audio-free video, and cut appropriately + * Export into an MP4 video (this last step usually takes some time, so have a coffee…) + + + +### Electronic blackboards + +If you want to annotate your slides or develop ideas on an electronic blackboard, you need note-taking software and a device with a touchscreen or a graphics tablet. A great open source tool (developed with Swiss taxpayer funding) for blackboarding is [OpenBoard][6]. It is cross-platform; although it is officially only available for Linux on Ubuntu 16.04, you can install a [Flatpak][7] and it will work on any Linux flavor. It is really a nice tool; its only shortcoming is that annotating slides is not very good. + +My main open source annotation and electric blackboard tool is [Xournal++][8], which is available in some Linux distros repos (e.g., Linux Mint) and otherwise via [Flathub][9]. Like all the tools mentioned earlier, it is also available on Mac and Windows. If you know of any open source, cross-platform note-taking tools, please share them in the comments. + +### Built-in solutions have their limits + +You might wonder why you should bother with alternative recording software in the first place. After all, most modern operating systems have built-in screen recorders that will also capture audio. However, these built-in solutions have their limits. One key limitation is that you cannot usually capture more than one video source at a time (e.g., a webcam with your talking head and a set of slides plus a whiteboard from a graphics tablet). + +The ability to use multiple video sources is very useful, though, since it can be dull for students to just listen to your voice and see your slides for extended periods. Face-to-face interactions—even if done virtually—help keep listeners' attention and make it easier for them to cope with imperfect recording quality and background noise. In addition, many of the built-in tools do not allow you to capture selected areas of the screen, and in general, you cannot change the resolution or the number of frames per second, which can be important for keeping your podcast's memory and bandwidth usage in check. + +### Conclusion + +When planning your online teaching, you will want to use a blend of audio, video, slides, and electronic blackboards to create an immersive experience even while students are learning remotely. Open source software offers advanced, effective tools for creating such online educational experiences. + +* * * + +_This article is based on "[Open source software for online teaching in the times of corona][10]" on Mathias Hoffman's blog and is reused with permission._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-remote-teaching-tools + +作者:[Mathias Hoffmann][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/mhopensource +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) +[2]: https://obsproject.com/ +[3]: http://www.openshot.org/ +[4]: http://www.shotcut.org/ +[5]: https://www.audacityteam.org/ +[6]: http://www.openboard.ch/ +[7]: http://www.flathub.org +[8]: https://github.com/xournalpp/xournalpp +[9]: https://flathub.org/apps/details/com.github.xournalpp.xournalpp +[10]: http://mathiashoffmann.net/2020/03/22/open-source-software-for-online-teaching-in-the-times-of-corona From 28d284fb8ab822e7c7c32e7b31bd067390900606 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 00:59:20 +0800 Subject: [PATCH 114/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20How=20?= =?UTF-8?q?to=20automate=20your=20cryptocurrency=20trades=20with=20Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200415 How to automate your cryptocurrency trades with Python.md --- ... your cryptocurrency trades with Python.md | 424 ++++++++++++++++++ 1 file changed, 424 insertions(+) create mode 100644 sources/tech/20200415 How to automate your cryptocurrency trades with Python.md diff --git a/sources/tech/20200415 How to automate your cryptocurrency trades with Python.md b/sources/tech/20200415 How to automate your cryptocurrency trades with Python.md new file mode 100644 index 0000000000..c216d22663 --- /dev/null +++ b/sources/tech/20200415 How to automate your cryptocurrency trades with Python.md @@ -0,0 +1,424 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to automate your cryptocurrency trades with Python) +[#]: via: (https://opensource.com/article/20/4/python-crypto-trading-bot) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) + +How to automate your cryptocurrency trades with Python +====== +In this tutorial, learn how to set up and use Pythonic, a graphical +programming tool that makes it easy for users to create Python +applications using ready-made function modules. +![scientific calculator][1] + +Unlike traditional stock exchanges like the New York Stock Exchange that have fixed trading hours, cryptocurrencies are traded 24/7, which makes it impossible for anyone to monitor the market on their own. + +Often in the past, I had to deal with the following questions related to my crypto trading: + + * What happened overnight? + * Why are there no log entries? + * Why was this order placed? + * Why was no order placed? + + + +The usual solution is to use a crypto trading bot that places orders for you when you are doing other things, like sleeping, being with your family, or enjoying your spare time. There are a lot of commercial solutions available, but I wanted an open source option, so I created the crypto-trading bot [Pythonic][2]. As [I wrote][3] in an introductory article last year, "Pythonic is a graphical programming tool that makes it easy for users to create Python applications using ready-made function modules." It originated as a cryptocurrency bot and has an extensive logging engine and well-tested, reusable parts such as schedulers and timers. + +### Getting started + +This hands-on tutorial teaches you how to get started with Pythonic for automated trading. It uses the example of trading [Tron][4] against [Bitcoin][5] on the [Binance][6] exchange platform. I choose these coins because of their volatility against each other, rather than any personal preference. + +The bot will make decisions based on [exponential moving averages][7] (EMAs). + +![TRX/BTC 1-hour candle chart][8] + +TRX/BTC 1-hour candle chart + +The EMA indicator is, in general, a weighted moving average that gives more weight to recent price data. Although a moving average may be a simple indicator, I've had good experiences using it. + +The purple line in the chart above shows an EMA-25 indicator (meaning the last 25 values were taken into account). + +The bot monitors the pitch between the current EMA-25 value (t0) and the previous EMA-25 value (t-1). If the pitch exceeds a certain value, it signals rising prices, and the bot will place a buy order. If the pitch falls below a certain value, the bot will place a sell order. + +The pitch will be the main indicator for making decisions about trading. For this tutorial, it will be called the _trade factor_. + +### Toolchain + +The following tools are used in this tutorial: + + * Binance expert trading view (visualizing data has been done by many others, so there's no need to reinvent the wheel by doing it yourself) + * Jupyter Notebook for  data-science tasks + * Pythonic, which is the  overall framework + * PythonicDaemon as the  pure runtime (console- and Linux-only) + + + +### Data mining + +For a crypto trading bot to make good decisions, it's essential to get open-high-low-close ([OHLC][9]) data for your asset in a reliable way. You can use Pythonic's built-in elements and extend them with your own logic. + +The general workflow is: + + 1. Synchronize with Binance time + 2. Download OHLC data + 3. Load existing OHLC data from the file into memory + 4. Compare both datasets and extend the existing dataset with the newer rows + + + +This workflow may be a bit overkill, but it makes this solution very robust against downtime and disconnections. + +To begin, you need the **Binance OHLC Query** element and a **Basic Operation** element to execute your own code. + +![Data-mining workflow][10] + +Data-mining workflow + +The OHLC query is set up to query the asset pair **TRXBTC** (Tron/Bitcoin) in one-hour intervals. + +![Configuration of the OHLC query element][11] + +Configuring the OHLC query element + +The output of this element is a [Pandas DataFrame][12]. You can access the DataFrame with the **input** variable in the **Basic Operation** element. Here, the **Basic Operation** element is set up to use Vim as the default code editor. + +![Basic Operation element set up to use Vim][13] + +Basic Operation element set up to use Vim + +Here is what the code looks like: + + +``` +import pickle, pathlib, os +import pandas as pd + +outout = None + +if isinstance(input, pd.DataFrame): +    file_name = 'TRXBTC_1h.bin' +    home_path = str(pathlib.Path.home()) +    data_path = os.path.join(home_path, file_name) + +    try: +        df = pickle.load(open(data_path, 'rb')) +        n_row_cnt = df.shape[0] +        df = pd.concat([df,input], ignore_index=True).drop_duplicates(['close_time']) +        df.reset_index(drop=True, inplace=True) +        n_new_rows = df.shape[0] - n_row_cnt +        log_txt = '{}: {} new rows written'.format(file_name, n_new_rows) +    except: +        log_txt = 'File error - writing new one: {}'.format(e) +        df = input + +    pickle.dump(df, open(data_path, "wb" )) +    output = df +``` + +First, check whether the input is the DataFrame type. Then look inside the user's home directory (**~/**) for a file named **TRXBTC_1h.bin**. If it is present, then open it, concatenate new rows (the code in the **try** section), and drop overlapping duplicates. If the file doesn't exist, trigger an _exception_ and execute the code in the **except** section, creating a new file. + +As long as the checkbox **log output** is enabled, you can follow the logging with the command-line tool **tail**: + + +``` +`$ tail -f ~/Pythonic_2020/Feb/log_2020_02_19.txt` +``` + +For development purposes, skip the synchronization with Binance time and regular scheduling for now. This will be implemented below. + +### Data preparation + +The next step is to handle the evaluation logic in a separate grid; therefore, you have to pass over the DataFrame from Grid 1 to the first element of Grid 2 with the help of the **Return element**. + +In Grid 2, extend the DataFrame by a column that contains the EMA values by passing the DataFrame through a **Basic Technical Analysis** element. + +![Technical analysis workflow in Grid 2][14] + +Technical analysis workflow in Grid 2 + +Configure the technical analysis element to calculate the EMAs over a period of 25 values. + +![Configuration of the technical analysis element][15] + +Configuring the technical analysis element + +When you run the whole setup and activate the debug output of the **Technical Analysis** element, you will realize that the values of the EMA-25 column all seem to be the same. + +![Missing decimal places in output][16] + +Decimal places are missing in the output + +This is because the EMA-25 values in the debug output include just six decimal places, even though the output retains the full precision of an 8-byte float value. + +For further processing, add a **Basic Operation** element: + +![Workflow in Grid 2][17] + +Workflow in Grid 2 + +With the **Basic Operation** element, dump the DataFrame with the additional EMA-25 column so that it can be loaded into a Jupyter Notebook; + +![Dump extended DataFrame to file][18] + +Dump extended DataFrame to file + +### Evaluation logic + +Developing the evaluation logic inside Juypter Notebook enables you to access the code in a more direct way. To load the DataFrame, you need the following lines: + +![Representation with all decimal places][19] + +Representation with all decimal places + +You can access the latest EMA-25 values by using [**iloc**][20] and the column name. This keeps all of the decimal places. + +You already know how to get the latest value. The last line of the example above shows only the value. To copy the value to a separate variable, you have to access it with the **.at** method, as shown below. + +You can also directly calculate the trade factor, which you will need in the next step. + +![Buy/sell decision][21] + +Buy/sell decision + +### Determine the trading factor + +As you can see in the code above, I chose 0.009 as the trade factor. But how do I know if 0.009 is a good trading factor for decisions? Actually, this factor is really bad, so instead, you can brute-force the best-performing trade factor. + +Assume that you will buy or sell based on the closing price. + +![Validation function][22] + +Validation function + +In this example, **buy_factor** and **sell_factor** are predefined. So extend the logic to brute-force the best performing values. + +![Nested for loops for determining the buy and sell factor][23] + +Nested _for_ loops for determining the buy and sell factor + +This has 81 loops to process (9x9), which takes a couple of minutes on my machine (a Core i7 267QM). + +![System utilization while brute forcing][24] + +System utilization while brute-forcing + +After each loop, it appends a tuple of **buy_factor**, **sell_factor**, and the resulting **profit** to the **trading_factors** list. Sort the list by profit in descending order. + +![Sort profit with related trading factors in descending order][25] + +Sort profit with related trading factors in descending order + +When you print the list, you can see that 0.002 is the most promising factor. + +![Sorted list of trading factors and profit][26] + +Sorted list of trading factors and profit + +When I wrote this in March 2020, the prices were not volatile enough to present more promising results. I got much better results in February, but even then, the best-performing trading factors were also around 0.002. + +### Split the execution path + +Start a new grid now to maintain clarity. Pass the DataFrame with the EMA-25 column from Grid 2 to element 0A of Grid 3 by using a **Return** element. + +In Grid 3, add a **Basic Operation** element to execute the evaluation logic. Here is the code of that element: + +![Implemented evaluation logic][27] + +Implemented evaluation logic + +The element outputs a **1** if you should buy or a **-1** if you should sell. An output of **0** means there's nothing to do right now. Use a **Branch** element to control the execution path. + +![Branch element: Grid 3 Position 2A][28] + +Branch element: Grid 3, Position 2A + +Due to the fact that both **0** and **-1** are processed the same way, you need an additional Branch element on the right-most execution path to decide whether or not you should sell. + +![Branch element: Grid 3 Position 3B][29] + +Branch element: Grid 3, Position 3B + +Grid 3 should now look like this: + +![Workflow on Grid 3][30] + +Workflow on Grid 3 + +### Execute orders + +Since you cannot buy twice, you must keep a persistent variable between the cycles that indicates whether you have already bought. + +You can do this with a **Stack element**. The Stack element is, as the name suggests, a representation of a file-based stack that can be filled with any Python data type. + +You need to define that the stack contains only one Boolean element, which determines if you bought (**True**) or not (**False**). As a consequence, you have to preset the stack with one **False**. You can set this up, for example, in Grid 4 by simply passing a **False** to the stack. + +![Forward a False-variable to the subsequent Stack element][31] + +Forward a **False** variable to the subsequent Stack element + +The Stack instances after the branch tree can be configured as follows: + +![Configuration of the Stack element][32] + +Configuring the Stack element + +In the Stack element configuration, set **Do this with input** to **Nothing**. Otherwise, the Boolean value will be overwritten by a 1 or 0. + +This configuration ensures that only one value is ever saved in the stack (**True** or **False**), and only one value can ever be read (for clarity). + +Right after the Stack element, you need an additional **Branch** element to evaluate the stack value before you place the **Binance Order** elements. + +![Evaluate the variable from the stack][33] + +Evaluating the variable from the stack + +Append the Binance Order element to the **True** path of the Branch element. The workflow on Grid 3 should now look like this: + +![Workflow on Grid 3][34] + +Workflow on Grid 3 + +The Binance Order element is configured as follows: + +![Configuration of the Binance Order element][35] + +Configuring the Binance Order element + +You can generate the API and Secret keys on the Binance website under your account settings. + +![Creating an API key in Binance][36] + +Creating an API key in the Binance account settings + +In this tutorial, every trade is executed as a market trade and has a volume of 10,000 TRX (~US$ 150 on March 2020). (For the purposes of this tutorial, I am demonstrating the overall process by using a Market Order. Because of that, I recommend using at least a Limit order.) + +The subsequent element is not triggered if the order was not executed properly (e.g., a connection issue, insufficient funds, or incorrect currency pair). Therefore, you can assume that if the subsequent element is triggered, the order was placed. + +Here is an example of output from a successful sell order for XMRBTC: + +![Output of a successfully placed sell order][37] + +Successful sell order output + +This behavior makes subsequent steps more comfortable: You can always assume that as long the output is proper, the order was placed. Therefore, you can append a **Basic Operation** element that simply writes the output to **True** and writes this value on the stack to indicate whether the order was placed or not. + +If something went wrong, you can find the details in the logging message (if logging is enabled). + +![Logging output of Binance Order element][38] + +Logging output from Binance Order element + +### Schedule and sync + +For regular scheduling and synchronization, prepend the entire workflow in Grid 1 with the **Binance Scheduler** element. + +![Binance Scheduler at Grid 1, Position 1A][39] + +Binance Scheduler at Grid 1, Position 1A + +The Binance Scheduler element executes only once, so split the execution path on the end of Grid 1 and force it to re-synchronize itself by passing the output back to the Binance Scheduler element. + +![Grid 1: Split execution path][40] + +Grid 1: Split execution path + +Element 5A points to Element 1A of Grid 2, and Element 5B points to Element 1A of Grid 1 (Binance Scheduler). + +### Deploy + +You can run the whole setup 24/7 on your local machine, or you could host it entirely on an inexpensive cloud system. For example, you can use a Linux/FreeBSD cloud system for about US$5 per month, but they usually don't provide a window system. If you want to take advantage of these low-cost clouds, you can use PythonicDaemon, which runs completely inside the terminal. + +![PythonicDaemon console interface][41] + +PythonicDaemon console + +PythonicDaemon is part of the basic installation. To use it, save your complete workflow, transfer it to the remote running system (e.g., by Secure Copy [SCP]), and start PythonicDaemon with the workflow file as an argument: + + +``` +`$ PythonicDaemon trading_bot_one` +``` + +To automatically start PythonicDaemon at system startup, you can add an entry to the crontab: + + +``` +`# crontab -e` +``` + +![Crontab on Ubuntu Server][42] + +Crontab on Ubuntu Server + +### Next steps + +As I wrote at the beginning, this tutorial is just a starting point into automated trading. Programming trading bots is approximately 10% programming and 90% testing. When it comes to letting your bot trade with your money, you will definitely think thrice about the code you program. So I advise you to keep your code as simple and easy to understand as you can. + +If you want to continue developing your trading bot on your own, the next things to set up are: + + * Automatic profit calculation (hopefully only positive!) + * Calculation of the prices you want to buy for + * Comparison with your order book (i.e., was the order filled completely?) + + + +You can download the whole example on [GitHub][2]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/python-crypto-trading-bot + +作者:[Stephan Avenwedde][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/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calculator_money_currency_financial_tool.jpg?itok=2QMa1y8c (scientific calculator) +[2]: https://github.com/hANSIc99/Pythonic +[3]: https://opensource.com/article/19/5/graphically-programming-pythonic +[4]: https://tron.network/ +[5]: https://bitcoin.org/en/ +[6]: https://www.binance.com/ +[7]: https://www.investopedia.com/terms/e/ema.asp +[8]: https://opensource.com/sites/default/files/uploads/1_ema-25.png (TRX/BTC 1-hour candle chart) +[9]: https://en.wikipedia.org/wiki/Open-high-low-close_chart +[10]: https://opensource.com/sites/default/files/uploads/2_data-mining-workflow.png (Data-mining workflow) +[11]: https://opensource.com/sites/default/files/uploads/3_ohlc-query.png (Configuration of the OHLC query element) +[12]: https://pandas.pydata.org/pandas-docs/stable/getting_started/dsintro.html#dataframe +[13]: https://opensource.com/sites/default/files/uploads/4_edit-basic-operation.png (Basic Operation element set up to use Vim) +[14]: https://opensource.com/sites/default/files/uploads/6_grid2-workflow.png (Technical analysis workflow in Grid 2) +[15]: https://opensource.com/sites/default/files/uploads/7_technical-analysis-config.png (Configuration of the technical analysis element) +[16]: https://opensource.com/sites/default/files/uploads/8_missing-decimals.png (Missing decimal places in output) +[17]: https://opensource.com/sites/default/files/uploads/9_basic-operation-element.png (Workflow in Grid 2) +[18]: https://opensource.com/sites/default/files/uploads/10_dump-extended-dataframe.png (Dump extended DataFrame to file) +[19]: https://opensource.com/sites/default/files/uploads/11_load-dataframe-decimals.png (Representation with all decimal places) +[20]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iloc.html +[21]: https://opensource.com/sites/default/files/uploads/12_trade-factor-decision.png (Buy/sell decision) +[22]: https://opensource.com/sites/default/files/uploads/13_validation-function.png (Validation function) +[23]: https://opensource.com/sites/default/files/uploads/14_brute-force-tf.png (Nested for loops for determining the buy and sell factor) +[24]: https://opensource.com/sites/default/files/uploads/15_system-utilization.png (System utilization while brute forcing) +[25]: https://opensource.com/sites/default/files/uploads/16_sort-profit.png (Sort profit with related trading factors in descending order) +[26]: https://opensource.com/sites/default/files/uploads/17_sorted-trading-factors.png (Sorted list of trading factors and profit) +[27]: https://opensource.com/sites/default/files/uploads/18_implemented-evaluation-logic.png (Implemented evaluation logic) +[28]: https://opensource.com/sites/default/files/uploads/19_output.png (Branch element: Grid 3 Position 2A) +[29]: https://opensource.com/sites/default/files/uploads/20_editbranch.png (Branch element: Grid 3 Position 3B) +[30]: https://opensource.com/sites/default/files/uploads/21_grid3-workflow.png (Workflow on Grid 3) +[31]: https://opensource.com/sites/default/files/uploads/22_pass-false-to-stack.png (Forward a False-variable to the subsequent Stack element) +[32]: https://opensource.com/sites/default/files/uploads/23_stack-config.png (Configuration of the Stack element) +[33]: https://opensource.com/sites/default/files/uploads/24_evaluate-stack-value.png (Evaluate the variable from the stack) +[34]: https://opensource.com/sites/default/files/uploads/25_grid3-workflow.png (Workflow on Grid 3) +[35]: https://opensource.com/sites/default/files/uploads/26_binance-order.png (Configuration of the Binance Order element) +[36]: https://opensource.com/sites/default/files/uploads/27_api-key-binance.png (Creating an API key in Binance) +[37]: https://opensource.com/sites/default/files/uploads/28_sell-order.png (Output of a successfully placed sell order) +[38]: https://opensource.com/sites/default/files/uploads/29_binance-order-output.png (Logging output of Binance Order element) +[39]: https://opensource.com/sites/default/files/uploads/30_binance-scheduler.png (Binance Scheduler at Grid 1, Position 1A) +[40]: https://opensource.com/sites/default/files/uploads/31_split-execution-path.png (Grid 1: Split execution path) +[41]: https://opensource.com/sites/default/files/uploads/32_pythonic-daemon.png (PythonicDaemon console interface) +[42]: https://opensource.com/sites/default/files/uploads/33_crontab.png (Crontab on Ubuntu Server) From 20875e831d536407d1daf2b55608d45c0a982ebc Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 01:00:04 +0800 Subject: [PATCH 115/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20Writin?= =?UTF-8?q?g=20Java=20with=20Quarkus=20in=20VS=20Code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200415 Writing Java with Quarkus in VS Code.md --- ...15 Writing Java with Quarkus in VS Code.md | 239 ++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 sources/tech/20200415 Writing Java with Quarkus in VS Code.md diff --git a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md new file mode 100644 index 0000000000..2d61db71de --- /dev/null +++ b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md @@ -0,0 +1,239 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Writing Java with Quarkus in VS Code) +[#]: via: (https://opensource.com/article/20/4/java-quarkus-vs-code) +[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) + +Writing Java with Quarkus in VS Code +====== +In this tutorial, I'll walk you through how to rebuild, package, and +deploy cloud-native applications automatically with Quarkus. +![Person drinking a hat drink at the computer][1] + +In the previous articles in this series about cloud-native [Java][2] applications, I shared [_6 requirements of cloud-native software_][3] and [_4 things cloud-native Java must provide_][4]. But now you might want to implement these advanced Java applications in your local machine without climbing a steep learning curve. In this article, I will walk through using the open source technologies [Quarkus][5] and [Visual Studio Code][6] (VS Code) to accelerate the development of both traditional cloud-native Java stacks and also serverless, reactive applications with easier and more familiar methods. + +Quarkus is a Kubernetes-native Java stack tailored for GraalVM and OpenJDK HotSpot. It's crafted from best-of-breed Java libraries and standards with live coding, unified configuration, superfast startup, small memory footprint, and unified imperative and reactive development. VS Code is an open source integrated development environment (IDE) for editing code. + +### Generate a Quarkus project + +Begin by navigating to Quarkus' [Start coding][7] page to generate a Quarkus project that includes a RESTful endpoint. Leave all variables (i.e., Group, Artifact, Build Tool, Extensions) on the default settings, then click **Generate your application** at the top-right of the page. Note that the RESTEasy JAX-RS extension is preselected as default. + +![Quarkus Generate application button][8] + +The ZIP file will automatically download on your local machine. Extract the file with the following command: + + +``` +$ unzip code-with-quarkus.zip +Archive: code-with-quarkus.zip +    creating: code-with-quarkus/ +   inflating: code-with-quarkus/pom.xml +   ... +``` + +### Install VS Code + +Download and install VS Code in your preferred way, whether that's [from the website][9] or through your package manager (dnf, apt, brew, etc). Once that's done, open the unzipped Quarkus project using VS Code's command-line tool: + + +``` +$ cd code-with-quarkus/ +$ code . +``` + +You will see the [Apache Maven][10] project structure with: + + * **ExampleResource** exposed on **/hello** + * Associated JUnit test + * Accessible landing page via + * Dockerfiles for both [native compilation][11] and JVM HotSpot + * A unified application configuration file + + + +Add Quarkus tools to your IDE through the VS Code's extension feature. + +![Add Quarkus tools to VS Code IDE][12] + +### Start coding + +Run the application using Quarkus development mode. To run the application, you need: + + * JDK 1.8+ installed with JAVA_HOME configured appropriately + * Apache Maven 3.6.3+ + + + +Move to the **code-with-quarkus** directory then type **mvn compile quarkus:dev** in VS Code's terminal. + +![Run application][13] + +You will see that the Java application is running well with: + + * About one second to startup + * Live coding activated + * EnabledCDI and RESTEASY features + + + +When you access the endpoint via a web browser, you will see the return code, **hello**. + +!["Hello" return][14] + +Now, you're ready to change the code! Move back to VS Code, then open the **ExampleResource.java** file in **src/main/java/org/acme**. Replace the return code with "**Welcome, Cloud-Native Java with Quarkus!"** Don't forget to **Save** the file. + +![Editing the return][15] + +Go back to the web browser and reload the page. + +![New return][16] + +_It's like magic!_ Behind the scenes, Quarkus rebuilt, packaged, and deployed the application for you automatically, and it only took half a second. This is one of the essential cloud-native Java runtime features for increasing development productivity. + +![Quarkus output][17] + +Continue running your cloud-native Java application in Quarkus. + +### Integrate data transactions via Quakrus Tool + +To add an in-memory database (H2) transaction capability, press **F1** then click on **Quarkus: Add extensions to the current project**. + +![Adding extensions in Quarkus][18] + +Enter **h2** in the search bar, then double-click on **JDBC Driver - H2 Data** in the result. + +![JDBC Driver - H2 Data extension][19] + +Select the following three extensions, which will simplify your persistence code and return JSON format data: + + * Hibernate ORM with Panache Data + * JDBC Driver - H2 + * RESTEasy JSON-B Web + + + +Press **Enter** to add those dependencies. + +![Add Quarkus extensions][20] + +You should see the following in a new VS Code terminal: + +![VS Code adding extensions][21] + +You should also find the following pulled dependencies in **POM.xml**: + +![dependencies in POM.xml][22] + +### Create an Inventory entity + +With your project in place, you can get to work defining the business logic. + +The first step is to define the model (entity) of an Inventory object. Since Quarkus uses Hibernate ORM Panache, create an **Inventory.java** file in the **src.main.java.org.acme** directory, and paste the following code into it: + + +``` +package org.acme; + +import javax.persistence.Cacheable; +import javax.persistence.Entity; + +import io.quarkus.hibernate.orm.panache.PanacheEntity; + +@[Entity][23] +@Cacheable +public class Inventory extends PanacheEntity { +    +    public [String][24] itemId; +    public [String][24] location; +    public int quantity; +    public [String][24] link + +    public Inventory() { + +    } +    +} +``` + +#### Define the RESTful endpoint of Inventory + +Next, mirror the abstraction of service so that you can inject the Inventory service into various places (like a RESTful resource endpoint) in the future. Create an **InventoryResource.java** file in the **src.main.java.org.acme** directory and add this code to it: + + +``` +package org.acme; + +import java.util.List; +import javax.enterprise.context.ApplicationScoped; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; + +@Path("/services/inventory") +@ApplicationScoped +@Produces("application/json") +@Consumes("application/json") +public class InventoryResource { + +    @GET +    +    public List<Inventory> getAll() { +        return Inventory.listAll(); +    } +} +``` + +Don't forget to save these files. Go back to your web browser and access a new endpoint, . You will see: + +![Inventory endpoint][25] + +### Wrapping up + +If you have an issue or get an error when you implement this, you can find and reuse the [code in my GitHub repository][26]. + +If you want to learn more, Quarkus has some [practical and useful guides][27] that show how to develop advanced cloud-native Java applications using Quarkus extensions with event-driven programming, serverless development, and Kubernetes deployment. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/java-quarkus-vs-code + +作者:[Daniel Oh][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/daniel-oh +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) +[2]: https://opensource.com/resources/java +[3]: https://opensource.com/article/20/1/cloud-native-software +[4]: https://opensource.com/article/20/1/cloud-native-java +[5]: https://quarkus.io/ +[6]: https://code.visualstudio.com/ +[7]: https://code.quarkus.io/ +[8]: https://opensource.com/sites/default/files/uploads/quarkus_generateapplication.png (Quarkus Generate application button) +[9]: https://code.visualstudio.com/download +[10]: https://maven.apache.org/ +[11]: https://quarkus.io/guides/building-native-image +[12]: https://opensource.com/sites/default/files/uploads/add-quarkus-to-ide.png (Add Quarkus tools to VS Code IDE) +[13]: https://opensource.com/sites/default/files/uploads/run-application.png (Run application) +[14]: https://opensource.com/sites/default/files/uploads/endpoint-hello.png ("Hello" return) +[15]: https://opensource.com/sites/default/files/uploads/edit-return-code.png (Editing the return) +[16]: https://opensource.com/sites/default/files/uploads/new-return-code.png (New return) +[17]: https://opensource.com/sites/default/files/uploads/quarkus-magic.png (Quarkus output) +[18]: https://opensource.com/sites/default/files/uploads/quarkus-add-extensions.png (Adding extensions in Quarkus) +[19]: https://opensource.com/sites/default/files/uploads/jbdc-driver-h2-data.png (JDBC Driver - H2 Data extension) +[20]: https://opensource.com/sites/default/files/uploads/add-extensions.png (Add Quarkus extensions) +[21]: https://opensource.com/sites/default/files/uploads/vscode-adding-extensions.png (VS Code adding extensions) +[22]: https://opensource.com/sites/default/files/uploads/dependencies-pomxml.png (dependencies in POM.xml) +[23]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+entity +[24]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[25]: https://opensource.com/sites/default/files/uploads/inventory-endpoint.png (Inventory endpoint) +[26]: https://github.com/danieloh30/code-with-quarkus +[27]: https://quarkus.io/guides/ From d78af15a1af6742bb8ac5c8e2e74d22905964780 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 01:02:01 +0800 Subject: [PATCH 116/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20Tweaki?= =?UTF-8?q?ng=20history=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200415 Tweaking history on Linux.md --- .../20200415 Tweaking history on Linux.md | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 sources/tech/20200415 Tweaking history on Linux.md diff --git a/sources/tech/20200415 Tweaking history on Linux.md b/sources/tech/20200415 Tweaking history on Linux.md new file mode 100644 index 0000000000..b17a666a8a --- /dev/null +++ b/sources/tech/20200415 Tweaking history on Linux.md @@ -0,0 +1,189 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Tweaking history on Linux) +[#]: via: (https://www.networkworld.com/article/3537214/tweaking-history-on-linux.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Tweaking history on Linux +====== +The bash shell's history command in Linux makes it easy to review and reuse commands, but there's a lot you do to control how much it remembers and how much forgets. +[Claudio Testa][1] [(CC0)][2] + +The bash **history** command on Linux systems helps with remembering commands you’ve previously run and repeating those commands without having to retype them. + +You could decide, however, that you’d be just as happy to forget that you referenced a dozen man pages, listed your files every 10 minutes or viewed previously run commands by typing “history”. In this post, we’re going to look at how you can get the history command to remember just what you want it to remember and forget commands that are likely to be of little "historic value". + +### Viewing your command history + +To view previously run commands, you simply type “history”. You’ll probably see a long list of commands. The number of commands remembered depends on an environment variable called **$HISTSIZE** that is set up in your **~/.bashrc** file, but there’s nothing stopping you from changing this setting if you want to save more or fewer commands. + +To view history, use the **history** command: + +``` +$ history +209 uname -v +210 date +211 man chage +... +``` + +To see the maximum number of commands that will be displayed: + +``` +$ echo $HISTSIZE +500 +``` + +You can change **$HISTSIZE** and make the change permanent by running commands like these: + +``` +$ export HISTSIZE=1000 +$ echo “HISTSIZE=1000” >> ~/.bashrc +``` + +There’s also a difference between how much history is preserved for you and how much is displayed when you type “history”. The **$HISTSIZE** variable controls how much history is displayed while the **$HISTFILESIZE** variable controls how many commands are retained in your **.bash_history** file. + +[][3] + +``` +$ echo $HISTSIZE +1000 +$ echo $HISTFILESIZE +2000 +``` + +You can verify the second variable by counting the lines in your history file: + +``` +$ wc -l .bash_history +2000 .bash_history +``` + +One thing to keep in mind is that commands that you enter during a login session aren’t added to your **.bash_history** file until you log off, even though they show up in the **history** command output right away. + +### Using history + +There are three ways to reissue commands that you find in your history. The simplest way, especially if the command you want to reuse was run recently, is often to type a ! followed by enough of the first letters in the command's name to uniquely identify it. + +``` +$ !u +uname -v +#37-Ubuntu SMP Thu Mar 26 20:41:27 UTC 2020 +``` + +Another easy way to repeat a command is to simply press your up-arrow key until the command is displayed and then press enter. + +Alternately, if you run the history command and see the command you want to rerun listed, you can type an ! followed by the sequence number shown to the left of the command. + +``` +$ !209 +uname -v +#37-Ubuntu SMP Thu Mar 26 20:41:27 UTC 2020 +``` + +### Hiding history + +If you want to stop recording commands for some period of time, you can use this command: + +``` +$ set +o history +``` + +Commands will not show up when you type "history" nor will they be added to your **.bash_history** file when you exit the session by logging off or exiting the terminal. + +To reverse this setting, use **set -o history**. To make it permanent, you can add it to your **.bashrc** file, though failing to make use of command history altogether is generally not a good idea. + +``` +$ echo 'set +o history' >> ~/.bashrc +``` + +To temporarily clear history, so that only commands that you enter afterwards show up when you type "history", use the **history -c** (clear) command: + +``` +$ history | tail -3 +209 uname -v +210 date +211 man chage +$ history -c +$ history +1 history +``` + +NOTE: The commands entered after typing "history -c" will not be added to your .bash_history file. + +### Controlling history + +The command history settings on many systems will default to including one called **$HISTCONTROL** that ensures that, even if you run the same command seven times in a row, it will only be remembered once. It also ensures that commands that you type after first entering one or more blanks will be omitted from your command history. + +``` +$ grep HISTCONTROL .bashrc +HISTCONTROL=ignoreboth +``` + +The "ignoreboth" means "ignore both duplicate commands and command starting with blanks". For example, if you type these commands: + +``` +$ echo try this +$ date +$ date +$ date +$ pwd +$ history +``` + +your history command should report something like this: + +``` +$ history +$ echo try this +$ date +$ history +``` + +Notice that the sequential date commands were reduced to one and the indented command was omitted. + +### Overlooking history + +To ignore certain commands so that they never show up when you type "history" and are never added to your **.bash_history** file, use the **$HISTIGNORE** setting. For example: + +``` +$ export HISTIGNORE=”history:cd:exit:ls:pwd:man” +``` + +This setting will cause all **history**, **cd**, **exit**, **ls**, **pwd** and **man** commands to be omitted from your **history** output and your **.bash_history** file. + +If you want to make this setting permanent, you have to add it to your **.bashrc** file. + +``` +$ echo 'HISTIGNORE="history:cd:exit:ls:pwd:man"' >> .bashrc +``` + +This setting just means that when you look back through previously run commands, the list won’t be cluttered by commands that you're unlikely to be looking for when you are looking through your command history. + +### Remembering, ignoring and forgetting the past + +Command history is useful because it helps you remember what commands you’ve recently used and reminds you about changes you’ve recently made. It also makes it easier to rerun commands, especially those with a string of arguments that you don't necessarily want to recreate. Tailoring your history settings can make your use of command history a little easier and more efficient. + +Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3537214/tweaking-history-on-linux.html + +作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://unsplash.com/photos/iqeG5xA96M4 +[2]: https://creativecommons.org/publicdomain/zero/1.0/ +[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 8a630a5c79822a4434a22ae43a0d44e5b9cc00fe Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 01:03:14 +0800 Subject: [PATCH 117/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20Networ?= =?UTF-8?q?k=20World=202020=20State=20of=20the=20Network:=20SD-WAN,=20edge?= =?UTF-8?q?=20networking=20and=20security=20are=20hot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md --- ...N, edge networking and security are hot.md | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md diff --git a/sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md b/sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md new file mode 100644 index 0000000000..7e9543e099 --- /dev/null +++ b/sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Network World 2020 State of the Network: SD-WAN, edge networking and security are hot) +[#]: via: (https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +Network World 2020 State of the Network: SD-WAN, edge networking and security are hot +====== +Network World survey finds 5G, IoT, server consolidation and WAN optimization top priorities. +[orna wachman / Pixabay][1] [(CC0)][2] + +Networking trends including [SD-WAN][3], edge and [5G][4] technology dominate the plans of IT executives and management as they look to develop efficient, bulletproof enterprise communications strategies for the future. + +Those trends and others such as network security, server consolidation and WAN optimization were cited as primary IT drivers of future investment, according to Network World's 2020 State of the Network report. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][5] + +The  survey tapped 268 IT executives and management personnel with primary networking responsibilities for their organization to find out what initiatives are motivating the move to a more digital business environment. + +### SD-WAN and WAN optimization + +The survey found that 58% of respondents said SD-WAN can improve bandwidth efficiency, and 55% said it will expand connectivity options. 48% said it will encourage [hybrid cloud][6] and 41% said it would encourage multi-cloud adoption. The Network World survey found that the increased use of containers and cloud-based applications that need access from the edge is also driving the use of SD-WAN technologies. + +There are a few differences by company size: 63% of enterprises say SD-WAN will improve the bandwidth efficiency for its cloud resources compared to 55% of SMBs. Close to half (46%) of enterprises expect SD-WAN to encourage multi-cloud, while only 26% of SMBs agree, perhaps because multicloud is less prevalent in smaller organizations, the survey stated. + +The State of the Network survey found that 44% of organizations are currently piloting or using SD-WAN, and another 28% have it on their radar. Organizations expect SD-WAN to improve management and monitoring (52%), increase resiliency (51%), improve network security (50%) and prioritize business-critical traffic (46%), the survey stated. + +It will probably come as little surprise that the technologies around SD-WAN are hot. In separate recent survey reports, analyst firm IDC says that 95% of enterprises will be using [SD-WAN][7] technology within two years, and that 42% have already deployed it. IDC also says the SD-WAN infrastructure market will hit $4.5 billion by 2022, growing at a more than 40% yearly clip between now and then. + +[][8] + +“The growth of SD-WAN is a broad-based trend that is driven largely by the enterprise desire to optimize cloud connectivity for remote sites,” Rohit Mehra, vice president, network infrastructure at IDC [said recently][9]. Going forward, the addition of features such as cloud-based application insights and performance monitoring will be a key part of SD-WAN rollouts, Mehra said. + +Cisco has talked about the growth of multicloud networking motivating many businesses to re-tool their networks in favor of SD-WAN technology, Cisco wrote recently. SD-WAN is critical for businesses adopting cloud services, acting as a connective fabric between the campus, branch, [IoT][10], [data center][11] and cloud. + +While SD-WAN is popular, its predecessor, WAN optimiization, is still in heavy use. The IDG survey found that more than half of organizations (53%) are currently piloting or using WAN optimization, which was traditionally centered around a single centralized hub or data center where an organization’s applications and data are hosted. With widely disparate user communities, many enterprises are now viewing new application-centric or regionally distributed architecture as a way to replace MPLS sprawl with purpose-built regional hubs, the survey stated. + +### Edge is big + +Often associated with SD-WAN, edge computing is also a high priority for customers in the Network World study, which found that more than one-third of organizations surveyed (36%) already have edge computing tools in production or are piloting initiatives, and another 25% are actively researching the technology. + +Edge computing is driven by a number of factors. Gartner research says that by 2023, more than 50% of enterprise-generated data will be created and processed outside the [data center][11] or cloud, up from less than 10% in 2019. + +Hand-in-hand with that change is a shift in what technologies are supported at the edge of the network, and that means information processing, content collection and delivery are placed closer to the sources, repositories and consumers of this information. Edge networking tries to keep the traffic and processing local to reduce latency, exploit the capabilities of the edge and enable greater autonomy at the edge, Gartner says. + +The Network World survey stated that [edge-computing][12] adopters expect the technologies  to reduce network latency and operational expenses, allow real-time data processing and save bandwidth. It is also expected to preserve uptime and resilience by reducing the number of network failures, providing an [IoT][10] security framework and reducing the impact of data-center outages. + +Despite all of the virtues of edge computing, security concerns are still on the minds of the vast majority of respondents (77%). More than half of those surveyed believe that  edge devices were not built with security in mind (55%), that the need for middleware creates an additional attack surface (51%) and that there are many other potential attack vectors due to the heterogeneous computing environment (51%). + +The survey stated that 69% of respondents implementing edge computing said network security has already been or will be affected, and 55% said their network management will be affected. Additionally, 49% said their cloud will be affected, perhaps because edge computing has the ability to reduce the amount of data that needs to be processed in theh cloud. + +### Security is a hot spot + +The "State of the Network" survey found there are a variety of data-center security concerns. Topping the list are DDoS attacks, which are aimed at disrupting and disabling internet services, and web application attacks where attackers target vulnerable web servers and install malicious code. + +Organizations are taking a variety of actions when it comes to mitigating these security risks, according to the study. For example the survey found that for 88% of respondents, [firewalls][10] are still the front-line defense. Access-control technologies are being used by about 81% of respondents and anti-malware is being used by 70% of enterprise customers with intrusion prevention being used by 66%. + +With the increasing number and complexity of cyber threats, it’s not surprising that almost three-quarters of respondents (71%) are either piloting, currently using or upgrading network security-monitoring technology. Network security monitoring helps to identify slowdowns and problem areas as well as allows administrators to attack problems as they happen and help prevent future attacks, the survey stated. + +### 5G is on the radar + +51% of respondents say their organization is actively researching 5G, but just 11% are piloting or using it in any capacity. Uses interested organizations are considering include broadband mobile (51%), IoT connectivity (43%), [branch or remote site connectivity][13] (41%) and low-latency communications and fixed wireless access (40% each), the survey stated. + +Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html + +作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/ +[b]: https://github.com/lujun9972 +[1]: https://pixabay.com/photos/young-man-student-studying-learning-4053324/ +[2]: https://creativecommons.org/publicdomain/zero/1.0/ +[3]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html +[4]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html +[5]: https://www.networkworld.com/newsletters/signup.html +[6]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html +[7]: https://www.networkworld.com/article/3489938/what-s-hot-at-the-edge-for-2020-everything.html +[8]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[9]: https://www.networkworld.com/article/3527194/multicloud-security-integration-drive-massive-sd-wan-adoption.html +[10]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html +[11]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html +[12]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html +[13]: https://www.networkworld.com/article/3250664/sd-branch-what-it-is-and-why-youll-need-it.html +[14]: https://www.facebook.com/NetworkWorld/ +[15]: https://www.linkedin.com/company/network-world From 5bf90656cf1fcd0376d222915253187c47f451ae Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 01:08:32 +0800 Subject: [PATCH 118/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20IBM=20?= =?UTF-8?q?extends=20z15=20mainframe=20family,=20intensifies=20Linux=20sec?= =?UTF-8?q?urity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md --- ...rame family, intensifies Linux security.md | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md diff --git a/sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md b/sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md new file mode 100644 index 0000000000..2ec127350a --- /dev/null +++ b/sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md @@ -0,0 +1,75 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IBM extends z15 mainframe family, intensifies Linux security) +[#]: via: (https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html) +[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) + +IBM extends z15 mainframe family, intensifies Linux security +====== +IBM continued to reshape the mainframe with an eye toward further integrating it within hybrid clouds and further securing Linux-based workloads. +Kali Linux / nevarpp / Getty Images + +IBM continued to reshape the [mainframe][1] with an eye toward further integrating it within hybrid clouds and securing [Linux][2]-based workloads. + +On the hardware side, IBM rolled out two entry-level, 19” single-frame, air-cooled platforms, the  [z15 Model T02][3] and [LinuxONE III Model LT2][4]. The new machines are extensions of the IBM z15 family that [Big Blue rolled out in September][5] of last year.  + +Both can fit in cloud [data-center][6] racks and can be outfitted with a second drawer, should customers need to grow capacity.  Both feature 65 cores using commercial processors running at 4.5GHz and can be configured to support all manner of workloads.  + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][7] + +IBM said new machines support z/OS Container Extensions that enable access to an ecosystem of open-source and Linux-on-IBM Z applications that may be deployed within the native z/OS environment without requiring a separate Linux server, using Docker container skills and patterns. In addition customers can use the latest open-source tools, popular NoSQL databases, analytics frameworks and application servers, IBM said. + +The LinuxONE Model LT2 can run a number of Linux systems including [Red Hat Enterprise Linux][8], SUSE and Ubuntu, alone or side by side with IBM z/VM environments on a single physical server. The IBM LinuxONE server can run Linux workloads independently on a single server. + +Both systems support IBM’s prepackaged Cloud Paks, which include a secured Kubernetes container and containerized IBM middleware designed to let customers quickly spin-up enterprise-ready containers, the company said. IBM has standard Cloud Paks for data, application, integration, automation and multicloud management and security. The idea is to help customers develop, deploy, and manage cloud-native applications for the z15 family, IBM stated. + +Security and privacy features are key for the z15 and those have been extended with the introduction of IBM Secure Execution for Linux for the all z15 models.  In a [blog post][9] about the security extensions, IBM stated that at its core, a Secure Execution provides a KVM-based virtual machine that is fully isolated and protected from the hypervisor with encryption keys that only the IBM Z hardware and firmware have access to. + +[][10] + +“In practice, an encrypted Linux image is created using the host public key and a customer-specific key. Since the encryption keys are stored on the IBM Z hardware and firmware, the encrypted image can only be executed in a virtual machine on the host(s) it has been prepared for, and the image can’t be decrypted or tampered with outside of the designated host(s). In addition, your unencrypted virtual machine memory cannot be accessed by the host operating system either,” IBM stated. “Applications are then run inside of that virtual machine, allowing the owner of the application to focus on just disk and network data encryption, both of which can be easily handled in userland.” + +In an environment where [customers are running Kubernetes][11] across servers running on x86 and Linux on Z systems, you can deploy the Secure Execution containers specifically for the applications you want to have protected, like sensitive databases and blockchain services. In this model, Kubernetes still manages the orchestration of containers, both on x86 and IBM Z, but it has no access to the data inside the Secure Execution environment container, IBM stated.  + +With Secure Execution IBM is trying to mitigate insider threats to enterprise data. + +From 2016 to 2019, the average number of incidents involving employee or contractor negligence has increased from 10.5 to 14.5–and the average number of credential theft incidents per company has tripled over the past three years, from 1.0 to 3.2, According to the [Ponemon Institute’s 2020 Cost of an Insider Breach Report][12], IBM stated.  “IBM Secure Execution for Linux helps to mitigate these concerns by enabling clients to isolate large numbers of workloads with granularity and at scale, within a trusted execution environment.” + +The z15 family already supports what IBM calls [Data Privacy Passports][13] that promise to let customers control privacy and security by defining how all data is accessed, stored and shared. The idea is to let customers  protect and provision data and revoke access to that data at any time, not only within the z15 environment but across an enterprise's hybrid [multicloud][14] environment, IBM stated.  + +The new systems and software are expected to be available by mid-May.  z15 T02 pricing starts at $160,000 but each machine is built to order so prices vary. + +Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html + +作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/article/3446140/enterprises-find-a-new-use-for-mainframes-blockchain-and-containerized-apps.html +[2]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html +[3]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-006&appname=USN +[4]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-014&appname=USN +[5]: https://www.networkworld.com/article/3438542/ibm-z15-mainframe-amps-up-cloud-security-features.html +[6]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html +[7]: https://www.networkworld.com/newsletters/signup.html +[8]: https://www.redhat.com/en/blog/enterprise-linux-all-architectures-bringing-red-hat-enterprise-linux-ibm-z15-and-linuxone-iii-single-frame-systems?sc_cid=701f2000000txokAAA&utm_source=bambu&utm_medium=social&utm_campaign=Partner +[9]: https://developer.ibm.com/blogs/inside-the-new-ibm-z15-t02-and-linuxone-iii-lt2/ +[10]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[11]: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html +[12]: https://www.ibm.com/downloads/cas/LQZ4RONE +[13]: https://developer.ibm.com/blogs/data-privacy-passports-for-developers/ +[14]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html +[15]: https://www.facebook.com/NetworkWorld/ +[16]: https://www.linkedin.com/company/network-world From bb38e2c16efdab8290e5ffa630c76fd6cb4c5b96 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 16 Apr 2020 01:11:34 +0800 Subject: [PATCH 119/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200415=20How=20?= =?UTF-8?q?to=20dispose=20of=20IT=20hardware=20without=20hurting=20the=20e?= =?UTF-8?q?nvironment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md --- ...ardware without hurting the environment.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md diff --git a/sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md b/sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md new file mode 100644 index 0000000000..511720d7fd --- /dev/null +++ b/sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to dispose of IT hardware without hurting the environment) +[#]: via: (https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +How to dispose of IT hardware without hurting the environment +====== +Find certified recyclers and disposal firms in order to know that the retirement of your old electronics gear is handled safely. +[Angelo Tsirekas][1] [(CC BY 3.0)][2] + +Many enterprises don’t think much about where their obsolete IT gear winds up, but it’s possible to be green-minded, not bust the budget, and even benefit a little from proper disposal. Here is how. + +### Go back to where you bought + +The first option to consider is returning the equipment the vendor or reseller you bought it from, says Susan Middleton, research director, financing strategies at IDC. “Every year we ask customers, ‘How do you handle end-of-lease?’ Overwhelmingly, they return to vendor or partner who are better equipped to handle recycling,” she says. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] + +Vendors often give a fair-market buyout for the devices that can go toward new products, Middleton says. “The big players like IBM and HPE do a great job because they can clean them up and resell them, and the facilities to do that are pretty big,” she says. + +### Vet disposal firms + +If that’s not an option,  and you have to find a disposal company – an IT Asset Disposition (ITAD) service – on your own, the first thing to check is whether it is properly certified, says Mike Satter, CEO of IT asset disposal and [data-center][4]-decommissioning provider OceanTech. Proper certification starts with a [Responsible Recycling (R2) certification][5]. + +R2s are administered by [Sustainable Electronics Recycling International][6] (SERI), a non-profit organization dedicated to the responsible reuse, repair, and recycling of electronic products. It sets the R2 standard and audits ITAD providers that carry the standard to make sure they are in compliance with the standard. Being responsible means creating a paper trail that shows the electronic waste – which contains heavy metals including arsenic, beryllium, cadmium, chromium, cobalt, indium, lead, mercury, nickel, and thallium, and are toxic in high enough doses – is reused, recovered or recycled. + +Some disposal firms dump old gear in general landfills or export them to other countries where regulations aren’t as strong.   + +“Any ITAD service provider that does not carry an R2 certification cannot fully guarantee zero landfill or zero export of materials,” says Satter. “Many recyclers will say they are compliant, but without verified certifications you’re taking a chance.” + +[][7] + +Mark Dobson, IT asset disposal security specialist with NextUse, a firm that removes and the resells second-hand IT assets, cites six disposal certifications that companies should look for: [R2][5],  [e-Stewards][8],  [NAID][9], [NAID AAA][10] (which has greater certification of regulatory compliance), [ISO 14001][11], and ISO 18001. “R2 would be the floor,” he says. + +Briefly, here’s what these certifications do. + + * **e-Stewards** is a standard set by the Basel Action Network in Sweden, which recognizes electronics recyclers that adhere to the most stringent environmentally and socially responsible practices when recovering hazardous electronic materials. In particular it is focused on making sure it was not shipped off to poor countries, where underage workers were exposed to toxic materials in careless work conditions. + * **NAID and NAID** AAA certification are set by The National Association of Information Destruction, a standards body that sets rules for the proper disposal of information devices, like hard drives. + * **ISO 14001** is a management framework for organizations to “achieve the intended outcomes of its environmental management system, which provide value for the environment, the organization itself and interested parties.” Outcomes of the framework should enhance environmental performance, fulfill compliance obligations and achieve environmental objectives. ISO is the International Organization of Standards, a global standards body. + * **ISO 18001** is the international standard for health and safety management systems. + + + +Dobson says ITAD companies that do it right are using one or more of the certification standards for data security and responsible recycling, and getting and maintaining those standard takes substantial initial and on-going investment in facilities, equipment, hardware, software, personnel, policies and procedures. + +“When those vendors charge more for their services, it is to cover those expenses, not to be excessively profitable,” he says. “Companies that do it the cheap way are skipping many if not all of those investments.” + +If an e-waste company says they will take retired equipment for free, consider that a red flag, says Satter. “Compliant e-waste companies have to hire vetted/credentialed employees, which must pass background checks to ensure compliance is delivered,” Satter says. “All of that costs money.” + +But the additional cost of using a certified company is minor. “We’re not talking hundreds of thousands of dollars,” says Dobson. “Even on the biggest job, it’s a few thousand dollars difference between the right way and the cheap way. For your average client, you’re talking thousands of dollars between the best vendors possible and totally half-assing it with the cheapest vendor that’s not operating in anyone’s best interest but their own.” + +### Penalties + +State environmental laws about illegal disposal are mainly enforced by state attorneys general. In addition, various federal agencies enforce violations of their agency's laws and regulations. + +Satter thinks enforcement needs to be tougher. “It will take the federal government to create extreme enforcement measures to ensure our e-waste is handled properly. The CEO or owner of companies should be arrested if they violate illegal e-waste dumping laws or knowingly exports e-waste to developing countries,” he says. + +In one case, two executives of a Seattle e-waste recycling company got [28 months in jail][12] for improper disposal of e-waste. In that case, it was e-Stewards that got wise to their illegal activities and turned them in to the Washington state AG. + +But that’s an exception, not the rule. Dobson says he sees very little enforcement. “The regulations are in place but spotily enforced, and penalties are not incentivizing. A lot of this is viewed as the cost of doing business. They build the fines for if they get caught into the cost of disposal,” he says. + +Fines for illegal dumping of old IT assets, are determined by the size of the violation, the clean-up cost, and the guidelines in the state or federal law. AT&T got one of the largest fines on record in 2014 for illegal disposal of e-waste, socked with a [$52 million fine][13]. Two years later, Apple got a spanking of $450,000 for its own [illegal dumping][14]. + +Middleton says first and foremost companies should ask for a paper trail to verify proper handling and disposal of assets from the moment they are picked up. “Ask about who certifies that your [disposal] partners are doing it correctly. When you don’t get a good answer, you walk away,” she says. + +But she says she thinks most firms are legit. “Anyone that’s lasted in this business isn’t shady. The majority that have been around a while are responsible,” says Middleton. + +Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html + +作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Kerbside_collection#/media/File:ACT_recycling_truck.jpg +[2]: https://creativecommons.org/licenses/by/3.0/legalcode +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html +[5]: https://sustainableelectronics.org/r2-standard +[6]: https://sustainableelectronics.org/ +[7]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[8]: http://e-stewards.org/ +[9]: https://naidonline.org/ +[10]: https://naidonline.org/certifications/why-become-certified/ +[11]: https://www.iso.org/iso-14001-environmental-management.html +[12]: https://www.theverge.com/2019/12/4/20992240/e-waste-recycling-electronic-basel-convention-crime-total-reclaim-fraud +[13]: https://www.reuters.com/article/us-usa-at-t-california/att-to-pay-california-52-million-in-hazardous-waste-disposal-settlement-idUSKCN0J50AG20141121 +[14]: https://www.mercurynews.com/2016/12/06/apple-to-pay-450000-after-allegations-of-hazardous-waste-violations/ +[15]: https://www.facebook.com/NetworkWorld/ +[16]: https://www.linkedin.com/company/network-world From f4b0fc93cf3d82de9ffe8afc0c9d0d59349f5194 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 16 Apr 2020 08:35:26 +0800 Subject: [PATCH 120/394] translated --- ...ow to Add Multiple Time Zones in Ubuntu.md | 92 ------------------- ...ow to Add Multiple Time Zones in Ubuntu.md | 92 +++++++++++++++++++ 2 files changed, 92 insertions(+), 92 deletions(-) delete mode 100644 sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md create mode 100644 translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md diff --git a/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md b/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md deleted file mode 100644 index f0d353455d..0000000000 --- a/sources/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Add Multiple Time Zones in Ubuntu) -[#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Add Multiple Time Zones in Ubuntu -====== - -_**This quick tutorial shows the steps for adding additional clocks for multiple time zones in Ubuntu and other distributions using GNOME desktop environment.**_ - -If you have family members or colleagues in another country or if you live in a country with multiple time zones, keeping a track of the time difference becomes important. After all, you don’t want to disturb someone by calling at 4’o clock in the morning. - -Some Linux users also keep a tab on the [UTC time][1] because an overwhelming majority of servers use UTC. - -Situations like these can be managed better if you have multiple clocks. You can set one clock to your local time and sync other clock(s) to other time zone(s). It makes keep an eye on the different times easier. - -In this quick tutorial, I’ll show you how to add additional clocks in Ubuntu and other Linux distributions that use GNOME desktop environment. - -### Adding multiple time zone clocks in Ubuntu (and other Linux using GNOME) - -Please [check which desktop environment you are using][2]. This tutorial is suitable for GNOME desktop only. - -To add additional clocks, you can use a nifty little app unsurprisingly called [GNOME Clocks][3]. - -GNOME Clocks is a simple application that shows the time and date in multiple locations. You can also use it to set alarms or timers. Stopwatch feature is also included. - -GNOME Clocks is available in the universe repository in Ubuntu. So please make sure to [enable universe repository][4] first. - -You can search for GNOME Clocks in Software Center and install it from there. - -![Gnome Clocks Ubuntu Software Center][5] - -Alternatively, you can open a terminal and use the following command to install GNOME Clocks: - -``` -sudo apt install gnome-clocks -``` - -If you are using some other Linux distribution, please use your distribution’s software center or package manager to install this application. - -Once you have installed it, search for it by pressing the super key (Windows key) and typing clocks: - -![Gnome Clocks App Search Ubuntu][6] - -Start the application and you should see an interface that provides you a few options like adding world clock, setting alarms, use stopwatch and timer. - -Click on the + sign in the top left corner it will give you an option to search for a geographical location. Search it, select it and add it. - -![Adding additional clocks][7] - -Once you have added the required time zone(s) via its geographical location, you can see that this new clock is now added in the message try. It also shows the time difference between your local time and other time zones. - -![Multiple clocks for multiple time zones][8] - -You can use Super + M keys to quickly open the message tray. There are some more [useful Ubuntu shortcuts][9] you may master and save your time. - -If you want to remove the additional clocks, you can do that from the GNOME Clocks application interface: - -![Remove Additional Clocks][10] - -You cannot delete your current time zone and set it to something else. There are other ways [to change your current time zone in Linux][11]. - -I hope you liked this quick tip. Questions and suggestions are always welcome. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/add-multiple-time-zones-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://en.wikipedia.org/wiki/Coordinated_Universal_Time -[2]: https://itsfoss.com/find-desktop-environment/ -[3]: https://wiki.gnome.org/Apps/Clocks -[4]: https://itsfoss.com/ubuntu-repositories/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-ubuntu-software-center.jpg?ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-app-search-ubuntu.jpg?ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/add-multiple-time-zones-gnome.jpg?ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/multiple-clocks-ubuntu.jpg?ssl=1 -[9]: https://itsfoss.com/ubuntu-shortcuts/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/remove-additional-clocks-ubuntu.jpg?ssl=1 -[11]: https://itsfoss.com/change-timezone-ubuntu/ diff --git a/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md b/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md new file mode 100644 index 0000000000..c3ab289f06 --- /dev/null +++ b/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md @@ -0,0 +1,92 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Add Multiple Time Zones in Ubuntu) +[#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Ubuntu 中添加多个时区 +====== + +_**此教程展示了使用 GNOME 桌面环境在 Ubuntu 和其他发行版中为多个时区添加其他时钟的步骤。**_ + +如果你的家人或同事在另一个国家,或者你居住在一个有多个时区的国家,那么了解时差就变得很重要。毕竟,你不想在凌晨 4 点打电话打扰别人。 + +一些 Linux 用户还会加一个 [UTC 时间][1]标签,因为大多数服务器都使用 UTC。 + +如果你有多个时钟,那么可以更好地管理此类情况。你可以将一个时钟设置为本地时间,并将其他时钟同步到其他时区。这使得了解不同时间变得更加容易。 + +在本教程中,我将向你展示如何在 Ubuntu 和其他使用 GNOME 桌面环境的 Linux 发行版中添加其他时钟。 + +### 在 Ubuntu(以及其他使用 GNOME 的 Linux)中添加多个时区时钟 + +请[检查你正在使用的桌面环境][2]。本教程仅适用于 GNOME 桌面。 + +要添加其他时钟,可以使用一个叫 [GNOME Clocks][3] 的小程序。 + +GNOME Clocks 是一个简单的应用,它可以显示多个位置的时间和日期。你也可以使用它来设置闹钟或计时器。还包括秒表功能。 + +GNOME Clocks 存在于 Ubuntu 的 Universe 仓库中。因此,请确保首先[启用 Universe 仓库][4]。 + +你可以在软件中心中搜索 GNOME Clocks 并从那里安装它。 + +![Gnome Clocks Ubuntu Software Center][5] + +或者,你可以打开终端并使用以下命令来安装 GNOME Clocks: + +``` +sudo apt install gnome-clocks +``` + +如果你使用的是其他 Linux 发行版,那么请使用发行版的软件中心或软件包管理器来安装此程序。 + +安装后,请按 super 键(Windows 键)并搜索 clocks: + +![Gnome Clocks App Search Ubuntu][6] + +启动程序,你应该会看到一个提供一些选项的界面,例如添加世界时钟、设置闹钟、使用秒表和计时器。 + +单击左上角的 + 号,它将为你提供搜索地理位置的选项。搜索,选择并添加。 + +![Adding additional clocks][7] + +通过地理位置添加所需的时区后,你可以看到现在在消息托盘中添加了这个新时钟。它还显示了你当地时间与其他时区之间的时差。 + +![Multiple clocks for multiple time zones][8] + +你可以使用 Super + M 键快速打开消息托盘。你可以掌握这些[有用的 Ubuntu 快捷方式][9]来节省时间。 + +如果要删除其他时钟,你可以从 GNOME Clocks 应用界面执行以下操作: + +![Remove Additional Clocks][10] + +你无法删除当前时区并设置为其他时区。有其他方法[更改 Linux 中的当前时区][11]。 + +我希望你喜欢这个快速技巧。欢迎提出问题和建议。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/add-multiple-time-zones-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://en.wikipedia.org/wiki/Coordinated_Universal_Time +[2]: https://itsfoss.com/find-desktop-environment/ +[3]: https://wiki.gnome.org/Apps/Clocks +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-ubuntu-software-center.jpg?ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-clocks-app-search-ubuntu.jpg?ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/add-multiple-time-zones-gnome.jpg?ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/multiple-clocks-ubuntu.jpg?ssl=1 +[9]: https://itsfoss.com/ubuntu-shortcuts/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/remove-additional-clocks-ubuntu.jpg?ssl=1 +[11]: https://itsfoss.com/change-timezone-ubuntu/ From e2342e3b7f125a9238682c96bed8b44b964d4e6e Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 16 Apr 2020 08:39:40 +0800 Subject: [PATCH 121/394] translating --- ... A handy utility for creating Raspberry Pi SD card images.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md b/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md index 7d0eadb90c..133a389f91 100644 --- a/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md +++ b/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 59ee3e0ef79ab3521260d335db53cb4d6753922a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 16 Apr 2020 09:00:08 +0800 Subject: [PATCH 122/394] Rename sources/tech/20200415 Fedora Origins - Part 01.md to sources/talk/20200415 Fedora Origins - Part 01.md --- sources/{tech => talk}/20200415 Fedora Origins - Part 01.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200415 Fedora Origins - Part 01.md (100%) diff --git a/sources/tech/20200415 Fedora Origins - Part 01.md b/sources/talk/20200415 Fedora Origins - Part 01.md similarity index 100% rename from sources/tech/20200415 Fedora Origins - Part 01.md rename to sources/talk/20200415 Fedora Origins - Part 01.md From c8e2f67bbb23972d9db06c7b14b597d01b0458bb Mon Sep 17 00:00:00 2001 From: "qfzy1233@163.com" Date: Thu, 16 Apr 2020 15:23:17 +0800 Subject: [PATCH 123/394] Update 20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md --- ... to Save Time and Increase Productivity.md | 51 ++++++++++--------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md index d464f6ccd4..c4feb5a787 100644 --- a/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md +++ b/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md @@ -7,64 +7,65 @@ [#]: via: (https://itsfoss.com/create-templates-libreoffice/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) -How to Create Templates in LibreOffice to Save Time and Increase Productivity +如何在 LibreOffice 中创建模板以实现省时高效 ====== -Creating a template in [LibreOffice][1] can save you some time for the documents that you use often. It can be a letter, a financial spreadsheet or even a presentation. +在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件,是财务表格抑或是简报。 -Time is one factor that a template can save and on the other hand it provides consistency where a group of people in an organization work together at the same project. +模板不仅可以为你节省时间,另一方面它可以保证在同一机构内参与统一项目的小组成员文档的一致性。 -For example, if you are a small organization that has to often issue certificates of experience, instead of copy-pasting from a saved document somewhere, you can create a template. When you need to issue a new certificate of experience, you create a new one from the template, edit it slightly and you are good to go. +举例而言,如果你是一家需要经常开具工作经验证明的企业,你可以创建一个模板,而不再需要从某个地方复制粘贴已保存的文档。当你需要开具一个新的经验证明时,你可以从模板中创建,稍微编辑一下就可以了。 -LibreOffice comes with a few templates by default but you are not restricted to use just them. You are free to create your own as per your requirements. +LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使用这些,你可以根据自己的需求自由定制。 -I think templates are one of the [essential LibreOffice tips][2] that every user should know. Let me show you how to do it. +我认为模板是每个用户都应该了解的 [LibreOffice 基础技巧之一][2]。下面我将为你演示如何使用。 -### How to create a template in LibreOffice +###如何在 LibreOffice 中创建一个模板 -First, create the document that you want to reuse with minimal editing. It could be a document, spreadsheet or presentation. I am using a word document in the example but the steps are the same for all of them. +首先,创建你希望通过最少的编辑就可以重复使用的文档。它可以是文档、电子表格或演示文稿。我在示例中使用的是 word 文档,但是所有步骤都是相同的。 -Now go to file and select Save as Template. You will be prompted to give a name and a category from the menu, the press save. +然后转到文件选项卡并选择存储为模板。你将被提示输入名称及选择类别,再单击保存。 ![Creating a new template in LibreOffice][3] -This file will be saved in the LibreOffice template folder in .ots format. You can use these .ots files on other systems that have LibreOffice installed and use the same templates on those systems as well. +此文件将以 .ots 格式保存在 LibreOffice 的模板文件夹中。你可以在其他安装了 LibreOffice 的系统上使用这些 .ots 文件,并在这些系统上使用相同的模板。 -### How to use templates in LibreOffice +### 如何在 LibreOffice 中使用模板 -To use a template, select File and then Templates. +要使用模板,请选择 “文件选项卡”,然后选择 “模板”。 -Don’t worry! Opening a template LibreOffice creates a copy without affecting the original template. You can edit the document without worrying about your template getting changed. +不要担心! LibreOffice 在打开一个模板时会在不影响原始模板的情况下创建一个副本。你可以随意编辑文档而不必担心模板发生改动。 ![Using templates][4] -Once you choose your template, click open. You can edit it as you like. +选择模板后,单击打开。你就可以随意编辑了。 -### How to change a template in LibreOffice +### 如何在LibreOffice中更改模板 -Needs may change from time to time and adjustments to your templates can be necessary. +我们需求可能会不时变化,所以需要对模板进行相应。 -To edit an existing template go to File -> Templates and then right click on the desired template and click edit. +编辑一个现有的模板,单击文件>然后右键单击所需的模板,然后单击编辑。 ![edit Template][5] -When you finish editing the template, click on save to make the changes permanent. +当您完成对模板的编辑时,单保存以使更改生效。 -**Recommended Read:** +**推荐阅读:** ![][6] -#### [7 LibreOffice Tips To Get More Out of It][2] +#### [7 个高效使用 LibreOffice 的小技巧][2] -LibreOffice is an excellent office suite. These LibreOffice tips will enable you to use it more effectively. +LibreOffice 是一个优秀的办公套件。这些 LibreOffice 技巧将帮助你使用时更为高效。 -All in all templates are great not only at reducing the workload on repetitive tasks but also for user mistake proofing. You can take advantage of your computer’s ability to handle a repetitive task but with flexibility. It increases your efficiency. +总之,模板不仅可以减少重复任务的工作量,还可以防止用户出错。你可以利用电脑优势来灵活的处理重复性的任务,并以此提高你的效率。 -Bonus Tip! +福利小贴士 -You can find tons of additional templates on the [LibreOffice website][7]. You can search for the ones you need, download them and use them. Be advised that these are from third-party, unverified users. So use them at your risk. +你可以在[LibreOffice网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。 + +之后我会继续分享更多这样的技巧。同时,您还可以学习如何创建模板[在GNOME的右键菜单上下文中添加“创建新文档”选项][8]。 -I’ll keep on sharing more such tips in future. Meanwhile, you may also learn about creating templates to [add the “create new document” option in the right click menu context in GNOME][8]. -------------------------------------------------------------------------------- From 3f25f85a0e5389b5b0377397fcd057007e85bd76 Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Thu, 16 Apr 2020 15:27:47 +0800 Subject: [PATCH 124/394] change the dir --- ...tes in LibreOffice to Save Time and Increase Productivity.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => translated}/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md (98%) diff --git a/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md similarity index 98% rename from sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md rename to translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md index c4feb5a787..e0f4ae64ea 100644 --- a/sources/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md +++ b/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md @@ -73,7 +73,7 @@ via: https://itsfoss.com/create-templates-libreoffice/ 作者:[Dimitrios Savvopoulos][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[qfzy1233](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From f32893eaff59eb4c420916c2f55633acdf8971aa Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Apr 2020 20:31:05 +0800 Subject: [PATCH 125/394] PRF @geekpi --- ...ver with a Raspberry Pi and Rocket.Chat.md | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md b/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md index dd59fe627f..b8ef1b822a 100644 --- a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md +++ b/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat) @@ -9,36 +9,37 @@ 使用树莓派和 Rocket.Chat 构建一个私人聊天服务器 ====== -使用这些简单、经济高效的开源工具创建你自己的真正私人聊天和消息解决方案。 -![Chat via email][1] -互联网提供大量免费的消息服务。WhatsApp 和 Viber 等应用是我们日常生活的一部分,也是我们与亲朋好友沟通的最常见方式。但是,安全意识正在增加对真正私人聊天解决方案的需求。此外,消息应用在我们的设备中占用了大量空间,因此备用聊天渠道可用于与朋友共享媒体、信息和联系人。 +> 使用这些简单、经济高效的开源工具构建自己真正的私人聊天和消息解决方案。 + +![](https://img.linux.net.cn/data/attachment/album/202004/16/203055g5r5w7ei8eenw1ex.jpg) + +互联网提供了大量免费的消息服务。像 WhatsApp 和 Viber 这样的应用已经是我们日常生活的一部分,也是我们与亲朋好友沟通的最常见方式。但是,安全意识的提高,让人们对真正的私密聊天解决方案的需求越来越大。此外,消息类应用在我们的设备中占用了大量空间,因此一个备用聊天渠道可能对于我们与朋友分享媒体、信息和联系人很有作用。 今天,我们将了解如何使用[树莓派][2]和 Rocket.Chat 安装一个私人聊天和消息服务器。 ### 什么是 Rocket.Chat? -[Rocket.Chat][3] 是一个开源解决方案,它提供增强的聊天服务。它包括媒体共享、屏幕共享和视频/音频呼叫支持等协作工具。 +[Rocket.Chat][3] 是一个开源解决方案,它提供了一个增强的聊天服务。它包括媒体共享、屏幕共享和视频/音频呼叫支持等协作工具。 它可以通过浏览器或从所有主要应用商店(Google Play、App Store 等)下载使用。 -除了社区版本外,Rocket.Chat 还提供企业版和专业版,包括支持和其他功能。 +除了社区版本外,Rocket.Chat 还提供企业版和专业版,包括支持和其他附加功能。 ### 我们需要什么 -对于这个项目,我将使用更便宜的树莓派 3 model A+。树莓派 3 model B 和 B+ 以及树莓派 4 model B 工作应该一样。 +对于这个项目,我将使用更便宜的树莓派 3A+。树莓派 3B 和 3B+ 以及树莓派 4B 应该也可以用同样的方法。 -我也建议使用高性能 SD 卡,因为 Rocket.Chat 会给树莓派大量的负载。如其他文章中所述,高性能 SD 卡可显著提高 Raspbian 操作系统的性能。 +我也建议使用一块高性能 SD 卡,因为 Rocket.Chat 会给树莓派带来很大的负载。如其他文章中所述,高性能 SD 卡可显著提高 Raspbian 操作系统的性能。 我们将使用 Raspbian 的精简版本,拥有预配置的 WiFi 访问和 SSH 服务,因此不需要键盘或 HDMI 线缆。 ### 分步过程 -从[安装最新版本的 Raspbian Buster Lite][5] 开始 +从[安装最新版本的 Raspbian Buster Lite][5] 开始。 我们将使用 [Snap][6] 简化 Rocket.Chat 安装。通过 SSH 登录并从终端输入: - ``` sudo apt-get update sudo apt-get upgrade @@ -46,36 +47,33 @@ sudo apt-get upgrade 安装 Snap: - ``` -`sudo apt-get install snapd` +sudo apt-get install snapd ``` 安装 Snap 后,我们需要重启系统使其正常工作: - ``` -`sudo reboot` +sudo reboot ``` 再次通过 SSH 登录,并用以下简单的命令安装 Rocket.Chat: - ``` -`sudo snap install rocketchat-server` +sudo snap install rocketchat-server ``` -从终端安装后,请等待一段时间,等待 Rocket.Chat 初始化数据库和服务。休息一下,几分钟后,你应该能够在浏览器中访问 http://<<YOUR_RPI_IP_ADDRESS>>:3000,你应该看到以下内容: +从终端安装后,请等待一段时间,让 Rocket.Chat 初始化数据库和服务。休息一下,几分钟后,你应该能够在浏览器中访问 `http://<>:3000`,你应该看到以下内容: ![Rocket Chat setup wizard][7] -填写所需的表格就可以了。四个简单的设置窗口后,你应该会进入 Rocket.Chat 主页: +填写所需的表单就可以了。经过四个简单的设置窗口后,你应该会进入 Rocket.Chat 主页: ![Rocket Chat home page][8] 享受吧! -_本文最初发表在 [peppe8o.com][9],并获许重新发布。_ +本文最初发表在 [peppe8o.com][9],并获许重新发布。 -------------------------------------------------------------------------------- @@ -84,7 +82,7 @@ via: https://opensource.com/article/20/3/raspberry-pi-rocketchat 作者:[Giuseppe Cassibba][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8c16926b5f9ffc7ec02938df291de4554989ad99 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Apr 2020 20:31:55 +0800 Subject: [PATCH 126/394] PUB @geekpi https://linux.cn/article-12116-1.html --- ...private chat server with a Raspberry Pi and Rocket.Chat.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md (98%) diff --git a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md b/published/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md similarity index 98% rename from translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md rename to published/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md index b8ef1b822a..25a4581dd7 100644 --- a/translated/tech/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md +++ b/published/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12116-1.html) [#]: subject: (Build a private chat server with a Raspberry Pi and Rocket.Chat) [#]: via: (https://opensource.com/article/20/3/raspberry-pi-rocketchat) [#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) From c23dc4891a1aaee4bb4e496568c1a8703e3e80f8 Mon Sep 17 00:00:00 2001 From: cycoe Date: Thu, 16 Apr 2020 21:21:59 +0800 Subject: [PATCH 127/394] Translated by Cycoe --- ...u need to know about variables in Emacs.md | 239 ++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 translated/tech/20200311 What you need to know about variables in Emacs.md diff --git a/translated/tech/20200311 What you need to know about variables in Emacs.md b/translated/tech/20200311 What you need to know about variables in Emacs.md new file mode 100644 index 0000000000..635f7d6249 --- /dev/null +++ b/translated/tech/20200311 What you need to know about variables in Emacs.md @@ -0,0 +1,239 @@ +[#]: collector: (lujun9972) +[#]: translator: (cycoe) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What you need to know about variables in Emacs) +[#]: via: (https://opensource.com/article/20/3/variables-emacs) +[#]: author: (Clemens Radermacher https://opensource.com/users/clemera) + +关于 Emacs 中的变量你需要知道的事情 +====== +学习 Elisp 是如何处理变量的,以及如何在你的脚本与配置中使用它们。 +![编程键盘][1] + +GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言)写成,它是一个编辑器的同时,又碰巧是 Elisp 的沙盒。因此,理解 Elisp 中的一些基本编程概念会对你有一些帮助。 + +如果你是 [Emacs][2] 新手,请先访问 Sacha Chua 的[《给 Emacs 新手的资源》][3]精品帖。本篇文章假定你熟悉常见的 Emacs 术语,并且能够阅读 Elisp 代码的简单片段并对其进行求值。最好你也听说过变量作用域的概念,知道它在其它编程语言中的作用。本篇文章中的示例假定你使用的是相对较新的 Emacs 版本([v.25 之后的版本][4])。 + +[Elisp 手册][5] 包含了 Elisp 的方方面面,但它是写给那些有明确查找目标的人们的,并且它在这方面也做得相当棒。但是很多人希望这些资源能够在更高的层次上解释 Elisp 的概念,同时将信息压缩成最精华的部分。本篇文章也正是我回应这种呼声的一次尝试,为读者描绘基础的大体轮廓。使他们能在配置中用上这些技巧,也让他们在手册中查询细节变得更容易。 + +### 全局变量 + +用 `defcustom` 定义的用户设置和用 `defvar` 或 `defconst` 定义的变量是全局的。使用 `defcustom` 或 `defvar` 声明变量的一个非常重要的原因是,当一个变量已经被绑定bind,对它们进行重新求值不会覆盖掉已有的值。举个栗子,如果你在初始化文件中对 `my-var` 进行如下绑定: + + +``` +`(setq my-var nil)` +``` + +对如下表达式求值不会将变量覆盖为 `t`: + + +``` +`(defvar my-var t)` +``` + +注意此处有_一个例外_:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式,你可以按需将变量强制覆盖。这种行为是刻意而为之的:你可能知道,Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。 + +### 用户选项 + +用户选项就是使用 `defcustom` 声明的全局变量。与使用 `defvar` 声明的变量不同,这些变量可以用 `M-x customize` 界面来配置。据我所知,大部分人因为觉得它开销较大而不经常使用。一旦你知道如何在你的初始化文件中设置变量,也就没有理由一定要去使用它了。许多用户没有意识到的一个细节是,通过 **customize** 的方式设置用户选项能够执行代码,有的时间可用来运行一些附加的配置说明: + + +``` +(defcustom my-option t +  "我的用户选项" +  :set (lambda (sym val) +         (set-default sym val) +         (message "Set %s to %s" sym val))) +``` + +若你对这段代码求值,并键入 `M-x customize-option RET my-option RET` 运行 **customize** 界面,lambda 匿名函数就会被调用,回显区域就会显示出该选项的符号名与值。 + +如果你在初始化文件中使用 `setq` 改变该选项的值,那么匿名函数不会运行。要想在 Elisp 中正确设置一个选项,你需要使用函数 `customize-set-variable`。或者,人们在他们的配置文件中使用了各种版本的 `csetq` 宏来自动处理(如你所愿,你可以通过 GitHub 的代码搜索发现更复杂的变体)。 + + +``` +(defmacro csetq (sym val) +  `(funcall (or (get ',sym 'custom-set) 'set-default) ',sym ,val)) +``` + +若你正在使用 [use-package][6] 宏,`:custom` 关键字会替你处理好以上这些。 + +在你将以上代码放入到你的初始化文件中之后,你便可以使用 `csetq` 宏在设置变量的同时运行任何现存的 `setter` 函数。要证明这点,你可以使用此宏来改变上面定义的选项,并观察回显区域的消息输出。 + + +``` +`(csetq my-option nil)` +``` + +### 动态绑定与词法绑定 + +当你在使用其它编程语言时,你可能不会意识到动态绑定与词法绑定的区别。当今的大部分编程语言使用词法绑定,并且在学习变量作用域与变量查找时也没有必要去了解它们之间的区别。 + +如此看来,Emacs Lisp 比较特殊因为动态绑定是默认选项,词法绑定需要显式启用。这里有一些历史遗留原因,但在实际使用中,你应该_时刻_启用词法绑定,因为它更快并且不容易出错。要启用词法绑定,只需将如下的注释行作为你的 Emacs Lisp 文件的第一行: + + +``` +`;;; -*- lexical-binding: t; -*-` +``` + +另一种方式,你可以调用 `add-file-local-variable-prop-line`,在你选择将变量 `lexical-binding` 置为 `t` 后,会自动插入如上的注释行。 + +在加载包含如上特殊格式行的文件时,Emacs 会相应地设置变量,这意味着该缓冲区中的代码加载时启用了词法绑定。若要采用交互式的方式,你可以调用 `M-x eval-buffer` 命令,它会将词法绑定考虑在内。 + +既然你已经知道了如何启用词法绑定,那么了解这些术语的含义就很明智了。对于动态绑定,在程序执行期间建立的最后一个绑定将用于变量查找。你可以通过将以下代码放入空缓冲区并执行 `M-x eval buffer`,以对此进行测试: + +``` +(defun a-exists-only-in-my-body (a) +  (other-function)) + +(defun other-function () +  (message "I see `a', its value is %s" a)) + +(a-exists-only-in-my-body t) +``` + +你可能会很惊讶地发现,在 `other-function` 中查找变量 `a` 竟然成功了。 + +若你在顶部添加了特殊的词法绑定注释后,重新运行前面的示例,这段代码将抛出 `variable is void` 错误,因为 `other-functioin` 无法识别变量 `a`。如果你使用的是其它编程语言,这才是你所期望的行为。 + +启用词法绑定后,作用域会由周围的代码所定义。这并不单单是性能原因,时间也已经表明了词法绑定才是更受喜爱的。 + +### 特殊变量与动态绑定 + +如你所知,`let` 用于临时建立局部绑定: + + +``` +(let ((a "I'm a") +      (b "I'm b")) +  (message "Hello, %s. Hello %s" a b)) +``` + +接下来有趣的是——使用 `defcustom`、`defvar` 以及 `defconst` 定义的变量被称为_特殊变量_,不论词法绑定是否启用,它们都将使用动态绑定: + + +``` +;;; -*- lexical-binding: t; -*- + +(defun some-other-function () +  (message "I see `c', its value is: %s" c)) + +(defvar c t) + +(let ((a "I'm lexically bound") +      (c "I'm special and therefore dynamically bound")) +  (some-other-function) +  (message "I see `a', its values is: %s" a)) +``` + +通过 `C-h e` 切换至 `Messages` 缓冲区,查看上述示例输出的消息。 + +使用 `let` 或者函数参数绑定的局部变量会遵循由 `lexical-binding` 变量定义的查找规则,但使用 `defvar`、`defconst` 或 `defcustom` 定义的全局变量,能够沿着调用栈在 `let` 表达式中被修改。 + +这种技巧允许方便地进行特殊定制,并且经常在 Emacs 中被使用。这并不奇怪,毕竟 Emacs Lisp 最开始只提供动态绑定作为唯一选择。下面是一个常见的示例,说明如何向只读缓冲区临时写入数据: + +``` +(let ((inhibit-read-only t)) +  (insert ...)) +``` + +这是另一个常见的示例,如何进行大小写敏感的搜索: + + +``` +(let ((case-fold-search nil)) +  (some-function-which-uses-search ...)) +``` + +动态绑定允许你采用作者未曾预料的方式对函数进行修改。对于像 Emacs 这样设计使用的程序来说,这是个强大的工具与特性。 + +有一点需要注意:你可能会意外地使用局部变量名,该变量在其他地方被声明为特殊变量。防止这种冲突的一个技巧是避免在局部变量名中使用下划线。在我当前的 Emacs 会话中,以下代码只留下少数潜在冲突的候选: + +``` +(let ((vars ())) +  (mapatoms +   (lambda (cand) +     (when (and (boundp cand) +                (not (keywordp cand)) +                (special-variable-p cand) +                (not (string-match "-" +                                   (symbol-name cand)))) +       (push cand vars)))) +  vars) ;; => (t obarray noninteractive debugger nil) +``` + +### 缓冲区局部变量 + +每个缓冲区都能够拥有变量的一个局部绑定。这就意味着对于任何变量,都会首先在当前缓冲区中查找缓冲区局部变量取代默认值。局部变量是 Emacs 中一个非常重要的特性,比如它们被主模式用来建立缓冲区范围内的行为与设置。 + +事实上你已经在本文中见过_缓冲区局部变量_——也就是将 `lexical-binding` 在缓冲区范围内设置为 `t` 的特殊注释行。在 Emacs 中,在特殊注释行中定义的缓冲区局部变量也被称为`文件局部变量`。 + +任何的全局变量都可以用缓冲区局部变量来遮掩,比如上面定义的变量 `my-var`,你可用如下方式设置局部变量: + + +``` +(setq-local my-var t) +;; or (set (make-local-variable 'my-var) t) +``` + +此时 `my-var` 对于你在对上述代码进行求值时对应的缓冲区来说就是局部变量。若你对它调用 `describe-variable`,文档会同时告诉你局部与全局的值。从编程的角度来讲,你可以分别用 `buffer-local-value` 获取局部值,用 `default-value` 获取全局值。若要移除局部值,你可以调用 `kill-local-variable`。 + +另一个需要注意的重要性质就是,一旦一个变量成为缓冲区局部变量,后续在该缓冲区中使用的 `setq` 都将只能设置局部的值。要想设置默认值,你需要使用 `setq-default`。 + +因为局部变量意味着对缓冲区的定制,它们也就经常被用于模式钩子中。一个典型的例子如下所示: + + +``` +(add-hook 'go-mode-hook +          (defun go-setup+ () +            (setq-local compile-command +              (if (string-suffix-p "_test.go" buffer-file-name) +                  "go test -v" +                (format "go run %s" +                        (shell-quote-argument +                         (file-name-nondirectory buffer-file-name))))))) +``` + +这将设置 `go-mode` 缓冲区中 `M-x compile` 使用的编译命令。 + +另一个重要的方面就是一些变量会_自动_成为缓冲区局部变量。这也就意味着当你使用 `setq` 设置这样一个变量时,它会针对当前缓冲区设置局部绑定。这个特性不应该被经常使用,因为这种隐式的行为并不好。不过如果你想的话,你可以使用如下方法创建自动局部变量: + + +``` +(defvar-local my-automatical-local-var t) +;; or (make-variable-buffer-local 'my-automatical-local-var) +``` + +变量 `indent-tabs-mode` 就是 Emacs 内建的一个例子。如果你在初始化文件中使用 `setq` 改变变量的值,根本不会影响默认值。只有在你加载初始化文件时正处在当前的缓冲区的局部值会被改变。因此,你需要使用 `setq-default` 来改变 `indent-tabs-mode` 的默认值。 + +### 结语 + +Emacs 是一个强大的编辑器,并且随着你的定制它将变得更加强大。现在,你知道了 Elisp 是如何处理变量的,以及你应如何在你自己的脚本与配置中使用它们。 + +* * * + +_本篇文章此前采用 CC BY-NC-SA 4.0 许可证发布在 [With-Emacs][7] 上,经过修改(带有合并请求)并在作者允许的情况下重新发布。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/variables-emacs + +作者:[Clemens Radermacher][a] +选题:[lujun9972][b] +译者:[cycoe](https://github.com/cycoe) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clemera +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming_keyboard_coding.png?itok=E0Vvam7A (Programming keyboard.) +[2]: https://www.gnu.org/software/emacs/ +[3]: http://sachachua.com/blog/p/27144 +[4]: https://www.gnu.org/software/emacs/download.html +[5]: https://www.gnu.org/software/emacs/manual/html_node/elisp/ +[6]: https://github.com/jwiegley/use-package#customizing-variables +[7]: https://with-emacs.com/posts/tutorials/almost-all-you-need-to-know-about-variables/ From ea59e2a6ccb76ba53bac6609def4a07a80059e33 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Apr 2020 21:44:03 +0800 Subject: [PATCH 128/394] PRF @qfzy1223 --- ... to Save Time and Increase Productivity.md | 36 ++++++++----------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md index e0f4ae64ea..23520b1feb 100644 --- a/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md +++ b/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) -[#]: translator: (qfzy1233 ) -[#]: reviewer: ( ) +[#]: translator: (qfzy1233) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Create Templates in LibreOffice to Save Time and Increase Productivity) @@ -10,7 +10,9 @@ 如何在 LibreOffice 中创建模板以实现省时高效 ====== -在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件,是财务表格抑或是简报。 +![](https://img.linux.net.cn/data/attachment/album/202004/16/214314y17oww0ymfylyn1m.jpg) + +在 [LibreOffice][1] 中为你经常使用的文档创建模板可以为你节省一些时间。它可以是信件、财务表格抑或是简报。 模板不仅可以为你节省时间,另一方面它可以保证在同一机构内参与统一项目的小组成员文档的一致性。 @@ -20,11 +22,11 @@ LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使 我认为模板是每个用户都应该了解的 [LibreOffice 基础技巧之一][2]。下面我将为你演示如何使用。 -###如何在 LibreOffice 中创建一个模板 +### 如何在 LibreOffice 中创建一个模板 首先,创建你希望通过最少的编辑就可以重复使用的文档。它可以是文档、电子表格或演示文稿。我在示例中使用的是 word 文档,但是所有步骤都是相同的。 -然后转到文件选项卡并选择存储为模板。你将被提示输入名称及选择类别,再单击保存。 +然后转到“文件”选项卡并选择“存储为模板”。你将被提示输入“名称”及选择“类别”,再单击“保存”。 ![Creating a new template in LibreOffice][3] @@ -40,31 +42,23 @@ LibreOffice 默认情况下提供了一些模板,但并不仅仅局限于使 选择模板后,单击打开。你就可以随意编辑了。 -### 如何在LibreOffice中更改模板 +### 如何在 LibreOffice 中更改模板 我们需求可能会不时变化,所以需要对模板进行相应。 -编辑一个现有的模板,单击文件>然后右键单击所需的模板,然后单击编辑。 +编辑一个现有的模板,单击“文件” -> “模板”,然后右键单击所需的模板,然后单击“编辑”。 ![edit Template][5] -当您完成对模板的编辑时,单保存以使更改生效。 - -**推荐阅读:** - -![][6] - -#### [7 个高效使用 LibreOffice 的小技巧][2] - -LibreOffice 是一个优秀的办公套件。这些 LibreOffice 技巧将帮助你使用时更为高效。 +当你完成对模板的编辑时,单击“保存”以使更改生效。 总之,模板不仅可以减少重复任务的工作量,还可以防止用户出错。你可以利用电脑优势来灵活的处理重复性的任务,并以此提高你的效率。 -福利小贴士 +> 福利小贴士 -你可以在[LibreOffice网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。 +你可以在 [LibreOffice 网站][7]上找到大量的附加模板。你可以搜索你需要的,下载并使用它们。请注意,这些模板来自第三方和未经验证的用户。所以使用它们的风险需要自己承担。 -之后我会继续分享更多这样的技巧。同时,您还可以学习如何创建模板[在GNOME的右键菜单上下文中添加“创建新文档”选项][8]。 +之后我会继续分享更多这样的技巧。同时,你还可以学习一下如何创建模板[在 GNOME 的右键菜单上下文中添加“创建新文档”选项][8]。 -------------------------------------------------------------------------------- @@ -73,8 +67,8 @@ via: https://itsfoss.com/create-templates-libreoffice/ 作者:[Dimitrios Savvopoulos][a] 选题:[lujun9972][b] -译者:[qfzy1233](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[qfzy1233](https://github.com/qfzy1233) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b3392045c71678a38f4291fe9f149cdc100d5330 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 16 Apr 2020 21:44:36 +0800 Subject: [PATCH 129/394] PUB @qfzy1223 https://linux.cn/article-12118-1.html --- ...s in LibreOffice to Save Time and Increase Productivity.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md (98%) diff --git a/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md similarity index 98% rename from translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md rename to published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md index 23520b1feb..1377f03523 100644 --- a/translated/tech/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md +++ b/published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (qfzy1233) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12118-1.html) [#]: subject: (How to Create Templates in LibreOffice to Save Time and Increase Productivity) [#]: via: (https://itsfoss.com/create-templates-libreoffice/) [#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) From d3899a9e2b239ff54cef1e577d34933c0c3d153a Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Thu, 16 Apr 2020 22:46:57 +0800 Subject: [PATCH 130/394] Update 20190814 9 open source cloud native projects to consider.md --- ...ource cloud native projects to consider.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index 5a0ea56b9e..09304a737b 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -11,18 +11,18 @@ ====== Work with containers? Get familiar with these projects from the Cloud Native Computing Foundation -工作中使用了容器?熟悉来自云原生计算基金会的这些项目 +工作中用了容器?熟悉这些出自云原生计算基金会的项目? ![clouds in the sky with blue pattern][1] As the practice of developing applications with containers is getting more popular, [cloud-native applications][2] are also on the rise. By [definition][3]: -随着通过容器开发应用的实践变得流行,[云原生应用][2]也在上升。其定义: -云原生技术被用于开发应用程序,这些程序通过将服务打包在容器中来完成构建,部署为微服务,通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。 +随着用容器来开发应用的实践变得流行,[云原生应用][2]也在增长。云原生应用的定义为: +> "云原生技术被用于开发应用程序,这些应用通过将服务打包在容器中来完成构建,被部署为微服务,并通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。" > "Cloud-native technologies are used to develop applications built with services packaged in containers, deployed as microservices, and managed on elastic infrastructure through agile DevOps processes and continuous delivery workflows." This description includes four elements that are integral to cloud-native applications: -这个描述包括构成云原生应用的4个元素: +这个定义提到了构成云原生应用的4个元素: 1. Container 容器 2. Microservice 微服务 @@ -32,7 +32,7 @@ This description includes four elements that are integral to cloud-native applic Although these technologies have very distinct histories, they complement each other well and have led to surprisingly exponential growth of cloud-native applications and toolsets in a short time. This [Cloud Native Computing Foundation][4] (CNCF) infographic shows the size and breadth of the cloud-native application ecosystem today. -尽管这些技术有非常独特的历史,它们互相补充,共同导致了短时间内的云原生应用和工具的惊人的指数级增长。这个[云原生计算基金会][4]信息图现实了今天的云原生应用生态的规模和广度。 +尽管这些技术各有各自独特的历史,但它们相互补充,共同导致了云原生应用和工具在短时间内惊人的指数级增长。这个[云原生计算基金会][4]信息图呈现了当今云原生应用生态的规模和广度。 ![Cloud-Native Computing Foundation applications ecosystem][5] @@ -40,23 +40,23 @@ Cloud-Native Computing Foundation projects 云原生计算基金会项目 I mean, just look at that! And this is just a start. Just as NodeJS’s creation sparked the explosion of endless JavaScript tools, the popularity of container technology started the exponential growth of cloud-native applications. -我的意思是,留意吧!这仅仅是一个开始。 正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用程序的指数增长。 +我想说,瞧着吧!这仅仅是一个开始。正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。 The good news is that there are several organizations that oversee and connect these dots together. One is the [**Open Containers Initiative (OCI)**][6], which is a lightweight, open governance structure (or project), "formed under the auspices of the Linux Foundation for the express purpose of creating open industry standards around container formats and runtime." The other is the **CNCF**, "an open source software foundation dedicated to making cloud native computing universal and sustainable." -好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[** Open Containers Initiative(OCI)**][6],它是一种轻量级的,开放的治理结构(或项目),“是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准容器格式和运行时。” 另一个是** CNCF **,“致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 +好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[** Open Containers Initiative(OCI)**][6],它是一个轻量级的,开放的治理机构(或项目),“它是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 In addition to building a community around cloud-native applications generally, CNCF also helps projects set up structured governance around their cloud-native applications. CNCF created the concept of maturity levels—Sandbox, Incubating, or Graduated—which correspond to the Innovators, Early Adopters, and Early Majority tiers on the diagram below. -除了通常围绕云原生应用建立社区之外,CNCF还帮助项目围绕其云原生应用建立结构化的管理。CNCF创建了成熟度级别的概念(沙箱,孵化或毕业),与下图中的“创新者”,“早期采用者”和“早期多数”层相对应。 +除了常见的围绕云原生应用建立社区之外,CNCF还帮助项目基于其云原生应用建立结构化的管理。CNCF创建了成熟等级的概念(沙箱级,孵化级或毕业级),分别与下图中的“创新者”,“早期采用者”和“早期大量应用”相对应。 ![CNCF project maturity levels][7] -CNCF project maturity levels CNCF项目成熟度级别 +CNCF project maturity levels CNCF项目成熟等级 The CNCF has detailed [criteria][8] for each maturity level (included below for readers’ convenience). A two-thirds supermajority of the Technical Oversight Committee (TOC) is required for a project to be Incubating or Graduated. -CNCF为每个成熟度级别制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会(TOC)的三分之二的同意才能转为孵化或毕业项目。 +CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会(TOC)三分之二的同意才能转为孵化或毕业级。 ### Sandbox stage 沙箱级 -> To be accepted in the sandbox, a project must have at least two TOC sponsors. See the CNCF Sandbox Guidelines v1.0 for the detailed process. 要成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 +> To be accepted in the sandbox, a project must have at least two TOC sponsors. See the CNCF Sandbox Guidelines v1.0 for the detailed process. 要想成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 ### Incubating stage 孵化级 @@ -93,7 +93,7 @@ CNCF为每个成熟度级别制定了详细的[标准][8](为方便读者而 > * Have a public list of project adopters for at least the primary repo (e.g., ADOPTERS.md or logos on the project website). > * Receive a supermajority vote from the TOC to move to graduation stage. Projects can attempt to move directly from sandbox to graduation, if they can demonstrate sufficient maturity. Projects can remain in an incubating state indefinitely, but they are normally expected to graduate within two years. > ->要从沙箱或孵化状态毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化阶段标准外还要满足: +>要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足: > > *至少有两个组织的提交者。 > *已获得并维护了“核心基础设施计划最佳实践徽章”。 @@ -106,7 +106,7 @@ CNCF为每个成熟度级别制定了详细的[标准][8](为方便读者而 ## 9 projects to consider 值得考虑的9个项目 While it’s impossible to cover all of the CNCF projects in this article, I’ll describe are nine of most interesting Graduated and Incubating open source projects. -本文不可能涵盖所有的CNCF项目,我将介绍最有趣的9个“毕业和孵化中”的开源项目。 +本文不可能涵盖所有的CNCF项目,我将介绍最有趣的9个“已毕业和孵化中”的开源项目。 Name | License | What It Is 名称|授权类型|简要描述 @@ -122,14 +122,14 @@ Name | License | What It Is [CRI-O][17] | Apache 2.0 | Lightweight runtime for Kubernetes 专门用于K8s的轻量级运行时环境 I also created this video tutorial to walk through these projects. -我也创建了这个视频材料来介绍这些项目。 +我也创建了视频材料来介绍这些项目。 ## Graduated projects 毕业项目 Graduated projects are considered mature—adopted by many organizations—and must adhere to the CNCF’s guidelines. Following are three of the most popular open source CNCF Graduated projects. (Note that some of these descriptions are adapted and reused from the projects' websites.) 已毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了CNCF的准则。 以下是三个最受欢迎的开源CNCF毕业项目。 (请注意,其中一些描述来源于项目的网站并被做了改编。) -### Kubernetes K8S +### Kubernetes Ah, Kubernetes. How can we talk about cloud-native applications without mentioning Kubernetes? Invented by Google, Kubernetes is undoubtedly the most famous container-orchestration platform for container-based applications, and it is also an open source tool. Kubernetes。我们如何在不提及Kubernetes的情况下谈论云原生应用程序? Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 @@ -174,7 +174,7 @@ There are numerous alternatives for service mesh applications, such as Uber’s * It’s API-driven and supports dynamic configuration and hot reloads * Has a strong focus on metric collection, tracing, and overall observability -服务网格应用程序有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: +服务网格应用有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: *所有的“table stakes(入场筹码,引申为基础必备特性)”特性(与控制平面(例如Istio)组合时) *带载运行时99%数据可达到低延时 @@ -226,7 +226,7 @@ However, there are some subtle differences between the two. While Envoy and Link * Built-in service discovery abstractions to unite multiple systems * Support for gRPC, HTTP/2, and HTTP/1.x requests plus all TCP traffic -像创建Envoy代理的Lyft一样,Uber开发了Linkerd开源解决方案用于生产级别上的服务维护。 在某些方面,Linkerd就像Envoy一样,因为两者都是服务网格工具,旨在提供平台级的可观测性,可靠性和安全性,而无需进行配置或代码更改。 +像创建Envoy代理的Lyft一样,Uber开发了Linkerd开源解决方案用于生产级的服务维护。在某些方面,Linkerd就像Envoy一样,因为两者都是服务网格工具,旨在提供平台级的可观测性,可靠性和安全性,而无需进行配置或代码更改。 但是,两者之间存在一些细微的差异。 尽管Envoy和Linkerd充当代理并可以通过所连接的服务进行上报,但是Envoy并不像Linkerd那样被设计为Kubernetes Ingress控制器。 Linkerd的显著功能包括: @@ -279,7 +279,7 @@ CRI-O is an Open Container Initiative (OCI)-compliant implementation of the Kube * Storage and management of image layers using containers/storage * Networking support through the Container Network Interface (CNI) -CRI-O是Kubernetes运行时接口的兼容开放容器倡议(OCI)实现。 CRI-O用于各种功能,包括: +CRI-O是Kubernetes运行时接口的OCI兼容实现。CRI-O用于各种功能,包括: *使用runc(或遵从OCI运行时规范的任何实现)和OCI运行时工具运行 *使用容器/镜像进行镜像管理 From 5e45ea6c6e2ee67d0c81040bbc646e7a5f89acf5 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Thu, 16 Apr 2020 22:54:27 +0800 Subject: [PATCH 131/394] Remove origin and left chinese --- ...ource cloud native projects to consider.md | 152 ++++-------------- 1 file changed, 31 insertions(+), 121 deletions(-) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/sources/tech/20190814 9 open source cloud native projects to consider.md index 09304a737b..14ca76e0b5 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -7,69 +7,47 @@ [#]: via: (https://opensource.com/article/19/8/cloud-native-projects) [#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo) -9 open source cloud native projects to consider 值得考虑的9个开源的云原生项目 +值得考虑的9个开源的云原生项目 ====== -Work with containers? Get familiar with these projects from the Cloud -Native Computing Foundation 工作中用了容器?熟悉这些出自云原生计算基金会的项目? ![clouds in the sky with blue pattern][1] -As the practice of developing applications with containers is getting more popular, [cloud-native applications][2] are also on the rise. By [definition][3]: 随着用容器来开发应用的实践变得流行,[云原生应用][2]也在增长。云原生应用的定义为: > "云原生技术被用于开发应用程序,这些应用通过将服务打包在容器中来完成构建,被部署为微服务,并通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。" -> "Cloud-native technologies are used to develop applications built with services packaged in containers, deployed as microservices, and managed on elastic infrastructure through agile DevOps processes and continuous delivery workflows." - -This description includes four elements that are integral to cloud-native applications: 这个定义提到了构成云原生应用的4个元素: - 1. Container 容器 - 2. Microservice 微服务 - 3. DevOps DevOps - 4. Continuous integration and continuous delivery (CI/CD) 持续集成和持续交付 + 1. 容器 + 2. 微服务 + 3. DevOps + 4. 持续集成和持续交付 (CI/CD) - -Although these technologies have very distinct histories, they complement each other well and have led to surprisingly exponential growth of cloud-native applications and toolsets in a short time. This [Cloud Native Computing Foundation][4] (CNCF) infographic shows the size and breadth of the cloud-native application ecosystem today. 尽管这些技术各有各自独特的历史,但它们相互补充,共同导致了云原生应用和工具在短时间内惊人的指数级增长。这个[云原生计算基金会][4]信息图呈现了当今云原生应用生态的规模和广度。 ![Cloud-Native Computing Foundation applications ecosystem][5] -Cloud-Native Computing Foundation projects 云原生计算基金会项目 -I mean, just look at that! And this is just a start. Just as NodeJS’s creation sparked the explosion of endless JavaScript tools, the popularity of container technology started the exponential growth of cloud-native applications. 我想说,瞧着吧!这仅仅是一个开始。正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。 -The good news is that there are several organizations that oversee and connect these dots together. One is the [**Open Containers Initiative (OCI)**][6], which is a lightweight, open governance structure (or project), "formed under the auspices of the Linux Foundation for the express purpose of creating open industry standards around container formats and runtime." The other is the **CNCF**, "an open source software foundation dedicated to making cloud native computing universal and sustainable." 好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[** Open Containers Initiative(OCI)**][6],它是一个轻量级的,开放的治理机构(或项目),“它是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 -In addition to building a community around cloud-native applications generally, CNCF also helps projects set up structured governance around their cloud-native applications. CNCF created the concept of maturity levels—Sandbox, Incubating, or Graduated—which correspond to the Innovators, Early Adopters, and Early Majority tiers on the diagram below. 除了常见的围绕云原生应用建立社区之外,CNCF还帮助项目基于其云原生应用建立结构化的管理。CNCF创建了成熟等级的概念(沙箱级,孵化级或毕业级),分别与下图中的“创新者”,“早期采用者”和“早期大量应用”相对应。 ![CNCF project maturity levels][7] -CNCF project maturity levels CNCF项目成熟等级 +CNCF项目成熟等级 -The CNCF has detailed [criteria][8] for each maturity level (included below for readers’ convenience). A two-thirds supermajority of the Technical Oversight Committee (TOC) is required for a project to be Incubating or Graduated. CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会(TOC)三分之二的同意才能转为孵化或毕业级。 -### Sandbox stage 沙箱级 +### 沙箱级 -> To be accepted in the sandbox, a project must have at least two TOC sponsors. See the CNCF Sandbox Guidelines v1.0 for the detailed process. 要想成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 +> 要想成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 -### Incubating stage 孵化级 +### 孵化级 -> Note: The incubation level is the point at which we expect to perform full due diligence on projects. -> -> To be accepted to incubating stage, a project must meet the sandbox stage requirements plus: -> -> * Document that it is being used successfully in production by at least three independent end users which, in the TOC’s judgement, are of adequate quality and scope. -> * Have a healthy number of committers. A committer is defined as someone with the commit bit; i.e., someone who can accept contributions to some or all of the project. -> * Demonstrate a substantial ongoing flow of commits and merged contributions. -> * Since these metrics can vary significantly depending on the type, scope, and size of a project, the TOC has final judgement over the level of activity that is adequate to meet these criteria -> >注意:孵化级是我们期望对项目进行全面尽职调查的起点。 > >要进入孵化阶段,项目除了满足沙箱阶段的要求之外还要满足: @@ -81,18 +59,8 @@ CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列 -### Graduated stage 毕业级 +### 毕业级 -> To graduate from sandbox or incubating status, or for a new project to join as a graduated project, a project must meet the incubating stage criteria plus: -> -> * Have committers from at least two organizations. -> * Have achieved and maintained a Core Infrastructure Initiative Best Practices Badge. -> * Have completed an independent and third party security audit with results published of similar scope and quality as the following example (including critical vulnerabilities addressed): and all critical vulnerabilities need to be addressed before graduation. -> * Adopt the CNCF Code of Conduct. -> * Explicitly define a project governance and committer process. This preferably is laid out in a GOVERNANCE.md file and references an OWNERS.md file showing the current and emeritus committers. -> * Have a public list of project adopters for at least the primary repo (e.g., ADOPTERS.md or logos on the project website). -> * Receive a supermajority vote from the TOC to move to graduation stage. Projects can attempt to move directly from sandbox to graduation, if they can demonstrate sufficient maturity. Projects can remain in an incubating state indefinitely, but they are normally expected to graduate within two years. -> >要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足: > > *至少有两个组织的提交者。 @@ -103,77 +71,56 @@ CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列 > *至少有主仓的项目采用者的公开列表(例如,ADOPTERS.md或项目网站上的徽标)。 > *获得TOC的多数票,进入毕业阶段。如果项目能够证明足够的成熟度,则可以尝试直接从沙箱过渡到毕业。项目可以无限期保持孵化状态,但是通常预计它们会在两年内毕业。 -## 9 projects to consider 值得考虑的9个项目 +## 值得考虑的9个项目 -While it’s impossible to cover all of the CNCF projects in this article, I’ll describe are nine of most interesting Graduated and Incubating open source projects. 本文不可能涵盖所有的CNCF项目,我将介绍最有趣的9个“已毕业和孵化中”的开源项目。 -Name | License | What It Is 名称|授权类型|简要描述 ---|---|--- -[Kubernetes][9] | Apache 2.0 | Orchestration platform for containers 容器编排平台 -[Prometheus][10] | Apache 2.0 | Systems and service monitoring tool 系统和服务监控工具 -[Envoy][11] | Apache 2.0 | Edge and service proxy 边缘和服务代理 -[rkt][12] | Apache 2.0 | Pod-native container engine Pod原生的容器引擎 -[Jaeger][13] | Apache 2.0 | Distributed tracing system 分布式跟踪系统 -[Linkerd][14] | Apache 2.0 | Transparent service mesh 无感服务网格 -[Helm][15] | Apache 2.0 | Kubernetes package manager K8s包管理器 -[Etcd][16] | Apache 2.0 | Distributed key-value store 分布式键值存储 -[CRI-O][17] | Apache 2.0 | Lightweight runtime for Kubernetes 专门用于K8s的轻量级运行时环境 +[Kubernetes][9] | Apache 2.0 | 容器编排平台 +[Prometheus][10] | Apache 2.0 | 系统和服务监控工具 +[Envoy][11] | Apache 2.0 | 边缘和服务代理 +[rkt][12] | Apache 2.0 | Pod原生的容器引擎 +[Jaeger][13] | Apache 2.0 | 分布式跟踪系统 +[Linkerd][14] | Apache 2.0 | 无感服务网格 +[Helm][15] | Apache 2.0 | Kubernetes包管理器 +[Etcd][16] | Apache 2.0 | 分布式键值存储 +[CRI-O][17] | Apache 2.0 | 专门用于Kubernetes的轻量级运行时环境 -I also created this video tutorial to walk through these projects. 我也创建了视频材料来介绍这些项目。 -## Graduated projects 毕业项目 +## 毕业项目 -Graduated projects are considered mature—adopted by many organizations—and must adhere to the CNCF’s guidelines. Following are three of the most popular open source CNCF Graduated projects. (Note that some of these descriptions are adapted and reused from the projects' websites.) 已毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了CNCF的准则。 以下是三个最受欢迎的开源CNCF毕业项目。 (请注意,其中一些描述来源于项目的网站并被做了改编。) ### Kubernetes -Ah, Kubernetes. How can we talk about cloud-native applications without mentioning Kubernetes? Invented by Google, Kubernetes is undoubtedly the most famous container-orchestration platform for container-based applications, and it is also an open source tool. -Kubernetes。我们如何在不提及Kubernetes的情况下谈论云原生应用程序? Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 +Kubernetes! 我们如何在不提及Kubernetes的情况下谈论云原生应用程序? Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 -What is a container orchestration platform? Basically, a container engine on its own may be okay for managing a few containers. However, when you are talking about thousands of containers and hundreds of services, managing those containers becomes super complicated. This is where the container engine comes in. The container-orchestration engine helps scale containers by automating the deployment, management, networking, and availability of containers. 什么是容器编排平台? 通常,一个容器引擎本身可以管理几个容器。 但是,当您谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。 这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署,管理,网络和可用性来帮助管理大量的容器。 -Docker Swarm and Mesosphere Marathon are other container-orchestration engines, but it is safe to say that Kubernetes has won the race (at least for now). Kubernetes also gave birth to Container-as-a-Service (CaaS) platforms like [OKD][18], the Origin community distribution of Kubernetes that powers [Red Hat OpenShift][19]. Docker Swarm和Mesosphere Marathon也是容器编排引擎,但是可以肯定地说Kubernetes在竞争中胜出(至少现在是这样)。Kubernetes还诞生了容器即服务(CaaS)平台如[OKD][18],它是Origin社区针对Kubernetes的发行版,并成了[Red Hat OpenShift][19]的一部分。 -To get started, visit the [Kubernetes GitHub repository][9], and access its documentation and learning resources from the [Kubernetes documentation][20] page. 想开始学习请访问[Kubernetes GitHub仓库][9],并从[Kubernetes文档][20]页面访问其文档和学习资源。 ### Prometheus -Prometheus is an open source system monitoring and alerting toolkit built at SoundCloud in 2012. Since then, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project that is maintained independently of the company. Prometheus是2012年在SoundCloud上构建的一个开源系统监控和告警工具。之后,许多公司和组织都使用了Prometheus,并且该项目拥有非常活跃的开发者和用户群体。 现在,它是一个独立于公司的独立维护的开源项目。 ![Prometheus’ architecture][21] -Prometheus’ architecture Prometheus的架构 +Prometheus的架构 -The easiest way to think about Prometheus is to visualize a production system that needs to be up 24 hours a day and 365 days a year. No system is perfect, and there are techniques to reduce failures (called fault-tolerant systems). However, if an issue occurs, the most important thing is to identify it as soon as possible. That is where a monitoring tool like Prometheus comes in handy. Prometheus is more than a container-monitoring tool, but it is most popular among cloud-native application companies. In addition, other open source monitoring tools, including [Grafana][22], leverage Prometheus. 理解Prometheus的最简单方法是可视化一个生产系统,该系统需要24(小时)x365天都可以正常运行。 没有哪个系统是完美的,也有减少故障的技术(称为容错系统)。 但是,如果出现问题,最重要的是尽快识别它。 这就是像Prometheus这样的监控工具的用武之地。Prometheus不仅是容器监控工具,它在云原生应用公司中也最受欢迎。 此外,其他开源监视工具,包括[Grafana][22],都借鉴了Prometheus。 -The best way to get started with Prometheus is to check out its [GitHub repo][10]. Running Prometheus locally is easy, but you need to have a container engine installed. You can access detailed documentation on [Prometheus’ website][23]. + 开始使用Prometheus的最佳方法是下载其[GitHub仓库][10]。 在本地运行Prometheus很容易,但是您需要安装一个容器引擎。 您可以在[Prometheus网站][23]上查看详细的文档。 ### Envoy -Envoy (or Envoy Proxy) is an open source edge and service proxy designed for cloud-native applications. Created at Lyft, Envoy is a high-performance, C++, distributed proxy designed for single services and applications, as well as a communications bus and a universal data plane designed for large microservice service mesh architectures. Built on the learnings of solutions such as Nginx, HAProxy, hardware load balancers, and cloud load balancers, Envoy runs alongside every application and abstracts the network by providing common features in a platform-agnostic manner. Envoy(或Envoy代理)是专为云原生应用设计的开源的边缘代理和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对Nginx,HAProxy,硬件负载均衡器和云负载均衡器等方案了解的基础上,Envoy与每个应用相伴(并行)运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。 -When all service traffic in an infrastructure flows through an Envoy mesh, it becomes easy to visualize problem areas via consistent observability, tune overall performance, and add substrate features in a single place. Basically, Envoy Proxy is a service mesh tool that helps organizations build a fault-tolerant system for production environments. 当基础设施中的所有服务流量都经过一个Envoy网格时,很容易就可以通过连贯的监测来可视化问题域,调整整体性能,并在单个位置添加基础功能。基本上,Envoy代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。 -There are numerous alternatives for service mesh applications, such as Uber’s [Linkerd][24] (discussed below) and [Istio][25]. Istio extends Envoy Proxy by deploying as a [Sidecar][26] and leveraging the [Mixer][27] configuration model. Notable Envoy features are: - - * All the "table stakes" features (when paired with a control plane, like Istio) are included - * Low, 99th percentile latencies at scale when running under load - * Acts as an L3/L4 filter at its core with many L7 filters provided out of the box - * Support for gRPC and HTTP/2 (upstream/downstream) - * It’s API-driven and supports dynamic configuration and hot reloads - * Has a strong focus on metric collection, tracing, and overall observability - 服务网格应用有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: *所有的“table stakes(入场筹码,引申为基础必备特性)”特性(与控制平面(例如Istio)组合时) @@ -184,48 +131,34 @@ There are numerous alternatives for service mesh applications, such as Uber’s *重点关注指标收集,跟踪和整体可监测性 -Understanding Envoy, proving its capabilities, and realizing its full benefits require extensive experience with running production-level environments. You can learn more in its [detailed documentation][28] and by accessing its [GitHub][11] repository. 要想了解Envoy,证实其能力并意识到其全部优势,需要丰富的在生产级环境运行的经验。 您可以在[详细文档][28]或访问其[GitHub][11]仓库了解更多信息。 -## Incubating projects 孵化项目 +## 孵化项目 -Following are six of the most popular open source CNCF Incubating projects. 下面是最流行的开源的CNCF孵化项目中的六个。 ### rkt -rkt, pronounced "rocket," is a pod-native container engine. It has a command-line interface (CLI) for running containers on Linux. In a sense, it is similar to other containers, like [Podman][29], Docker, and CRI-O. rkt, 拼为"rocket", 是一个pod原生的容器引擎。它有一个命令行接口用来在Linux上运行容器。从某种意义上讲,它和其他容器如[Podman][29], Docker和CRI-O相似。 -rkt was originally developed by CoreOS (later acquired by Red Hat), and you can find detailed [documentation][30] on its website and access the source code on [GitHub][12]. rkt最初由CoreOS开发(后来被Red Hat收购),您可以在其网站上找到详细的[文档][30],以及在[GitHub][12]上访问其源代码。 ### Jaeger -Jaeger is an open source, end-to-end distributed tracing system for cloud-native applications. In one way, it is a monitoring solution like Prometheus. Yet it is different because its use cases extend into: Jaeger是面向云原生应用的开源的端到端的分布式跟踪系统。 在某种程度上,它是像Prometheus这样的监控解决方案。但它有所不同,因为其使用场景有所扩展: - * Distributed transaction monitoring 分布式事务监控 - * Performance and latency optimization 性能和延时优化 - * Root-cause analysis 根因分析 - * Service dependency analysis 服务的依赖分析 - * Distributed context propagation 分布式上下文传播 + * 分布式事务监控 + * 性能和延时优化 + * 根因分析 + * 服务的依赖分析 + * 分布式上下文传播 -Jaeger is an open source technology built by Uber. You can find [detailed documentation][31] on its website and its [source code][13] on GitHub. Jaeger是Uber建立的开源的技术。 您可以在其网站上找到[详细文档][31],以及在GitHub上找到其[源码][13]。 ### Linkerd -Like Lyft with Envoy Proxy, Uber developed Linkerd as an open source solution to maintain its service at the production level. In some ways, Linkerd is just like Envoy, as both are service mesh tools designed to give platform-wide observability, reliability, and security without requiring configuration or code changes. - -However, there are some subtle differences between the two. While Envoy and Linkerd function as proxies and can report over services that are connected, Envoy isn’t designed to be a Kubernetes Ingress controller, as Linkerd is. Notable features of Linkerd include: - - * Support for multiple platforms (Docker, Kubernetes, DC/OS, Amazon ECS, or any stand-alone machine) - * Built-in service discovery abstractions to unite multiple systems - * Support for gRPC, HTTP/2, and HTTP/1.x requests plus all TCP traffic - 像创建Envoy代理的Lyft一样,Uber开发了Linkerd开源解决方案用于生产级的服务维护。在某些方面,Linkerd就像Envoy一样,因为两者都是服务网格工具,旨在提供平台级的可观测性,可靠性和安全性,而无需进行配置或代码更改。 但是,两者之间存在一些细微的差异。 尽管Envoy和Linkerd充当代理并可以通过所连接的服务进行上报,但是Envoy并不像Linkerd那样被设计为Kubernetes Ingress控制器。 Linkerd的显著功能包括: @@ -235,28 +168,16 @@ However, there are some subtle differences between the two. While Envoy and Link *支持gRPC,HTTP / 2和HTTP / 1.x请求和所有的TCP流量 -You can read more about it on [Linkerd’s website][32] and access its source code on [GitHub][14]. 您可以在[Linkerd网站][32]上阅读有关它的更多信息,并在[GitHub][14]上访问其源码。 ### Helm -Helm is basically the package manager for Kubernetes. If you’ve used Apache Maven, Maven Nexus, or a similar service, you will understand Helm’s purpose. Helm helps you manage your Kubernetes application. It uses "Helm Charts" to define, install, and upgrade even the most complex Kubernetes applications. Helm isn’t the only method for this; another concept becoming popular is [Kubernetes Operators][33], which are used by Red Hat OpenShift 4. - -You can try Helm by following the [quickstart guide][34] in its documentation or its [GitHub guide][15]. - Helm基本上是Kubernetes的软件包管理器。 如果您使用过Apache Maven,Maven Nexus或类似的服务,您就会理解Helm的作用。 Helm可帮助您管理Kubernetes应用程序。 它使用“Helm图”来定义,安装和升级最复杂的Kubernetes应用程序。 Helm并不是实现此功能的唯一方法; 另一个流行的概念是[Kubernetes Operators][33],它被Red Hat OpenShift 4所使用。 您可以按照其文档中的[快速开始指南][34]或[GitHub指南][15]来试用Helm。 ### Etcd -Etcd is a distributed, reliable key-value store for the most critical data in a distributed system. Its key features are: - - * Well-defined, user-facing API (gRPC) - * Automatic TLS with optional client certificate authentication - * Speed (benchmarked at 10,000 writes per second) - * Reliability (distributed using Raft) - Etcd是用于分布式系统中最关键数据的分布式的,可靠的键值存储。 其主要特性有: *定义明确的,面向用户的API(gRPC) @@ -264,21 +185,12 @@ Etcd是用于分布式系统中最关键数据的分布式的,可靠的键值 *速度(可达每秒10,000次写入) *可靠性(使用Raft实现分布式) -Etcd is used as a built-in default data storage for Kubernetes and many other technologies. That said, it is rarely run independently or as a separate service; instead, it utilizes the one integrated into Kubernetes, OKD/OpenShift, or another service. There is also an [etcd Operator][35] to manage its lifecycle and unlock its API management capabilities: - Etcd是Kubernetes和许多其他技术的默认的内置数据存储方案。也就是说,它很少独立运行或作为单独的服务运行; 相反,它利用了集成到Kubernetes,OKD / OpenShift或其他服务中的一个。 还有[etcd Operator][35]来管理其生命周期并解锁其API管理功能: -You can learn more in [etcd’s documentation][36] and access its [source code][16] on GitHub. + 您可以在[etcd文档][36]中了解更多信息,并在GitHub上访问其[源码][16]。 ### CRI-O -CRI-O is an Open Container Initiative (OCI)-compliant implementation of the Kubernetes runtime interface. CRI-O is used for various functions including: - - * Runtime using runc (or any OCI runtime-spec implementation) and OCI runtime tools - * Image management using containers/image - * Storage and management of image layers using containers/storage - * Networking support through the Container Network Interface (CNI) - CRI-O是Kubernetes运行时接口的OCI兼容实现。CRI-O用于各种功能,包括: *使用runc(或遵从OCI运行时规范的任何实现)和OCI运行时工具运行 @@ -286,12 +198,10 @@ CRI-O是Kubernetes运行时接口的OCI兼容实现。CRI-O用于各种功能, *使用容器/存储来存储和管理镜像层 *通过容器网络接口(CNI)来提供网络支持 -CRI-O provides plenty of [documentation][37], including guides, tutorials, articles, and even podcasts, and you can also access its [GitHub page][17]. CRI-O提供了大量的[文档][37],包括指南,教程,文章,甚至播客,您还可以访问其[GitHub页面][17]。 * * * -Did I miss an interesting open source cloud-native project? Please let me know in the comments. 我错过了其他有趣且开源的云原生项目吗? 请在评论中提醒我。 -------------------------------------------------------------------------------- From dcbc94795967d3d057f9c968297237edfabb0928 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Thu, 16 Apr 2020 23:02:36 +0800 Subject: [PATCH 132/394] move to translated --- .../20190814 9 open source cloud native projects to consider.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => translated/sources}/tech/20190814 9 open source cloud native projects to consider.md (97%) diff --git a/sources/tech/20190814 9 open source cloud native projects to consider.md b/translated/sources/tech/20190814 9 open source cloud native projects to consider.md similarity index 97% rename from sources/tech/20190814 9 open source cloud native projects to consider.md rename to translated/sources/tech/20190814 9 open source cloud native projects to consider.md index 14ca76e0b5..9ccb1fc0ab 100644 --- a/sources/tech/20190814 9 open source cloud native projects to consider.md +++ b/translated/sources/tech/20190814 9 open source cloud native projects to consider.md @@ -32,7 +32,7 @@ 我想说,瞧着吧!这仅仅是一个开始。正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。 -好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[** Open Containers Initiative(OCI)**][6],它是一个轻量级的,开放的治理机构(或项目),“它是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 +好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[**Open Containers Initiative(OCI)**][6],它是一个轻量级的,开放的治理机构(或项目),“它是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 除了常见的围绕云原生应用建立社区之外,CNCF还帮助项目基于其云原生应用建立结构化的管理。CNCF创建了成熟等级的概念(沙箱级,孵化级或毕业级),分别与下图中的“创新者”,“早期采用者”和“早期大量应用”相对应。 ![CNCF project maturity levels][7] From 050c0208456f2b657f86edb427d835200ddc07ca Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:11:22 +0800 Subject: [PATCH 133/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200417=2012=20L?= =?UTF-8?q?inux=20Commands=20to=20Have=20Some=20Fun=20in=20the=20Terminal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md --- ...mmands to Have Some Fun in the Terminal.md | 343 ++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md diff --git a/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md new file mode 100644 index 0000000000..9c7843ea59 --- /dev/null +++ b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -0,0 +1,343 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (12 Linux Commands to Have Some Fun in the Terminal) +[#]: via: (https://itsfoss.com/funny-linux-commands/) +[#]: author: (Community https://itsfoss.com/author/itsfoss/) + +12 Linux Commands to Have Some Fun in the Terminal +====== + +_**So, you think Linux terminal is all work and no fun? These funny Linux commands will prove you wrong.**_ + +The Linux terminal is the place to get serious work done. We have plenty of useful [linux command tips and tricks][1] to help you with that. + +But, did you know that you can have a lot of fun using the terminal? Well, if you did not, then you are not alone. Most Linux users see the terminal as an interface that is designed and built for system management and development tasks. + +However, you will be surprised to know that there are tons of [terminal based games][2] and [ASCII games][3] that you can play in the terminal. + +And, in this article, I’m going to explore some interesting, some funny and some ridiculous commands that you can type into the terminal on Linux and have fun! + +### Have some fun in Linux terminal with these commands + +![][4] + +You’ll find a lot of these commands ridiculous or useless but some of them could actually be put to some good use. + +I have added installation instructions for Ubuntu/Debian. If you are using Ubuntu-based distribution, please make sure to [enable universe repository][5] as most of these commands are not in the main repository. + +If you are using Arch, Fedora, SUSE, Solus or any other non-Ubuntu distributions, please use your distribution’s package manager to install these funny Linux commands. + +#### 1\. Run a train in the terminal + +Let’s take a ride in the locomotive and begin our auspicious journey. And I mean it literally! + +The sl command allows you to run a train in your terminal. + +![][6] + +Here’s how to install the command: + +``` +sudo apt install sl +``` + +Once done, you can simply type in the following in the terminal to get started: + +``` +sl +``` + +Impressive, isn’t it? But, hold on. We are not done yet! Apparently, you can fly your locomotive. Just add the option -F, Mr. Potter: + +``` +sl -F +``` + +****This should make the locomotive get wings to fly off from the terminal window! + +#### 2\. Add the Matrix effect to your Linux terminal + +Remember the iconic sci-fi movie [The Matrix][7]? The green text falling down on the terminal became an identity of Matrix. + +You can have this Matrix digital rain on your Linux box as well! You just need to install **cmatrix** and type it in the terminal. + +![][8] + +Installing cmatrix on Debian/Ubuntu Linux: + +``` +sudo apt install cmatrix +``` + +Now, all you have to do is type the following to get the matrix screen on terminal: + +``` +cmatrix +``` + +Press Ctrl+C to stop it, Mr. Anderson. + +**Recommended Read:** + +![][9] + +#### [Watch Star Wars In Linux Terminal via Telnet][10] + +Watch Star Wars in ASCII art Linux terminal. + +#### 3\. Let there be fire + +Keep your fire extinguisher handy because now you are going to start a fire in your terminal! + +![][11] + +To get it installed, here’s what you have to type: + +``` +sudo apt install libaa-bin +``` + +Once done start a fire in your terminal by entering: + +``` +aafire +``` + +Press Ctrl+C to stop it. + +#### 4\. Fortune ~~Cookie~~ Command + +Want to know your fortune but there are no fortune cookies around you? + +Not to worry, you just need to type “fortune” on your terminal and press enter. The terminal will display a random sentence just like you usually get in fortune cookies. + +![][12] + +Install it with: + +``` +sudo apt install fortune +``` + +Once done, simply type in the command below to know your fortune: + +``` +fortune +``` + +Now this is one of the commands here that you could actually use. You can use it as message of the day so that in a multi-user environment, all the users will see a random fortune cookie when they login. + +You may also add it to your bashrc file so that it shows you a random message as soon as you log in to the terminal. + +#### 5\. Pet lover? This is for you + +Oneko is a little fun command that will change your regular cursor into a mouse and creates a curious little cat who will chase your cursor once you move it. It’s not limited to just the terminal. You can keep on working while the cat chases the cursor. + +Now, that’s something fun to do specially if you have kids at home. + +![][13] + +Install Oneko with this command: + +``` +sudo apt install oneko +``` + +Run it with this command: + +``` +oneko +``` + +In case you want a dog instead of a cat, type: + +``` +oneko -dog +``` + +There are a few more types of cats available. You can get that information by using oneko –help. To stop it, use Ctrl+C. + +#### 6\. Little brother is watching you + +Xeyes is a tiny gui program that let the user draws a pair of ever watching eyes! It will follow your mouse cursor constantly. Run the command and see it yourself! + +![][14] + +You can install it using this command: + +``` +sudo apt install xeyes +``` + +And then use it with this: + +``` +xeyes +``` + +Press Ctrl+C to stop it. + +#### Let the terminal speak for you + +To try out this command, make sure you have turned on your speakers. [eSpeak][15] is a fun command that gives your terminal a voice. Yes, you heard that right. + +Install the package first: + +``` +sudo apt install espeak +``` + +Next, you need to simply type in the command along with a text that you want to listen as audio: + +``` +espeak "Type what your computer says" +``` + +Whatever you place in the double quotes, your computer is obligated to say! It’s like [echo command in Linux][16]. But instead of printing, it speaks. + +#### Toilet (but it has nothing to do with a washroom) + +This sounds weird, yes. But, it’s just a command that transforms a text into large ASCII characters. + +![][17] + +Install toilet with this command: + +``` +sudo apt install toilet +``` + +Once done, you just need to type in: + +``` +toilet sample text you want +``` + +I don’t know why this little program is called toilet. + +#### What does the ~~fox~~ cow say? + +Cowsay is a command that displays a cow using ASCII characters in the terminal. And by using this command you can instruct the cow to say anything you want. + +Not to be confused with any audio – it will just display a text (like you usually see in a comic book). + +![Cowsay Cowthink][18] + +Install ****cowsay: + +``` +sudo apt install cowsay +``` + +Once you have it installed, you just need to type in: + +``` +cowsay "your text" +``` + +Whatever you place in the double quotes, your cow is obligated to say! I have seen a few sysadmins using it to display the message of the day. Maybe you can do the same. You may even combine it with fortune command. + +#### Banner Command + +The banner command works just like the toilet command but it is limited to print only 10 characters at most. + +![][19] + +You can install banner command like this: + +``` +sudo apt install sysvbanner +``` + +Then use it in the following way: + +``` +banner "Welcome" +``` + +Replace content in the double quotes and you shall have your desired text displayed. + +#### Yes command + +![][20] + +The “yes” command helps you to loop an automated response until you terminate the command. This command will print the exact same thing indefinitely. If you want to produce huge amounts of junk text fast, then this command will work like a charm. + +You may also use it to provide a yes to a command (if it prompts for it). For example, the apt upgrade command asks for your confirmation, you can use it like this: + +``` +yes | sudo apt upgrade +``` + +You don’t need to install any package for it. Yes command is already available. + +Terminate the yes command loop, simply press **CTRL + C**. + +#### Get a new identity, well, sort of + +Want to generate a random fake identity? I give you the command “rig”. Once you place this in the terminal, it will generate a fake identity. + +![][21] + +Install rig with this command: + +``` +sudo apt install rig +``` + +Then simply type this: + +``` +rig +``` + +It may be used in scripts or web-apps that displays random information but I haven’t done anything of that sort on my own. + +**Wrapping Up** + +I hope you liked this list of fun Linux commands. Which command do you like the most here? Do you know some other such amusing commands? Do share it with us in the comment section. + +![][22] + +### Srimanta Koley + +A passionate writer, a distrohopper and an open source enthusiast, Srimanta is extremely fond of everything related to technology. He loves to read books and has an unhealthy addiction to the 90s! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/funny-linux-commands/ + +作者:[Community][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/itsfoss/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-command-tricks/ +[2]: https://itsfoss.com/best-command-line-games-linux/ +[3]: https://itsfoss.com/best-ascii-games/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fun-linux-commands.png?ssl=1 +[5]: https://itsfoss.com/ubuntu-repositories/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sl-command.jpg?ssl=1 +[7]: https://en.wikipedia.org/wiki/The_Matrix +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/matrix-screen-command.png?ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png?fit=732%2C462&ssl=1 +[10]: https://itsfoss.com/star-wars-linux/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fire-command.png?ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fortune-command.jpg?ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/oneko-command.jpg?ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/xeyes-command.jpg?ssl=1 +[15]: https://itsfoss.com/espeak-text-speech-linux/ +[16]: https://linuxhandbook.com/echo-command/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/toilet-command.jpg?ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cowsay-cowthink.jpg?ssl=1 +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/banner-command.jpg?ssl=1 +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/yes-yourtext.jpg?ssl=1 +[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/rig-command.jpg?ssl=1 +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1 From 279fbcac788246a9eef75e3724995b743d7c6dd0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:12:54 +0800 Subject: [PATCH 134/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200416=20State?= =?UTF-8?q?=20of=20software=20engineering,=20JavaScript=20is=20the=20futur?= =?UTF-8?q?e,=20and=20more=20industry=20trends?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md --- ...is the future, and more industry trends.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md diff --git a/sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md b/sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md new file mode 100644 index 0000000000..201d0242e8 --- /dev/null +++ b/sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md @@ -0,0 +1,53 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (State of software engineering, JavaScript is the future, and more industry trends) +[#]: via: (https://opensource.com/article/20/4/state-software-engineering-javascript-and-more-industry-trends) +[#]: author: (Tim Hildred https://opensource.com/users/thildred) + +State of software engineering, JavaScript is the future, and more industry trends +====== +A weekly look at open source community and industry trends. +![Person standing in front of a giant computer screen with numbers, data][1] + +As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. + +## [State of Software Engineering in 2020][2] + +> Software is moving fast, and it is fusing into all other areas of industry. As it is a growing field, learning to program and improving your skills in software engineering can have get you great returns in the future. Moreover, identifying the fastest growing areas of software and investing your time into them can get you to even better places. Keep learning and try to find opportunities that you can capitalize on or products that can serve a niche in a growing field of software. When that niche becomes mainstream, you can end up with a successful product in your hands, which can become your future success. If it fails, it will be an immense experience on the path to becoming a product person. + +**The impact**: Learn COBOL, see the world! + +## [Why JavaScript is the programming language of the future][3] + +> JavaScript has one of the most mature – if not THE most mature – ecosystems a programming language could ever have. The community for JavaScript is vast, and the entry barrier is extremely low. + +**The impact**: The only knowledge I have of the veracity of this statement comes from the JavaScript people I follow on Twitter. If you can indeed extrapolate from them, then JavaScript has a pretty good shot. + +## [Why Linux containers are a CIO's best friend][4] + +> "A big take-away for CIOs is that fit enterprises increasingly view IT as a point of leverage for the business. Having a clear and consistent overall business strategy ranks as one of the most distinctive traits of fit enterprises," said Gartner VP and Distinguished Analyst Andy Roswell-Jones, in Gartner's report on the survey. "In such organizations, digital technology will drive that strategy." + +**The impact**: Point of leverage meaning that if the IT an organization is selected in reference to and in support of that organization's overall strategy there will be an outsized lift on execution against that strategy. The corollary is that without a clear and consistent business strategy no technology can save your enterprise. + +_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/state-software-engineering-javascript-and-more-industry-trends + +作者:[Tim Hildred][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/thildred +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) +[2]: https://quanticdev.com/articles/software-engineering-in-2020/ +[3]: https://www.freecodecamp.org/news/future-of-javascript/ +[4]: https://www.ciodive.com/news/linux-containers-kubernetes/575506/ From 29818d3a952bd11be4c63c86ae159a2c126b860d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:13:58 +0800 Subject: [PATCH 135/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200416=20Learni?= =?UTF-8?q?ng=20to=20love=20systemd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200416 Learning to love systemd.md --- .../tech/20200416 Learning to love systemd.md | 328 ++++++++++++++++++ 1 file changed, 328 insertions(+) create mode 100644 sources/tech/20200416 Learning to love systemd.md diff --git a/sources/tech/20200416 Learning to love systemd.md b/sources/tech/20200416 Learning to love systemd.md new file mode 100644 index 0000000000..0aa8609ee7 --- /dev/null +++ b/sources/tech/20200416 Learning to love systemd.md @@ -0,0 +1,328 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Learning to love systemd) +[#]: via: (https://opensource.com/article/20/4/systemd) +[#]: author: (David Both https://opensource.com/users/dboth) + +Learning to love systemd +====== +systemd is the mother of all processes, responsible for bringing the +Linux host up to a state where productive work can be done. +![Penguin driving a car with a yellow background][1] + +systemd—yes, all lower-case, even at the beginning of a sentence—is the modern replacement for init and SystemV init scripts. It is also much more. + +Like most sysadmins, when I think of the init program and SystemV, I think of Linux startup and shutdown and not really much else, like managing services once they are up and running. Like init, systemd is the mother of all processes, and it is responsible for bringing the Linux host up to a state in which productive work can be done. Some of the functions assumed by systemd, which is far more extensive than the old init program, are to manage many aspects of a running Linux host, including mounting filesystems, managing hardware, handling timers, and starting and managing the system services that are required to have a productive Linux host. + +This series of articles, which is based in part on excerpts from my three-volume Linux training course, [_Using and administering Linux: zero to sysadmin_][2], explores systemd's functions both at startup and beginning after startup finishes. + +### Linux boot + +The complete process that takes a Linux host from an off state to a running state is complex, but it is open and knowable. Before getting into the details, I'll give a quick overview from when the host hardware is turned on until the system is ready for a user to log in. Most of the time, "the boot process" is discussed as a single entity, but that is not accurate. There are, in fact, three major parts to the full boot and startup process: + + * **Hardware boot:** Initializes the system hardware + * **Linux boot:** Loads the Linux kernel and then systemd + * **Linux startup:** Where systemd prepares the host for productive work + + + +The Linux startup sequence begins after the kernel has loaded either init or systemd, depending upon whether the distribution uses the old or new startup, respectively. The init and systemd programs start and manage all the other processes and are both known as the "mother of all processes" on their respective systems. + +It is important to separate the hardware boot from the Linux boot from the Linux startup and to explicitly define the demarcation points between them. Understanding these differences and what part each plays in getting a Linux system to a state where it can be productive makes it possible to manage these processes and better determine where a problem is occurring during what most people refer to as "boot." + +The startup process follows the three-step boot process and brings the Linux computer up to an operational state in which it is usable for productive work. The startup process begins when the kernel transfers control of the host to systemd. + +### systemd controversy + +systemd can evoke a wide range of reactions from sysadmins and others responsible for keeping Linux systems up and running. The fact that systemd is taking over so many tasks in many Linux systems has engendered pushback and discord among certain groups of developers and sysadmins. + +SystemV and systemd are two different methods of performing the Linux startup sequence. SystemV start scripts and the init program are the old methods, and systemd using targets is the new method. Although most modern Linux distributions use the newer systemd for startup, shutdown, and process management, there are still some that do not. One reason is that some distribution maintainers and some sysadmins prefer the older SystemV method over the newer systemd. + +I think both have advantages. + +#### Why I prefer SystemV + +I prefer SystemV because it is more open. Startup is accomplished using Bash scripts. After the kernel starts the init program, which is a compiled binary, init launches the **rc.sysinit** script, which performs many system initialization tasks. After **rc.sysinit** completes, init launches the **/etc/rc.d/rc** script, which in turn starts the various services defined by the SystemV start scripts in the **/etc/rc.d/rcX.d**, where "X" is the number of the runlevel being started. + +Except for the init program itself, all these programs are open and easily knowable scripts. It is possible to read through these scripts and learn exactly what is taking place during the entire startup process, but I don't think many sysadmins actually do that. Each start script is numbered so that it starts its intended service in a specific sequence. Services are started serially, and only one service starts at a time. + +systemd, developed by Red Hat's Lennart Poettering and Kay Sievers, is a complex system of large, compiled binary executables that are not understandable without access to the source code. It is open source, so "access to the source code" isn't hard, just less convenient. systemd appears to represent a significant refutation of multiple tenets of the Linux philosophy. As a binary, systemd is not directly open for the sysadmin to view or make easy changes. systemd tries to do everything, such as managing running services, while providing significantly more status information than SystemV. It also manages hardware, processes, and groups of processes, filesystem mounts, and much more. systemd is present in almost every aspect of the modern Linux host, making it the one-stop tool for system management. All of this is a clear violation of the tenets that programs should be small and that each program should do one thing and do it well. + +#### Why I prefer systemd + +I prefer systemd as my startup mechanism because it starts as many services as possible in parallel, depending upon the current stage in the startup process. This speeds the overall startup and gets the host system to a login screen faster than SystemV. + +systemd manages almost every aspect of a running Linux system. It can manage running services while providing significantly more status information than SystemV. It also manages hardware, processes and groups of processes, filesystem mounts, and much more. systemd is present in almost every aspect of the modern Linux operating system, making it the one-stop tool for system management. (Does this sound familiar?) + +The systemd tools are compiled binaries, but the tool suite is open because all the configuration files are ASCII text files. Startup configuration can be modified through various GUI and command-line tools, as well as adding or modifying various configuration files to suit the needs of the specific local computing environment. + +#### The real issue + +Did you think I could not like both startup systems? I do, and I can work with either one. + +In my opinion, the real issue and the root cause of most of the controversy between SystemV and systemd is that there is [no choice][3] on the sysadmin level. The choice of whether to use SystemV or systemd has already been made by the developers, maintainers, and packagers of the various distributions—but with good reason. Scooping out and replacing an init system, by its extreme, invasive nature, has a lot of consequences that would be hard to tackle outside the distribution design process. + +Despite the fact that this choice is made for me, my Linux hosts boot up and work, which is what I usually care the most about. As an end user and even as a sysadmin, my primary concern is whether I can get my work done, work such as writing my books and this article, installing updates, and writing scripts to automate everything. So long as I can do my work, I don't really care about the start sequence used on my distro. + +I do care when there is a problem during startup or service management. Regardless of which startup system is used on a host, I know enough to follow the sequence of events to find the failure and fix it. + +#### Replacing SystemV + +There have been previous attempts at replacing SystemV with something a bit more modern. For about two releases, Fedora used a thing called Upstart to replace the aging SystemV, but it did not replace init and provided no changes that I noticed. Because Upstart provided no significant changes to the issues surrounding SystemV, efforts in this direction were quickly dropped in favor of systemd. + +Despite the fact that most Linux developers agree that replacing the old SystemV startup is a good idea, many developers and sysadmins dislike systemd for that. Rather than rehash all the so-called issues that people have—or had—with systemd, I will refer you to two good, if somewhat old, articles that should cover most everything. Linus Torvalds, the creator of the Linux kernel, seems disinterested. In a 2014 ZDNet article, _[Linus Torvalds and others on Linux's systemd][4]_, Linus is clear about his feelings. + +> "I don't actually have any particularly strong opinions on systemd itself. I've had issues with some of the core developers that I think are much too cavalier about bugs and compatibility, and I think some of the design details are insane (I dislike the binary logs, for example), but those are details, not big issues." + +In case you don't know much about Linus, I can tell you that if he does not like something, he is very outspoken, explicit, and quite clear about that dislike. He has become more socially acceptable in his manner of addressing his dislike about things. + +In 2013, Poettering wrote a long blog post in which he debunks the [myths about systemd][5] while providing insight into some of the reasons for creating it. This is a very good read, and I highly recommend it. + +### systemd tasks + +Depending upon the options used during the compile process (which are not considered in this series), systemd can have as many as 69 binary executables that perform the following tasks, among others: + + * The systemd program runs as PID 1 and provides system startup of as many services in parallel as possible, which, as a side effect, speeds overall startup times. It also manages the shutdown sequence. + * The systemctl program provides a user interface for service management. + * Support for SystemV and LSB start scripts is offered for backward compatibility. + * Service management and reporting provide more service status data than SystemV. + * It includes tools for basic system configuration, such as hostname, date, locale, lists of logged-in users, running containers and virtual machines, system accounts, runtime directories and settings, daemons to manage simple network configuration, network time synchronization, log forwarding, and name resolution. + * It offers socket management. + * systemd timers provide advanced cron-like capabilities to include running a script at times relative to system boot, systemd startup, the last time the timer was started, and more. + * It provides a tool to analyze dates and times used in timer specifications. + * Mounting and unmounting of filesystems with hierarchical awareness allows safer cascading of mounted filesystems. + * It enables the positive creation and management of temporary files, including deletion. + * An interface to D-Bus provides the ability to run scripts when devices are plugged in or removed. This allows all devices, whether pluggable or not, to be treated as plug-and-play, which considerably simplifies device handling. + * Its tool to analyze the startup sequence can be used to locate the services that take the most time. + * It includes journals for storing system log messages and tools for managing the journals. + + + +### Architecture + +Those tasks and more are supported by a number of daemons, control programs, and configuration files. Figure 1 shows many of the components that belong to systemd. This is a simplified diagram designed to provide a high-level overview, so it does not include all of the individual programs or files. Nor does it provide any insight into data flow, which is so complex that it would be a useless exercise in the context of this series of articles. + +![systemd architecture][6] + +A full exposition of systemd would take a book on its own. You do not need to understand the details of how the systemd components in Figure 1 fit together; it's enough to know about the programs and components that enable managing various Linux services and deal with log files and journals. But it's clear that systemd is not the monolithic monstrosity it is purported to be by some of its critics. + +### systemd as PID 1 + +systemd is PID 1. Some of its functions, which are far more extensive than the old SystemV3 init program, are to manage many aspects of a running Linux host, including mounting filesystems and starting and managing system services required to have a productive Linux host. Any of systemd's tasks that are not related to the startup sequence are outside the scope of this article (but some will be explored later in this series). + +First, systemd mounts the filesystems defined by **/etc/fstab**, including any swap files or partitions. At this point, it can access the configuration files located in **/etc**, including its own. It uses its configuration link, **/etc/systemd/system/default.target**, to determine which state or target it should boot the host into. The **default.target** file is a symbolic link to the true target file. For a desktop workstation, this is typically going to be the **graphical.target**, which is equivalent to runlevel 5 in SystemV. For a server, the default is more likely to be the **multi-user.target**, which is like runlevel 3 in SystemV. The **emergency.target** is similar to single-user mode. Targets and services are systemd units. + +The table below (Figure 2) compares the systemd targets with the old SystemV startup runlevels. systemd provides the systemd target aliases for backward compatibility. The target aliases allow scripts—and many sysadmins—to use SystemV commands like **init 3** to change runlevels. Of course, the SystemV commands are forwarded to systemd for interpretation and execution. + +**systemd targets** | **SystemV runlevel** | **target aliases** | **Description** +---|---|---|--- +default.target | | | This target is always aliased with a symbolic link to either **multi-user.target** or **graphical.target**. systemd always uses the **default.target** to start the system. The **default.target** should never be aliased to **halt.target**, **poweroff.target**, or **reboot.target**. +graphical.target | 5 | runlevel5.target | **Multi-user.target** with a GUI +| 4 | runlevel4.target | Unused. Runlevel 4 was identical to runlevel 3 in the SystemV world. This target could be created and customized to start local services without changing the default **multi-user.target**. +multi-user.target | 3 | runlevel3.target | All services running, but command-line interface (CLI) only +| 2 | runlevel2.target | Multi-user, without NFS, but all other non-GUI services running +rescue.target | 1 | runlevel1.target | A basic system, including mounting the filesystems with only the most basic services running and a rescue shell on the main console +emergency.target | S | | Single-user mode—no services are running; filesystems are not mounted. This is the most basic level of operation with only an emergency shell running on the main console for the user to interact with the system. +halt.target | | | Halts the system without powering it down +reboot.target | 6 | runlevel6.target | Reboot +poweroff.target | 0 | runlevel0.target | Halts the system and turns the power off + +Each target has a set of dependencies described in its configuration file. systemd starts the required dependencies, which are the services required to run the Linux host at a specific level of functionality. When all the dependencies listed in the target configuration files are loaded and running, the system is running at that target level. In Figure 2, the targets with the most functionality are at the top of the table, with functionality declining towards the bottom of the table. + +systemd also looks at the legacy SystemV init directories to see if any startup files exist there. If so, systemd uses them as configuration files to start the services described by the files. The deprecated network service is a good example of one that still uses SystemV startup files in Fedora. + +Figure 3 (below) is copied directly from the bootup man page. It shows a map of the general sequence of events during systemd startup and the basic ordering requirements to ensure a successful startup. + + +``` +                                         cryptsetup-pre.target +                                                   | + (various low-level                                v +     API VFS mounts:                 (various cryptsetup devices...) +  mqueue, configfs,                                |    | +  debugfs, ...)                                    v    | +  |                                  cryptsetup.target  | +  |  (various swap                                 |    |    remote-fs-pre.target +  |   devices...)                                  |    |     |        | +  |    |                                           |    |     |        v +  |    v                       local-fs-pre.target |    |     |  (network file systems) +  |  swap.target                       |           |    v     v                 | +  |    |                               v           |  remote-cryptsetup.target  | +  |    |  (various low-level  (various mounts and  |             |              | +  |    |   services: udevd,    fsck services...)   |             |    remote-fs.target +  |    |   tmpfiles, random            |           |             |             / +  |    |   seed, sysctl, ...)          v           |             |            / +  |    |      |                 local-fs.target    |             |           / +  |    |      |                        |           |             |          / +  \\____|______|_______________   ______|___________/             |         / +                              \ /                                |        / +                               v                                 |       / +                        sysinit.target                           |      / +                               |                                 |     / +        ______________________/|\\_____________________           |    / +       /              |        |      |               \          |   / +       |              |        |      |               |          |  / +       v              v        |      v               |          | / +  (various       (various      |  (various            |          |/ +   timers...)      paths...)   |   sockets...)        |          | +       |              |        |      |               |          | +       v              v        |      v               |          | + timers.target  paths.target   |  sockets.target      |          | +       |              |        |      |               v          | +       v              \\_______ | _____/         rescue.service   | +                              \|/                     |          | +                               v                      v          | +                           basic.target         rescue.target    | +                               |                                 | +                       ________v____________________             | +                      /              |              \            | +                      |              |              |            | +                      v              v              v            | +                  display-    (various system   (various system  | +              manager.service     services        services)      | +                      |         required for        |            | +                      |        graphical UIs)       v            v +                      |              |            multi-user.target + emergency.service    |              |              | +         |            \\_____________ | _____________/ +         v                          \|/ + emergency.target                    v +                              graphical.target +``` + +The **sysinit.target** and **basic.target** targets can be considered checkpoints in the startup process. Although one of systemd's design goals is to start system services in parallel, certain services and functional targets must be started before other services and targets can start. These checkpoints cannot be passed until all of the services and targets required by that checkpoint are fulfilled. + +The **sysinit.target** is reached when all of the units it depends on are completed. All of those units, mounting filesystems, setting up swap files, starting udev, setting the random generator seed, initiating low-level services, and setting up cryptographic services (if one or more filesystems are encrypted), must be completed but, within the **sysinit.target**, those tasks can be performed in parallel. + +The **sysinit.target** starts up all of the low-level services and units required for the system to be marginally functional and that are required to enable moving onto the **basic.target**. + +After the **sysinit.target** is fulfilled, systemd then starts all the units required to fulfill the next target. The basic target provides some additional functionality by starting units that are required for all of the next targets. These include setting up things like paths to various executable directories, communication sockets, and timers. + +Finally, the user-level targets, **multi-user.target** or **graphical.target**, can be initialized. The **multi-user.target** must be reached before the graphical target dependencies can be met. The underlined targets in Figure 3 are the usual startup targets. When one of these targets is reached, startup has completed. If the **multi-user.target** is the default, then you should see a text-mode login on the console. If **graphical.target** is the default, then you should see a graphical login; the specific GUI login screen you see depends on your default display manager. + +The bootup man page also describes and provides maps of the boot into the initial RAM disk and the systemd shutdown process. + +systemd also provides a tool that lists dependencies of a complete startup or for a specified unit. A unit is a controllable systemd resource entity that can range from a specific service, such as httpd or sshd, to timers, mounts, sockets, and more. Try the following command and scroll through the results. + + +``` +`systemctl list-dependencies graphical.target` +``` + +Notice that this fully expands the top-level target units list required to bring the system up to the graphical target run mode. Use the **\--all** option to expand all of the other units as well. + + +``` +`systemctl list-dependencies --all graphical.target` +``` + +You can search for strings such as "target," "slice," and "socket" using the search tools of the **less** command. + +So now, try the following. + + +``` +`systemctl list-dependencies multi-user.target` +``` + +and + + +``` +`systemctl list-dependencies rescue.target` +``` + +and + + +``` +`systemctl list-dependencies local-fs.target` +``` + +and + + +``` +`systemctl list-dependencies dbus.service` +``` + +This tool helps me visualize the specifics of the startup dependencies for the host I am working on. Go ahead and spend some time exploring the startup tree for one or more of your Linux hosts. But be careful because the systemctl man page contains this note: + +> _"Note that this command only lists units currently loaded into memory by the service manager. In particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a specific unit, as it won't list the dependencies declared by units currently not loaded."_ + +### Final thoughts + +Even before getting very deep into systemd, it's obvious that it is both powerful and complex. It is also apparent that systemd is not a single, huge, monolithic, and unknowable binary file. Rather, it is composed of a number of smaller components and subcommands that are designed to perform specific tasks. + +The next article in this series will explore systemd startup in more detail, as well as systemd configuration files, changing the default target, and how to create a simple service unit. + +### Resources + +There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. + + * The Fedora Project has a good, practical [guide][7] [to systemd][7]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. + * The Fedora Project also has a good [cheat sheet][8] that cross-references the old SystemV commands to comparable systemd ones. + * For detailed technical information about systemd and the reasons for creating it, check out [Freedesktop.org][9]'s [description of systemd][10]. + * [Linux.com][11]'s "More systemd fun" offers more advanced systemd [information and tips][12]. + + + +There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. + + * [Rethinking PID 1][13] + * [systemd for Administrators, Part I][14] + * [systemd for Administrators, Part II][15] + * [systemd for Administrators, Part III][16] + * [systemd for Administrators, Part IV][17] + * [systemd for Administrators, Part V][18] + * [systemd for Administrators, Part VI][19] + * [systemd for Administrators, Part VII][20] + * [systemd for Administrators, Part VIII][21] + * [systemd for Administrators, Part IX][22] + * [systemd for Administrators, Part X][23] + * [systemd for Administrators, Part XI][24] + + + +Alison Chiaken, a Linux kernel and systems programmer at Mentor Graphics, offers a preview of her... + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/systemd + +作者:[David Both][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/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) +[2]: http://www.both.org/?page_id=1183 +[3]: http://www.osnews.com/story/28026/Editorial_Thoughts_on_Systemd_and_the_Freedom_to_Choose +[4]: https://www.zdnet.com/article/linus-torvalds-and-others-on-linuxs-systemd/ +[5]: http://0pointer.de/blog/projects/the-biggest-myths.html +[6]: https://opensource.com/sites/default/files/uploads/systemd-architecture.png (systemd architecture) +[7]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html +[8]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet +[9]: http://Freedesktop.org +[10]: http://www.freedesktop.org/wiki/Software/systemd +[11]: http://Linux.com +[12]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ +[13]: http://0pointer.de/blog/projects/systemd.html +[14]: http://0pointer.de/blog/projects/systemd-for-admins-1.html +[15]: http://0pointer.de/blog/projects/systemd-for-admins-2.html +[16]: http://0pointer.de/blog/projects/systemd-for-admins-3.html +[17]: http://0pointer.de/blog/projects/systemd-for-admins-4.html +[18]: http://0pointer.de/blog/projects/three-levels-of-off.html +[19]: http://0pointer.de/blog/projects/changing-roots +[20]: http://0pointer.de/blog/projects/blame-game.html +[21]: http://0pointer.de/blog/projects/the-new-configuration-files.html +[22]: http://0pointer.de/blog/projects/on-etc-sysinit.html +[23]: http://0pointer.de/blog/projects/instances.html +[24]: http://0pointer.de/blog/projects/inetd.html From 1b48e650b8c40af6524808fe2e1608825cf7aec5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:14:44 +0800 Subject: [PATCH 136/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200416=20How=20?= =?UTF-8?q?I've=20adjusted=20my=20work-from-home=20habits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200416 How I-ve adjusted my work-from-home habits.md --- ... I-ve adjusted my work-from-home habits.md | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 sources/tech/20200416 How I-ve adjusted my work-from-home habits.md diff --git a/sources/tech/20200416 How I-ve adjusted my work-from-home habits.md b/sources/tech/20200416 How I-ve adjusted my work-from-home habits.md new file mode 100644 index 0000000000..251e9a7b9e --- /dev/null +++ b/sources/tech/20200416 How I-ve adjusted my work-from-home habits.md @@ -0,0 +1,86 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I've adjusted my work-from-home habits) +[#]: via: (https://opensource.com/article/20/4/healthy-remote-work-habits) +[#]: author: (Will Kelly https://opensource.com/users/willkelly) + +How I've adjusted my work-from-home habits +====== +WFH newbs and veterans alike have to adjust to self-quarantine; here's +how to maintain some balance. +![Oatmeal and a laptop.][1] + +I've been a remote worker during various chapters in my career, and have tried to carry those lessons into each new remote work experience. At the end of last year, I switched to a job that lets me work from home. Fast forward to the COVID-19 outbreak; even though I was no WFH novice, I found myself having to adapt just like the many other workers who've been suddenly thrust into remote work. + +In hopes of easing that transition, here are some healthy remote work habits to adapt during a pandemic. + +### Keep exercising even if your gym is closed + +I watched the crowd in my gym dwindle the week before my state government issued its stay at home orders. Whether I've been working in an office or at home, going to the gym helps me vent stress, plus it acts as a logical break in my daily routine because I put down my phone and keyboard to clear my head. + +Fortunately, my gym put some training activities online that I plan to use. I already have a stability ball and Bosu ball in my home office that I began using on day three after the pandemic closed all the offices, schools, and later gyms in my local area. As I write this article, I'm entering week 4 of COVID-19-mandated remote work, and I'm still trying to get back to the exercise dedication and momentum I had before this all happened. + +### Dress (and groom) yourself for work + +I've worked from home on and off during my career. When I started my new job, I decided not to repeat some mistakes I made during the last time I worked from home. One mistake I made was not shaving every day. I also stopped getting dressed for work. + +When you dress and groom yourself for work every day, it can help put you in focus for work. You don't have to be too strict; it is a pandemic after all. I'm still debating on sweatpants Fridays during this crisis. + +### Eat meals away from your desk + +It's too easy to just eat meals at your desk when you work at home. Many even do it at the office. I recommend as you get through your COVID-19-enforced remote working that you use eating as a natural break in the ebbs and flows of your day. For example, unless a deadline was calling, I would go out to lunch to break up my remote working days. These days I get up from my desk, walk outside to get a breath of fresh air and have lunch in my living room. + +### Keep a schedule and track your progress + +It's easy to sleep in when you don't have to go to the office. I recommend trying to keep to your regular schedule as much as possible. It's admittedly easy for me to say that because I live alone. If you're home with children, work with your employer to time-shift your schedule to accommodate the added responsibilities and other challenges you're facing right now. It may take a few iterations to get the right schedule, but you'll appreciate the consistency. + +Another word about keeping a schedule—you might add important work meetings to your personal calendar or as reminders on your mobile device, so you have another reminder as you adjust to the new normal of COVID-19. + +The open source community has a lot of great scheduling and project management tools that you can use to track your own time and progress. There are [project management tools][2] for agile development teams. You can also find open source alternatives to [Googl][3][e Calendar][3] available on Android. + +### Put backup communications channels in place + +Even companies with robust telework programs may see some communications outages. It may not even be their CIO's fault, such as the Microsoft Teams outage that happened in Europe early on during the COVID-19 pandemic. + +Having problems dialing into a conference bridge or your employer's group chat having sporadic issues will surprise nobody right now; most understand that workers are in a period of transition, and not everything will run smoothly. However, you still need to have backup channels in place to make that communication happen, even if it's just coworkers exchanging cell numbers so they can text or call each other as needed. + +There are some fully-featured open source [Slack alternatives][4] available that are worth exploring if your organization is lacking in chat applications or if you want to give your team a backup channel to your official corporate application. (Whether you do it with the approval of your corporate IT department is up to you). + +You should also consider installing implementing [MediaWiki][5] or [Twiki][6] to improve collaboration or to give your team an accessible document repository. + +### Pivot on communications when needed + +Every company where I've been an employee or contractor has had its own communications style. Remote working at scale during the COVID-19 epidemic will challenge those communication styles. + +Be prepared to shake up your communication style, whether you're a newb or long term remote worker. That could mean writing more detailed emails instead of the terse ones you normally send to becoming more of a power user with your company's group chat tool. There are also the open source wikis I mentioned earlier that can provide you a centralized platform for any long-form writing you need to do to help communicate project requirements and changes. + +I also extend this advice to your personal communications during the workday. For example, a friend and I video conference during the day. We never did that pre-COVID-19. + +### Final thoughts + +Lots of people will evolve and rethink their remote work habits. It's only healthy that you prepare yourself for adjusting your own remote working habits. What worked for me pre-COVID-19 doesn't necessarily work right now, so I'm adjusting my remote work habits weekly as I see fit so I can maximize my productivity during the current crisis. + +How are you adjusting your remote work habits during self-quarantine? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/healthy-remote-work-habits + +作者:[Will Kelly][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/willkelly +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/oatmeal-and-fedora.jpg?itok=NBFUH9eF (Oatmeal and a laptop.) +[2]: https://opensource.com/article/18/2/agile-project-management-tools +[3]: https://www.androidpolice.com/2019/12/30/the-best-free-and-open-source-alternatives-to-google-calendar-on-android/ +[4]: https://opensource.com/alternatives/slack +[5]: http://www.mediawiki.org/ +[6]: http://www.twiki.org/ From b44c6d4d305caf20295ee449f807dba2d686adec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:15:32 +0800 Subject: [PATCH 137/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200416=20How=20?= =?UTF-8?q?to=20package=20Python=20applications=20for=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200416 How to package Python applications for Linux.md --- ...o package Python applications for Linux.md | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) create mode 100644 sources/tech/20200416 How to package Python applications for Linux.md diff --git a/sources/tech/20200416 How to package Python applications for Linux.md b/sources/tech/20200416 How to package Python applications for Linux.md new file mode 100644 index 0000000000..24e8343038 --- /dev/null +++ b/sources/tech/20200416 How to package Python applications for Linux.md @@ -0,0 +1,179 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to package Python applications for Linux) +[#]: via: (https://opensource.com/article/20/4/package-python-applications-linux) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +How to package Python applications for Linux +====== +Learn how to use dh_virtualenv to make your Python applications +installable as .deb packages. +![Python in a tree][1] + +One way to make Python applications installable on Debian-based operating systems (such as Debian or [Elementary OS][2]) is by using the [dh_virtualenv][3] tool. It builds a **.deb** package that wraps a Python virtual environment around an application and deploys it upon installing. + +In this article, I will explain how to use it with the example of building a package containing the [HTTPie][4] tool to test HTTP APIs from the command line without having to activate a virtual environment. + +### Packaging with dh_virtualenv + +First, you need to install the tools that dh_virtualenv needs. dh_virtualenv's [documentation][5] provides all of the installation options. On my Debian-based system, I entered: + + +``` +`apt-get install dh-virtualenv devscripts` +``` + +While the [devscripts][6] package is not required, it will simplify doing the subsequent operations. + +Now, create a directory to keep the sources. Since this is a local, unofficial, packaging of HTTPie, I called it **myhttp**. Next, let's create some files inside **myhttp** to provide metadata to the Debian build system. + +First, create the **debian/control** file: + + +``` +Source: myhttp +Section: python +Priority: extra +Maintainer: Jan Doe <[jandoe@example.org][7]> +Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8) +Standards-Version: 3.9.5 + +Package: myhttp +Architecture: any +Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends} +Depends: ${misc:Depends} +Description: http client + Useful for doing stuff +``` + +So what is all this information about? As the [Debian documentation][8] puts it: + +> "Lines 1–7 are the control information for the source package. Lines 9–13 are the control information for the binary package." + +Here's my take: + + * the **section** value is mostly meaningless for our case, but needs to be there. It's meaningful to provide information to the guided UI installer, which is not relevant for this package. + * The extra **Priority** value is the right priority for 3rd party packages like this one. + * It is highly recommended to put real contact details in the **Maintainer** field. It does not have to be your personal e-mail, though -- "Infrastructure Team <[infra-team-list@company.example.com][9]>", for example, if the package is maintained by the team and you would like issues to be sent to the team's mail alias. + * The **build-depends** field indicates that you need debhelper, python, and dh-virtualenv to build the package: the package build process will make sure those dependencies are installed at package build time. + * The **standards version** is mostly for human consumption. It indicates which guide you are following. This guide is based on the official documentation of dh-virtualenv, which is based on the 3.9.5 guide from Debian. It is almost always the best choice to name the binary package and the source package the same. + * The **Architecture** field should be **Any** because a virtual environment might include some architecture-specific files: otherwise, the field would be better chosen as **all**. + * Keep the **pre-depends** list as-is: pre-depends is a pretty strict form of dependencies, and it is rare that you need anything more than the minimum suggested here. The dependencies are usually calculated accurately by the build system, so there is no reason to specify them manually. + * If your package is mostly for internal use, then the **Description** might only specify minimal information and a link to the company wiki; otherwise, more details might be useful. + + + +Then create the **debian/compat** file, which [exists mostly for historical purposes][10]: + + +``` +`$ echo "9" > debian/compat` +``` + +Next, create the changelog to tell package users what has changed since the last release. The easiest way is to use **dch --create** to create a template and then fill in the values. + +Filled in, it looks like: + + +``` +myhttp (2.0.0-1) stable; urgency=medium + +  * Initial release. + + -- Jan Doe <[jandoe@example.org][7]>  Fri, 27 Mar 2020 01:09:22 +0000 +``` + +Now you need to tell the tool to install HTTPie, but which version? + +Create a **requirements.in** file that has loose versions: + + +``` +`httpie` +``` + +In general, the loose requirements file will only contain direct dependencies of your project and will specify minimum versions if needed. It is not always necessary to specify the minimum versions: the tools are usually biased towards tightening the dependencies towards "latest version possible". In the case where your Debian package corresponds to one internal Python package, a common case in internal applications, the loose requirements file will look similar: just one line with the name of the package. + +Then use **pip-compile** (which is available by installing the PyPI package **pip-tools**): + + +``` +`$ pip-compile requirements.in > requirements.txt` +``` + +This will produce a strict dependency file called **requirements.txt**: + + +``` +# +# This file is autogenerated by pip-compile +# To update, run: +# +#    pip-compile requirements.in +# +certifi==2019.11.28       # via requests +chardet==3.0.4            # via requests +httpie==2.0.0             # via -r requirements.in +idna==2.9                 # via requests +pygments==2.6.1           # via httpie +requests==2.23.0          # via httpie +urllib3==1.25.8           # via requests +``` + +Finally, write a **debian/rules** file for creating the package. Since dh_virtualenv does all the hard work, the rules file is simple: + + +``` +#!/usr/bin/make -f + +%: +        dh $@ --with python-virtualenv --python /usr/bin/python3.7 +``` + +Be sure to specify the Python interpreter. By default, it will use the interpreter in **/usr/bin/python**, which is Python 2, but you should use a [supported version of Python][11]. + +The writing is finished; all that's left is to build the package: + + +``` +`$ debuild -b -us -uc` +``` + +This will produce a file in the parent directory with a name like **myhttp_2.0.0-1_amd64.deb**. This file can be installed on any compatible operating system. + +In general, it's best to build Debian packages that are intended for a specific platform, such as Debian 10.0, on the same platform. + +You can store this Debian package in a repository and install it on all relevant systems with, for example, [Ansible][12]. + +### Conclusion + +Packaging applications for Debian-based operating systems is a multi-step process. Using dh_virtualenv will make the process straightforward. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/package-python-applications-linux + +作者:[Moshe Zadka][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/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-python.jpg?itok=F2PYP2wT (Python in a tree) +[2]: https://opensource.com/article/19/12/pantheon-linux-desktop +[3]: https://dh-virtualenv.readthedocs.io/en/latest/ +[4]: https://opensource.com/article/19/8/getting-started-httpie +[5]: https://dh-virtualenv.readthedocs.io/en/1.1/tutorial.html +[6]: http://man.he.net/man1/devscripts +[7]: mailto:jandoe@example.org +[8]: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control +[9]: mailto:infra-team-list@company.example.com +[10]: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat +[11]: https://opensource.com/article/19/11/end-of-life-python-2 +[12]: https://opensource.com/resources/what-ansible From eb70a1c2af4f89bf8b518ea7511d6162409d4562 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:18:33 +0800 Subject: [PATCH 138/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200416=20Contac?= =?UTF-8?q?t=20tracing=20via=20Bluetooth=20could=20help=20track=20COVID-19?= =?UTF-8?q?=20transmission?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md --- ... could help track COVID-19 transmission.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md diff --git a/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md b/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md new file mode 100644 index 0000000000..86fa318f1c --- /dev/null +++ b/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Contact tracing via Bluetooth could help track COVID-19 transmission) +[#]: via: (https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +Contact tracing via Bluetooth could help track COVID-19 transmission +====== + +Thinkstock + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] + +A team of researchers from MIT has developed a novel method of tracking COVID-19 transmission among the population, using Bluetooth “chirps” that could automatically trace COVID-positive contacts and warn those who have potentially become infected, without violating their privacy. + +The system is called PACT, or Private Automated Contact Tracing. It works by sending random strings of numbers via low-power Bluetooth from a user’s smartphone to other nearby devices using the system, creating a coded list of smartphones that a given user has been close to in the past 14 days. + +If the user subsequently tests positive for COVID, he or she can upload that list of “chirps” to the database, so that other users can run a check to determine whether they might have exposed. + +MIT said that the system uses advanced privacy protection methods to ensure the privacy of both COVID sufferers and those checking to see whether they’ve been exposed. People would need to opt in, and researchers specifically highlighted that PACT does not use any GPS, wireless location or phone ID information. + +“For these broadcasts, we’re using cryptographic techniques to generate random, rotating numbers that are not just anonymous, but pseudonymous, constantly changing their ‘ID,’ and that can’t be traced back to an individual,” said MIT institute professor Ron Rivest, who led the project. (Rivest knows a  thing or two about cryptography: he’s the R in RSA, the first publicly available public-key cryptosystem.) + +The idea behind PACT is to make sure that the system isn’t tracking any individuals specifically. Rather, it’s meant to be a yes/no resource for those wondering whether they may have been in proximity to someone with COVID. It’s currently at the proof-of-concept stage – the team recently overcame the hurdle of getting Androids and iPhones to speak to each other – and overtures have been made to smartphone makers, Apple, Google and Microsoft to try and get the system into the public’s hands as quickly as possible. + +“The aim of the prototype is to prove to these developers that this is feasible for them to implement,” said Rivest. + +**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][2] ]** + +The team hopes that if PACT comes into widespread use it would enable a much more selective approach to quarantine and give communities the ability to return to normalcy more quickly. Tracking the spread of a disease like COVID with more speed and precision could let public health authorities suggest testing to specific groups of people if they notice a pattern emerging. + +MIT also said that the team has demonstrated PACT to various government agencies, and coordinating similar efforts elsewhere in the U.S., as well as in Europe. + +Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html + +作者:[Jon Gold][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.networkworld.com/author/Jon-Gold/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/newsletters/signup.html +[2]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture +[3]: https://www.facebook.com/NetworkWorld/ +[4]: https://www.linkedin.com/company/network-world From f40ab383de3a0a6bda60e6c8275bb098eaeb14d5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 17 Apr 2020 01:19:53 +0800 Subject: [PATCH 139/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200416=20Harves?= =?UTF-8?q?ting=20ambient=20energy=20will=20power=20IoT,=20scientists=20sa?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md --- ...t energy will power IoT, scientists say.md | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md diff --git a/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md b/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md new file mode 100644 index 0000000000..8831fcbfbe --- /dev/null +++ b/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md @@ -0,0 +1,66 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Harvesting ambient energy will power IoT, scientists say) +[#]: via: (https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Harvesting ambient energy will power IoT, scientists say +====== +Magnetic fields found naturally around electrical devices could be diverted and converted into electricity to power the IoT. +Thinkstock + +Stray, ambient magnetic fields that are naturally created from electricity usage should be captured, diverted, and converted into power for Internet of Things sensors, researchers say. + +"Just like sunlight is a free source of energy we try to harvest, so are magnetic fields," said Shashank Priya, professor of materials science and engineering and associate vice president for research at Penn State, in a statement published [on the university's web site][1]. "We have this ubiquitous energy present in our homes, office spaces, work spaces and cars. It's everywhere, and we have an opportunity to harvest this background noise and convert it to useable electricity." + +Electricity produces tiny magnetic fields around common power cables, computers and lighting found in factories, homes and offices. That energy, if harnessed, could power sensors and small data-sending radios, the academics think. Penn State is attempting to design ambient power receptors for IoT. + +### Materials science + +The group at Penn State has been having some success getting it to work. Experimental devices that are thin and about 1.5 inches long are being tested. Placing the capture-device around or on common appliances does produce electricity, the researchers claim. The key is to put the device where the magnetic field is the strongest. In one experiment, the researchers were able to generate enough power to run 180 LED lighting arrays with a device placed about 4 inches from a space heater. At 8 inches, the device produced enough electricity to operate a clock. + +"These results provide significant advancements toward sustainable power for integrated sensors and wireless communication systems," said Min Gyu Kang, an assistant research professor at Penn State and joint lead author of the study. + +Electricity and magnetism have always gone hand in hand. Magnetism is created by a moving electric charge. It's that movement which creates the magnetic field. That's why low-level magnetism is manifested in electrical wires generally, for example—the electricity is moving along the cable. + +In this case, the scientists are converting the magnetic field, which is caused by the moving electricity, into a separate electrical current. They're doing it with materials science by combining two materials. One of the materials is a magnetostrictor – it converts the magnetic field into stress-generating vibrations. The another material is piezoelectric, which grabs the vibrations and translates that energy into electricity. + +[][2] + +### How to power sensors + +Producing usable power from stray magnetic fields is just one stab at powering the IoT. Just how one goes about producing power for the millions, and possibly billions, of environmental, factory process and other sensors that are expected to come on stream as IoT takes off is up for grabs. + +Batteries have limitations—they need to be changed or charged, for example. Ambient humidity is one possibility I [wrote about recently][3]. In that case, bio-electronics have been proven to capture half-a-volt from ambient air, scientists claim. That's enough to operate rudimentary sensors. Waste heat, too, is another possible source: Researchers are [exploring ways to convert excess heat][4], such as is found in data centers, into light, and then turn that light into electricity. + +Other angles include simply reducing energy consumption through more efficient chips or streamlined wireless communications hardware. Other parasitic techniques are being tried. They include [turning existing wireless noise into a data carrier][5]. It's efficient because one doesn't have to make so much power for radio transceivers—the carrier already exists. + +In the case of the Penn State work, less obvious benefits might exist, too. + +"In buildings, it's known that if you automate a lot of functions, you could actually improve the energy efficiency very significantly," Priya said. “Buildings are one of the largest consumers of electricity in the United States. So even a few percent drop in energy consumption could represent or translate into megawatts of savings. Sensors are what will make it possible to automate these controls, and this technology is a realistic way to power those sensors." + +Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html + +作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/ +[b]: https://github.com/lujun9972 +[1]: https://news.psu.edu/story/613154/2020/03/31/research/scientists-tap-unused-energy-source-power-smart-sensor-networks +[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[3]: https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html +[4]: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html +[5]: https://www.networkworld.com/article/3449819/wireless-noise-protocol-can-extend-iot-range.html +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world From ff7fd94747bd53bfd63516238e1cee9459a43135 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 17 Apr 2020 07:54:19 +0800 Subject: [PATCH 140/394] Rename translated/sources/tech/20190814 9 open source cloud native projects to consider.md to translated/tech/20190814 9 open source cloud native projects to consider.md --- .../20190814 9 open source cloud native projects to consider.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename translated/{sources => }/tech/20190814 9 open source cloud native projects to consider.md (100%) diff --git a/translated/sources/tech/20190814 9 open source cloud native projects to consider.md b/translated/tech/20190814 9 open source cloud native projects to consider.md similarity index 100% rename from translated/sources/tech/20190814 9 open source cloud native projects to consider.md rename to translated/tech/20190814 9 open source cloud native projects to consider.md From 9f3173643a309265d6cc87671e885d173e939395 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 17 Apr 2020 08:56:32 +0800 Subject: [PATCH 141/394] translated --- ...rator in Nautilus File Manager in Linux.md | 89 ------------------- ...rator in Nautilus File Manager in Linux.md | 84 +++++++++++++++++ 2 files changed, 84 insertions(+), 89 deletions(-) delete mode 100644 sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md create mode 100644 translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md diff --git a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md deleted file mode 100644 index 5dc6cd023a..0000000000 --- a/sources/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) -[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Open Files and Folders as Administrator in Nautilus File Manager in Linux -====== - -_**Learn to add an “Open as Administrator” option in the right click context menu in Nautilus file manager in Ubuntu and other Linux distributions.**_ - -If you want to open or edit a file as root, you can always do that in the terminal. I know a few people don’t feel too comfortable with the command line. - -The desktop Linux often provides ways to avoid the command line for terminal-fearing people. - -If you are in a situation where you have to access a folder as root or edit a file with root privilege, you can do that graphically in [Nautilus file manager][1]. - -A neat Nautilus hack allows you to open a files and folders as administrator i.e. root. Let me show you how. - -**Recommended Read:** - -![][2] - -#### [Root User in Ubuntu: Important Things You Should Know][3] - -Root user is essential to any Linux distribution. Learn why Ubuntu locks the root user and how can you use it in this Ubuntu beginner series. - -### Add ‘open as administrator’ option in right click context menu in Nautilus file manager - -_**A word of warning! Please don’t go around opening and editing random files as root as you might mess up with wrong files and end up with a broken system. Use it only in the cases where it is required.**_ - -I am showing the installation steps for Ubuntu. You can change it as per your distribution’s package manager. - -You’ll have to use terminal (even if you don’t like it) for installing the Nautilus plugin. Please [make sure that you have the universe repository enabled][4]: - -``` -sudo apt install nautilus-admin -``` - -Close and open Nautilus file manager again to see the changes in effect. - -![Right clock to see the “Open as Administrator” option][5] - -You can also edit files as root the same way. Just select the file, right click on it and choose the “Edit as Administrator” option. - -![Edit Files As Root Ubuntu][6] - -In both cases, you’ll be prompted to enter your account’s password: - -![You need to enter your password, of course][7] - -That’s pretty much it. You can enjoy the comfort of GUI. - -In case you don’t want to run Nautilus as root anymore, you can remove this plugin. It’s always good to remove additional things you installed but you don’t use anymore. - -In the terminal (yes, again), use the following command to remove the Nautilus plugin. - -``` -sudo apt remove nautilus-admin -``` - -By the way, if you are using [Ubuntu MATE][8], you can use caja-admin, instead of nautilus-admin. Other file managers may or may not provide such a feature. - -I hope you find this quick tip helpful. Questions and suggestions are always welcome. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/open-nautilus-as-administrator/ - -作者:[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://wiki.gnome.org/Apps/Files -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/root_user_ubuntu.png?fit=800%2C450&ssl=1 -[3]: https://itsfoss.com/root-user-ubuntu/ -[4]: https://itsfoss.com/ubuntu-repositories/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1 -[8]: https://ubuntu-mate.org/ diff --git a/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md new file mode 100644 index 0000000000..3355744d64 --- /dev/null +++ b/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md @@ -0,0 +1,84 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) +[#]: via: (https://itsfoss.com/open-nautilus-as-administrator/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +如何在 Linux 的 Nautilus 文件管理器中以管理员身份打开文件和文件夹 +====== + +_**了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。**_ + +如果要以根用户身份打开或编辑文件,你总是可以在终端中执行此操作。但我知道有些人对命令行不适应。 + +桌面 Linux 通常为那些害怕终端的人提供方法避免命令行。 + +如果你必须以 root 用户身份访问文件夹或以 root 用户权限编辑文件,那你可以在 [Nautilus 文件管理器][1]中以图形方式进行操作。 + +一个干净的 Nautilus hack 方式能让你以管理员也就是 root 打开文件和文件夹。让我向你展示如何做。 + +#### [Ubuntu 的 root 用户:你应该知道的重要事项][3] + +根用户对于任何 Linux 发行版都是必不可少的。在本 Ubuntu 初学者系列文章中了解 Ubuntu 为何锁定 root 用户以及如何使用它。 + +### 在 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项 + +_**警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。**_ + +我展示的是 Ubuntu 的步骤。你可以根据你的发行版的软件包管理器进行更改。 + +你必须使用终端(即使你不喜欢它)来安装 Nautilus 插件。请[确保已启用 Universe 仓库][4]: + +``` +sudo apt install nautilus-admin +``` + +关闭并再次打开 Nautilus 文件管理器以查看更改生效。 + +![Right clock to see the “Open as Administrator” option][5] + +你也可以用 root 用户身份编辑文件。只需选择文件,右键单击它,然后选择“以管理员身份编辑”选项。 + +![Edit Files As Root Ubuntu][6] + +这两种情况下,系统都会提示你输入帐户密码: + +![You need to enter your password, of course][7] + +差不多了。你可以享受 GUI 的舒适了。 + +如果你不想再以 root 用户身份运行 Nautilus,那么可以删除此插件。删除已安装但不再使用的其他东西总是没错的。 + +在终端中(没错,再一次在终端),使用以下命令删除 Nautilus 插件。 + +``` +sudo apt remove nautilus-admin +``` + +顺便说一句,如果你在使用 [Ubuntu MATE][8],你可以使用 caja-admin 代替 nautilus-admin。其他文件管理器可能会或可能不会提供此类功能。 + +我希望这个快速技巧对你有所帮助。随时欢迎提出问题和建议。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/open-nautilus-as-administrator/ + +作者:[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://wiki.gnome.org/Apps/Files +[3]: https://itsfoss.com/root-user-ubuntu/ +[4]: https://itsfoss.com/ubuntu-repositories/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/open-folder-as-administrator-ubuntu.jpg?ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/edit-files-as-root-ubuntu.jpg?ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/authentication-pop-up-ubuntu.png?ssl=1 +[8]: https://ubuntu-mate.org/ From f3e7d30a6cf1948091891b23b9ca7a250a99cddf Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 17 Apr 2020 09:17:47 +0800 Subject: [PATCH 142/394] translated --- sources/tech/20200413 How to install Python on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200413 How to install Python on Linux.md b/sources/tech/20200413 How to install Python on Linux.md index cc46e86ef4..07d4aa4087 100644 --- a/sources/tech/20200413 How to install Python on Linux.md +++ b/sources/tech/20200413 How to install Python on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 7842d84ec90f7f9b24a23f52187d5296795d1f83 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 17 Apr 2020 09:21:21 +0800 Subject: [PATCH 143/394] Rename sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md to sources/news/20200416 State of software engineering, JavaScript is the future, and more industry trends.md --- ...neering, JavaScript is the future, and more industry trends.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200416 State of software engineering, JavaScript is the future, and more industry trends.md (100%) diff --git a/sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md b/sources/news/20200416 State of software engineering, JavaScript is the future, and more industry trends.md similarity index 100% rename from sources/tech/20200416 State of software engineering, JavaScript is the future, and more industry trends.md rename to sources/news/20200416 State of software engineering, JavaScript is the future, and more industry trends.md From ab22dd0feb65623d9811e9698bfa21abc0a6bde8 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 17 Apr 2020 09:27:20 +0800 Subject: [PATCH 144/394] Rename sources/tech/20200416 How I-ve adjusted my work-from-home habits.md to sources/talk/20200416 How I-ve adjusted my work-from-home habits.md --- .../20200416 How I-ve adjusted my work-from-home habits.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200416 How I-ve adjusted my work-from-home habits.md (100%) diff --git a/sources/tech/20200416 How I-ve adjusted my work-from-home habits.md b/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md similarity index 100% rename from sources/tech/20200416 How I-ve adjusted my work-from-home habits.md rename to sources/talk/20200416 How I-ve adjusted my work-from-home habits.md From d896ad68a865f9651db46f24b5b3bc4775c3c871 Mon Sep 17 00:00:00 2001 From: cycoe Date: Fri, 17 Apr 2020 10:15:12 +0800 Subject: [PATCH 145/394] Delete the original article in source --- ...u need to know about variables in Emacs.md | 243 ------------------ 1 file changed, 243 deletions(-) delete mode 100644 sources/tech/20200311 What you need to know about variables in Emacs.md diff --git a/sources/tech/20200311 What you need to know about variables in Emacs.md b/sources/tech/20200311 What you need to know about variables in Emacs.md deleted file mode 100644 index fdbeffe90d..0000000000 --- a/sources/tech/20200311 What you need to know about variables in Emacs.md +++ /dev/null @@ -1,243 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (cycoe) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What you need to know about variables in Emacs) -[#]: via: (https://opensource.com/article/20/3/variables-emacs) -[#]: author: (Clemens Radermacher https://opensource.com/users/clemera) - -What you need to know about variables in Emacs -====== -Learn how Elisp deals with variables and to use them in your scripts and -configurations. -![Programming keyboard.][1] - -GNU Emacs is written in C and Emacs Lisp (Elisp), a dialect of the Lisp programming language. Because it's a text editor that happens to be an Elisp sandbox, it is helpful to understand how basic programming concepts work in Elisp. - -If you're new to [Emacs][2], visit Sacha Chua's excellent list of [resources for Emacs beginners][3]. This article assumes you're familiar with common Emacs terminology and that you know how to read and evaluate basic snippets of Elisp code. Ideally, you should also have heard of variable scope and how it works in another programming language. The examples also assume you use a fairly recent Emacs version ([v.25 or later][4]). - -The [Elisp manual][5] includes everything there is to know, but it is written for people who already know what they are looking for (and it is really great for that). But many people want resources that explain Elisp concepts at a higher level and reduce the amount of information to the most useful bits. This article is my attempt to respond to that—to give readers a good grasp of the basics so they can use them for their configuration and make it easier for people to look up some detail in the manual. - -### Global variables - -User options defined with **defcustom** and variables defined with **defvar** or **defconst** are global. One important aspect of variables declared by **defcustom** or **defvar** is that reevaluating them won't reset a variable if it is already bound. For example, if you establish a binding for **my-var** in your init file like this: - - -``` -`(setq my-var nil)` -``` - -evaluating the following form won't reset the variable to **t**: - - -``` -`(defvar my-var t)` -``` - -Note that there is _one exception_: If you evaluate the declaration above with **C-M-x** that calls **eval-defun**, the value will be reset to **t**. This way, you can enforce setting the value if you need to. This behavior is intentional: As you might know, many features in Emacs load only on demand (i.e., they are autoloaded). If the declarations in those files reset variables to their default value, this would override any settings in your init. - -### User options - -A user option is simply a global variable that is declared with **defcustom**. Unlike variables declared with **defvar**, such a variable is configurable with the  **M-x customize** interface. As far as I know, most people don't use it much because it feels clunky. Once you know how to set variables in your init file, there's no compelling reason to use it. One detail many users aren't aware of is that setting user options with **customize** might execute code, and this is sometimes used to run additional setup instructions: - - -``` -(defcustom my-option t -  "My user option." -  :set (lambda (sym val) -         (set-default sym val) -         (message "Set %s to %s" sym val))) -``` - -If you evaluate this code and change the value using the **customize** interface with **M-x customize-option RET my-option RET **the lambda will be called, and the message in the echo area will tell you the symbol and value of the option. - -If you use **setq** in your init file, to change the value of such an option, the setter function will _not_ run. To set such an option correctly with Elisp, you need to use the function **customize-set-variable**. Alternatively, people use various versions of **csetq** macros in their configs to automatically take care of this (you can use GitHub code search to discover more sophisticated variants if you like): - - -``` -(defmacro csetq (sym val) -  `(funcall (or (get ',sym 'custom-set) 'set-default) ',sym ,val)) -``` - -If you are using the [use-package][6] macro, the **:custom** keyword will handle this for you. - -After putting the code above into your init file, you can use **csetq** to set variables in a way that respects any existing setter functions. You can prove this by watching the message in the echo area when using this macro to change the option defined above: - - -``` -`(csetq my-option nil)` -``` - -### Dynamic binding and lexical binding - -If you use other programming languages, you may not be aware of the differences between dynamic and lexical binding. Most programming languages today use lexical binding, and there is no need to know the difference when you learn about variable scope/lookup. - -Emacs Lisp is special in this regard because dynamic binding is the default, and lexical binding must be enabled explicitly. There are historical reasons for this, and in practice, you should _always_ enable lexical binding because it is faster and less error-prone. To enable it, simply put the following comment line as the first line in your Emacs Lisp file: - - -``` -`;;; -*- lexical-binding: t; -*-` -``` - -Alternatively, you can call M-x **add-file-local-variable-prop-line**, which will insert the comment line above when you choose the variable **lexical-binding** with value **t**. - -When a file with such a specially formatted line is loaded, Emacs sets the variable accordingly, which means the code in that buffer is loaded with lexical binding enabled. Interactively, you can use **M-x eval-buffer**, which takes the lexical binding setting into account. - -Now that you know how to enable lexical binding, it's smart to learn what the terms mean. With dynamic binding, the last binding established during program execution is used for variable lookup. You can test this by putting the following code in an empty buffer and executing **M-x eval-buffer**: - - -``` -(defun a-exists-only-in-my-body (a) -  (other-function)) - -(defun other-function () -  (message "I see `a', its value is %s" a)) - -(a-exists-only-in-my-body t) -``` - -You may be surprised to see that the lookup of variable **a** in the **other-function** is successful. - -If you retry the preceding example with the special lexical-binding comment at the top, the code will throw a "variable is void" error because **other-function** does not know about the **a** variable. If you're coming from another programming language, this is the behavior you would expect. - -With lexical binding, the scope is defined by the surrounding source code. This is not only for performance reasons—experience and time have shown that this behavior is preferred. - -### Special variables and dynamic binding - -As you may know, **let** is used to temporary establish local bindings: - - -``` -(let ((a "I'm a") -      (b "I'm b")) -  (message "Hello, %s. Hello %s" a b)) -``` - -Here is the thing: Variables declared with **defcustom**, **defvar**, or **defconst** are called _special variables_, and they continue to use dynamic binding regardless of whether lexical binding is enabled: - - -``` -;;; -*- lexical-binding: t; -*- - -(defun some-other-function () -  (message "I see `c', its value is: %s" c)) - -(defvar c t) - -(let ((a "I'm lexically bound") -      (c "I'm special and therefore dynamically bound")) -  (some-other-function) -  (message "I see `a', its values is: %s" a)) -``` - -To see both messages in the example above, switch to the ***Messages*** buffer using **C-h e**. - -Local variables bound with **let** or function arguments follow the lookup rules defined by the **lexical-binding** variable, but global variables defined with **defvar**, **defconst**, or **defcustom** can be changed deep down in the call stack for the duration of the **let** body. - -This behavior allows for convenient ad-hoc customizations and is often used in Emacs, which isn't surprising given that Emacs Lisp started out with dynamic binding being the only option. Here is a common example showing how you can temporarily write to a read-only buffer: - - -``` -(let ((inhibit-read-only t)) -  (insert ...)) -``` - -Here is another often-seen example for performing case-sensitive searches: - - -``` -(let ((case-fold-search nil)) -  (some-function-which-uses-search ...)) -``` - -Dynamic binding allows you to change the behavior of functions in ways the authors of those functions may have never anticipated. It's a powerful tool and a great feature for a program that is designed and used like Emacs. - -There is one caveat to be aware of: You might accidentally use a local variable name that is declared as a special variable elsewhere. One trick to prevent such conflicts is to avoid dashes in local variables' names. In my current Emacs session, this leaves only a handful of potential conflicting candidates: - - -``` -(let ((vars ())) -  (mapatoms -   (lambda (cand) -     (when (and (boundp cand) -                (not (keywordp cand)) -                (special-variable-p cand) -                (not (string-match "-" -                                   (symbol-name cand)))) -       (push cand vars)))) -  vars) ;; => (t obarray noninteractive debugger nil) -``` - -### Buffer-local variables - -Each buffer can have a local binding for a variable. This means any variable lookup made while this buffer is current will reveal the buffer's local value of that variable instead of the default value. Local variables are an important feature in Emacs; for example, they are used by major modes to establish their buffer-local behavior and settings. - -You have already seen a buffer-local variable in this article: the special comment line for **lexical-binding** that binds the buffer locally to **t**. In Emacs, such buffer-local variables defined in special comment lines are also called _file-local variables_. - -Any global variable can be shadowed by a buffer-local variable. Take, for example, the **my-var** variable defined above, which you can set locally like this: - - -``` -(setq-local my-var t) -;; or (set (make-local-variable 'my-var) t) -``` - -**my-var** is local to the buffer, which is current when you evaluate the code above. If you call **describe-variable** on it, the documentation tells you both the local value and the global one. Programmatically, you can check the local value using **buffer-local-value** and the default value with **default-value**. To remove the local version, you could invoke  **M-x kill-local-variable**. - -Another important property to be aware of is that once a variable is buffer-local, any further use of **setq** (while this buffer is current) will continue to set the local value. To set the default value, you would need to use **setq-default**. - -Because local variables are meant for buffer customization, they're used most often in mode hooks. A typical example would be something like this: - - -``` -(add-hook 'go-mode-hook -          (defun go-setup+ () -            (setq-local compile-command -              (if (string-suffix-p "_test.go" buffer-file-name) -                  "go test -v" -                (format "go run %s" -                        (shell-quote-argument -                         (file-name-nondirectory buffer-file-name))))))) -``` - -This sets the compile command used by **M-x compile** for go-mode buffers. - -Another important aspect is that some variables are _automatically_ buffer-local. This means as soon as you **setq** such a variable, it sets a local binding for the current buffer. This feature shouldn't be used often (because this implicit behavior isn't nice), but if you want, you can create such automatically local variables like this: - - -``` -(defvar-local my-automatical-local-var t) -;; or (make-variable-buffer-local 'my-automatical-local-var) -``` - -The variable **indent-tabs-mode** is a built-in example of this. If you use **setq** in your init file to change the value of this variable, it won't affect the default value at all. Only the value for the buffer that is current while loading your init file will be changed. Therefore, you need to use **setq-default** to change the default value of **indent-tabs-mode**. - -### Closing words - -Emacs is a powerful editor, and it only gets more powerful the more you change it to suit your needs. Now you know how Elisp deals with variables and how you can use them in your own scripts and configurations. - -* * * - -_This previously appeared on [With-Emacs][7] under a CC BY-NC-SA 4.0 license and has been adapted (with a merge request) and republished with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/variables-emacs - -作者:[Clemens Radermacher][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/clemera -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming_keyboard_coding.png?itok=E0Vvam7A (Programming keyboard.) -[2]: https://www.gnu.org/software/emacs/ -[3]: http://sachachua.com/blog/p/27144 -[4]: https://www.gnu.org/software/emacs/download.html -[5]: https://www.gnu.org/software/emacs/manual/html_node/elisp/ -[6]: https://github.com/jwiegley/use-package#customizing-variables -[7]: https://with-emacs.com/posts/tutorials/almost-all-you-need-to-know-about-variables/ From c65dac764f60bf8a71fe6544f0124b90e45cf80e Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Fri, 17 Apr 2020 15:08:36 +0800 Subject: [PATCH 146/394] Translating --- ...hi Linux 5.1 Review- Slightly Different Lightweight Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md index d4892ffbcc..6b8be0c8bd 100644 --- a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md +++ b/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (qfzy1233) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8eb1dd3a8279562d228f72a2e33ce747cc7cca03 Mon Sep 17 00:00:00 2001 From: LazyWolf Lin Date: Fri, 17 Apr 2020 17:06:56 +0800 Subject: [PATCH 147/394] Translating. --- sources/tech/20200414 How I containerize a build system.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200414 How I containerize a build system.md b/sources/tech/20200414 How I containerize a build system.md index b45168c55f..1271aa27af 100644 --- a/sources/tech/20200414 How I containerize a build system.md +++ b/sources/tech/20200414 How I containerize a build system.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (LazyWolfLin) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c998684dee0ea788c0ec42152352c169516c4762 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Apr 2020 21:02:42 +0800 Subject: [PATCH 148/394] PRF @lxbwolf --- ...vate social network with a Raspberry Pi.md | 157 +++++++----------- 1 file changed, 63 insertions(+), 94 deletions(-) diff --git a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md b/translated/tech/20200320 Build a private social network with a Raspberry Pi.md index 5325d7e67f..9d7e8e7fea 100644 --- a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md +++ b/translated/tech/20200320 Build a private social network with a Raspberry Pi.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Build a private social network with a Raspberry Pi) @@ -9,23 +9,23 @@ 用树莓派搭建一个私人社交网络 ====== -手把手教你怎样以低硬件成本和简易步骤搭建自己的社交网络。 + +> 手把手教你怎样以低成本的硬件和简易步骤搭建自己的社交网络。 + ![Team of people around the world][1] -近年来,社交网络已经革新了人们的生活习惯。为了维持与朋友和家人的联系,人们每天都会使用社交频道。但是涉及到隐私和数据安全时,仍有一些普遍问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息被泄露,最好的办法还是把数据保存在自己的服务器上。 +近年来,社交网络已经革新了人们的生活习惯。人们每天都会使用社交频道与朋友和家人联系。但是涉及到隐私和数据安全时,仍有一些共同的问题。尽管社交网络创建了复杂的隐私策略来保护用户的信息,但如果你不想自己的信息被泄露,最好的办法还是把数据保存在自己的服务器上。 -一个树莓派 — 多才多艺的 Raspbian Lite 版本就可以让你搭建很多有用的家庭服务(参照我的文章[树莓派项目][2])。通过搜索开源软件你就可以实现一些令人痴迷的功能,你也可以用这个神奇的设备来感受那些功能。其中一个有趣的尝试就是在你的树莓派上安装 OSSN(译注:OpenSource Social Network)。 +一个树莓派 — 多才多艺的 Raspbian Lite 版本就可以让你搭建很多有用的家庭服务(参照我的文章[树莓派项目][2])。通过搜索开源软件你就可以实现一些令人痴迷的功能,你也可以用这个神奇的设备来感受那些功能。其中一个有趣的尝试就是在你的树莓派上安装 OSSN。 -### OSSN是什么? +### OSSN 是什么? -[OSSN][3] 是用 PHP 写的一个快速开发社交网络软件,让你可以搭建自己的社交网站。OSSN 可以用来搭建不同类型的社交应用,如: +[开源社交网络][3]OpenSource Social Network(OSSN)是用 PHP 写的一个快速开发社交网络软件,让你可以搭建自己的社交网站。OSSN 可以用来搭建不同类型的社交应用,如: * 私人内部网 * 公用/公开网络 * 社区 - - OSSN 支持的功能: * 照片 @@ -35,13 +35,11 @@ OSSN 支持的功能: * 搜索 * 聊天 - - OSSN 运行在 LAMP 服务器上。硬件需求很简单,却能提供强大的用户界面,也友好支持移动端。 ### 我们需要准备什么 -这个项目很简单,而且由于我们只安装远程 web 服务,因此我们只需要一些便宜的零件就够了。我使用的是树莓派 3B+,但是用树莓派 3A+ 或其他更新的板应该也可以。 +这个项目很简单,而且由于我们只安装远程 Web 服务,因此我们只需要一些便宜的零件就够了。我使用的是树莓派 3B+,但是用树莓派 3A+ 或其他更新的板应该也可以。 硬件: @@ -49,76 +47,66 @@ OSSN 运行在 LAMP 服务器上。硬件需求很简单,却能提供强大的 * 一张 SD 卡(最好是性能好点的卡,至少 16 GB) * 一台有 SFTP 软件(如免费的 [Filezilla][4])的桌面 PC,用来把安装包传到你的树莓派上 - - ### 操作步骤 我们首先搭建一个传统的 LAMP 服务器,然后配置数据库用户和安装 OSSN。 -#### 1\. 安装 Raspbian Buster Lite 操作系统 +#### 1、安装 Raspbian Buster Lite 操作系统 你可以直接参照我的文章[在你的树莓派上安装 Raspbian Buster Lite][5]。 为了确保你的系统是最新的,ssh 登录到树莓派后在终端输入下面的命令: - ```bash sudo apt-get update sudo apt-get upgrade ``` -#### 2\. 安装 LAMP 服务 +#### 2、安装 LAMP 服务 LAMP(Linux–Apache–Mysql–Php)服务通常与 MySQL 数据库配合。在我们的项目中,我们选择 MariaDB,因为它更轻量,完美支持树莓派。 -#### 3\. 安装 Apache 服务: - +安装 Apache 服务: ``` -`sudo apt-get install apache2 -y` +sudo apt-get install apache2 -y ``` 你可以通过在浏览器输入 `http://<>` 来检查 Apache 是否安装正确: ![][6] -#### 4\. 安装 PHP: - +安装 PHP: ``` -`sudo apt-get install php -y` +sudo apt-get install php -y ``` -#### 5\. 安装 MariaDB 服务和 PHP connector: - +安装 MariaDB 服务和 PHP connector: ``` -`sudo apt-get install mariadb-server php-mysql -y` +sudo apt-get install mariadb-server php-mysql -y ``` -#### 6\. 安装 phpMyAdmin: +安装 phpMyAdmin: 在 OSSN 中 phpMyAdmin 不是强制安装的,但我建议你安装,因为它可以简化数据库的管理。 - ``` -`sudo apt-get install phpmyadmin` +sudo apt-get install phpmyadmin ``` 在 phpMyAdmin 配置界面,执行以下步骤: - * 按下空格和 OK 选择 apache(强制)。 - * 在 dbconfig-common 选择是,配置 phpMyAdmin 的数据库。 - * 输入想设置的密码,按下 OK。 - * 再次输入 phpMyAdmin 密码来确认,按下 OK。 + * 按下空格和 “OK” 选择 apache(强制)。 + * 在 dbconfig-common 选择“Yes”,配置 phpMyAdmin 的数据库。 + * 输入想设置的密码,按下 “OK”。 + * 再次输入 phpMyAdmin 密码来确认,按下 “OK”。 - - -#### 7\. 为 phpMyAdmin 用户添加数据库权限来管理数据库: +为 phpMyAdmin 用户添加数据库权限来管理数据库: 我们用 root 用户连接 MariaDB(默认没有密码)来设置权限。 - ``` sudo mysql -uroot -p grant all privileges on *.* to 'phpmyadmin'@'localhost'; @@ -126,11 +114,10 @@ flush privileges; quit ``` -#### 8\. 最后,重启 Apache 服务: - +最后,重启 Apache 服务: ``` -`sudo systemctl restart apache2.service` +sudo systemctl restart apache2.service ``` 在浏览器输入 `http://<>/phpmyadmin/` 来检查 phpMyAdmin 是否正常: @@ -139,52 +126,44 @@ quit 默认的 phpMyAdmin 登录凭证: - * 用户名:phpmyadmin + * 用户名:`phpmyadmin` * 密码:在 phpMyAdmin 安装步骤中你设置的密码 - - -### 安装 OSSN 所需的其他包和配置 PHP +#### 3、安装 OSSN 所需的其他包和配置 PHP 在第一次配置 OSSN 前,我们还需要在系统上安装一些所需的包: - * PHP 版本 5.6,7.0 或 7.1 + * PHP 版本 5.6、7.0 或 7.1 * MYSQL 5 及以上 * APACHE * MOD_REWRITE * 需要打开 PHP 扩展 cURL 和 Mcrypt * PHP GD 扩展 * PHP ZIP 扩展 - * 打开 PHP 设置 allow_url_fopen + * 打开 PHP 设置 `allow_url_fopen` * PHP JSON 支持 * PHP XML 支持 * PHP OpenSSL - - 在终端输入以下命令来安装上述包: - ``` -`sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml` +sudo apt-get install php7.3-curl php7.3-gd php7.3-zip php7.3-json php7.3-xml ``` -#### 1\. 打开 MOD_REWRITE: - +打开 mod_rewrite: ``` -`sudo a2enmod rewrite` +sudo a2enmod rewrite ``` -#### 2\. 修改默认的 Apache 配置,使用 mod_rewrite: - +修改默认的 Apache 配置,使用 mod_rewrite: ``` -`sudo nano /etc/apache2/sites-available/000-default.conf` +sudo nano /etc/apache2/sites-available/000-default.conf ``` -#### 3\. 在 **000-default.conf** 文件中添加下面的内容: - +在 `000-default.conf` 文件中添加下面的内容: ```ini @@ -192,18 +171,17 @@ quit DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined - # SECTION TO ADD -------------------------------- + # 需要添加的部分开始 -------------------------------- Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted - # END SECTION TO ADD -------------------------------- + # 需要添加的部分结束 -------------------------------- ``` -#### 4\. 安装 Mcrypt: - +安装 Mcrypt: ```bash sudo apt install php-dev libmcrypt-dev php-pear @@ -211,45 +189,42 @@ sudo pecl channel-update pecl.php.net sudo pecl install mcrypt-1.0.2 ``` -#### 5\. 在 `/etc/php/7.3/apache2/php.ini` 文件中添加 `extension=mcrypt.so`(或取消注释)打开 Mcrypt 模块: +打开 Mcrypt 模块: +在 `/etc/php/7.3/apache2/php.ini` 文件中 `extension=mcrypt.so`(或取消注释): ```bash sudo nano /etc/php/7.3/apache2/php.ini ``` -**allow_url_fopen** 应该已经在 `/etc/php/7.3/apache2/php.ini` 文件中打开了。OpenSSL 应该在 php7.3 中安装了。 - -#### 6\. 我建议的另一个设置是把 PHP 最大上传文件数修改为 16 MB: +`allow_url_fopen` 应该已经在 `/etc/php/7.3/apache2/php.ini` 文件中打开了。OpenSSL 应该在 php7.3 中安装了。 +我建议的另一个设置是把 PHP 最大上传文件数修改为 16 MB: ``` -`sudo nano /etc/php/7.3/apache2/php.ini` +sudo nano /etc/php/7.3/apache2/php.ini ``` -#### 7\. 搜索到 **upload_max_filesize** 所在的行,参照下面的设置: - +搜索到 `upload_max_filesize` 所在的行,参照下面的设置: ``` -`upload_max_filesize = 16M` +upload_max_filesize = 16M ``` -#### 8\. 保存并退出,重启 Apache: - +保存并退出,重启 Apache: ``` -`sudo systemctl restart apache2.service` +sudo systemctl restart apache2.service ``` -### 安装 OSSN +#### 4、安装 OSSN -#### 1\. 创建数据库,设置用户: +##### 创建数据库,设置用户 -回到 phpmyadmin web页面(浏览器输入 `http://<>/phpmyadmin/`)并登录: +回到 phpmyadmin web 页面(浏览器输入 `http://<>/phpmyadmin/`)并登录: -用户名: phpmyadmin - -密码:在 phpMyAdmin 安装步骤中你设置的密码 +- 用户名: `phpmyadmin` +- 密码:在 phpMyAdmin 安装步骤中你设置的密码 点击数据库标签页: @@ -261,13 +236,11 @@ sudo nano /etc/php/7.3/apache2/php.ini 现在为 OSSN 创建一个数据库用户,我使用下面的凭证: -用户名: ossn_db_user - -密码: ossn_db_password +- 用户名: `ossn_db_user` +- 密码: `ossn_db_password` 在终端输入下面的命令(如果你没有修改过密码,root 密码应该仍然是空): - ```bash sudo mysql -uroot -p CREATE USER 'ossn_db_user'@'localhost' IDENTIFIED BY 'ossn_db_password'; @@ -276,34 +249,30 @@ flush privileges; quit ``` -#### 2\. 安装 OSSN 软件: +##### 安装 OSSN 软件 在你 PC 上从 [OSSN 下载页面][10] 下载 OSSN 安装压缩文件,保存为文件 `ossn-v5.2-1577836800.zip`。 使用你习惯的 SFTP 软件把整个压缩文件通过 SFTP 传到树莓派的新目录 `/home/pi/download` 下。常用的(默认)SFP 连接参数是: * 主机:你树莓派的 IP 地址 - * 用户名:pi + * 用户名:`pi` * 密码:raspberry(如果没有修改过默认密码) * 端口: 22 - - 在终端输入: - ```bash -cd /home/pi/download/ #Enter directory where OSSN installation files have been transferred -unzip ossn-v5.2-1577836800.zip #Extracts all files from zip -cd /var/www/html/ #Enter Apache web directory -sudo rm index.html #Removes Apache default page - we'll use OSSN one +cd /home/pi/download/ # 进入上传的 OSSN 安装文件的目录。 +unzip ossn-v5.2-1577836800.zip # 从压缩包中提取所有文件 +cd /var/www/html/ # 进入 Apache Web 目录 +sudo rm index.html # 删除 Apache 默认页面 - 我们将使用 OSSN sudo cp -R /home/pi/download/ossn-v5.2-1577836800/* ./ #Copy installation files to web directory sudo chown -R www-data:www-data ./ ``` 创建数据文件夹:OSSN 需要一个文件夹来存放数据。出于安全目的,OSSN 建议这个文件夹创建在公开文档根目录之外。所以,我们在 `/opt` 下创建。 - ```bash sudo mkdir /opt/ossn_data sudo chown -R www-data:www-data /opt/ossn_data/ @@ -337,7 +306,7 @@ sudo chown -R www-data:www-data /opt/ossn_data/ ![][17] -*本文首发在 [peppe8o.com][18]。已获得转载授权。* +本文首发在 [peppe8o.com][18]。已获得转载授权。 -------------------------------------------------------------------------------- @@ -346,7 +315,7 @@ via: https://opensource.com/article/20/3/raspberry-pi-open-source-social 作者:[Giuseppe Cassibba][a] 选题:[lujun9972][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 49ddbdbd5aed606a4cf2c7720a1dc9a5b59b9cc5 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 17 Apr 2020 21:06:56 +0800 Subject: [PATCH 149/394] PUB @lxbwolf https://linux.cn/article-12120-1.html --- ...0320 Build a private social network with a Raspberry Pi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200320 Build a private social network with a Raspberry Pi.md (99%) diff --git a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md b/published/20200320 Build a private social network with a Raspberry Pi.md similarity index 99% rename from translated/tech/20200320 Build a private social network with a Raspberry Pi.md rename to published/20200320 Build a private social network with a Raspberry Pi.md index 9d7e8e7fea..8e9faaa8cc 100644 --- a/translated/tech/20200320 Build a private social network with a Raspberry Pi.md +++ b/published/20200320 Build a private social network with a Raspberry Pi.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12120-1.html) [#]: subject: (Build a private social network with a Raspberry Pi) [#]: via: (https://opensource.com/article/20/3/raspberry-pi-open-source-social) [#]: author: (Giuseppe Cassibba https://opensource.com/users/peppe8o) From 98a631f4581f602c5a8c67c0110320f1d7e4dc71 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Sat, 18 Apr 2020 00:06:32 +0800 Subject: [PATCH 150/394] APL --- sources/tech/20200228 Getting started with Linux firewalls.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200228 Getting started with Linux firewalls.md b/sources/tech/20200228 Getting started with Linux firewalls.md index c77d60b618..7c2cefc682 100644 --- a/sources/tech/20200228 Getting started with Linux firewalls.md +++ b/sources/tech/20200228 Getting started with Linux firewalls.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d0197dfda253664c62d690d9c8d386d00e90887f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Apr 2020 01:49:18 +0800 Subject: [PATCH 151/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200417=20Face-t?= =?UTF-8?q?o-face=20collaboration=20for=20community=20to=20become=20more?= =?UTF-8?q?=20impactful=20=E2=80=93=20Chip=20Childers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md --- ...o become more impactful - Chip Childers.md | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md diff --git a/sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md b/sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md new file mode 100644 index 0000000000..ccc63dc914 --- /dev/null +++ b/sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md @@ -0,0 +1,58 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Face-to-face collaboration for community to become more impactful – Chip Childers) +[#]: via: (https://www.linux.com/articles/face-to-face-collaboration-for-community-to-become-more-impactful-chip-childers/) +[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) + +Face-to-face collaboration for community to become more impactful – Chip Childers +====== + +“Anytime there’s a crisis, there’s also an opportunity for open source communities to find ways to be helpful,” affirms Chip Childers, the Executive Director of Cloud Foundry Foundation. He believes the remarkable work the Cloud Foundry community has done over the years to enhance enterprise developer productivity will now help those who have adopted the platform to combat COVID-19.; + +“It (the platform) allows them to move quickly to respond to changing conditions, whether those are market conditions, or in this case, a global pandemic. We’re actually pretty proud of a lot of the end-users and how they’re able to use the software more efficiently now,” he says. + +Prior to becoming the Executive Director, Childers served as the CTO for a little over five years. He feels “it’s a very exciting time to be stepping into the role,” and has already chalked out a robust strategy to take the Foundation to the next level. + +For starters, Google has upped its membership of Cloud Foundry and is now at the technical tier. “We were quite happy to have them decide to upgrade and we appreciate their support on that,” says Childers. + +He is also happy with how Kubernetes and Cloud Foundry are coming together. + +“Cloud Foundry and Kubernetes are now becoming complementary. The Cloud Foundry developer platform should run on the Kube infrastructure platform. Both communities have reached the point where they’re ready to see this get blended,” says Childers. + +**Unswerving Support** +VMware ranks among the largest contributors to communities. Last year, it acquired Pivotal, which is one of the biggest stakeholders in the Cloud Foundry project. So, what are the implications on Cloud Foundry of a player that has stakes in both Kubernetes and Cloud Foundry? + +“It’s a clear indication the teams that used to work for Pivotal are being intermixed with the teams that were at VMware, and through some of their other acquisitions like Heptio, they’re all working together on the shared vision of creating the Tanzu platform. This happens to align well with the vision that other Cloud Foundry distributions have — like the way SUSE builds Kubernetes-based infrastructure layers Cloud Foundry on top for developer productivity,” explains Childers. + +Childers believes Paul Fazzone’s promotion to Chairman of the Board will provide an additional boost to Cloud Foundry. + +“Paul heads R&D for VMware’s modern applications business unit. He’s been on our board for a long time. So it’s great that we’re going to continue to see the investment in the open source community not just at the business level from VMware, but also in terms of supporting the contributors, be it developers, product managers, project management support, or marketing support. They’re not wavering in their commitment to open source across the board and Cloud Foundry is one of those communities that will benefit from that,” he states. + +**A Three-Pronged Strategy** +The core mission of the Foundation is to bring a world-class enterprise developer experience to as many enterprise developers as possible. Childers, therefore, considers “enterprise developer productivity for Kubernetes infrastructure our new north star” and has devised a three-pronged strategy to align with it. + +“The first thing is that we will focus on working with the contributing community — the Foundation staff, key member contacts and participants — to improve their experience. + +Next is to build upon the inclusivity and diversity work that the Foundation has done over the years. “We’ve always had a number of different audiences to whom we’ve tried to describe the work of the project: line of business leaders, CIOs, IT operations, and enterprise developers. It is important to make a little bit of a dent in the broader technology industry,” avers Childers. + +The third and final prong of Childers strategy is to encourage developers or companies participating in Cloud Foundry efforts to also participate in Istio (an open platform that connects, manages, and secures microservices), Kubernetes, and the various scenes within the community. + +“There’s a massive overlap, which I think will be very beneficial to everyone. The learnings that developers helping to code Kubernetes or Istio learn during that process should flow in such a way that the CF community builds the developer experience on top of those systems. From this perspective, cross-pollination is really, really important,” says Childers. + +Childers is also planning a tectonic shift in the way Foundation contributors work. “While now it’s going to become a little bit harder as we deal with some of the challenges around the pandemic, I’m very excited about spending a lot of our effort focused on increasing the impact of the face-to-face collaboration time that we’re able to create for the community,” adds Childers. +-------------------------------------------------------------------------------- + +via: https://www.linux.com/articles/face-to-face-collaboration-for-community-to-become-more-impactful-chip-childers/ + +作者:[Swapnil Bhartiya][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.linux.com/author/swapnil/ +[b]: https://github.com/lujun9972 From 6c7bef0840a68e5fa7bdf6aec9ef207647622cf6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Apr 2020 01:59:49 +0800 Subject: [PATCH 152/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200417=20Create?= =?UTF-8?q?=20a=20SDN=20on=20Linux=20with=20open=20source?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200417 Create a SDN on Linux with open source.md --- ... Create a SDN on Linux with open source.md | 194 ++++++++++++++++++ 1 file changed, 194 insertions(+) create mode 100644 sources/tech/20200417 Create a SDN on Linux with open source.md diff --git a/sources/tech/20200417 Create a SDN on Linux with open source.md b/sources/tech/20200417 Create a SDN on Linux with open source.md new file mode 100644 index 0000000000..2e144abb26 --- /dev/null +++ b/sources/tech/20200417 Create a SDN on Linux with open source.md @@ -0,0 +1,194 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Create a SDN on Linux with open source) +[#]: via: (https://opensource.com/article/20/4/quagga-linux) +[#]: author: (M Umer https://opensource.com/users/noisybotnet) + +Create a SDN on Linux with open source +====== +Make your Linux system act like a router with the open source routing +stack Quagga. +![Coding on a computer][1] + +Network routing protocols fall into two main categories: interior gateway protocols and exterior gateway protocols. Interior gateway protocols are used by routers to share information within a single autonomous system. If you are running Linux, you can make your system behave as a router through the open source (GPLv2) routing stack [Quagga][2]. + +### What is Quagga? + +Quagga is a [routing software suite][3] and a fork of [GNU Zebra][4]. It provides implementations of all major routing protocols such as Open Shortest Path First (OSPF), Routing Information Protocol (RIP), Border Gateway Protocol (BGP), and Intermediate System to Intermediate System (IS-IS) for Unix-like platforms. + +Although Quagga implements the routing protocols for both IPv4 and IPv6, it doesn't act as a complete router. A true router not only implements all the routing protocols but also has the ability to forward network traffic. Quagga only implements the routing stack, and the job of forwarding network traffic is handled by the Linux kernel. + +### Architecture + +Quagga implements the different routing protocols through protocol-specific daemons. The daemon name is the same as the routing protocol followed by the letter "d." Zebra is the core and a protocol-independent daemon that provides an [abstraction layer][5] to the kernel and presents the Zserv API over TCP sockets to Quagga clients. Each protocol-specific daemon is responsible for running the relevant protocol and building the routing table based on the information exchanged. + +![Quagga architecture][6] + +### Setup + +This tutorial implements the OSPF protocol to configure dynamic routing using Quagga. The setup includes two CentOS 7.7 hosts, named Alpha and Beta. Both hosts share access to the **192.168.122.0/24** network. + +**Host Alpha:** + +IP: 192.168.122.100/24 +Gateway: 192.168.122.1 + +**Host Beta:** + +IP: 192.168.122.50/24 +Gateway: 192.168.122.1 + +### Install the package + +First, install the Quagga package on both hosts. It is available in the CentOS base repo: + + +``` +`yum install quagga -y` +``` + +### Enable IP forwarding + +Next, enable IP forwarding on both hosts since that will performed by the Linux kernel: + + +``` +sysctl -w net.ipv4.ip_forward = 1 +sysctl -p +``` + +### Configuration + +Now, go into the **/etc/quagga** directory and create the configuration files for your setup. You need three files: + + * **zebra.conf**: Quagga's daemon configuration file, which is where you'll define the interfaces and their IP addresses and IP forwarding + * **ospfd.conf**: The protocol configuration file, which is where you'll define the networks that will be offered through the OSPF protocol + * **daemons**: Where you'll specify the relevant protocol daemons that are required to run + + + +On host Alpha, + + +``` + [root@alpha]# cat /etc/quagga/zebra.conf +interface eth0 + ip address 192.168.122.100/24 + ipv6 nd suppress-ra +interface eth1 + ip address 10.12.13.1/24 + ipv6 nd suppress-ra +interface lo +ip forwarding +line vty + +[root@alpha]# cat /etc/quagga/ospfd.conf +interface eth0 +interface eth1 +interface lo +router ospf + network 192.168.122.0/24 area 0.0.0.0 + network 10.12.13.0/24 area 0.0.0.0 +line vty + +[root@alphaa ~]# cat /etc/quagga/daemons +zebra=yes +ospfd=yes +``` + +On host Beta, + + +``` +[root@beta quagga]# cat zebra.conf +interface eth0 + ip address 192.168.122.50/24 + ipv6 nd suppress-ra +interface eth1 + ip address 10.10.10.1/24 + ipv6 nd suppress-ra +interface lo +ip forwarding +line vty + +[root@beta quagga]# cat ospfd.conf +interface eth0 +interface eth1 +interface lo +router ospf + network 192.168.122.0/24 area 0.0.0.0 + network 10.10.10.0/24 area 0.0.0.0 +line vty + +[root@beta ~]# cat /etc/quagga/daemons +zebra=yes +ospfd=yes +``` + +### Configure the firewall + +To use the OSPF protocol, you must allow it in the firewall: + + +``` +firewall-cmd --add-protocol=ospf –permanent + +firewall-cmd –reload +``` + +Now, start the zebra and ospfd daemons. + + +``` +# systemctl start zebra +# systemctl start ospfd +``` + +Look at the route table on both hosts using: + + +``` +[root@alpha ~]# ip route show   +default via 192.168.122.1 dev eth0 proto static metric 100 +10.10.10.0/24 via 192.168.122.50 dev eth0 proto zebra metric 20 +10.12.13.0/24 dev eth1 proto kernel scope link src 10.12.13.1 +192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.100 metric 100 +``` + +You can see that the routing table on Alpha contains an entry of **10.10.10.0/24** via **192.168.122.50** offered through protocol **zebra**. Similarly, on host Beta, the table contains an entry of network **10.12.13.0/24** via **192.168.122.100**. + + +``` +[root@beta ~]# ip route show +default via 192.168.122.1 dev eth0 proto static metric 100 +10.10.10.0/24 dev eth1 proto kernel scope link src 10.10.10.1 +10.12.13.0/24 via 192.168.122.100 dev eth0 proto zebra metric 20 +192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.50 metric 100 +``` + +### Conclusion + +As you can see, the setup and configuration are relatively simple. To add complexity, you can add more network interfaces to the router to provide routing for more networks. You can also implement BGP and RIP protocols using the same method. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/quagga-linux + +作者:[M Umer][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/noisybotnet +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) +[2]: https://www.quagga.net/ +[3]: https://en.wikipedia.org/wiki/Quagga_(software) +[4]: https://www.gnu.org/software/zebra/ +[5]: https://en.wikipedia.org/wiki/Abstraction_layer +[6]: https://opensource.com/sites/default/files/uploads/quagga_arch.png (Quagga architecture) From a4d6f4e9086eb04b0bea25450eb78275093dbd07 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Apr 2020 02:00:21 +0800 Subject: [PATCH 153/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200417=20How=20?= =?UTF-8?q?to=20set=20up=20and=20run=20WordPress=20for=20your=20classroom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200417 How to set up and run WordPress for your classroom.md --- ...up and run WordPress for your classroom.md | 164 ++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 sources/tech/20200417 How to set up and run WordPress for your classroom.md diff --git a/sources/tech/20200417 How to set up and run WordPress for your classroom.md b/sources/tech/20200417 How to set up and run WordPress for your classroom.md new file mode 100644 index 0000000000..bb8b87d560 --- /dev/null +++ b/sources/tech/20200417 How to set up and run WordPress for your classroom.md @@ -0,0 +1,164 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to set up and run WordPress for your classroom) +[#]: via: (https://opensource.com/article/20/4/wordpress-virtual-machine) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +How to set up and run WordPress for your classroom +====== +Follow these simple steps to customize WordPress for use in the +classroom using free open source software. +![Painting art on a computer screen][1] + +There are many good reasons to set up WordPress for your classroom. As more schools switch to online classes, WordPress can become the go-to content management system. Teachers using WordPress can provide a number of different educational choices to differentiate instruction for their students. Blogging is an accessible way to create content that energizes student learning. Teachers can write short stories, poems, and provide picture galleries that function as story starters. Students can comment and those comments can be moderated by their teacher. + +There are free options like [WordPress.com][2] and [Edublogs][3]. However, these free versions are limited, and you may want to explore all your options. You can install [Virtualbox][4] on any Windows, macOS, or Linux computer. You can use your own computer or an extra you happen to have access to in a virtual environment. + +On Linux, you can install Virtualbox from your package manager. For instance, on Debian, Elementary OS, or Ubuntu: + + +``` +`$ sudo apt install virtualbox` +``` + +On Fedora: + + +``` +`$ sudo dnf install virtualbox` +``` + +### Download a Wordpress image + +Wordpress is easy to install, but server configuration and management can be difficult for the uninitiated. That's why there's [Turnkey Linux][5], a project dedicated to creating virtual machine images and containers of popular server software, preconfigured and ready to run. With Turnkey Linux, you just download a disk image containing the operating system and the software you want to run, and then import that image into Virtualbox. + +To get started with Wordpress, download the **VM** virtual machine image from [turnkeylinux.org/wordpress][6] (in the **Builds** section). Make sure you download the image labeled **VM**, because that's the only format meant for Virtualbox. + +### Import the image into Virtualbox + +After installing Virtualbox, launch the application and import the virtual machine image into Virtualbox. + +![][7] + +Networking on the imported image is set to NAT by default. You will want to change the network settings to "bridged." + +![Virtualbox menu][8] + +After restarting the virtual machine, you are prompted to add passwords for MySQL, Adminer, and the WordPress **admin** user. + +Then you see the network configuration console for the installation. Launch a web browser and navigate to the **web** address provided (in this example, it's 192.168.86.149). + +![Console][9] + +In a web browser, you see a login screen for your Wordpress installation. Click on the **Login** link. + +![Wordpress welcome][10] + +Enter **admin** as the username, followed by the password you created earlier. Click the **Login** link. On this first login as **admin**, you can choose a new password. Be sure to remember it! + +![Login screen][11] + +After logging in, you're presented with the WordPress Dashboard. The software will likely notify you, in the upper left corner of the window, that a new version of Wordpress exists. Update to the latest versions as prompted so your site is secure. + +It's important to note that your Wordpress blog isn't visible by anyone on the Internet yet. It only exists in your local network: only people in your building who are connected to the same router or wifi access point as you can see your Wordpress site right now. The worldwide Internet can't get to it because you're behind a firewall (embedded in your router, and possible also in your computer). + +![Wordpress dashboard][12] + +Following the upgrade, the application restarts, and you're ready to begin configuring WordPress to your liking. + +![Wordpress configuration][13] + +On the far left, there is a button to **Customize Your Site**. + +There, you can choose the name of your site. You can accept the default theme, which is "Twenty Nineteen," or choose another. My favorite is "Twenty Ten," but browse through the themes available to find your personal favorite. WordPress comes with five free themes installed. You can download other free themes from the [WordPress][14][.org][15] site or choose to purchase a premium theme. + +When you click the **Customize Your Site** button, you're presented with new menu options. Select **Site Identity** and change the name of your site. You might use the name of your school or classroom. There's also room to choose a byline (the credit given to the author of a blog post). You can choose the colors for your site and where you will place menus and widgets. WordPress widgets and content and features to the sidebars for your site. Homepage settings are important, as they allow you to choose between a static page that might have a description of your school or classroom or having your blog entries displayed prominently. You can add additional CSS. + +![Turnkey theme][16] + +You can edit your front page, add additional pages like "About," or add a blog post. You can also manage widgets, manage menus, turn comments on or off, or add a link to learn more about WordPress. + +Customizing your site allows you to configure a number of options quickly and easily. + +WordPress has dozens of widgets that you can place in different areas of your page. Widgets are independent sections of content that can be placed into specific areas provided by your theme. These areas are called sidebars. + +### Adding content + +After you have WordPress configured to your liking, you probably want to get busy creating content. The best way to do that is to head back to the WordPress Dashboard. + +On the left side, near the top of the page, you see **Posts**. Select that link and a dropdown appears. Choose **Add New** to create your very first blog post. + +![Add post dropdown][17] + +Fill in your title in the top block and then move down to the body. It's like using a word processor. WordPress has all the tools you need to write. You can set the font size from _small_ to _huge_. You can start a paragraph with dropped capitals. The text and background color can be changed. Your posts can include quote blocks and embedded content. A wide variety of embedded content is supported so you can make your posts a dynamic multimedia experience. + +![Wordpress classroom blog][18] + +### Going online + +So far, your Wordpress blog only exists on your local network. Anyone using the same router as you (your housemates or classroom) can see your Wordpress site by navigating to 192.168.86.149, but once you're away from that router, the site becomes inaccessible. + +If you want to go online with your custom Wordpress site, you have to allow traffic through your router, and then direct that traffic to the computer running Virtualbox. If you've installed Virtualbox on a laptop, then your website would disappear any time you closed your laptop, which is why servers that never get shutdown exist. But if this is just a fun lesson on how to run a Wordpress site, then having a website that's only available during class hours is fine. + +If you have access to your router, then you can log into it and make the adjustments yourself. If you don't own or control your router, then you must talk to your systems administrator for access. + +A _router_ is the box you got from your internet service provider. You might also call it your _modem_. + +Every device is different, so there's no way for me to definitively tell you what you need to click on to adjust your settings. Generally, you access your home router through a web browser. Your router's address is often printed on the bottom of the router and begins with either 192.168 or 10. + +Navigate to the router address and log in with the credentials you were provided when you got your internet service. It's often as simple as `admin` with a numeric password (sometimes this password is printed on the router, too). If you don't know the login, call your internet provider and ask for details. + +Different routers use different terms for the same thing; keywords to look for are **Port forwarding**, **Virtual server**, and **Firewall**. Whatever your router calls it, you want to accept traffic coming to port 80 of your router and forward that traffic to the same port of your virtual machines's IP address (in this example, that is 192.168.86.149, but it could be different for you). + +![Example router setting screen][19] + +Now you're allowing traffic through the web port of your router's firewall. To view your Wordpress site over the Internet, get your worldwide IP address. You can get your global IP by going to the site [icanhazip.com][20]. Then go to a different computer, open a browser, and navigate to that IP address. As long as Virtualbox is running, you'll see your Wordpress site on the Internet. You can do this from anywhere in the world, because your site is on the Internet now. + +Most websites use a domain name so you don't have to remember global IP addresses. You can purchase a domain name from services like [webhosting.coop][21] or [gandi.net][22], or a temporary one from [freenom.com][23]. Mapping that to your Wordpress site, however, is out of scope for this article. + +### Wordpress for everyone + +[WordPress][24] is open source and is licensed under the [GNU Public License][25]. You are welcome to contribute to WordPress as either a [developer][26] or enthusiast. WordPress is committed to being inclusive and accessible as possible. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/wordpress-virtual-machine + +作者:[Don Watkins][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/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://wordpress.com/ +[3]: https://edublogs.org/ +[4]: https://www.virtualbox.org/ +[5]: https://www.turnkeylinux.org +[6]: https://www.turnkeylinux.org/wordpress +[7]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_1.png +[8]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_2.png (Virtualbox menu) +[9]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_3.png (Console) +[10]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_4.png (Wordpress welcome) +[11]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_5.png (Login screen) +[12]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_6.png (Wordpress dashboard) +[13]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_7.png (Wordpress configuration) +[14]: http://Wordpress.org +[15]: http://WordPress.org +[16]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_8.png (Turnkey theme) +[17]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_12.png (Add post dropdown) +[18]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_13.png (Wordpress classroom blog) +[19]: https://opensource.com/sites/default/files/router-web.jpg (Example router setting screen) +[20]: http://icanhazip.com/ +[21]: https://webhosting.coop/domain-names +[22]: https://www.gandi.net +[23]: http://freenom.com/ +[24]: https://wordpress.org/ +[25]: https://github.com/WordPress/WordPress/blob/master/license.txt +[26]: https://wordpress.org/five-for-the-future/ From 6441c100a9e34a6a69825856e97217f1a25758c3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Apr 2020 02:01:09 +0800 Subject: [PATCH 154/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200417=20Is=20r?= =?UTF-8?q?eporting=20100%=20of=20code=20coverage=20reasonable=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200417 Is reporting 100- of code coverage reasonable.md --- ...orting 100- of code coverage reasonable.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 sources/tech/20200417 Is reporting 100- of code coverage reasonable.md diff --git a/sources/tech/20200417 Is reporting 100- of code coverage reasonable.md b/sources/tech/20200417 Is reporting 100- of code coverage reasonable.md new file mode 100644 index 0000000000..6d57fb30f8 --- /dev/null +++ b/sources/tech/20200417 Is reporting 100- of code coverage reasonable.md @@ -0,0 +1,174 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Is reporting 100% of code coverage reasonable?) +[#]: via: (https://opensource.com/article/20/4/testing-code-coverage) +[#]: author: (Eric Herman https://opensource.com/users/ericherman) + +Is reporting 100% of code coverage reasonable? +====== +The time required to reach reporting 100% of code coverage is +considerably less than what I would have estimated before this +exploration. +![Code going into a computer.][1] + +The [Foundation for Public Code][2] works to enable open and collaborative public-purpose software for public organizations (like local governments) internationally. We do this by supporting software at the codebase level through codebase stewardship. We also publish the [Standard for Public Code][3] (draft version 0.1.4 at the time of this writing), which helps open source codebase communities build solutions that can be reused successfully by other organizations. It includes guidance for policymakers, managers, developers, designers, and vendors. + +Among other things, the standard addresses [code coverage][4], or how much of the code is executed when an automated test suite runs. It's one way to measure the likelihood that the code contains undetected software bugs. In the standard's ["Use continuous integration" requirements][5], it says, "source code test and documentation coverage **should** be monitored." Additionally, the [guidance to check][6] this requirement states, "code coverage tools check whether coverage is at 100% of the code." + +Over my software development career, which spans more than two decades, I have worked on codebases large and small and some with very high percentages of code coverage. Yet none of the non-trivial codebases I have contributed to have reported 100% test coverage. This made me question whether the "_check whether coverage is at 100%_" guidance would be followed. + +When I think about the nature of the test coverage gaps in the codebases I have worked on, they typically have been around system states that are very difficult (and in some cases, impossible) to create. For instance, in earlier versions of Java, I recall we were required to write catch blocks for exceptions that could never be thrown. + +Previously, I reasoned that 100% test coverage is something to aspire to, but it is probably not worth the cost on most codebases and may not be realistic in a few. + +Coverage tools have been getting smarter and more tunable over time. Languages have been getting lighter, and libraries have been getting easier to mock and test. So how unreasonable is 100% coverage of functionality today? + +### Resource exhaustion + +The high-quality but low test-coverage codebases I contribute to happen to be written in C or C++. A quick glance at these codebases shows that there is a class of common low-coverage situations that I'll lump together under the umbrella of resource exhaustion: out of memory, out of disk space, etc. + +Here is a simple example of code that does not check for resource exhaustion; in this case, memory allocation failure: + + +``` +char *buf = malloc(80); +sprintf(buf, "hello, world"); +``` + +This example code needs to allocate a small buffer, so it calls **malloc(80)**, and **malloc** usually returns a pointer to 80 bytes of memory … but that can fail. In the (unlikely) case that **malloc** returns **NULL**, the code above will proceed to call **sprintf** with a **NULL** pointer which causes a crash. It is typical in C code to do something more like this: + + +``` +char *buf = malloc(80); +if (buf == NULL) { +    fprintf(stderr, "malloc returned NULL for 80 bytes?\n"); +    return NULL; +} +sprintf(buf, "hello, world"); +``` + +This code guards against **malloc** returning **NULL**, which is better. However, creating tests for correct behavior in the face of this kind of resource exhaustion can be really hard. It's not impossible, of course, and there are multiple approaches. Many approaches result in fragile tests, which require a lot of maintenance over time, and these tests can be very time-consuming to build in the first place. + +### Exploration + +Pondering this, I decided to run a little experiment to see if I could learn something about the costs and consequences of this strict, 100% criterion. + +Since I do some embedded-systems development, I have a few C libraries that I've developed and reused over the years in my embedded projects. I decided to look at some of these libraries and see just how hard it would be to bring them up to 100% code coverage. In the process, I paid attention to the impact on code clarity, code structure, and performance. + +#### A library with preexisting dependency injection + +Step one is measuring by adding code coverage to a codebase. Since this is C, **gcc** provides quite a lot by default with the **\--coverage** option, and **lcov** (with **genhtml**) does a good job of making reports; thus, this step was easy. I expected the starting coverage to be pretty good—it was, but it had a few untested branches, as well as the predicted gaps around error conditions and error reporting. + +I made error reporting pluggable, so it was easier to capture and make assertions around error messages in previously untested branches. + +Since this code already allowed for pluggable implementations of **malloc** and **free**, it was straightforward to write little malloc and free wrappers that I could inject memory allocation failures into. Within an hour or two, that was covered. + +In the process, I realized that there was one condition where, from the perspective of the calling client code, it was impossible to distinguish between the situation where an error occurs and one where **NULL** is a valid return value. For you C programmers, it was essentially similar to the following: + + +``` +/* stashes a copy of the value + * returns the previously stashed value */ +char *foo_stash(foo_s *context, +                char *stash_me, +                size_t stash_me_len) +{ +    char *copy = malloc(stash_me_len); +    if (copy == NULL) { +        return NULL; +    } +    memcpy(copy, stash_me, stash_me_len); +    char *previous = context->stash; +    context->stash = copy; +    /* previous may be NULL */ +    return previous; +} +``` + +I adjusted the API to allow the error information to be explicitly available. If you are a C developer, you know there are various ways this can be accomplished. I chose an approach similar to this: + + +``` +/* stashes a copy of the value + * returns the previously stashed value + * on error, the 'err' pointer is set to 1 */ +char *foo_stash2(foo_s *context, +                char *stash_me, +                size_t stash_me_len, +                int *err) +{ +    char *copy = malloc(stash_me_len); +    if (copy == NULL) { +        *err = 1; +        return NULL; +    } +    memcpy(copy, stash_me, stash_me_len); +    char *previous = context->stash; +    context->stash = copy; +    /* previous may be NULL */ +    return previous; +} +``` + +Without testing for resource exhaustion, it may have taken a long time for me to notice this (now obvious) shortcoming of the API. + +To get **lcov** to report 100% test coverage, I had to tell the compiler to [not inline any code][7], something I learned it does even at optimization level zero. + +When embedded in actual firmware, the compiler optimized away the unused indirection; therefore, the added indirection in the source code imposed no real-world performance penalty in the compiled firmware. + +Of course, this was the easy library. + +#### A more typical library + +Once I established a method of injecting memory allocation failures in tests, I decided to move onto another library, but one for which malloc and free were not already pluggable. I had questions. How invasive will this be to the codebase? Will it clutter the code, making it less clear? How time-consuming will it be? + +While I don't always record coverage metrics, I am a big believer in testing: more than 20 years ago, I learned that my code improves if I write the tests and client code [before][8] the implementation code, and I have worked that way ever since. (In [_Test-Driven Development: By Example_][9], you can find my name in the acknowledgments.) Yet, when I added code coverage reporting to the second library, I was surprised to see that (at some point in the past) I had added a pair of functions to the library without adding tests for them. The other untested areas were, unsurprisingly, code to handle memory-allocation failure. + +Writing tests for the pair of untested functions was, of course, quick and easy. The coverage tools also revealed that I had a function with an untested code branch that, given only a quick glance, contained a bug. The fix was trivial, yet I was surprised to find a bug, given the different projects where I use this library. Nonetheless, there it was, a humbling reminder that, all too often, bugs lurk in untested code. + +Next up was the more challenging stuff: testing for resource exhaustion. I started by introducing some global variables for the malloc/free function pointers, as well as a variable to hold a memory-tracking object. Once that was working, I moved those variables from global scope into a context argument that was already present. Refactoring the code to allow for the necessary indirection took only a couple of hours (less time than I expected), and the complexity added was negligible. + +### Reflections + +My conclusion from the first library was that it was well worth the time. The code is now more flexible, the API is now more complete for the caller, and writing the failure injection harness was pretty easy. + +From the second library, I was reminded that even less-pluggable code could be made testable without adding undue levels of complexity. The code improved, I fixed a bug, and I can be more confident in the code. Also, the additional modularity of being able to plug in an alternative memory allocator is a feature that may prove more valuable in the future. + +Exclusion comments are a feature of **lcov** to cause coverage reporting to ignore a block of code. Interestingly, I didn't feel the need to use exclusion comments in either library. + +I am more certain than ever that even very good code is improved by investing in test coverage. + +Both of these codebases are small, had some modularity already, began from a point of good testing, are single-threaded, and contain no graphical UI code. If I were to try to tackle this on one of the larger, more monolithic codebases I contribute to, it would be harder and require a larger time investment. There would likely be some sections of code where I might still conclude that the best thing to do would be to "cheat" by tuning the tooling to not report on some section of code. + +That said, I estimate that the time required to reach reporting 100% of code coverage is considerably less than what I would have estimated before this exploration. + +If you happen to be a C coder and want to see a running example of this, including **gcov** / **lcov** usage, I extracted the out-of-memory injecting code and put it in an [example repository][10]. + +Have you pushed a codebase to 100% coverage by tests, or tried to? What was your experience? Please share it in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/testing-code-coverage + +作者:[Eric Herman][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/ericherman +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.) +[2]: https://publiccode.net/ +[3]: https://standard.publiccode.net +[4]: https://en.wikipedia.org/wiki/Code_coverage +[5]: https://standard.publiccode.net/criteria/continuous-integration.html#requirements +[6]: https://standard.publiccode.net/criteria/continuous-integration.html#how-to-test +[7]: https://twitter.com/Eric_Herman/status/1224983465784938496 +[8]: https://opensource.com/article/20/2/automate-unit-tests +[9]: https://www.oreilly.com/library/view/test-driven-development/0321146530/ +[10]: https://github.com/ericherman/context-alloc From ce62c7a4db39611ce612b03a50161eba592a5cb4 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Apr 2020 02:03:07 +0800 Subject: [PATCH 155/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200418=20Ethern?= =?UTF-8?q?et=20consortium=20announces=20completion=20of=20800GbE=20spec?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md --- ...ium announces completion of 800GbE spec.md | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md diff --git a/sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md b/sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md new file mode 100644 index 0000000000..a7a6bf1c1a --- /dev/null +++ b/sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md @@ -0,0 +1,56 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Ethernet consortium announces completion of 800GbE spec) +[#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +Ethernet consortium announces completion of 800GbE spec +====== +The specification for 800GbE doubles the maximum speed of the current Ethernet standard, but also tweaks other aspects including latency. +Martyn Williams/IDGNS + +The industry-backed Ethernet Technology Consortium has announced the completion of a specification for 800 Gigabit Ethernet technology. + +Based on many of the technologies used in the current top-end 400 Gigabit Ethernet protocol, the new spec is formally known as 800GBASE-R. The consortium that designed it (then known as the 25 Gigabit Ethernet Consortium) was also instrumental in developing the 25, 50, and 100 Gigabit Ethernet protocols and includes Broadcom, Cisco, Google, and Microsoft among its members. + +**[ Now see [the hidden cause of slow internet and how to fix it][1].]** + +The 800GbE spec adds new media access control (MAC) and physical coding sublayer (PCS) methods, which tweaks these functions to distribute data across eight physical lanes running at a native 106.25Gbps. (A lane can be a copper twisted pair or in optical cables, a strand of fiber or a wavelength.)  The 800GBASE-R specification is built on two 400 GbE 2xClause PCSs to create a single MAC which operates at a combined 800Gbps. + +And while the focus is on eight 106.25G lanes, it's not locked in. It is possible to run 16 lanes at half the speed, or 53.125Gbps. + +The new standard offers half the latency of 400G Ethernet specification, but the new spec also cuts the forward error correction (FEC) overhead on networks running at 50 Gbps, 100 Gbps, and 200 Gbps by half, thus reducing the packet-processing load on the NIC. + +By lowering latency this will feed the need for speed in latency-sensitive applications like [high-performance computing][2] and artificial intelligence, where lots of data needs to be moved around as fast as possible. + +[][3] + +Doubling from 400G to 800G wasn’t too great of a technological leap. It meant adding more lanes at the same transfer rate, with a few tweaks. But breaking a terabit, something Cisco and other networking firms have been talking about for a decade, will require a significant reworking of the technology and won’t be an easy fix. + +It likely won’t be cheap, either. 800G works with existing hardware and 400GbE switches are not cheap, running as high as six figures. Moving past the terabit barrier with a major revision to the technology will likely be even more expensive. But for hyperscalers and HPC customers, that’s par for the course. + +The ETC didn’t say when to expect new hardware supporting the 800G, but given its modest change to existing specs, it could appear this year, assuming the pandemic-induced shutdown doesn’t throw a monkey wrench into plans. + +Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html + +作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/article/3107744/internet/the-hidden-cause-of-slow-internet-and-how-to-fix-it.html +[2]: https://www.networkworld.com/article/3444399/high-performance-computing-do-you-need-it.html +[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 76d336d28f8556b0e3a66710ee8e0599a16c68f5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 18 Apr 2020 02:03:54 +0800 Subject: [PATCH 156/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200417=20How=20?= =?UTF-8?q?to=20compress=20files=20on=20Linux=205=20ways?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200417 How to compress files on Linux 5 ways.md --- ...7 How to compress files on Linux 5 ways.md | 207 ++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 sources/tech/20200417 How to compress files on Linux 5 ways.md diff --git a/sources/tech/20200417 How to compress files on Linux 5 ways.md b/sources/tech/20200417 How to compress files on Linux 5 ways.md new file mode 100644 index 0000000000..5ce33cd18c --- /dev/null +++ b/sources/tech/20200417 How to compress files on Linux 5 ways.md @@ -0,0 +1,207 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to compress files on Linux 5 ways) +[#]: via: (https://www.networkworld.com/article/3538471/how-to-compress-files-on-linux-5-ways.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +How to compress files on Linux 5 ways +====== +There are a number of tools that you use to compress files on Linux systems, but they don't all behave the same way or yield the same level of compression. In this post, we compare five of them. +Getty Images + +There are quite a few commands on Linux for compressing files. One of the newest and most effective is **xz**, but they all have advantages for both saving disk space and preserving files for later use. In this post, we compare the compression commands and point out the significant differences. + +### tar + +The tar command is not specifically a compression command. It’s generally used to pull a number of files into a single file for easy transport to another system or to back the files up as a related group. It also provides compression as a feature, which makes a lot of sense, and the addition of the **z** compression option is available to make this happen. + +When compression is added to a **tar** command with the **z** option, tar uses **gzip** to do the compressing. + +You can use **tar** to compress a single file as easily as a group though this offers no particular advantage over using **gzip** directly. To use **tar** for this, just identify the file as you would a group of files with a “tar cfz newtarfile filename” command like this: + +``` +$ tar cfz bigfile.tgz bigfile + ^ ^ + | | + +- new file +- file to be compressed + +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 103270400 Apr 16 16:09 bigfile +-rw-rw-r-- 1 shs shs 21608325 Apr 16 16:08 bigfile.tgz +``` + +Note the significant reduction in the file size. + +If you prefer, you can use the **tar.gz** extension which might make the character of the file a bit more obvious, but most Linux users will probably recognize **tgz** as meaning the same thing – the combination of **tar** and **gz** to indicate that the file is a compressed tar file. You will be left with both the original file and the compressed file once the compression is complete. + +To collect a number of files together and compress the resultant “tar ball” in one command, use the same basic syntax, but specify the files to be included as a group in place of the single file. Here’s an example: + +[][1] + +``` +$ tar cfz bin.tgz bin/* + ^ ^ + | +-- files to include + + new file +``` + +### zip + +The **zip** command creates a compressed file while leaving the original file intact. The syntax is straightforward except that, as with **tar**, you have to remember that your original file should be the last argument on the command line. + +``` +$ zip ./bigfile.zip bigfile +updating: bigfile (deflated 79%) +$ ls -l bigfile bigfile.zip +-rw-rw-r-- 1 shs shs 103270400 Apr 16 11:18 bigfile +-rw-rw-r-- 1 shs shs 21606889 Apr 16 11:19 bigfile.zip +``` + +### gzip + +The **gzip** command is very simple to use. You just type "gzip" followed by the name of the file you want to compress. Unlike the commands described above, **gzip** will encrypt the files "in place". In other words, the original file will be replaced by the encrypted file. + +``` +$ gzip bigfile +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 21606751 Apr 15 17:57 bigfile.gz +``` + +### bzip2 + +As with the **gzip** command, **bzip2** will compress the file that you select "in place", leaving only the original file. + +``` +$ bzip bigfile +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 18115234 Apr 15 17:57 bigfile.bz2 +``` + +### xz + +A relative newcomer to the compression command team, **xz** is a front runner in terms of how well it compresses files. Like the two previous commands, you only need to supply the file name to the command. Again, the original file is compressed in place. + +``` +$ xz bigfile +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 13427236 Apr 15 17:30 bigfile.xz +``` + +For large files, you are likely to notice that **xz** takes longer to run than other compression commands, but the compression results are very impressive. + +### Comparisons to consider + +Most people have heard it said that "size isn't everything". So, let's compare file size as well as some other issues to be considered when you make plans for how you want to compress your files. + +The stats shown below all relate to compressing the single file – bigfile – used in the example commands shown above. This file is a large and fairly random text file. Compression rates will depend to some extent on the content of the files. + +#### Size reduction + +When compared, the various compression commands shown above yielded the following results. The percentages represent how the compressed files compare with the original file. + +``` +-rw-rw-r-- 1 shs shs 103270400 Apr 16 14:01 bigfile +------------------------------------------------------ +-rw-rw-r-- 1 shs shs 18115234 Apr 16 13:59 bigfile.bz2 ~17% +-rw-rw-r-- 1 shs shs 21606751 Apr 16 14:00 bigfile.gz ~21% +-rw-rw-r-- 1 shs shs 21608322 Apr 16 13:59 bigfile.tgz ~21% +-rw-rw-r-- 1 shs shs 13427236 Apr 16 14:00 bigfile.xz ~13% +-rw-rw-r-- 1 shs shs 21606889 Apr 16 13:59 bigfile.zip ~21% +``` + +The **xz** commands wins, ending up at only 13% the size of the original file, but all of these compression commands reduced the original file size quite significantly. + +#### Whether the original files are replaced + +The **bzip2**, **gzip** and **xz** commands all replace the original files with compressed versions. The **tar** and **zip** commands to not. + +#### Run time + +The **xz** command seems to take more time than the other commands to encrypt the files. For bigfile, the approximate times were: + +``` +command run-time +tar 4.9 seconds +zip 5.2 seconds +bzip2 22.8 seconds +gzip 4.8 seconds +xz 50.4 seconds +``` + +Decompression times are likely to be considerably smaller than compression times. + +#### File permissions + +Regardless of what permissions you have set on your original file, permissions for the compressed file will be based on your **umask** setting, except for **bzip2** which retains the original file's permissions. + +#### Compatibility with Windows + +The **zip** command creates a file which can be used (i.e., decompressed) on Windows systems as well as Linux and other Unix systems without having to install other tools which may or may not be available. + +### Decompressing files + +The commands for decompressing files are similar to those used to compress the files. These commands would work for decompressing bigfile after the compression commands shown above were run. + + * tar: **tar xf bigfile.tgz** + * zip: **unzip bigfile.zip** + * gzip: **gunzip bigfile.gz** + * bzip2: **bunzip2 bigfile.gz2** + * xz: **xz -d bigfile.xz** or **unxz bigfile.xz** + + + +### Running your own compression comparisons + +If you'd like to run some tests on your own, grab a large but replaceable file and compress it using each of the commands shown above – preferably using a new subdirectory. You might have to first install **xz** if you want to include it in the tests.This script can make the comparison easier, but will likely take a few minutes to complete. + +``` +#!/bin/bash + +# ask user for filename +echo -n "filename> " +read filename + +# you need this because some commands will replace the original file +cp $filename $filename-2 + +# clean up first (in case previous results are still available) +rm $filename.* + +tar cvfz ./$filename.tgz $filename > /dev/null +zip $filename.zip $filename > /dev/null +bzip2 $filename +# recover original file +cp $filename-2 $filename +gzip $filename +# recover original file +cp $filename-2 $filename +xz $filename + +# show results +ls -l $filename.* + +# replace the original file +mv $filename-2 $filename +``` + +Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538471/how-to-compress-files-on-linux-5-ways.html + +作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[2]: https://www.facebook.com/NetworkWorld/ +[3]: https://www.linkedin.com/company/network-world From b770695e03c2a30c9073798c564cecd36b3a752f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 18 Apr 2020 12:33:52 +0800 Subject: [PATCH 157/394] Rename sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md to sources/talk/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md --- ...tion for community to become more impactful - Chip Childers.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md (100%) diff --git a/sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md b/sources/talk/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md similarity index 100% rename from sources/tech/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md rename to sources/talk/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md From e21237f5d107b47727271096b0a07ec312da4d30 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Sat, 18 Apr 2020 12:41:51 +0800 Subject: [PATCH 158/394] TSL 20200228 Getting started with Linux firewalls --- ...28 Getting started with Linux firewalls.md | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) rename {sources => translated}/tech/20200228 Getting started with Linux firewalls.md (68%) diff --git a/sources/tech/20200228 Getting started with Linux firewalls.md b/translated/tech/20200228 Getting started with Linux firewalls.md similarity index 68% rename from sources/tech/20200228 Getting started with Linux firewalls.md rename to translated/tech/20200228 Getting started with Linux firewalls.md index 7c2cefc682..bc5d20732a 100644 --- a/sources/tech/20200228 Getting started with Linux firewalls.md +++ b/translated/tech/20200228 Getting started with Linux firewalls.md @@ -1,25 +1,24 @@ -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with Linux firewalls) -[#]: via: (https://opensource.com/article/20/2/firewall-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Getting started with Linux firewalls" +[#]: via: "https://opensource.com/article/20/2/firewall-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" -Getting started with Linux firewalls +Linux 防火墙入门教程 ====== -A firewall is your computer's first line of defense against network -intrusion. Download our cheat sheet to make sure you're secure. +防火墙是你的计算机防止网络入侵的第一道屏障。为确保你的安全,请下载我们的备忘单。 ![Cheat Sheet cover image][1] -A sensible firewall is your computer's first line of defense against network intrusion. When you're at home, you're probably behind a firewall built into the router supplied by your internet service provider. When you're away from home, though, the only firewall you have is the one running on your computer, so it's important to configure and control the firewall on your Linux computer. If you run a Linux server, it's just as important to know how to manage your firewall so that you can protect it from unwanted traffic both locally and remotely. +合理的防火墙是你的计算机防止网络入侵的第一道屏障。你在家里上网,通常互联网服务提供会在路由中搭建了一层防火墙。如果不在家里上网,那么你计算机上的那层防火墙就是仅有的一层,因为配置和控制好你 Linux 电脑上的防火墙很重要。如果你维护一台 Linux 服务器,知道怎么去管理你的防火墙同样重要,只要掌握了这些知识你才能保护你的服务器免于本地或远程非法流量的入侵。 -### Install a firewall +### 安装防火墙 -Many Linux distributions ship with a firewall already installed, and traditionally that was **iptables**. It is extremely effective and customizable, but it can be complex to configure. Luckily, developers have produced several frontends to help users control their firewall without writing lengthy iptables rules. +很多 Linux 发行版本已经自带了防火墙,通常是 `iptables`。它很有效并可以自定义,但配置起来有点复杂。幸运的是,有开发者写出了一些前端界面来帮助用户不需要写冗长的 iptables 规则就可以控制防火墙。 -On Fedora, CentOS, Red Hat, and similar distributions, the firewall software installed by default is **firewalld**, which is configured and controlled with the **firewall-cmd** command. On Debian and most other distributions, firewalld is available to install from your software repository. Ubuntu ships with the Uncomplicated Firewall (ufw), so to use firewalld, you must enable the **universe** repository: +在 Fedora,CentOS,Red Hat 和一些类似的发行版本上,默认安装的防火墙软件是 `firewalld`,是用 **firewall-cmd** 命令来配置和控制的。在 Debian 和大部分其他发行版上,可以从你的软件仓库安装 firewalld。Ubuntu 自带的是 Uncomplicated Firewall(ufw),所以你必须打开 **universe** 库才能使用 firewalld: ``` @@ -27,25 +26,25 @@ $ sudo add-apt-repository universe $ sudo apt install firewalld ``` -You must also deactivate ufw: +你还需要停用 ufw: ``` `$ sudo systemctl disable ufw` ``` -There's no reason _not_ to use ufw. It's an excellent firewall frontend. However, this article focuses on firewalld because of its wide availability and integration into systemd, which is shipped with nearly every distribution. +没有理由*不*用 ufw。它是一个强大的防火墙前端。然而,本文重点讲 firewalld,因为大部分发行版都支持它而且它集成到了 systemd,systemd 是几乎所有发行版都自带的。 -Regardless of your distribution, for a firewall to be effective, it must be active, and it should be loaded at boot time: +不管你的发行版是哪个,都要先激活防火墙才能让它生效,激活需要在启动时加载: ``` `$ sudo systemctl enable --now firewalld` ``` -### Understanding firewall zones +### 理解防火墙的 zone -Firewalld aims to make firewall configuration as simple as possible. It does this by establishing _zones_. A zone is a set of sensible, common rules that suit the everyday needs of most users. There are nine by default: +Firewalld 旨在让防火墙的配置工作尽可能简单。它通过建立 *zone* 来实现这个目标。一个 zone 是一类型的合理、通用的规则,这些规则适配大部分用户的日常需求。 * **trusted:** All network connections are accepted. This is the least paranoid firewall setting and should only be used in a trusted environment, such as a test lab or in a family home where everyone on the local network is known to be friendly. * **home, work, internal:** In these three zones, most incoming connections are accepted. They each exclude traffic on ports that usually expect no activity. Any of them is a reasonable setting for use in a home setting where there is no reason to expect network traffic to obscure ports, and you generally trust the other users on the network. @@ -124,5 +123,5 @@ via: https://opensource.com/article/20/2/firewall-cheat-sheet [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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP "Cheat Sheet cover image" [2]: https://opensource.com/downloads/firewall-cmd-cheat-sheet From 5edac4c8560bb719df772065b54624234a52d0c1 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sat, 18 Apr 2020 13:48:01 +0800 Subject: [PATCH 159/394] Rename sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md to sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md --- ...418 Ethernet consortium announces completion of 800GbE spec.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{talk => news}/20200418 Ethernet consortium announces completion of 800GbE spec.md (100%) diff --git a/sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md b/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md similarity index 100% rename from sources/talk/20200418 Ethernet consortium announces completion of 800GbE spec.md rename to sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md From 15fe356d75a3ef19b95a248c6301a3d471ab4dee Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 14:21:06 +0800 Subject: [PATCH 160/394] PRF @geekpi --- ...ow to Add Multiple Time Zones in Ubuntu.md | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md b/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md index c3ab289f06..0260e1327d 100644 --- a/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md +++ b/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Add Multiple Time Zones in Ubuntu) @@ -10,11 +10,13 @@ 如何在 Ubuntu 中添加多个时区 ====== -_**此教程展示了使用 GNOME 桌面环境在 Ubuntu 和其他发行版中为多个时区添加其他时钟的步骤。**_ +> 本快速教程介绍了在 Ubuntu 和其他发行版中使用 GNOME 桌面环境添加多时区时钟的步骤。 + +![](https://img.linux.net.cn/data/attachment/album/202004/18/142021jborblzkglbebrkk.jpg) 如果你的家人或同事在另一个国家,或者你居住在一个有多个时区的国家,那么了解时差就变得很重要。毕竟,你不想在凌晨 4 点打电话打扰别人。 -一些 Linux 用户还会加一个 [UTC 时间][1]标签,因为大多数服务器都使用 UTC。 +一些 Linux 用户还会记下 [UTC 时间][1],因为大多数服务器都使用 UTC。 如果你有多个时钟,那么可以更好地管理此类情况。你可以将一个时钟设置为本地时间,并将其他时钟同步到其他时区。这使得了解不同时间变得更加容易。 @@ -26,11 +28,11 @@ _**此教程展示了使用 GNOME 桌面环境在 Ubuntu 和其他发行版中 要添加其他时钟,可以使用一个叫 [GNOME Clocks][3] 的小程序。 -GNOME Clocks 是一个简单的应用,它可以显示多个位置的时间和日期。你也可以使用它来设置闹钟或计时器。还包括秒表功能。 +GNOME Clocks 是一个简单的应用,它可以显示多个位置的时间和日期。你也可以使用它来设置闹钟或计时器,它还包括秒表功能。 GNOME Clocks 存在于 Ubuntu 的 Universe 仓库中。因此,请确保首先[启用 Universe 仓库][4]。 -你可以在软件中心中搜索 GNOME Clocks 并从那里安装它。 +你可以在软件中心中搜索 “GNOME Clocks” 并从那里安装它。 ![Gnome Clocks Ubuntu Software Center][5] @@ -42,13 +44,13 @@ sudo apt install gnome-clocks 如果你使用的是其他 Linux 发行版,那么请使用发行版的软件中心或软件包管理器来安装此程序。 -安装后,请按 super 键(Windows 键)并搜索 clocks: +安装后,请按 `Super` 键( `Windows` 键)并搜索 clocks: ![Gnome Clocks App Search Ubuntu][6] -启动程序,你应该会看到一个提供一些选项的界面,例如添加世界时钟、设置闹钟、使用秒表和计时器。 +启动程序,你应该会看到一个界面,提供一些选项,例如添加世界时钟、设置闹钟、使用秒表和计时器。 -单击左上角的 + 号,它将为你提供搜索地理位置的选项。搜索,选择并添加。 +单击左上角的 “+” 号,它将为你提供搜索地理位置的选项。搜索、选择并添加。 ![Adding additional clocks][7] @@ -56,13 +58,13 @@ sudo apt install gnome-clocks ![Multiple clocks for multiple time zones][8] -你可以使用 Super + M 键快速打开消息托盘。你可以掌握这些[有用的 Ubuntu 快捷方式][9]来节省时间。 +你可以使用 `Super + M` 键快速打开消息托盘。你可以掌握这些[有用的 Ubuntu 快捷方式][9]来节省时间。 如果要删除其他时钟,你可以从 GNOME Clocks 应用界面执行以下操作: ![Remove Additional Clocks][10] -你无法删除当前时区并设置为其他时区。有其他方法[更改 Linux 中的当前时区][11]。 +你无法(在这里)删除当前时区并设置为其他时区。有其他方法[更改 Linux 中的当前时区][11]。 我希望你喜欢这个快速技巧。欢迎提出问题和建议。 @@ -73,7 +75,7 @@ via: https://itsfoss.com/add-multiple-time-zones-ubuntu/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From a424681b9f925b22ab193d4952064b878b31886b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 14:21:39 +0800 Subject: [PATCH 161/394] PUB @geekpi https://linux.cn/article-12121-1.html --- .../20200413 How to Add Multiple Time Zones in Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200413 How to Add Multiple Time Zones in Ubuntu.md (98%) diff --git a/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md b/published/20200413 How to Add Multiple Time Zones in Ubuntu.md similarity index 98% rename from translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md rename to published/20200413 How to Add Multiple Time Zones in Ubuntu.md index 0260e1327d..8cd0619343 100644 --- a/translated/tech/20200413 How to Add Multiple Time Zones in Ubuntu.md +++ b/published/20200413 How to Add Multiple Time Zones in Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12121-1.html) [#]: subject: (How to Add Multiple Time Zones in Ubuntu) [#]: via: (https://itsfoss.com/add-multiple-time-zones-ubuntu/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 3f4a6b9c256de84b2b8d96d0e7b03a9b55646bb6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 15:16:39 +0800 Subject: [PATCH 162/394] PRF @wxy --- ...live Linux history with the ROX desktop.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/translated/tech/20191216 Relive Linux history with the ROX desktop.md b/translated/tech/20191216 Relive Linux history with the ROX desktop.md index 42b9c52dde..c618f9c4de 100644 --- a/translated/tech/20191216 Relive Linux history with the ROX desktop.md +++ b/translated/tech/20191216 Relive Linux history with the ROX desktop.md @@ -1,30 +1,30 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Relive Linux history with the ROX desktop) [#]: via: (https://opensource.com/article/19/12/linux-rox-desktop) [#]: author: (Seth Kenlon https://opensource.com/users/seth) -用 ROX 桌面版重温 Linux 历史 +用 ROX 桌面重温 Linux 历史 ====== > 这篇文章是 Linux 桌面 24 天特别系列的一部分。如果你想来一次有趣的时光之旅,ROX 桌面非常值得一试。 -![Person typing on a 1980's computer][1] +![](https://img.linux.net.cn/data/attachment/album/202004/18/151533n196wag64gwhs0ga.jpg) -[ROX][2] 桌面已经不再积极开发,而它的遗留问题至今仍然存在,即使在它活跃开发的时候,它也是一个另类的 Linux 桌面。当其他的桌面感觉与旧的 Unix 或 Windows 界面大致相似时,ROX 则属于 BeOS、AmigaOS 和 [RISC OS][3] 桌面阵营。 +[ROX][2] 桌面已经不再积极开发,而它的遗留问题至今仍然存在,但即使在它活跃开发的时候,它也是一个另类的 Linux 桌面。当其他的桌面感觉与旧式的 Unix 或 Windows 界面大致相似时,ROX 则属于 BeOS、AmigaOS 和 [RISC OS][3] 桌面阵营。 它专注于拖放式操作(这使得它的可访问性对某些用户来说并不理想)、点击式操作、弹出式上下文菜单,以及一个独特的应用程序目录系统,无需安装即可运行本地应用程序。 ### 安装 ROX -如今,ROX 基本上都被遗弃了,只剩下一点残渣碎片留给用户自己去收集整理。幸运的是,这个难题相对来说比较容易解决,但是当你在发行版的软件仓库中找到 ROX 桌面的碎片时,不要被迷惑了,因为那并不是 ROX 桌面所有的碎片。ROX 常用的部分 —— 文件管理器([ROX-Filer][4])和终端([ROXTerm][5]) —— 似乎在大多数流行的发行版软件仓库中都有存在,你可以将它们作为独立的应用程序安装(和使用)。然而,要运行 ROX 桌面,你必须同时安装 ROX-Session 和它所依赖的库。 +如今,ROX 基本上都被遗弃了,只剩下一点残渣碎片留给用户自己去收集整理。幸运的是,这个难题相对来说比较容易解决,但是当你在发行版的软件仓库中找到 ROX 桌面的碎片时,不要被迷惑了,因为那并不是 ROX 桌面全部的碎片。ROX 常用的部分 —— 文件管理器([ROX-Filer][4])和终端([ROXTerm][5]) —— 似乎在大多数流行的发行版软件仓库中都有存在,你可以将它们作为独立的应用程序安装(并使用)。然而,要运行 ROX 桌面,你必须同时安装 ROX-Session 和它所依赖的库。 我在 Slackware 14.2 上安装了 ROX,但它应该可以在任何 Linux 或 BSD 系统上运行。 -首先,你必须从其版本库中安装 [ROX-lib2][6]。按照它的理念,你要安装 ROX-lib2,只需下载tarball、[解压][7],然后将 `ROX-lib` 目录移动到 `/usr/local/lib` 下。 +首先,你必须从其版本库中安装 [ROX-lib2][6]。你要安装 ROX-lib2,按照它的理念,只需下载tarball、[解压][7],然后将 `ROX-lib` 目录移动到 `/usr/local/lib` 下就行。 接下来,你要安装 [ROX-Session][8]。这可能需要从源码中编译,因为它很可能不在你的软件仓库中。编译过程需要编译工具,这些工具在 Slackware 上是默认提供的,但在其他发行版中往往会被省略,以节省初始下载空间。根据你的发行版不同,你必须安装的包的名称也不同,所以请参考文档来了解具体内容。例如,在 Debian 发行版中,你可以在 [Debian 的 wiki][9] 中了解构建需求,而在 Fedora 发行版中,请参考 [Fedora 的文档][10]。安装了构建工具后,执行自定义的 ROX-Session 构建脚本。 @@ -36,7 +36,7 @@ $ ./AppRun 如果你还没有从你的软件库中安装 ROX-Filer,请在继续之前安装。 -这些组件共同组成了一个完整的 ROX 桌面。要登录到新桌面,请从当前桌面会话中注销。默认情况下,你的会话管理器(KDM、GDM、LightDM 或 XDM,视你的设置而定)会继续登录到您之前的桌面,所以在登录前必须覆盖。 +这些组件共同组成了一个完整的 ROX 桌面。要登录到新桌面,请从当前桌面会话中注销。默认情况下,你的会话管理器(KDM、GDM、LightDM 或 XDM,视你的设置而定)会继续登录到你之前的桌面,所以在登录前必须覆盖。 使用 SDDM: @@ -46,9 +46,9 @@ $ ./AppRun ![][12] -### ROX桌面特性 +### ROX 桌面特性 -ROX 桌面默认情况下很简单,屏幕底部有一个面板,桌面上有一个通往主目录的快捷方式图标。面板中包含了一些常用位置的快捷方式。这就是 ROX 桌面的全部功能,至少在安装后就是这样。如果你想要时钟或日历或系统托盘,你需要找到提供这些功能的应用程序。 +ROX 桌面默认情况下很简单,屏幕底部有一个面板,桌面上有一个通往主目录的快捷方式图标。面板中包含了一些常用位置的快捷方式。这就是 ROX 桌面的全部功能,至少在安装后就是这样。如果你想要时钟、日历或系统托盘,你需要找到提供这些功能的应用程序。 ![Default ROX desktop][13] @@ -56,7 +56,7 @@ ROX 桌面默认情况下很简单,屏幕底部有一个面板,桌面上有 面板也可以进行一些修改。你可以在其中放置不同的快捷方式,甚至可以创建自己的小程序。 -没有应用菜单,也没有上下文菜单中的应用快捷方式。相反,你可以手动导航到 `/usr/share/applications`,或者你可以将你的应用目录或目录添加到 ROX 面板中。 +它没有应用菜单,也没有上下文菜单中的应用快捷方式。相反,你可以手动导航到 `/usr/share/applications`,或者你可以将你的应用目录或目录添加到 ROX 面板中。 ![ROX desktop][14] @@ -64,9 +64,9 @@ ROX 桌面的工作流程集中在鼠标驱动上,让人联想到 Mac OS 7.5 ### 应用程序目录、AppRun 和 AppImage -ROX 桌面有一个优雅的惯例,在这个惯例中,包含一个名为 `AppRun` 的脚本的目录就可以像一个应用程序一样被执行。这意味着,要制作一个 ROX 应用程序,你所要做的就是将代码编译到一个目录中,将一个名为`AppRun` 的脚本放在该目录的根目录下,执行你所编译的二进制文件,然后将该目录标记为可执行。ROX-Filer 会按照你设置的方式来显示一个目录,并以特殊的图标和颜色显示一个目录。当你点击一个应用程序目录,ROX-Filer 会自动运行里面的 `AppRun` 脚本。它的外观和行为就像一个已经安装好的应用程序,但它是在用户的主目录下的本地目录,不需要特殊的权限。 +ROX 桌面有一个优雅的惯例,按照此惯例,包含一个名为 `AppRun` 的脚本的目录就可以像一个应用程序一样被执行。这意味着,要制作一个 ROX 应用程序,你所要做的就是将代码编译到一个目录中,将一个名为`AppRun` 的脚本放在该目录的根目录下,来执行你所编译的二进制文件,然后将该目录标记为可执行即可。ROX-Filer 会按照你设置的方式来显示一个目录,并以特殊的图标和颜色显示一个目录。当你点击一个应用程序目录,ROX-Filer 会自动运行里面的 `AppRun` 脚本。它的外观和行为就像一个已经安装好的应用程序,但它是在用户的主目录下的本地目录,不需要特殊的权限。 -这是一个方便的功能,但它是那些你使用时感觉很好的小功能之一,因为它很容易做到。它绝不是必要的,它只是比在本地建立一个应用程序,将目录隐藏在某个不显眼的地方,并建立一个快速的 `.desktop` 文件作为你的启动器,要领先了几步。然而,应用程序目录的概念已经当做灵感被 [AppImage][16] 打包系统所 [借鉴][15] 。 +这是一个方便的功能,但它是那些你使用时感觉很好的小功能之一,因为它很容易做到。它绝不是必要的,它只是比在本地建立一个应用程序,将目录隐藏在某个不显眼的地方,并建立一个快速的 `.desktop` 文件作为你的启动器,要领先了几步。然而,应用程序目录的概念已经当做灵感被 [AppImage][16] 打包系统所 [借鉴][15]。 ### 为什么应该试试 ROX 桌面 @@ -79,7 +79,7 @@ via: https://opensource.com/article/19/12/linux-rox-desktop 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 975ab0e347c6ac6c7bb2ff87b90069b31943db3a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 15:17:08 +0800 Subject: [PATCH 163/394] PUB @wxy https://linux.cn/article-12123-1.html --- .../20191216 Relive Linux history with the ROX desktop.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20191216 Relive Linux history with the ROX desktop.md (99%) diff --git a/translated/tech/20191216 Relive Linux history with the ROX desktop.md b/published/20191216 Relive Linux history with the ROX desktop.md similarity index 99% rename from translated/tech/20191216 Relive Linux history with the ROX desktop.md rename to published/20191216 Relive Linux history with the ROX desktop.md index c618f9c4de..72c2993473 100644 --- a/translated/tech/20191216 Relive Linux history with the ROX desktop.md +++ b/published/20191216 Relive Linux history with the ROX desktop.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12123-1.html) [#]: subject: (Relive Linux history with the ROX desktop) [#]: via: (https://opensource.com/article/19/12/linux-rox-desktop) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 202a1001a4cc162307cb79c9314e1395e554f92f Mon Sep 17 00:00:00 2001 From: Zioyi Date: Sat, 18 Apr 2020 16:43:52 +0800 Subject: [PATCH 164/394] Update 20200417 12 Linux Commands to Have Some Fun in the Terminal.md translating by Zioyi --- ...200417 12 Linux Commands to Have Some Fun in the Terminal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md index 9c7843ea59..81c05aa211 100644 --- a/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md +++ b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Zioyi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 57e6faf796e5f802c41f156c97c33eef3a13c73c Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Sat, 18 Apr 2020 19:50:53 +0800 Subject: [PATCH 165/394] TSL 20200228 Getting started with Linux firewalls --- ...28 Getting started with Linux firewalls.md | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/translated/tech/20200228 Getting started with Linux firewalls.md b/translated/tech/20200228 Getting started with Linux firewalls.md index bc5d20732a..93cc37289e 100644 --- a/translated/tech/20200228 Getting started with Linux firewalls.md +++ b/translated/tech/20200228 Getting started with Linux firewalls.md @@ -1,22 +1,22 @@ -[#]: collector: "lujun9972" -[#]: translator: "lxbwolf" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "Getting started with Linux firewalls" -[#]: via: "https://opensource.com/article/20/2/firewall-cheat-sheet" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: (lujun9972) +[#]: translator: (lxbwolf) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting started with Linux firewalls) +[#]: via: (https://opensource.com/article/20/2/firewall-cheat-sheet) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) Linux 防火墙入门教程 ====== 防火墙是你的计算机防止网络入侵的第一道屏障。为确保你的安全,请下载我们的备忘单。 ![Cheat Sheet cover image][1] -合理的防火墙是你的计算机防止网络入侵的第一道屏障。你在家里上网,通常互联网服务提供会在路由中搭建了一层防火墙。如果不在家里上网,那么你计算机上的那层防火墙就是仅有的一层,因为配置和控制好你 Linux 电脑上的防火墙很重要。如果你维护一台 Linux 服务器,知道怎么去管理你的防火墙同样重要,只要掌握了这些知识你才能保护你的服务器免于本地或远程非法流量的入侵。 +合理的防火墙是你的计算机防止网络入侵的第一道屏障。你在家里上网,通常互联网服务提供会在路由中搭建一层防火墙。如果不在家里上网,那么你计算机上的那层防火墙就是仅有的一层,因为配置和控制好你 Linux 电脑上的防火墙很重要。如果你维护一台 Linux 服务器,知道怎么去管理你的防火墙同样重要,只要掌握了这些知识你才能保护你的服务器免于本地或远程非法流量的入侵。 ### 安装防火墙 -很多 Linux 发行版本已经自带了防火墙,通常是 `iptables`。它很有效并可以自定义,但配置起来有点复杂。幸运的是,有开发者写出了一些前端界面来帮助用户不需要写冗长的 iptables 规则就可以控制防火墙。 +很多 Linux 发行版本已经自带了防火墙,通常是 `iptables`。它很强大并可以自定义,但配置起来有点复杂。幸运的是,有开发者写出了一些前端界面来帮助用户不需要写冗长的 iptables 规则就可以控制防火墙。 在 Fedora,CentOS,Red Hat 和一些类似的发行版本上,默认安装的防火墙软件是 `firewalld`,是用 **firewall-cmd** 命令来配置和控制的。在 Debian 和大部分其他发行版上,可以从你的软件仓库安装 firewalld。Ubuntu 自带的是 Uncomplicated Firewall(ufw),所以你必须打开 **universe** 库才能使用 firewalld: @@ -46,17 +46,17 @@ $ sudo apt install firewalld Firewalld 旨在让防火墙的配置工作尽可能简单。它通过建立 *zone* 来实现这个目标。一个 zone 是一类型的合理、通用的规则,这些规则适配大部分用户的日常需求。 - * **trusted:** All network connections are accepted. This is the least paranoid firewall setting and should only be used in a trusted environment, such as a test lab or in a family home where everyone on the local network is known to be friendly. - * **home, work, internal:** In these three zones, most incoming connections are accepted. They each exclude traffic on ports that usually expect no activity. Any of them is a reasonable setting for use in a home setting where there is no reason to expect network traffic to obscure ports, and you generally trust the other users on the network. - * **public:** For use in public areas. This is a paranoid setting, intended for times when you do not trust other computers on the network. Only selected common and mostly safe incoming connections are accepted. - * **dmz:** DMZ stands for demilitarized zone. This zone is intended for computers that are publically accessible, located on an organization's external network with limited access to the internal network. For personal computers, this is usually not a useful zone, but it is an important option for certain types of servers. - * **external:** For use on external networks with masquerading enabled (meaning the addresses of your private network are mapped to and hidden behind a public IP address). Similar to the dmz zone, only selected incoming connections are accepted, including SSH. - * **block:** Only network connections initiated within this system are possible, and all incoming network connections are rejected with an **icmp-host-prohibited** message. This is an extremely paranoid setting and is an important option for certain types of servers or personal computers in an untrusted or hostile environment. - * **drop:** Any and all incoming network packets are dropped with no reply. Only outgoing network connections are possible. The only setting more paranoid than this one is turning off your WiFi and unplugging your Ethernet cable. + * **trusted:** 接受所有的连接。这是最低级别的防火墙设置,只能在一个完全信任的环境中,如测试实验室或网络中相互都认识的家庭网络中。 + * **home, work, internal: **在这三个 zone 中,接受大部分来的连接。它们每个都会拒绝不活跃的端口进来的流量。这三个都适合用于家庭环境中,因为在家庭环境中不会出现端口模糊的网络流量,在家庭网络中你可以基本信任其他的用户。 + * **public:** 用于公共区域内。这是个极端的设置,当你不信任网络中的其他计算机时使用。只能接收经过选择的和基本安全的连接。 + * **dmz:** DMZ 表示隔离区。这个 zone 多用于可公开访问的计算机,属于某个组织的外部网络不能完全访问内网的计算机。对于个人计算机,它没什么用,但是对某类服务器来说它是个很重要的选项。 + * **external:** 用于外部网络,会开启伪装(你私人网络的地址被映射到一个外网 IP 地址,并隐藏起来)。跟 DMZ 类似,仅接受经过选择的连接,包括 SSH。 + * **block:** 仅接收在本系统中初始化的网络连接。接收到的任何网络连接都会被 **icmp-host-prohibited** 信息拒绝。这个一个极度偏激的设置,对于某类服务器或处于不信任或不安全的环境中的个人计算机来说很重要。 + * **drop:** 接收的所有网络包都被丢弃,没有任何回复。仅能有发送出去的网络连接。比这个设置更极端的办法,只有关闭 WiFi 和拔掉网线。 -You can read about each zone and any other zones defined by your distribution or sysadmin by looking at the configuration files in **/usr/lib/firewalld/zones**. For instance, here's the FedoraWorkstation zone that ships with Fedora 31: +你可以查看你发行版本的所有 zone,或通过配置文件 **/usr/lib/firewalld/zones** 来查看管理员设置。举个例子:下面是 Fefora 31 自带的 FedoraWorkstation zone: ``` @@ -73,16 +73,16 @@ $ cat /usr/lib/firewalld/zones/FedoraWorkstation.xml </zone> ``` -### Getting your current zone +### 获取当前的 zone -You can see what zone you're in at any time with the **\--get-active-zones** option: +任何时候你都可以通过 **\--get-active-zones** 选项来查看你是在哪个 zone ``` `$ sudo firewall-cmd --get-active-zones` ``` -In response, you receive the name of the active zone along with the network interface assigned to it. On a laptop, that usually means you have a WiFi card in the default zone: +输出结果中,会有当前活跃的 zone 名字和分配给它的网络接口。笔记本电脑上,在默认 zone 中通常意味着你有个 WiFi 卡: ``` @@ -90,9 +90,9 @@ FedoraWorkstation   interfaces: wlp61s0 ``` -### Change your current zone +### 修改你当前的 zone -To change your zone, reassign your network interface to a different zone. For instance, to change the example **wlp61s0** card to the public zone: +把你的网络接口分配给另一个 zone,就可以改变 zone。例如,把例子中的 **wlp61s0** 卡修改为 public zone: ``` @@ -100,15 +100,15 @@ $ sudo firewall-cmd --change-interface=wlp61s0 \ \--zone=public ``` -You can change the active zone for an interface any time you please and for any reason—whether you're going out to a café and feel the need to increase your laptop's security policy, or you're going to work and need to open up some ports to get on the intranet, or for any other reason. The options for **firewall-cmd** auto-complete when you press the **Tab** key, so as long as you remember the keywords "change" and "zone," you can stumble through the command until you learn it by memory. +你可以为一个接口修改活跃的 zone,不管出于什么理由 — 无论你是要出去喝杯咖啡还是感觉有必要增强笔记本电脑的安全策略,无论是你要去工作需要开启某些端口才能进入内联网,还是任何其他的理由。在你凭记忆学会 **firewall-cmd** 命令之前,你只要记住了关键词 ”change“ 和 ”zone“,就可以慢慢掌握,因为按下 **Tab** 时,它的选项会自动补全。 -### Learn more +### 更多信息 -There's a lot more you can do with your firewall, including customizing existing zones, setting a default zone, and more. The more comfortable with firewalls you get, the more secure your online activities are, so we've created a [cheat sheet][2] for quick and easy reference. +你可以用你的防火墙干更多的事,比如自定义已存在的 zone,设置默认的 zone,等等。你对防火墙越了解,你在网上的活动就越安全,所以我们创建了一个[备忘单][2]便于速查和参考。 -### Download your [firewall cheat sheet][2] +### 下载你的 [防火墙备忘单][2] -David Both shares how he replaced his dedicated network firewall computer with a Raspberry Pi 2. +David Both分享了他是怎样用树莓派 2 替换他的专用网络防火墙电脑的。 -------------------------------------------------------------------------------- @@ -116,12 +116,12 @@ via: https://opensource.com/article/20/2/firewall-cheat-sheet 作者:[Seth Kenlon][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[lxbwolf](https://github.com/lxbwolf) 校对:[校对者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/coverimage_cheat_sheet.png?itok=lYkNKieP "Cheat Sheet cover image" +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) [2]: https://opensource.com/downloads/firewall-cmd-cheat-sheet From 65a1e7c7d87f9308672b223a59a2fab4db9441a1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 20:55:21 +0800 Subject: [PATCH 166/394] PRF @geekpi --- ...Which Desktop Environment You are Using.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md index 4345d5cff8..dcee63114b 100644 --- a/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md +++ b/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md @@ -1,26 +1,26 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using) [#]: via: (https://itsfoss.com/find-desktop-environment/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -这是找出你所使用的桌面环境的方法 +如何找出你所使用的桌面环境 ====== 如果你是 Linux 新用户,并在一个 Linux 论坛中寻求帮助,那么你可能会被问以下问题: -_**“你使用的是哪个桌面环境?”**_ +> “你使用的是哪个桌面环境?” -你知道什么是桌面环境,但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。 +你知道什么是桌面环境desktop environment(DE),但你如何知道你使用的是哪一个?我会告诉你如何找到它。我将首先展示命令行方法,因为这适用于[各种 Linux 发行版][1]。我还将展示如何通过图形方式获得。 ### 检查你使用的是哪个桌面环境 ![][2] -你可以[在 Linux 中使用 echo 命令][3]在终端中显示 XDG_CURRENT_DESKTOP 变量的值。 +你可以[在 Linux 中使用 echo 命令][3]在终端中显示 `XDG_CURRENT_DESKTOP` 变量的值。 打开终端并复制粘贴此命令: @@ -37,15 +37,15 @@ ubuntu:GNOME 尽管此命令可以快速告诉你正在使用哪个桌面环境,但它不会提供任何其他信息。 -在某些情况下,了解桌面环境版本(也称为 DE)可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。 +在某些情况下,了解桌面环境版本可能很重要。软件的每个新版本都会带来新功能或删除某些功能。[GNOME 3.36][6] 引入了“请勿打扰”选项,以关闭所有桌面通知。 -假设你了解了此新的“请勿打扰”功能。你确认自己正在使用 GNOME,但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。 +假设你了解了这个新的“请勿打扰”功能。你确认自己正在使用 GNOME,但是在 GNOME 桌面上看不到此选项。如果你可以检查系统上已安装的 GNOME 桌面版本,那么这会很清楚。 我将先向你展示命令检查桌面环境版本,因为你可以在任何运行桌面环境的 Linux 中使用它。 ### 如何获取桌面环境版本 -与获取桌面环境的名称不同。获取其版本号并不直接,因为它没有标准的命令或环境变量可以提供此信息。 +与获取桌面环境的名称不同。获取其版本号的方法并不直接,因为它没有标准的命令或环境变量可以提供此信息。 在 Linux 中获取桌面环境信息的一种方法是使用 [Screenfetch][7] 之类的工具。此[命令行工具以 ascii 格式显示 Linux 发行版的 logo][8] 以及一些基本的系统信息。桌面环境版本就是其中之一。 @@ -57,7 +57,7 @@ sudo apt install screenfetch 对于其他 Linux 发行版,请使用系统的软件包管理器来安装此程序。 -安装后,只需在终端中输入 screenfetch 即可,它应该显示桌面环境版本以及其他系统信息。 +安装后,只需在终端中输入 `screenfetch` 即可,它应该显示桌面环境版本以及其他系统信息。 ![Check Desktop Environment Version][10] @@ -67,7 +67,7 @@ sudo apt install screenfetch ### 使用 GUI 检查桌面环境版本 -几乎所有桌面环境在其 “Settings-About” 部分中都提供了基本的系统详细信息。 +几乎所有桌面环境在其 “Settings”->“About” 部分中都提供了基本的系统详细信息。 一个主要问题是,大多数桌面环境看起来都不同,因此我无法展示每个桌面环境的确切步骤。我将展示 GNOME 的,让你在桌面上发现它。 @@ -90,7 +90,7 @@ via: https://itsfoss.com/find-desktop-environment/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0bfddc4995b1829ceb4ea9d055842ffffea288ef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 20:58:30 +0800 Subject: [PATCH 167/394] PUB @geekpi https://linux.cn/article-12124-1.html --- ...How to Find Out Which Desktop Environment You are Using.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md (98%) diff --git a/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/published/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md similarity index 98% rename from translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md rename to published/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md index dcee63114b..963a64f356 100644 --- a/translated/tech/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md +++ b/published/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12124-1.html) [#]: subject: (Here’s How to Find Out Which Desktop Environment You are Using) [#]: via: (https://itsfoss.com/find-desktop-environment/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From a7a8682e9f327983eb80bc6a57a173000190948f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 22:51:14 +0800 Subject: [PATCH 168/394] PRF @mr-ping --- ... Ways To Update Linux Kernel For Ubuntu.md | 129 ++++++++---------- 1 file changed, 60 insertions(+), 69 deletions(-) diff --git a/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md b/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md index fbc0c67658..ed7bfc2489 100644 --- a/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md +++ b/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md @@ -1,42 +1,41 @@ [#]: collector: "lujun9972" [#]: translator: "mr-ping" -[#]: reviewer: " " +[#]: reviewer: "wxy" [#]: publisher: " " [#]: url: " " [#]: subject: "Different Ways To Update Linux Kernel For Ubuntu" [#]: via: "https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/" [#]: author: "SK https://www.ostechnix.com/author/sk/" - -升级Ubuntu Linux核心的几种不同方法 +升级 Ubuntu Linux 内核的几种不同方法 ====== ![](https://www.ostechnix.com/wp-content/uploads/2019/01/ubuntu-linux-kernel-720x340.png) -这个指南里介绍了7种为Ubuntu升级Linux核心的不同方法。这7种方法里,有5种需要重启系统来使新核心生效,其他两种则不用。升级之前,**强烈建议您将重要数据进行备份!** 这里提到的所有方法只在Ubuntu中测试过。我们并不确定这些方法是不是也能适用于其他Ubuntu的特色发行版(如:Xubuntu)和衍生发行版(如:Linux Mint)。 +这个指南里介绍了 7 种为 Ubuntu 升级 Linux 内核的不同方法。这 7 种方法里,有 5 种需要重启系统来使新内核生效,其他两种则不用。升级之前,**强烈建议你将重要数据进行备份!** 这里提到的所有方法只在 Ubuntu 中测试过。我们并不确定这些方法是不是也能适用于其他 Ubuntu 的特色发行版(如: Xubuntu)和衍生发行版(如:Linux Mint)。 -### 第一部分: 需要重启的核心升级 +### 第一部分:需要重启的内核升级 -以下方法需要您重启系统以便新的核心生效。所有方法都建议在个人系统或测试系统中进行。重要的事儿再说一遍,请备份好您Ubuntu中的重要数据、配置文件和其他重要的东西。 +以下方法需要你重启系统以便新的内核生效。以下所有方法都建议在个人系统或测试系统中进行。重要的事儿再说一遍,请备份好你 Ubuntu 中的重要数据、配置文件和其他重要的东西。 -### 方法1 - 使用dpkg升级Linux核心(手动方式) +#### 方法 1 - 使用 dpkg 升级 Linux 内核(手动方式) -这个方法里会帮助你手动从**[kernel.ubuntu.com][1]**网站下载可用的最新Linux核心。如果你打算安装最新版(而不是稳定版或者正式发布版),那这种方法对你会很有用。从以上链接下载Linux核心版本。编写这个指南的时候,最新的可用版本是**5.0-rc1**,最新的稳定版是**v4.20**. +这个方法可以帮助你从 [kernel.ubuntu.com][1] 网站手动下载可用的最新 Linux 内核。如果你打算安装最新版(而不是稳定版或者正式发布版),那这种方法对你会很有用。从以上链接下载 Linux 内核版本。编写这个指南的时候,最新的可用版本是 **5.0-rc1**,最新的稳定版是 **v4.20**。 ![][3] -基于你的选择,点击相应的Linux核心版本链接,找到你对应的架构(‘Build for XXX’)的那部分。然后下载符合以下格式的两个文件(其中 X.Y.Z 是最高版本号): +点击你所选择的 Linux 内核版本链接,找到你对应的架构(“Build for XXX”)的那部分。然后下载符合以下格式的两个文件(其中 X.Y.Z 是最高版本号): 1. linux-image-*X.Y.Z*-generic-*.deb 2. linux-modules-X.Y.Z*-generic-*.deb -在终端中修改文件所在的目录,然后执行命令,手动安装核心: +在终端中改变到文件所在的目录,然后执行此命令手动安装内核: ``` $ sudo dpkg --install *.deb ``` -重启系统,使用新核心: +重启系统,使用新内核: ``` $ sudo reboot @@ -48,29 +47,28 @@ $ sudo reboot $ uname -r ``` -对于分步的说明,请查看以下名为“Install Linux Kernel 4.15 LTS On DEB based systems”的文章。 +对于分步的说明,请查看下列链接中对应的部分。 -+ [Install Linux Kernel 4.15 In RPM And DEB Based Systems](https://www.ostechnix.com/install-linux-kernel-4-15-rpm-deb-based-systems/) ++ [在基于 RPM 和 DEB 的系统中安装 Linux 内核 4.15](https://www.ostechnix.com/install-linux-kernel-4-15-rpm-deb-based-systems/) -以上的指南是针对的是4.15版本,不过安装最新版本的所有的步骤都是一样的。 +以上的指南是针对的是 4.15 版本,不过安装最新版本的所有的步骤都是一样的。 -**优势:** 不必联网(你可以从任何系统中下载Linux核心来使用) +**优势:** 不必联网(你可以从任何系统中下载 Linux 内核来使用) **缺点:** 手动更新,需要重启系统。 -#### 方法2 - 用apt-get来升级Linux核心(推荐方法) +#### 方法 2 - 用 apt-get 来升级 Linux 内核(推荐方法) -这是在类Ubuntu系统中升级Linux核心的推荐方法。不同于上一个方法,这种方法会从Ubuntu官方仓库下载、安装核心版本而不是从 **kernel.ubuntu.com**网站。 +这是在类 Ubuntu 系统中升级 Linux 内核的推荐方法。不同于上一个方法,这种方法会从 Ubuntu 官方仓库下载、安装内核版本,而不是从 **kernel.ubuntu.com**网站。 -要升级包括核心的整个系统,只需要执行: +要升级包括内核的整个系统,只需要执行: ``` $ sudo apt-get update - $ sudo apt-get upgrade ``` -如果只希望升级核心,运行: +如果只希望升级内核,运行: ``` $ sudo apt-get upgrade linux-image-generic @@ -80,117 +78,112 @@ $ sudo apt-get upgrade linux-image-generic **缺点:** 需要联网,需要重启。 -从官方库中升级核心是最接近开箱即用的方法,并且不会出什么问题。如果是生产环境的系统,这是最为推荐的升级Linux核心的方法。 +从官方库中升级内核是最接近开箱即用的方法,并且不会出什么问题。如果是生产环境的系统,这是最为推荐的升级 Linux 内核的方法。 -方法1和方法2都需要用户去介入到升级Linux核心的过程中。而下边的方法(3、 4、 5)则几乎是全自动的。 +方法 1 和方法 2 都需要用户去介入到升级 Linux 内核的过程中。而下边的方法(3、 4、 5)则几乎是全自动的。 -#### 方法3 - 使用Ukuu升级Linux核心 +#### 方法 3 - 使用 Ukuu 升级 Linux 内核 -**Ukuu**是一个用于从**kernel.ubuntu.com**下载Linux核心,并且将其自动安装到Ubuntu桌面系统和服务器系统中的Gtk图形化界面和命令行工具。Ukku并不是单单简化了手动下载、安装新核心的过程,同时也会帮助你移除旧的和不再需要的核心。更多细节可以参照以下指南。 +**Ukuu**是一个 Gtk GUI 和命令行工具,它可以从 kernel.ubuntu.com 下载最新的 Linux 主线内核,并自动安装到你的 Ubuntu 桌面版和服务器版中。Ukku 不仅简化了手动下载和安装新内核的过程,同时也会帮助你安全地移除旧的和不再需要的内核。更多细节可以参照以下指南。 -+ [Ukuu – An Easy Way To Install And Upgrade Linux Kernel In Ubuntu-based Systems](https://www.ostechnix.com/ukuu-an-easy-way-to-install-and-upgrade-linux-kernel-in-ubuntu-based-systems/) ++ [Ukuu:在 Ubuntu 系统中安装和升级 Linux 内核的简单方法](https://www.ostechnix.com/ukuu-an-easy-way-to-install-and-upgrade-linux-kernel-in-ubuntu-based-systems/) -**优势:** 易于安装使用。自动安装主线核心。 +**优势:** 易于安装使用。自动安装主线内核。 **缺点:** 需要联网,需要重启。 -#### 方法4 - 使用UKTools升级Linux核心 +#### 方法 4 - 使用 UKTools 升级 Linux 内核 -跟Ukuu差不多,**UKTools**也会从**kernel.ubuntu.com**网站获取最新的核心并且自动安装到Ubuntu以及类似于Linux Mint的延伸发行版中。 +跟 Ukuu 差不多,**UKTools** 也会从 kernel.ubuntu.com 网站获取最新的稳定内核并且自动安装到 Ubuntu 以及类似于 Linux Mint 的延伸发行版中。关于UKTools的更多详情,请参见下面的链接。 -+ [UKTools – Upgrade Latest Linux Kernel In Ubuntu And Derivatives](https://www.ostechnix.com/uktools-upgrade-latest-linux-kernel-in-ubuntu-and-derivatives/) ++ [UKTools:升级Ubuntu及其衍生产品中的最新Linux内核](https://www.ostechnix.com/uktools-upgrade-latest-linux-kernel-in-ubuntu-and-derivatives/) -**优势:** 简单,自动 +**优势:** 简单,自动。 **缺点:** 需要联网,需要重启。 -#### 方法5 - 使用Linux核心工具集(Linux Kernel Utilities)安装Linux核心 +#### 方法 5 - 使用 Linux 内核实用程序更新 Linux 内核 -**Linux Kernel Utilities**是目前另一个用于升级类Ubuntu系统Linux核心的程序。实质上,它是一个由一系列Bash脚本构成的合集,用于编译并且可以选择性地为Debian(译者注:Ubuntu的上游发行版)及其衍生发行版升级核心。它包含三个工具集,一个用于手动编译、安装来自于 [**http://www.kernel.org**][4] 网站的源码核心,另一个用于安装来自****网站的事先编译好的核心,第三个脚本用于移除旧核心。更多细节请浏览以下链接。 +**Linux 内核实用程序**是目前另一个用于升级类 Ubuntu 系统 Linux 内核的程序。实质上,它是一个由一系列 Bash 脚本构成的合集,用于编译并且可以选择性地为 Debian(LCTT 译注:Ubuntu 的上游发行版)及其衍生发行版升级内核。它包含三个实用程序,一个用于手动编译、安装来自于 [http://www.kernel.org][4] 网站的源码内核,另一个用于安装来自 网站的预编译的内核,第三个脚本用于移除旧内核。更多细节请浏览以下链接。 -+ [Linux Kernel Utilities – Scripts To Compile And Update Latest Linux Kernel For Debian And Derivatives](https://www.ostechnix.com/linux-kernel-utilities-scripts-compile-update-latest-linux-kernel-debian-derivatives/) ++ [Linux 内核实用程序:编译和更新最新的 Linux 内核的脚本,适用于 Debian 及其衍生产品](https://www.ostechnix.com/linux-kernel-utilities-scripts-compile-update-latest-linux-kernel-debian-derivatives/) -**优势:** 简单,自动 +**优势:** 简单,自动。 **缺点:** 需要联网,需要重启。 -### 第二部分 – Kernel Updates without reboot +### 第二部分:无需重启的内核升级 -我之前说过,上边所有的方法都需要你去重启服务器(译者注:也可以是桌面版)来启用新核心。如果是个人系统或者测试系统,可以这么办。但对于无法停机的生产环境系统该怎么办呢?一点问题没有,这时候**实时补丁(livepatching)**就派上用场了。 +我之前说过,上边所有的方法都需要你重启服务器(LCTT 译注:也可以是桌面版)来启用新内核。如果是个人系统或者测试系统,可以这么办。但对于无法停机的生产环境系统该怎么办呢?一点问题没有,这时候实时补丁livepatching就派上用场了。 -**实时补丁**(或者叫热补丁)允许你在不需要重启的情况下安装Linux升级或补丁来保证你的服务器处于最新的安全等级之下。这对web主机、游戏服务器这类需要不间断在线的服务器来说是很有价值的。事实上,任何情况下,服务器都应该保持在不间断运行的状态下。由于Linux供应商只会在出于修复安全漏洞的目的下维护补丁,所以如果安全性是你的点,这种方式再适合不过了。 +**实时补丁**(或者叫热补丁)允许你在不重启的情况下安装 Linux 更新或补丁,使你的服务器处于最新的安全级别。这对 web 主机、游戏服务器这类需要不间断在线的服务器来说是很有价值的。事实上,任何情况下,服务器都应该保持在不间断运行的状态下。由于 Linux 供应商只会在出于修复安全漏洞的目的下维护补丁,所以如果安全性是你最关注的问题时,这种方式再适合不过了。 -以下两种方法可以在不需要重启的情况下为生产环境和执行关键任务的Ubuntu服务器更新Linux核心。 +以下两种方法不需要重启,对于生产环境和执行关键任务的 Ubuntu 服务器的 Linux 内核更新非常有用。 -#### 方法6 – 使用Canonical实时补丁服务(Canonical Livepatch Service)来更新Linux核心 +#### 方法 6 – 使用 Canonical 实时补丁服务来更新 Linux 内核 ![][5] -[**Canonical Livepatch Service**][6] 可以在不需要重启Ubuntu系统的情况下执行核心升级、补丁和安全的热修复等操作,在减少服务器宕机的情况下保障其安全。Canonical Livepatch Service 可以在安装过程当中或安装之后尽心设置. 如果你使用的是Ubuntu桌面版,软件更新器会自动检查核心补丁的更新,并且通知你。在基于控制台的系统中,则需要你主动运行apt-get update命令来进行升级。由于需要你手动运行“apt-get upgrade”命令它才会安装核心的安全补丁,所以算是半自动的。 +[Canonical 实时补丁服务][6]可以在不需要重启 Ubuntu 系统的情况下自动应用内核更新、补丁和安全补丁。它可以减少Ubuntu系统的停机时间,并保证系统的安全。Canonical 实时补丁服务可以在安装过程当中或安装之后进行设置。如果你使用的是 Ubuntu 桌面版,软件更新器会自动检查内核补丁的更新,并通知你。在基于控制台的系统中,则需要你定期运行 `apt-get update` 命令来进行升级。由于需要你手动运行 `apt-get upgrade` 命令它才会安装内核的安全补丁,所以算是半自动的。 -Livepatch对三个及以下系统免费,如果多于三个,你需要升级成名为**Ubuntu Advantage**的企业支持方案套件。这个套件包括**Kernel Livepatching**及以下服务: +实时补丁对三个及以下系统免费,如果多于三个,你需要升级成名为 **Ubuntu Advantage** 的企业支持方案套件。这个套件包括 **Kernel 实时补丁**及以下服务: - * Extended Security Maintenance – Ubuntu生命周期后的重要安全更新 - * Landscape – 针对大规模使用Ubuntu的系统管理工具 - * Knowledge Base – 由Ubuntu专家撰写的私人文章和教程 + * 扩展安全维护 – Ubuntu 生命周期后的重要安全更新 + * Landscape – 针对大规模使用 Ubuntu 的系统管理工具 + * 知识库 – 由 Ubuntu 专家撰写的私人文章和教程 * 电话和网站支持 **价格** -Ubuntu Advantage包含三种付费计划, 必备(Essential), 标准(Standard)和 高级(Advanced).最基础的计划(Essential 计划)从 **单物理节点 225 美元/年**和**单VPS 75美元/年**开始计价。看上去应该不支持针对Ubuntu服务器版和桌面版的按月订阅。你可以在 [**此处**][7]浏览所有计划的细节信息。 +Ubuntu Advantage 包含三种付费计划,即基本计划、标准计划和高级计划。最基础的计划(基本计划)从 **单物理节点 225 美元/年**和**单VPS 75美元/年**开始计价。对于 Ubuntu 服务器版和桌面版看上去没有按月订阅。你可以在[此处][7]浏览所有计划的细节信息。 -**优势:** 简单。半自动化。无需重启。支持三个免费系统。 +**优势:** 简单。半自动化。无需重启。支持三个免费系统。 -**缺点:** 4个以上主机的话非常昂贵. 没有补丁回滚。 +**缺点:** 4 个以上主机的话非常昂贵。没有补丁回滚。 -**开启 Canonical Livepatch Service** +##### 开启 Canonical 实时补丁 如果你想在安装后设置实时补丁服务,依照以下方法逐步执行: -从 [**https://auth.livepatch.canonical.com/**][8] 获取一个秘钥. +从 [https://auth.livepatch.canonical.com/][8] 获取一个密钥。 ``` $ sudo snap install canonical-livepatch - $ sudo canonical-livepatch enable your-key ``` -#### 方法7- 使用KernelCare升级Linux内核 +#### 方法 7 - 使用 KernelCare 升级 Linux 内核 ![][9] -[**KernelCare**][10] 是所有实时补丁方案中最新的一个. 它是 [CloudLinux][11]推出的产品. KernelCare 可以运行在Ubuntu和其他的Linux特殊发行版中. 它每四个小时检查一遍补丁的发布,并在无需确认的情况下安装它们. 如果更新后存在问题,可以将补丁进行回滚。 +[KernelCare][10] 是最新的实时补丁方案。它是 [CloudLinux][11] 推出的产品。KernelCare 可以运行在 Ubuntu 和其他的 Linux 发行版中。它每四个小时检查一遍补丁的发布,并在无需确认的情况下安装它们。如果更新后存在问题,可以将补丁进行回滚。 **价格** -费用,每台服务器:**4 美元/月** , **45 美元/年**. +费用,每台服务器:**4 美元/月**,**45 美元/年**。 -跟Ubuntu Livepatch相比,kernelCare看起来非常便宜、实惠。好的方面在于**也可以按月订阅**。另一个前者不具备的功能是支持如Red Hat, CentOS, Debian, Oracle Linux, Amazon Linux 以及 OpenVZ, Proxmox 这种虚拟平台等等的其他Linux发行版。 +跟 Ubuntu 实时补丁相比,KernelCare 看起来非常便宜、实惠。好的方面在于**也可以按月订阅**。另一个前者不具备的功能是支持其他 Linux 发行版,如 Red Hat、CentOS、Debian、Oracle Linux、Amazon Linux 以及 OpenVZ、Proxmox 等虚拟化平台。 -你可以在 [**此处**][12] 了解KernelCare的所有特性和简介,以及所有的付费计划的细节。 +你可以在[此处][12]了解 KernelCare 的所有特性和简介,以及所有的付费计划的细节。 -**优势:** 简单。全自动化。范围更广的操作系统覆盖。补丁回滚。无需重启。对非盈利组织提供免费许可。价格低廉。 +**优势:** 简单。全自动化。覆盖范围更广的操作系统。补丁回滚。无需重启。对非营利组织提供免费许可。价格低廉。 -**缺点:** 除了30天试用外无免费计划。 +**缺点:** 不是免费的(除了30天的试用期)。 -**开启 KernelCare Service** +##### 开启 KernelCare 服务 -此处 [**https://cloudlinux.com/kernelcare-free-trial5**][14] 获取30天免费试用秘钥。 +在 [https://cloudlinux.com/kernelcare-free-trial5][14] 获取一个 30 天免费试用密钥。 -执行以下命令开启KernelCare并注册秘钥。 +执行以下命令开启 KernelCare 并注册秘钥。 ``` $ sudo wget -qq -O - https://repo.cloudlinux.com/kernelcare/kernelcare_install.sh | bash - $ sudo /usr/bin/kcarectl --register KEY ``` -如果你的目标是价格实惠,并且通过可靠的社区服务来保障你的Linux服务器核心的更新,那KernelCare是个不错的选择。 +如果你正在寻找一种经济实惠且可靠的商业服务来保持 Linux 服务器上的 Linux 内核更新,那么 KernelCare 是个不错的选择。 - -*由来自Cloud Linux的技术撰稿人和内容作者**Paul A. Jacobs**撰写。* - -**推荐阅读:** +*由来自 Cloud Linux 的技术撰稿人和内容作者 Paul A. Jacobs 提供。* 到此,希望这边文章能对你有所帮助。如果你觉得还有其他的工具和方法需要列在这里,可以在留言区给我们留言。我会根据反馈检查和更新这篇指南的。 @@ -198,8 +191,6 @@ $ sudo /usr/bin/kcarectl --register KEY Cheers! - - -------------------------------------------------------------------------------- via: https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/ @@ -207,7 +198,7 @@ via: https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/ 作者:[SK][a] 选题:[lujun9972][b] 译者:[mr-ping](https://github.com/mr-ping) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From aa0146cd01983880c0111240916b2ac696262d22 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 18 Apr 2020 22:51:55 +0800 Subject: [PATCH 169/394] PUB @mr-ping https://linux.cn/article-12125-1.html --- ...190107 Different Ways To Update Linux Kernel For Ubuntu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190107 Different Ways To Update Linux Kernel For Ubuntu.md (99%) diff --git a/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md b/published/20190107 Different Ways To Update Linux Kernel For Ubuntu.md similarity index 99% rename from translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md rename to published/20190107 Different Ways To Update Linux Kernel For Ubuntu.md index ed7bfc2489..50e1bb7e16 100644 --- a/translated/tech/20190107 Different Ways To Update Linux Kernel For Ubuntu.md +++ b/published/20190107 Different Ways To Update Linux Kernel For Ubuntu.md @@ -1,8 +1,8 @@ [#]: collector: "lujun9972" [#]: translator: "mr-ping" [#]: reviewer: "wxy" -[#]: publisher: " " -[#]: url: " " +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-12125-1.html" [#]: subject: "Different Ways To Update Linux Kernel For Ubuntu" [#]: via: "https://www.ostechnix.com/different-ways-to-update-linux-kernel-for-ubuntu/" [#]: author: "SK https://www.ostechnix.com/author/sk/" From 3f44b6951126521d90a03ef7e9e25ee4e6742fdd Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sat, 18 Apr 2020 23:18:45 +0800 Subject: [PATCH 170/394] Update 20200313 What is the internet backbone and how it works.md --- ...313 What is the internet backbone and how it works.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sources/talk/20200313 What is the internet backbone and how it works.md b/sources/talk/20200313 What is the internet backbone and how it works.md index 8393026255..a2e13ef449 100644 --- a/sources/talk/20200313 What is the internet backbone and how it works.md +++ b/sources/talk/20200313 What is the internet backbone and how it works.md @@ -8,23 +8,30 @@ [#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) What is the internet backbone and how it works +互联网的骨干网是什么以及它是怎样工作的 ====== Tier 1 internet service providers (ISP) mesh their high-speed fiber-optic networks together to create the internet backbone, which moves traffic efficiently among geographic regions. [Gerd Altmann][1] [(CC0)][2] +一级互联网服务提供商(ISP)将其高速光纤网络连接在一起,形成互联网的骨干网,实现在地理区域之间高效地传输流量。[Gerd Altmann][1] [(CC0)][2] The internet generates massive amounts of computer-to-computer traffic, and insuring all that traffic can be delivered anywhere in the world requires the aggregation of a vast array of high-speed networks collectively known as the internet backbone, but how does that work? +互联网会产生大量的计算机到计算机的流量,要确保所有流量都可以在世界上任何地方之间送达,就需要大量汇聚的高速网络,这些网络统称为互联网骨干网,但是它是如何工作的呢? ### What is the internet backbone? - +互联网的骨干网是什么? Like any other network, the internet consists of access links that move traffic to high-bandwidth routers that move traffic from its source over the best available path toward its destination. This core is made up of individual high-speed fiber-optic networks that peer with each other to create the internet backbone. +像任何其他网络一样,Internet由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的各个高速光纤网络而构成的Internet骨干网。 The individual core networks are privately owned by Tier 1 internet service providers (ISP), giant carriers whose networks are tied together. These providers include AT&T, CenturyLink, Cogent Communications, Deutsche Telekom, Global Telecom and Technology (GTT), NTT Communications, Sprint, Tata Communications, Telecom Italia Sparkle, Telia Carrier, and Verizon. +各个独立的核心网络由一级互联网服务提供商(ISP)所拥有,这些大型运营商的网络连接在一起。这些运营商包括AT&T,CenturyLink,Cogent Communications,德国电信,全球电信和技术(GTT),NTT Communications,Sprint,Tata Communications,意大利Sparkle电信,Telia Carrier和Verizon。 [[Get regularly scheduled insights by signing up for Network World newsletters.]][3] By joining these long-haul networks together, Tier 1 ISPs create a single worldwide network that gives all of them access to the entire internet routing table so they can efficiently deliver traffic to its destination through a hierarchy of progressively more local ISPs. +通过将这些远程网络连接在一起,一级ISP们创建了一个他们都可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地ISP网络来有效地将流量传输到其目的地。 In addition to being physically connected, these backbone providers are held together by a shared network protocol, TCP/IP. They are actually two protocols, transport control protocol and internet protocol that set up connections between computers, insuring that the connections are reliable and formating messages into packets. +除了物理连接之外,这些骨干运营商还通过一致的网络协议TCP/IP融合在一起。它们实际上是两个协议,传输控制协议和Internet协议,它们在计算机之间建立连接,以确保连接可靠并将消息格式化为数据包。 ### Internet exchange points (IXP) tie the backbone together From 394c0423a699a87dabdf2083545e8b4f1a2e1508 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 19 Apr 2020 01:05:25 +0800 Subject: [PATCH 171/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200419=20Gettin?= =?UTF-8?q?g=20Started=20With=20Pacman=20Commands=20in=20Arch-based=20Linu?= =?UTF-8?q?x=20Distributions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200419 Getting Started With Pacman Commands in Arch-based Linux Distributions.md --- ...mands in Arch-based Linux Distributions.md | 250 ++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 sources/tech/20200419 Getting Started With Pacman Commands in Arch-based Linux Distributions.md diff --git a/sources/tech/20200419 Getting Started With Pacman Commands in Arch-based Linux Distributions.md b/sources/tech/20200419 Getting Started With Pacman Commands in Arch-based Linux Distributions.md new file mode 100644 index 0000000000..f2fd06793f --- /dev/null +++ b/sources/tech/20200419 Getting Started With Pacman Commands in Arch-based Linux Distributions.md @@ -0,0 +1,250 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting Started With Pacman Commands in Arch-based Linux Distributions) +[#]: via: (https://itsfoss.com/pacman-command/) +[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) + +Getting Started With Pacman Commands in Arch-based Linux Distributions +====== + +_**Brief: This beginner’s guide shows you what you can do with pacmancommands in Linux, how to use them to find new packages, install and upgrade new packages, and clean your system.**_ + +The [pacman][1] package manager is one of the main difference between [Arch Linux][2] and other major distributions like Red Hat and Ubuntu/Debian. It combines a simple binary package format with an easy-to-use [build system][3]. The aim of pacman is to easily manage packages, either from the [official repositories][4] or the user’s own builds. + +If you ever used Ubuntu or Debian-based distributions, you might have used the apt-get or apt commands. Pacman is the equivalent in Arch Linux. If you [just installed Arch Linux][5], one of the first few [things to do after installing Arch Linux][6] is to learn to use pacman commands. + +In this beginner’s guide, I’ll explain some of the essential usage of the pacmand command that you should know for managing your Arch-based system. + +### Essential pacman commands Arch Linux users should know + +![][7] + +Like other package managers, pacman can synchronize package lists with the software repositories to allow the user to download and install packages with a simple command by solving all required dependencies. + +#### Install packages with pacman + +You can install a single package or multiple packages using pacman command in this fashion: + +``` +pacman -S _package_name1_ _package_name2_ ... +``` + +![Installing a package][8] + +The -S stands for synchronization. It means that pacman first synchronizes + +The pacman database categorises the installed packages in two groups according to the reason why they were installed: + + * **explicitly-installed**: the packages that were installed by a generic pacman -S or -U command + * **dependencies**: the packages that were implicitly installed because [required][9] by another package that was explicitly installed. + + + +#### Remove an installed package + +To remove a single package, leaving all of its dependencies installed: + +``` +pacman -R package_name_ +``` + +![Removing a package][10] + +To remove a package and its dependencies which are not required by any other installed package: + +``` +pacman -Rs _package_name_ +``` + +To remove dependencies that are no longer needed. For example, the package which needed the dependencies was removed. + +``` +pacman -Qdtq | pacman -Rs - +``` + +#### Upgrading packages + +Pacman provides an easy way to [update Arch Linux][11]. You can update all installed packages with just one command. This could take a while depending on how up-to-date the system is. + +The following command synchronizes the repository databases _and_ updates the system’s packages, excluding “local” packages that are not in the configured repositories: + +``` +pacman -Syu +``` + + * S stands for sync + * y is for refresh (local + * u is for system update + + + +Basically it is saying that sync to central repository (master package database), refresh the local copy of the master package database and then perform the system update (by updating all packages that have a newer version available). + +![System update][12] + +Attention! + +If you are an Arch Linux user before upgrading, it is advised to visit the [Arch Linux home page][2] to check the latest news for out-of-the-ordinary updates. If manual intervention is needed an appropriate news post will be made. Alternatively you can subscribe to the [RSS feed][13] or the [arch-announce mailing list][14]. + +Be also mindful to look over the appropriate [forum][15] before upgrading fundamental software (such as the kernel, xorg, systemd, or glibc), for any reported problems. + +**Partial upgrades are unsupported** at a rolling release distribution such as Arch and Manjaro. That means when new library versions are pushed to the repositories, all the packages in the repositories need to be rebuilt against the libraries. For example, if two packages depend on the same library, upgrading only one package, might break the other package which depends on an older version of the library. + +#### Use pacman to search for packages + +Pacman queries the local package database with the -Q flag, the sync database with the -S flag and the files database with the -F flag. + +Pacman can search for packages in the database, both in packages’ names and descriptions: + +``` +pacman -Ss _string1_ _string2_ ... +``` + +![Searching for a package][16] + +To search for already installed packages: + +``` +pacman -Qs _string1_ _string2_ ... +``` + +To search for package file names in remote packages: + +``` +pacman -F _string1_ _string2_ ... +``` + +To view the dependency tree of a package: + +``` +pactree _package_naenter code hereme_ +``` + +#### Cleaning the package cache + +Pacman stores its downloaded packages in /var/cache/pacman/pkg/ and does not remove the old or uninstalled versions automatically. This has some advantages: + + 1. It allows to [downgrade][17] a package without the need to retrieve the previous version through other sources. + 2. A package that has been uninstalled can easily be reinstalled directly from the cache folder. + + + +However, it is necessary to clean up the cache periodically to prevent the folder to grow in size. + +The [paccache(8)][18] script, provided within the [pacman-contrib][19] package, deletes all cached versions of installed and uninstalled packages, except for the most recent 3, by default: + +``` +paccache -r +``` + +![Clear cache][20] + +To remove all the cached packages that are not currently installed, and the unused sync database, execute: + +``` +pacman -Sc +``` + +To remove all files from the cache, use the clean switch twice, this is the most aggressive approach and will leave nothing in the cache folder: + +``` +pacman -Scc +``` + +#### Installing local or third-party packages + +Install a ‘local’ package that is not from a remote repository: + +``` +pacman -U _/path/to/package/package_name-version.pkg.tar.xz_ +``` + +Install a ‘remote’ package, not contained in an official repository: + +``` +pacman -U http://www.example.com/repo/example.pkg.tar.xz +``` + +### Bonus: Troubleshooting common errors with pacman + +Here are some common errors you may encounter while managing packages with pacman. + +#### Failed to commit transaction (conflicting files) + +If you see the following error: + +``` +error: could not prepare transaction +error: failed to commit transaction (conflicting files) +package: /path/to/file exists in filesystem +Errors occurred, no packages were upgraded. +``` + +This is happening because pacman has detected a file conflict and will not overwrite files for you. + +A safe way to solve this is to first check if another package owns the file (pacman -Qo _/path/to/file_). If the file is owned by another package, file a bug report. If the file is not owned by another package, rename the file which ‘exists in filesystem’ and re-issue the update command. If all goes well, the file may then be removed. + +Instead of manually renaming and later removing all the files that belong to the package in question, you may explicitly run _**pacman -S –overwrite glob package**_ to force pacman to overwrite files that match _glob_. + +#### Failed to commit transaction (invalid or corrupted package) + +Look for .part files (partially downloaded packages) in /var/cache/pacman/pkg/ and remove them. It is often caused by usage of a custom XferCommand in pacman.conf. + +#### Failed to init transaction (unable to lock database) + +When pacman is about to alter the package database, for example installing a package, it creates a lock file at /var/lib/pacman/db.lck. This prevents another instance of pacman from trying to alter the package database at the same time. + +If pacman is interrupted while changing the database, this stale lock file can remain. If you are certain that no instances of pacman are running then delete the lock file. + +Check if a process is holding the lock file: + +``` +lsof /var/lib/pacman/db.lck +``` + +If the above command doesn’t return anything, you can remove the lock file: + +``` +rm /var/lib/pacman/db.lck +``` + +If you find the PID of the process holding the lock file with lsof command output, kill it first and then remove the lock file. + +I hope you like my humble effort in explaining the basic pacman commands. Please leave your comments below and don’t forget to subscribe on our social media. Stay safe! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/pacman-command/ + +作者:[Dimitrios Savvopoulos][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/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://www.archlinux.org/pacman/ +[2]: https://www.archlinux.org/ +[3]: https://wiki.archlinux.org/index.php/Arch_Build_System +[4]: https://wiki.archlinux.org/index.php/Official_repositories +[5]: https://itsfoss.com/install-arch-linux/ +[6]: https://itsfoss.com/things-to-do-after-installing-arch-linux/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/essential-pacman-commands.jpg?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-S.png?ssl=1 +[9]: https://wiki.archlinux.org/index.php/Dependency +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-R.png?ssl=1 +[11]: https://itsfoss.com/update-arch-linux/ +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-Syu.png?ssl=1 +[13]: https://www.archlinux.org/feeds/news/ +[14]: https://mailman.archlinux.org/mailman/listinfo/arch-announce/ +[15]: https://bbs.archlinux.org/ +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-pacman-Ss.png?ssl=1 +[17]: https://wiki.archlinux.org/index.php/Downgrade +[18]: https://jlk.fjfi.cvut.cz/arch/manpages/man/paccache.8 +[19]: https://www.archlinux.org/packages/?name=pacman-contrib +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/sudo-paccache-r.png?ssl=1 From ad490326f87f602ca8a5f0c7b3793025a2fcb848 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 19 Apr 2020 01:06:51 +0800 Subject: [PATCH 172/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200418=20My=201?= =?UTF-8?q?0=20guiding=20principles=20for=20open=20source=20community=20ma?= =?UTF-8?q?nagement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200418 My 10 guiding principles for open source community management.md --- ...es for open source community management.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20200418 My 10 guiding principles for open source community management.md diff --git a/sources/tech/20200418 My 10 guiding principles for open source community management.md b/sources/tech/20200418 My 10 guiding principles for open source community management.md new file mode 100644 index 0000000000..c5e62ba6b3 --- /dev/null +++ b/sources/tech/20200418 My 10 guiding principles for open source community management.md @@ -0,0 +1,116 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (My 10 guiding principles for open source community management) +[#]: via: (https://opensource.com/article/20/4/open-source-community-management) +[#]: author: (Florian Effenberger https://opensource.com/users/floeff) + +My 10 guiding principles for open source community management +====== +It's not just about subject matter expertise; leadership in the open +source world requires special skills and processes. +![community team brainstorming ideas][1] + +Many activities these days, be they sports, social work, arts or free and open source software, are organized in some sort of community. If backed by a respective legal entity, this not only helps with getting donations and entering contracts but also puts statutes and rules in place that establish the values and ideals all contributors share and abide by. + +Inside these communities, there can be various roles. Some of them have formal requirements and annual or biannual elections, e.g., the board of directors or the supervisory board; others exist ad hoc within dynamically grown groups and can change frequently. Either of those are ideally composed of experienced and enthusiastic community members who take leadership and responsibility. + +Many regular contributors will, therefore, eventually face the question of whether to accept a certain role. Based on my experience with being a board member of the former German associations [OpenOffice.org][2] Deutschland e.V. and Freies Office Deutschland e.V., previous chairman and current executive director of [The Document Foundation][3] and founding member of the Munich [Open-Source-Treffen e.V.][4], I would like to share some personal insights on the topic. + +These views are purely my own, and your mileage might vary. It is likely that others had both similar and different experiences, so I'm looking forward to any feedback and thoughts you might have. + +### 1\. Cooperation + +A community is all about cooperation. Boards, groups, and bodies are no different in this regard. Usually, you don't know who will co-serve on an elected committee with you until shortly before you start your duty. Therefore, it is important to cooperate openly with your new colleagues in a transparent, trustworthy, and effective way, within the committee as well as the larger community. + +Sharing a common understanding of responsibilities and duties, and even more importantly, of your goals, visions, and plans can help a lot. It's not necessary for these to all be totally aligned in the first place, as long as there are consensus and compromise to help you identify goals that benefit the community and their objectives at large. In a vivid and diverse community, several goals can often be pursued at once, as most won't be mutually exclusive or otherwise prohibitive. + +And then let's not forget one thing: the fun! Be proud that you have been entrusted by your peers to drive the community and its projects toward a bright future. Be proud that you can help steer the ship and shape the soul of something that is important to you. As is often the case in life, cooperating and working together with others is key to success. Joining forces is not only easier but also much more fun than working alone. + +### 2\. Commitment + +Taking over a role is something that can and should make you proud. See this as something you have been entrusted with for a certain amount of time because your contributions have been recognized by the community as extraordinary and remarkable. You acted in a visible and trustworthy fashion, and people credit you with leadership skills. + +Depending on the role you take, the honor often comes with a fair amount of new responsibility beyond what you already do, and it might involve subjects yet unknown to you. In other words: Be ready to put in some time and effort. + +How much time such a commitment takes obviously depends on multiple factors: what specific role you take, how many contributors you have to coordinate with, how large your organization is, and of course, what kind of projects you run. [In one of its annual reports][5], board members of The Document Foundation explained that every year "they each donate 15 to 20 days of activity to TDF for Board duties in addition to other volunteering" and the members of its membership committee donate "between 10 and 15 days of activity." + +### 3\. Variety + +Should you be elected into an organizations' formal body, you will see yourself responsible for representing the entity from a marketing perspective, but also from a legal and organizational point of view. Other than the more glamorous parts, these duties often also entail regular meetings, annual budget planning and reserve building, tax filings and annual activity reports, team management, trademark and copyright handling, planning and overseeing tenders, and all sorts of expected and unexpected legal matters and fostering liaisons with other entities, all of which are rather unglamorous tasks rarely seen by the general public. + +That requires the willingness to learn in a variety of areas and for having a rather high tolerance for frustration. Luckily, most of the groups I know are composed of members with different skills, so it's likely someone is either already experienced in or willing to learn one or more of the respective areas. Looking at The Document Foundation's [rules of procedure][6] for the board, a total of 13 different areas of oversight can be identified, each one staffed with one or more volunteers, matched to their area of interest. + +### 4\. Delegation + +Handling all the work alone as a pure volunteer will sooner or later become an impossible task and, unless you have magical superpowers, it's strongly advisable to share these with other seat holders, volunteers, and, if they exist, staff and external professionals. Often, growing organizational demands luckily come together with the financial growth of the entity, which makes paying professionals for certain tasks quite feasible and sensible. Accounting, administration, and legal advice are prime examples of things to outsource (unless that's the service you already provide, of course). + +If you oversee a large part of the organization, you primarily need to focus on strategy and the mission at large, so it is advisable to delegate many tasks to others. Remember, the community has entrusted you to steer the ship, to oversee the big picture; don't bother yourself with every little detail and micromanagement, but get enough insight to oversee those you task and trust that they do a good job. + +### 5\. Responsibility + +In the end, however, it still is the ultimate and shared responsibility of all representatives to oversee and coordinate the work, ensure all duties are fulfilled, and, especially for board members, take care that all legal obligations are met. Remember, donors trust you to make good use of their money, so you have a huge responsibility. + +In nearly all legislations, there exist numerous rules and regulations you are bound by, and the unfortunate tendency is often to make things more complicated instead of relaxing them. + +In case something goes wrong, those most exposed are first in line to be confronted with that, both from a social and legal point of view. + +### 6\. Social + +Depending on the size of the organization and your role, you might not only have responsibility for tasks and projects, but also for a paid team. Keep in mind that, for many, their economic situation depends on the success of your organization. Job security and a positive work environment are important factors to keep a happy and dedicated team. + +Gaining the skills and finding the time as a pure volunteer to oversee a large full-time team is demanding. Interacting by talking, listening, and being open helps a lot for both your team and the organization. In many organizations, the paid team is there to serve your community, to drive forward the success of the project, to take away annoying administrative tasks from you, and to work on tasks that support and enable your contributors. + +Working at charities can be a bit different from companies. Given most of your income consists of donor's money, you have less monetary flexibility than commercial employers. However, you provide a far superior experience than many traditional businesses. Use that as your advantage—your team does something for the good cause, can work with people around the world, can really make a difference, and at the same time make a living out of what they love. Communicate frequently, and don't forget to laud people if they do a good job, especially in remote working environments. + +### 7\. Diversity + +Crucial and essential is that representatives reflect the diversity of the community—different genders, religions, languages, cultures, backgrounds, and experiences add an incredibly exciting variety that you should aim hard to achieve in any board, committee, and group. While this can turn out to be challenging in the beginning, it for sure will enrich your community in ways you never dared to dream of before. + +This diversity is one of the most important and exciting assets a larger community offers; you'll soon learn how it widens the view, helps you to question your own thoughts and positions, and contributes greatly to your overall efforts. If you run an open source community, do exactly as the name suggests—be open, be passionate, and try to get to the bottom of things! + +### 8\. Coordination + +Having members from around the globe can make you face some practical problems though—most notably, languages and time zones. While English as a common denominator is spoken widely in Europe, it might be different for other countries, and including those who don't speak English as their mother tongue is key if you have a large community. You risk losing vital insight into what your worldwide community does if you don't manage to connect to them. + +Something the law of physics at least currently doesn't allow is overcoming the different time zones. Finding suitable meeting slots for participants on different continents, matching everyone's working schedule, and providing a work-life balance aren't trivial requirements, especially when you want to include a paid team. As you end your workday, colleagues from a different continent are just about to start theirs. While the volunteers need meeting times after office hours, your staff would probably rather not stay in the office until late or during the weekends. + +Likely there isn't an ideal meeting time, but you will end up finding a compromise that works for most people, possibly including alternate meeting times. A word to the wise: use calendar invites and meeting planners with time zones to avoid confusion, especially during times of daylight savings changes. + +The choice of medium is important as well—all stakeholders need to be aware of and included in important discussions. Some of these are thus better done in email; others are easier to handle on the phone. You might also find it convenient to prepare initial discussions via emails and have the final vote on the phone. + +Properly prefixing email subjects with votes and discussions can likewise be helpful to handle the influx of messages and catch people's attention. The same is true for meeting intervals, agendas, deadlines, quorum requirements, and sunset periods—these need to reflect everyone's needs, factoring in availabilities, vacations, and absences. The rationale behind this is that taking a role requires continuous, active participation in many communities, to keep up with what's going on, and that is much easier when the rules are clear. + +Depending on your setup and the jurisdiction you're in, votes and meetings also have formal requirements you have to stick to. + +### 9\. Trust + +Trustworthiness is probably one of the most important characteristics for anyone who fills a leadership role. Email conversations lack tone and gestures, making it harder to understand moods, emotions, and intentions. Thus it's even more important to assume best intentions on each side, trying to avoid what is known as confirmation bias, i.e., interpreting actions and words in a way that seems to confirm your existing negative assumptions. + +Trust especially comes into play when the entity is located in a country whose language you don't speak or whose legal system you are not familiar with—you will have to rely on translation services and people acting as gateways, be they volunteers or paid professionals. + +### 10\. Reward + +Filling a community role usually means plenty of hard work on top of your existing duties, but there are plenty of rewards for all that work. It is a very honorable and truly exciting opportunity that will not only enrich your professional life (and makes a good item on a CV) but beyond that, enriches your personality, your skills, and your point of view. If you're passionate about what you do, if you're open to new things, if you want to shape the future of what you love—then you indeed might be a great candidate to serve the community and lead by example. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-community-management + +作者:[Florian Effenberger][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/floeff +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting_discussion_brainstorm.png?itok=7_m4CC8S (community team brainstorming ideas) +[2]: http://OpenOffice.org +[3]: https://www.documentfoundation.org/ +[4]: https://www.opensourcetreffen.de/ +[5]: https://wiki.documentfoundation.org/File:AnnualReport2016LR.pdf +[6]: https://wiki.documentfoundation.org/TDF/BoD_rules From 1df21ea33676f5fa40713a9d8e6aadf28db31fa9 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 19 Apr 2020 09:54:36 +0800 Subject: [PATCH 173/394] Rename sources/tech/20200418 My 10 guiding principles for open source community management.md to sources/talk/20200418 My 10 guiding principles for open source community management.md --- ... 10 guiding principles for open source community management.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200418 My 10 guiding principles for open source community management.md (100%) diff --git a/sources/tech/20200418 My 10 guiding principles for open source community management.md b/sources/talk/20200418 My 10 guiding principles for open source community management.md similarity index 100% rename from sources/tech/20200418 My 10 guiding principles for open source community management.md rename to sources/talk/20200418 My 10 guiding principles for open source community management.md From cf0158f5b1f37c50285af73e11fe61317dc123d5 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 10:09:44 +0800 Subject: [PATCH 174/394] Almost done --- ... the internet backbone and how it works.md | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/sources/talk/20200313 What is the internet backbone and how it works.md b/sources/talk/20200313 What is the internet backbone and how it works.md index a2e13ef449..935ffd66e4 100644 --- a/sources/talk/20200313 What is the internet backbone and how it works.md +++ b/sources/talk/20200313 What is the internet backbone and how it works.md @@ -7,8 +7,7 @@ [#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html) [#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) -What is the internet backbone and how it works -互联网的骨干网是什么以及它是怎样工作的 +What is the internet backbone and how it works 互联网的骨干网是什么以及它是怎样工作的 ====== Tier 1 internet service providers (ISP) mesh their high-speed fiber-optic networks together to create the internet backbone, which moves traffic efficiently among geographic regions. [Gerd Altmann][1] [(CC0)][2] @@ -17,55 +16,61 @@ Tier 1 internet service providers (ISP) mesh their high-speed fiber-optic networ The internet generates massive amounts of computer-to-computer traffic, and insuring all that traffic can be delivered anywhere in the world requires the aggregation of a vast array of high-speed networks collectively known as the internet backbone, but how does that work? 互联网会产生大量的计算机到计算机的流量,要确保所有流量都可以在世界上任何地方之间送达,就需要大量汇聚的高速网络,这些网络统称为互联网骨干网,但是它是如何工作的呢? -### What is the internet backbone? -互联网的骨干网是什么? +### What is the internet backbone? 互联网的骨干网是什么? Like any other network, the internet consists of access links that move traffic to high-bandwidth routers that move traffic from its source over the best available path toward its destination. This core is made up of individual high-speed fiber-optic networks that peer with each other to create the internet backbone. 像任何其他网络一样,Internet由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的各个高速光纤网络而构成的Internet骨干网。 The individual core networks are privately owned by Tier 1 internet service providers (ISP), giant carriers whose networks are tied together. These providers include AT&T, CenturyLink, Cogent Communications, Deutsche Telekom, Global Telecom and Technology (GTT), NTT Communications, Sprint, Tata Communications, Telecom Italia Sparkle, Telia Carrier, and Verizon. -各个独立的核心网络由一级互联网服务提供商(ISP)所拥有,这些大型运营商的网络连接在一起。这些运营商包括AT&T,CenturyLink,Cogent Communications,德国电信,全球电信和技术(GTT),NTT Communications,Sprint,Tata Communications,意大利Sparkle电信,Telia Carrier和Verizon。 +各个独立的核心网络由一级互联网服务提供商(ISP),大型运营商所拥有。他们的网络连接在一起。这些提供商包括AT&T,CenturyLink,Cogent Communications,德国电信,全球电信和技术(GTT),NTT Communications,Sprint,Tata Communications,意大利Sparkle电信,Telia Carrier和Verizon。 [[Get regularly scheduled insights by signing up for Network World newsletters.]][3] By joining these long-haul networks together, Tier 1 ISPs create a single worldwide network that gives all of them access to the entire internet routing table so they can efficiently deliver traffic to its destination through a hierarchy of progressively more local ISPs. -通过将这些远程网络连接在一起,一级ISP们创建了一个他们都可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地ISP网络来有效地将流量传输到其目的地。 +通过将这些长途网连接在一起,一级ISP们创建了一个他们可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地ISP网络来有效地将流量传输到其目的地。 In addition to being physically connected, these backbone providers are held together by a shared network protocol, TCP/IP. They are actually two protocols, transport control protocol and internet protocol that set up connections between computers, insuring that the connections are reliable and formating messages into packets. -除了物理连接之外,这些骨干运营商还通过一致的网络协议TCP/IP融合在一起。它们实际上是两个协议,传输控制协议和Internet协议,它们在计算机之间建立连接,以确保连接可靠并将消息格式化为数据包。 +除了物理连接之外,这些骨干提供商还通过一致的网络协议TCP/IP融合在一起。它们实际上是两个协议,传输控制协议和Internet协议,它们在计算机之间建立连接,以确保连接可靠并将消息格式化为数据包。 -### Internet exchange points (IXP) tie the backbone together +### Internet exchange points (IXP) tie the backbone together 互联网交接点(IXP)将骨干连接在一起 Backbone ISPs connect their networks at peering points, neutrally owned locations with high-speed switches and routers that move traffic among the peers. These are often owned by third parties, sometimes non-profits, that facilitate unifying the backbone. +骨干ISP在对等点,中立位置通过高速交换机和路由器连接其网络。这些通常由第三方(有时是非营利组织)提供,以促进骨干网的统一。 Participating Tier 1 ISPs help fund the IXPs, but don’t charge each other for transporting traffic from the other Tier 1 ISPs in a relationship known as settlement-free peering. Such agreements eliminate potential financial disputes that might have the result of slowing down internet performance. +有1级ISP的参与有助于为IXP提供资金,但是在称为无结算的对等关系中,彼此之间不收取从其他1级ISP传输流量的费用。此类协议消除了可能导致互联网性能下降的潜在财务纠纷。 [][4] -### How fast is the backbone? - +### How fast is the backbone? 骨干网有多快? The internet backbone is made up of the fastest routers, which can deliver 100Gbps trunk speeds. These routers are made by vendors including Cisco, Extreme, Huawei, Juniper, and Nokia, and use the border gateway protocol (BGP) to route traffic among themselves. +互联网骨干网由最快的路由器组成,可以提供100Gbps的线路速度。这些路由器由包括Cisco,Extreme,Huawei,Juniper和Nokia在内的供应商制造,使用边界网关协议(BGP)在彼此之间路由流量。 -### How traffic gets on the backbone +### How traffic gets on the backbone 流量是如何进入骨干网的 Below the Tier 1 ISPs are smaller Tier 2 and Tier 3 ISPs. +1级ISP之下是小的2级和3级ISP。 Tier 3 providers provide businesses and consumers with access to the internet. These providers have no access of their own to the internet backbone, so on their own would not be able to connect their customers to all of the billions of internet-attached computers. +3级(ISP)提供商为企业和消费者提供了Internet接入服务。这些提供商自己没有接入互联网骨干网,因此,他们自己无法将其客户连接到数十亿台互联网上的计算机。 Buying access to Tier 1 providers is expensive. So often Tier 3 ISPs contract with Tier 2 (regional) ISPs that have their own networks that can deliver traffic to a limited geographic area but not to all internet-attached devices. +购买一级(ISP)提供商的接入权非常昂贵。通常3级ISP与具有自己网络的2级(区域)ISP签订合同,利用2级ISP的网络将流量传输到有限的地理区域,但不能传输到所有Internet上的设备。 In order to do that, Tier 2 ISPs contract with Tier 1 ISPs for access to the global backbone, and in that way make the entire internet accesssible to their customers. +为此,2级ISP与1级ISP签约以访问全球骨干网,并以这种方式使客户可以访问整个Internet。 This arrangment makes it possible for traffic from a computer on one side of the world to connect to one on the other side. That traffic goes from a source computer to a Tier 3 ISP that routes it to a Tier 2 ISP that routes it to a Tier 1 backbone provider that routes it to the appropriate Tier 2 ISP that routes it to a Tier 3 access provider that delivers it to the destination computer. +这种方式使得来自世界一侧的计算机的流量能够连接到另一侧的计算机。流量从源计算机流向3级ISP,再路由到2级ISP,再路由到1级骨干网提供商,再路由到正确的2级ISP,最后路由到提供该数据的3级接入提供商连接的目标计算机。 Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - +加入[Facebook][5]和[LinkedIn][6]上的Network World社区,就可以评论最前沿的话题。 -------------------------------------------------------------------------------- via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html 作者:[Tim Greene][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[messon007](https://github.com/messon007) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 3172cee103d9048d293c522dd18f21a4435d2b77 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 10:15:50 +0800 Subject: [PATCH 175/394] remove origin and move to translated --- ... the internet backbone and how it works.md | 85 ------------------- ... the internet backbone and how it works.md | 69 +++++++++++++++ 2 files changed, 69 insertions(+), 85 deletions(-) delete mode 100644 sources/talk/20200313 What is the internet backbone and how it works.md create mode 100644 translated/talk/20200313 What is the internet backbone and how it works.md diff --git a/sources/talk/20200313 What is the internet backbone and how it works.md b/sources/talk/20200313 What is the internet backbone and how it works.md deleted file mode 100644 index 935ffd66e4..0000000000 --- a/sources/talk/20200313 What is the internet backbone and how it works.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (messon007) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is the internet backbone and how it works) -[#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html) -[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) - -What is the internet backbone and how it works 互联网的骨干网是什么以及它是怎样工作的 -====== -Tier 1 internet service providers (ISP) mesh their high-speed fiber-optic networks together to create the internet backbone, which moves traffic efficiently among geographic regions. -[Gerd Altmann][1] [(CC0)][2] -一级互联网服务提供商(ISP)将其高速光纤网络连接在一起,形成互联网的骨干网,实现在地理区域之间高效地传输流量。[Gerd Altmann][1] [(CC0)][2] - -The internet generates massive amounts of computer-to-computer traffic, and insuring all that traffic can be delivered anywhere in the world requires the aggregation of a vast array of high-speed networks collectively known as the internet backbone, but how does that work? -互联网会产生大量的计算机到计算机的流量,要确保所有流量都可以在世界上任何地方之间送达,就需要大量汇聚的高速网络,这些网络统称为互联网骨干网,但是它是如何工作的呢? - -### What is the internet backbone? 互联网的骨干网是什么? -Like any other network, the internet consists of access links that move traffic to high-bandwidth routers that move traffic from its source over the best available path toward its destination. This core is made up of individual high-speed fiber-optic networks that peer with each other to create the internet backbone. -像任何其他网络一样,Internet由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的各个高速光纤网络而构成的Internet骨干网。 - -The individual core networks are privately owned by Tier 1 internet service providers (ISP), giant carriers whose networks are tied together. These providers include AT&T, CenturyLink, Cogent Communications, Deutsche Telekom, Global Telecom and Technology (GTT), NTT Communications, Sprint, Tata Communications, Telecom Italia Sparkle, Telia Carrier, and Verizon. -各个独立的核心网络由一级互联网服务提供商(ISP),大型运营商所拥有。他们的网络连接在一起。这些提供商包括AT&T,CenturyLink,Cogent Communications,德国电信,全球电信和技术(GTT),NTT Communications,Sprint,Tata Communications,意大利Sparkle电信,Telia Carrier和Verizon。 - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -By joining these long-haul networks together, Tier 1 ISPs create a single worldwide network that gives all of them access to the entire internet routing table so they can efficiently deliver traffic to its destination through a hierarchy of progressively more local ISPs. -通过将这些长途网连接在一起,一级ISP们创建了一个他们可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地ISP网络来有效地将流量传输到其目的地。 - -In addition to being physically connected, these backbone providers are held together by a shared network protocol, TCP/IP. They are actually two protocols, transport control protocol and internet protocol that set up connections between computers, insuring that the connections are reliable and formating messages into packets. -除了物理连接之外,这些骨干提供商还通过一致的网络协议TCP/IP融合在一起。它们实际上是两个协议,传输控制协议和Internet协议,它们在计算机之间建立连接,以确保连接可靠并将消息格式化为数据包。 - -### Internet exchange points (IXP) tie the backbone together 互联网交接点(IXP)将骨干连接在一起 - -Backbone ISPs connect their networks at peering points, neutrally owned locations with high-speed switches and routers that move traffic among the peers. These are often owned by third parties, sometimes non-profits, that facilitate unifying the backbone. -骨干ISP在对等点,中立位置通过高速交换机和路由器连接其网络。这些通常由第三方(有时是非营利组织)提供,以促进骨干网的统一。 - -Participating Tier 1 ISPs help fund the IXPs, but don’t charge each other for transporting traffic from the other Tier 1 ISPs in a relationship known as settlement-free peering. Such agreements eliminate potential financial disputes that might have the result of slowing down internet performance. -有1级ISP的参与有助于为IXP提供资金,但是在称为无结算的对等关系中,彼此之间不收取从其他1级ISP传输流量的费用。此类协议消除了可能导致互联网性能下降的潜在财务纠纷。 - -[][4] - -### How fast is the backbone? 骨干网有多快? -The internet backbone is made up of the fastest routers, which can deliver 100Gbps trunk speeds. These routers are made by vendors including Cisco, Extreme, Huawei, Juniper, and Nokia, and use the border gateway protocol (BGP) to route traffic among themselves. -互联网骨干网由最快的路由器组成,可以提供100Gbps的线路速度。这些路由器由包括Cisco,Extreme,Huawei,Juniper和Nokia在内的供应商制造,使用边界网关协议(BGP)在彼此之间路由流量。 - -### How traffic gets on the backbone 流量是如何进入骨干网的 - -Below the Tier 1 ISPs are smaller Tier 2 and Tier 3 ISPs. -1级ISP之下是小的2级和3级ISP。 - -Tier 3 providers provide businesses and consumers with access to the internet. These providers have no access of their own to the internet backbone, so on their own would not be able to connect their customers to all of the billions of internet-attached computers. -3级(ISP)提供商为企业和消费者提供了Internet接入服务。这些提供商自己没有接入互联网骨干网,因此,他们自己无法将其客户连接到数十亿台互联网上的计算机。 - -Buying access to Tier 1 providers is expensive. So often Tier 3 ISPs contract with Tier 2 (regional) ISPs that have their own networks that can deliver traffic to a limited geographic area but not to all internet-attached devices. -购买一级(ISP)提供商的接入权非常昂贵。通常3级ISP与具有自己网络的2级(区域)ISP签订合同,利用2级ISP的网络将流量传输到有限的地理区域,但不能传输到所有Internet上的设备。 - -In order to do that, Tier 2 ISPs contract with Tier 1 ISPs for access to the global backbone, and in that way make the entire internet accesssible to their customers. -为此,2级ISP与1级ISP签约以访问全球骨干网,并以这种方式使客户可以访问整个Internet。 - -This arrangment makes it possible for traffic from a computer on one side of the world to connect to one on the other side. That traffic goes from a source computer to a Tier 3 ISP that routes it to a Tier 2 ISP that routes it to a Tier 1 backbone provider that routes it to the appropriate Tier 2 ISP that routes it to a Tier 3 access provider that delivers it to the destination computer. -这种方式使得来自世界一侧的计算机的流量能够连接到另一侧的计算机。流量从源计算机流向3级ISP,再路由到2级ISP,再路由到1级骨干网提供商,再路由到正确的2级ISP,最后路由到提供该数据的3级接入提供商连接的目标计算机。 - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. -加入[Facebook][5]和[LinkedIn][6]上的Network World社区,就可以评论最前沿的话题。 --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html - -作者:[Tim Greene][a] -选题:[lujun9972][b] -译者:[messon007](https://github.com/messon007) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Tim-Greene/ -[b]: https://github.com/lujun9972 -[1]: https://pixabay.com/en/social-media-digitization-faces-3271592/ -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/translated/talk/20200313 What is the internet backbone and how it works.md b/translated/talk/20200313 What is the internet backbone and how it works.md new file mode 100644 index 0000000000..d8294dba3c --- /dev/null +++ b/translated/talk/20200313 What is the internet backbone and how it works.md @@ -0,0 +1,69 @@ +[#]: collector: (lujun9972) +[#]: translator: (messon007) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is the internet backbone and how it works) +[#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html) +[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) + +互联网的骨干网是什么以及它是怎样工作的 +====== +一级互联网服务提供商(ISP)将其高速光纤网络连接在一起,形成互联网的骨干网,实现在不同地理区域之间高效地传输流量。[Gerd Altmann][1] [(CC0)][2] + +互联网会产生大量的计算机到计算机的流量,要确保所有流量都可以在世界上任何地方之间传输,就需要大量汇聚的高速网络,这些网络统称为互联网骨干网,但是它是如何工作的呢? + +### 互联网的骨干网是什么? +像任何其他网络一样,Internet由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的各个高速光纤网络而构成的Internet骨干网。 + +各个独立的核心网络由一级互联网服务提供商(ISP),大型运营商所拥有。他们的网络连接在一起。这些提供商包括AT&T,CenturyLink,Cogent Communications,德国电信,全球电信和技术(GTT),NTT Communications,Sprint,Tata Communications,意大利Sparkle电信,Telia Carrier和Verizon。 + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] + +通过将这些长途网连接在一起,一级ISP们创建了一个他们可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地ISP网络来有效地将流量传输到其目的地。 + +除了物理连接之外,这些骨干提供商还通过一致的网络协议TCP/IP融合在一起。它们实际上是两个协议,传输控制协议和IP协议,它们在计算机之间建立连接,以确保连接可靠并将消息格式化为数据包。 + +### 互联网交接点(IXP)将骨干连接在一起 + +骨干ISP在对等点,中立位置通过高速交换机和路由器连接其网络。这些通常由第三方(有时是非营利组织)提供,以促进骨干网的统一。 + +有1级ISP的参与有助于为IXP提供资金,但是在称为无结算的对等关系中,彼此之间不收取从其他1级ISP传输流量的费用。此类协议消除了可能导致互联网性能下降的潜在财务纠纷。 + +[][4] + +### 骨干网有多快? +互联网骨干网由最快的路由器组成,可以提供100Gbps的线路速度。这些路由器由包括Cisco,Extreme,Huawei,Juniper和Nokia在内的供应商制造,使用边界网关协议(BGP)在彼此之间路由流量。 + +### 流量是如何进入骨干网的 + +1级ISP之下是小的2级和3级ISP。 + +3级(ISP)提供商为企业和消费者提供了Internet接入服务。这些提供商自己没有接入互联网骨干网,因此,他们自己无法将其客户连接到数十亿台互联网上的计算机。 + +购买一级(ISP)提供商的接入权非常昂贵。通常3级ISP与具有自己网络的2级(区域)ISP签订合同,利用2级ISP的网络将流量传输到有限的地理区域,但不能传输到所有Internet上的设备。 + +为此,2级ISP与1级ISP签约以访问全球骨干网,并以这种方式使客户可以访问整个Internet。 + +这种方式使得来自世界一侧的计算机的流量能够连接到另一侧的计算机。流量从源计算机流向3级ISP,再路由到2级ISP,再路由到1级骨干网提供商,再路由到正确的2级ISP,最后路由到提供该数据的3级接入提供商连接的目标计算机。 + +加入[Facebook][5]和[LinkedIn][6]上的Network World社区,就可以评论最前沿的话题。 +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html + +作者:[Tim Greene][a] +选题:[lujun9972][b] +译者:[messon007](https://github.com/messon007) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Tim-Greene/ +[b]: https://github.com/lujun9972 +[1]: https://pixabay.com/en/social-media-digitization-faces-3271592/ +[2]: https://creativecommons.org/publicdomain/zero/1.0/ +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 99b0e53413c50cf24291ab2863dbd4e0a197009f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Apr 2020 11:56:49 +0800 Subject: [PATCH 176/394] PRF @wxy --- .../20200211 Navigating man pages in Linux.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20200211 Navigating man pages in Linux.md b/translated/tech/20200211 Navigating man pages in Linux.md index 5a160269e9..c4f575891c 100644 --- a/translated/tech/20200211 Navigating man pages in Linux.md +++ b/translated/tech/20200211 Navigating man pages in Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Navigating man pages in Linux) @@ -12,11 +12,11 @@ > Linux 系统上的手册页可以做的不仅仅是提供特定命令的信息。它们可以帮助你发现你没有意识到的命令。 -[Hello I'm Nik][1] [(CC0)][2] +![Hello I'm Nik][1] 手册页提供了关于 Linux 命令的基本信息,很多用户经常参考它,但手册页的内容比我们很多人意识到的要多得多。 -你总是可以输入一个像 `man who` 这样的命令,然后得到 `who` 命令的工作原理的漂亮描述,但是探索你可能不知道的命令可能会更有启发。例如,你可以使用 `man` 命令来帮助确定处理一些非常具有挑战性的任务的命令,或者显示一些选项,这些选项可以帮助你以新的更好的方式使用你已经知道的命令。 +你总是可以输入一个像 `man who` 这样的命令,然后得到 `who` 命令的工作原理的漂亮描述,但是探索你可能不知道的命令可能会更有启发。例如,你可以使用 `man` 命令来帮助找到一些处理非常具有挑战性的任务的命令,或者显示一些选项,这些选项可以帮助你以新的更好的方式使用你已经知道的命令。 让我们来浏览一些选项,看看最终的结果是什么。 @@ -41,11 +41,11 @@ useradd (8) - create a new user or update default new user information zshroadmap (1) - informal introduction to the zsh manual The Zsh Manual, … ``` -需要说明的是,上面的第三项只是提到 “new users” 类似的内容,并不是设置、删除或配置用户账号的命令。`man` 命令只是在命令描述中匹配了一些词,作用很像 `apropos` 命令。注意上面列出的每个命令后面的括号中的数字。这些数字与包含这些命令的手册页的部分有关。 +需要说明的是,上面的第三项只是提到 “new users” 类似的内容,并不是设置、删除或配置用户账号的命令。`man` 命令只是在命令描述中匹配了一些词,作用很像 `apropos` 命令。注意上面列出的每个命令后面的括号中的数字。这些数字与包含这些命令的手册页的分区有关。 -### 确定手册页的部分 +### 确定手册页的分区 -`man` 命令部分将命令划分为不同的类别。要列出这些类别,请键入 `man man`,并查看类似下面的描述。你的系统中很可能没有第 9 部分的命令。 +`man` 命令的分区将其内容划分为不同的类别。要列出这些类别,请键入 `man man`,并查看类似下面的描述。你的系统中很可能没有第 9 分区的命令。 - `1`:可执行程序或 shell 命令 - `2`:系统调用(内核提供的函数) @@ -59,7 +59,7 @@ zshroadmap (1) - informal introduction to the zsh manual The Zsh Manual, 手册页涵盖了比我们通常认为的“命令”更多的内容。从上面的描述中可以看到,它们涵盖了系统调用、库调用、特殊文件等等。 -下面的列表显示了 Linux 系统中的手册页的实际存储位置。这些目录上的日期会有所不同,因为随着更新,其中一些部分会有新的内容,而另一些则不会。 +下面的列表显示了 Linux 系统中的手册页的实际存储位置。这些目录上的日期会有所不同,因为随着更新,其中一些分区会有新的内容,而另一些则不会。 ``` $ ls -ld /usr/share/man/man? @@ -89,13 +89,13 @@ lrwxrwxrwx 1 root root 9 Sep 5 06:38 [.1.gz -> test.1.gz -rw-r--r-- 1 root root 2378 Aug 23 2018 ac.1.gz ``` -### 按部分列出的手册页 +### 按分区列出的手册页 -即使只看第 1 部分的前 10 个手册页(如上所示),你也可能会看到一些新的命令 —— 也许是 `a2query` 或 `aaflip`(如上所示)。 +即使只看第 1 分区的前 10 个手册页(如上所示),你也可能会看到一些新的命令 —— 也许是 `a2query` 或 `aaflip`(如上所示)。 -探索命令的更好策略是按节列出命令,不查看文件本身,而是使用 `man` 命令向你显示命令并提供每个命令的简要说明。 +探索命令的更好策略是按分区列出命令,不查看文件本身,而是使用 `man` 命令向你显示命令并提供每个命令的简要说明。 -在下面的命令中,`-s 1` 指示 `man` 显示第 1 部分中的命令信息。`-k .` 使该命令对所有命令都有效,而不是指定一个特定的关键字;如果没有这个,`man` 命令就会回过头来问:“你想要什么手册页?”所以,使用关键字来选择一组相关的命令,或者使用点来显示一个部分中的所有命令。 +在下面的命令中,`-s 1` 指示 `man` 显示第 1 分区中的命令信息。`-k .` 使该命令对所有命令都有效,而不是指定一个特定的关键字;如果没有这个,`man` 命令就会回过头来问:“你想要什么手册页?”所以,使用关键字来选择一组相关的命令,或者使用点来显示一个分区中的所有命令。 ``` $ man -s 1 -k . @@ -111,9 +111,9 @@ enchant (1) - a spellchecker … ``` -### 有几本手册页? +### 有多少手册页? -如果你对每个部分中有多少手册页感到好奇,可以使用以下命令按部分对它们进行计数: +如果你对每个分区中有多少手册页感到好奇,可以使用以下命令按分区对它们进行计数: ``` $ for num in {1..8} @@ -158,13 +158,13 @@ via: https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux. 作者:[Sandra Henry-Stocker][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ [b]: https://github.com/lujun9972 -[1]: https://unsplash.com/photos/YiRQIglwYig +[1]: https://images.idgesg.net/images/article/2019/10/field-note_play-book_playbook_map_navigation_journey_by-hello-i-m-nik-via-unsplash-100813507-large.jpg [2]: https://creativecommons.org/publicdomain/zero/1.0/ [3]: https://www.networkworld.com/slideshow/153439/linux-best-desktop-distros-for-newbies.html#tk.nww-infsb [4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) From beccbb531a5be7834c28941fac6850bfc619bf1d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Apr 2020 11:57:53 +0800 Subject: [PATCH 177/394] PUB @wxy https://linux.cn/article-12127-1.html --- .../20200211 Navigating man pages in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200211 Navigating man pages in Linux.md (99%) diff --git a/translated/tech/20200211 Navigating man pages in Linux.md b/published/20200211 Navigating man pages in Linux.md similarity index 99% rename from translated/tech/20200211 Navigating man pages in Linux.md rename to published/20200211 Navigating man pages in Linux.md index c4f575891c..98ca0579ed 100644 --- a/translated/tech/20200211 Navigating man pages in Linux.md +++ b/published/20200211 Navigating man pages in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12127-1.html) [#]: subject: (Navigating man pages in Linux) [#]: via: (https://www.networkworld.com/article/3519853/navigating-man-pages-in-linux.html) [#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) From 8123fdab6f1e5df9a4cb5a8f7f7160fdf9867e34 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Apr 2020 21:12:57 +0800 Subject: [PATCH 178/394] PRF @geekpi --- ...istrator in Nautilus File Manager in Linux.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md index 3355744d64..e327970e1f 100644 --- a/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md +++ b/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) @@ -10,7 +10,9 @@ 如何在 Linux 的 Nautilus 文件管理器中以管理员身份打开文件和文件夹 ====== -_**了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。**_ +> 了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项。 + +![](https://img.linux.net.cn/data/attachment/album/202004/19/211224hurk01u0kuvqnpvn.jpg) 如果要以根用户身份打开或编辑文件,你总是可以在终端中执行此操作。但我知道有些人对命令行不适应。 @@ -18,15 +20,11 @@ _**了解如何在 Ubuntu 和其他 Linux 发行版的 Nautilus 文件管理器 如果你必须以 root 用户身份访问文件夹或以 root 用户权限编辑文件,那你可以在 [Nautilus 文件管理器][1]中以图形方式进行操作。 -一个干净的 Nautilus hack 方式能让你以管理员也就是 root 打开文件和文件夹。让我向你展示如何做。 - -#### [Ubuntu 的 root 用户:你应该知道的重要事项][3] - -根用户对于任何 Linux 发行版都是必不可少的。在本 Ubuntu 初学者系列文章中了解 Ubuntu 为何锁定 root 用户以及如何使用它。 +一个小巧优雅的 Nautilus 技巧能让你以管理员(也就是 root)打开文件和文件夹。让我向你展示如何做。 ### 在 Nautilus 文件管理器的右键菜单中添加“以管理员身份打开”选项 -_**警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。**_ +> 警告!请不要以 root 用户身份打开和编辑随机文件,因为这样可能会弄乱文件并导致系统损坏。仅在需要时使用它。 我展示的是 Ubuntu 的步骤。你可以根据你的发行版的软件包管理器进行更改。 @@ -69,7 +67,7 @@ via: https://itsfoss.com/open-nautilus-as-administrator/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 0db2a16f4041c3a2c7946e752b2751b7235e8f81 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Apr 2020 21:13:30 +0800 Subject: [PATCH 179/394] PUB @geekpi https://linux.cn/article-12128-1.html --- ...ders as Administrator in Nautilus File Manager in Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md (98%) diff --git a/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/published/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md similarity index 98% rename from translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md rename to published/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md index e327970e1f..4b46fad9b3 100644 --- a/translated/tech/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md +++ b/published/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12128-1.html) [#]: subject: (How to Open Files and Folders as Administrator in Nautilus File Manager in Linux) [#]: via: (https://itsfoss.com/open-nautilus-as-administrator/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 6552f880f486ce2611708024a0a21957da94cb3e Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 21:25:19 +0800 Subject: [PATCH 180/394] Translating --- sources/tech/20200416 Learning to love systemd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200416 Learning to love systemd.md b/sources/tech/20200416 Learning to love systemd.md index 0aa8609ee7..70243db915 100644 --- a/sources/tech/20200416 Learning to love systemd.md +++ b/sources/tech/20200416 Learning to love systemd.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (messon007) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From dcea59cc037d08e908b3b22ef1613ec662096a90 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 21:28:37 +0800 Subject: [PATCH 181/394] translating --- sources/tech/20200417 Create a SDN on Linux with open source.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200417 Create a SDN on Linux with open source.md b/sources/tech/20200417 Create a SDN on Linux with open source.md index 2e144abb26..5e69bb4db6 100644 --- a/sources/tech/20200417 Create a SDN on Linux with open source.md +++ b/sources/tech/20200417 Create a SDN on Linux with open source.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (messon007) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 718724b2f2fc9fbe940d5c8423b4a8be16dae6c3 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 21:37:56 +0800 Subject: [PATCH 182/394] translating --- sources/tech/20180612 Systemd Services- Reacting to Change.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20180612 Systemd Services- Reacting to Change.md b/sources/tech/20180612 Systemd Services- Reacting to Change.md index a004f123c8..125b871602 100644 --- a/sources/tech/20180612 Systemd Services- Reacting to Change.md +++ b/sources/tech/20180612 Systemd Services- Reacting to Change.md @@ -1,3 +1,4 @@ +//messon007 translating Systemd Services: Reacting to Change ====== From bdb6b002e57c02760fdef87c8b5a89c8acf17b27 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 21:38:31 +0800 Subject: [PATCH 183/394] translating --- ...0180619 Systemd Services- Monitoring Files and Directories.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md b/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md index 601132a33f..f0ad489b5a 100644 --- a/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md +++ b/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md @@ -1,3 +1,4 @@ +//translating by messon007 Systemd Services: Monitoring Files and Directories ====== From 2ef8928e862b9b9049c261d020e75488873e4c3a Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 21:39:45 +0800 Subject: [PATCH 184/394] translating --- ...20190205 CFS- Completely fair process scheduling in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190205 CFS- Completely fair process scheduling in Linux.md b/sources/tech/20190205 CFS- Completely fair process scheduling in Linux.md index be44e75fea..fce243271a 100644 --- a/sources/tech/20190205 CFS- Completely fair process scheduling in Linux.md +++ b/sources/tech/20190205 CFS- Completely fair process scheduling in Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (messon007) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 205d9a0daaf47d6ffe0251d0a63512df5198f843 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sun, 19 Apr 2020 22:18:35 +0800 Subject: [PATCH 185/394] Update 20200401 The ins and outs of high-performance computing as a service.md --- ...high-performance computing as a service.md | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md index 0b0a1ac39b..45d258e08c 100644 --- a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md +++ b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md @@ -7,84 +7,109 @@ [#]: via: (https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html) [#]: author: (Josh Fruhlinger https://www.networkworld.com/author/Josh-Fruhlinger/) -The ins and outs of high-performance computing as a service +The ins and outs of high-performance computing as a service 高性能计算即服务的来龙去脉 ====== HPC services can be a way to meet expanding supercomputing needs, but depending on the use case, they’re not necessarily better than on-premises supercomputers. Dell EMC - +HPC服务可以满足不断扩展的超级计算需求,但根据使用情况,它们不一定比本地超级计算机更好。 戴尔EMC Electronics on missiles and military helicopters need to survive extreme conditions. Before any of that physical hardware can be deployed, defense contractor McCormick Stevenson Corp. simulates the real-world conditions it will endure, relying on finite element analysis software like Ansys, which requires significant computing power. +导弹和军用直升机上的电子设备需要在极端条件下生存。 在部署任何物理硬件之前,国防承包商麦考密克·史蒂文森公司(McCormick Stevenson Corp.)都依赖于像Ansys这样的有限元素分析软件来模拟它会承受的现实条件,该软件需要强大的计算能力。 Then one day a few years ago, it unexpectedly ran up against its computing limits. - +几年前的一天,它出乎意料地超出了计算极限。 [10 of the world's fastest supercomputers][1] "We had some jobs that would have overwhelmed the computers that we had in office," says Mike Krawczyk, principal engineer at McCormick Stevenson. "It did not make economic or schedule sense to buy a machine and install software." Instead, the company contracted with Rescale, which could sell them cycles on a supercomputer-class system for a tiny fraction of what they would've spent on new hardware. +麦考密克·史蒂文森(McCormick Stevenson)的首席工程师迈克·克劳奇奇(Mike Krawczyk)说:“我们从事的某些工作会使我们在办公室使用的计算机不堪重负。” “购买机器并安装软件在经济上或计划上都不合理。”取而代之的是,该公司与Rescale签约,可以在超级计算机级系统上向他们出售自行车的周期,而这只花费了他们在新硬件上花费的一小部分。 McCormick Stevenson had become an early adopter in a market known as supercomputing as a service or high-performance computing (HPC) as a service – two terms that are closely related. HPC is the application of supercomputers to computationally complex problems, while supercomputers are those computers at the cutting edge of processing capacity, according to the National Institute for Computational Sciences. +麦考密克·史蒂文森(McCormick Stevenson)已成为市场上的早期采用者,该市场被称为超级计算即服务或高性能计算(HPC)即服务–这两个紧密相关的术语。根据国家计算科学研究所的说法,HPC是超级计算机在计算复杂问题上的应用,而超级计算机是处理能力最先进的那些计算机。 Whatever it's called, these services are upending the traditional supercomputing market and bringing HPC power to customers who could never afford it before. But it's no panacea, and it's definitely not plug-and-play – at least not yet. +无论以何种方式称呼,这些服务都在颠覆传统的超级计算市场,并将HPC功能带给以前买不起的客户。但这不是万能药,而且绝对不是即插即用的,至少现在还没有。 -### HPC services in practice +### HPC services in practice HPC服务实践 From the end user's perspective, HPC as a service resembles the batch-processing model that dates back to the early mainframe era. "We create an Ansys batch file and send that up, and after it runs, we pull down the result files and import them locally here," Krawczyk says. +从最终用户的角度来看,HPC即服务类似于可追溯到大型机早期的批处理模型。 “我们创建一个Ansys批处理文件并将其发送出去,然后运行它,我们将结果文件下拉并在此处本地导入,” Krawczyk说。 Behind the scenes, cloud providers are running the supercomputing infrastructure in their own data centers – though that doesn't necessarily imply the sort of cutting-edge hardware you might be visualizing when you hear "supercomputer." As Dave Turek, Vice President of Technical Computing at IBM OpenPOWER, explains it, HPC services at their core are "a collection of servers that are strung together with an interconnect. You have the ability to invoke this virtual computing infrastructure that allows you to bring a lot of different servers to work together in a parallel construct to solve the problem when you present it." - +在幕后,云提供商正在其自己的数据中心中运行超级计算基础结构,尽管这不一定意味着您在听到“超级计算机”时可能会看到的最先进的硬件。正如IBM OpenPOWER技术计算副总裁Dave Turek解释说的那样,HPC服务的核心是“由互连串在一起的服务器的集合。您可以调用此虚拟计算基础结构,使您能够当您提出问题时,许多不同的服务器可以并行构造在一起以解决问题。” [][2] Sounds simple in theory. But making it viable in practice required some chipping away at technical problems, according to Theo Lynn, Professor of Digital Business at Dublin City University. What differentiates ordinary computing from HPC is those interconnects – high-speed, low-latency, and expensive – so those needed to be brought to the world of cloud infrastructure. Storage performance and data transport also needed to be brought up to a level at least in the same ballpark as on-prem HPC before HPC services could be viable. +理论上听起来很简单。都柏林城市大学数字业务教授西奥·林恩(Theo Lynn)表示,但要使其在实践中可行,需要解决一些技术问题。普通计算与HPC的区别在于那些互连-高速,低延迟和昂贵-因此需要将这些互连引入云基础架构领域。在HPC服务可行之前,还至少需要将存储性能和数据传输提升到与本地HPC相同的水平。 But Lynn says that some of the innovations that have helped HPC services take off have been more institutional than technological. In particular, "we are now seeing more and more traditional HPC applications adopting cloud-friendly licensing models – a barrier to adoption in the past." +但是林恩说,一些帮助高性能计算服务起飞的创新比技术更具有制度性。特别是,“我们现在看到越来越多的传统HPC应用程序采用云友好型许可模式-过去是采用这种模式的障碍。” And the economics have also shifted the potential customer base, he says. "Cloud service providers have opened up the market more by targeting low-end HPC buyers who couldn’t afford the capex associated with traditional HPC and opening up the market to new users. As the markets open up, the hyperscale economic model becomes more and more feasible, costs start coming down." +他说,经济也改变了潜在的客户群。 “云服务提供商通过针对那些负担不起与传统HPC相关的资本支出的低端HPC买家,并向新用户开放市场,进一步开放了市场。随着市场的开放,超大规模经济模型变得越来越多,更可行,成本开始下降。” -Avoid on-premises CAPEX** +Avoid on-premises CAPEX** 避免内部资本支出** ** HPC services are attractive to private-sector customers in the same fields where traditional supercomputing has long held sway. These include sectors that rely heavily on complex mathematical modeling, including defense contractors like McCormick Stevenson, along with oil and gas companies, financial services firms, and biotech companies. Dublin City University's Lynn adds that loosely coupled workloads are a particularly good use case, which meant that many early adopters used it for 3D image rendering and related applications. +在传统超级计算长期占据主导地位的相同领域,HPC服务对私营部门客户具有吸引力。这些行业包括严重依赖复杂数学模型的行业,包括麦考密克·史蒂文森(McCormick Stevenson)等国防承包商,以及石油和天然气公司,金融服务公司和生物技术公司。都柏林城市大学的Lynn补充说,松散耦合的工作负载是一个特别好的用例,这意味着许多早期采用者将其用于3D图像渲染和相关应用程序。 But when does it make sense to consider HPC services over on-premises HPC? For hhpberlin, a German company that simulates smoke propagation in and fire damage to structural components of buildings, the move came as it outgrew its current resources. +但是,何时在本地HPC上考虑HPC服务才有意义?对于德国的hhpberlin公司,该公司模拟烟雾在建筑物中的传播和火灾对建筑物结构部件的破坏,此举是因为它超出了其现有资源。 "For several years, we had run our own small cluster with up to 80 processor cores," says Susanne Kilian, hhpberlin's scientific head of numerical simulation. "With the rise in application complexity, however, this constellation has increasingly proven to be inadequate; the available capacity was not always sufficient to handle projects promptly." +hhpberlin数值模拟的科学负责人Susanne Kilian说:“几年来,我们一直在运行自己的小型集群,该集群具有多达80个处理器内核。” “但是,随着应用程序复杂性的提高,这种架构已经越来越不足够;可用容​​量并不总是足够迅速地处理项目。” But just spending money on a new cluster wasn't an ideal solution, she says: "In view of the size and administrative environment of our company, the necessity of constant maintenance of this cluster (regular software and hardware upgrades) turned out to be impractical. Plus, the number of required simulation projects is subject to significant fluctuations, such that the utilization of the cluster was not really predictable. Typically, phases with very intensive use alternate with phases with little to no use." By moving to an HPC service model, hhpberlin shed that excess capacity and the need to pay up front for upgrades. +她说:“但是,仅仅花钱买一个新的集群并不是一个理想的解决方案:鉴于我们公司的规模和管理环境,持续维护该集群(定期进行软件和硬件升级)的必要性非常明显。另外,所需的模拟项目的数量会出现很大的波动,因此群集的使用情况并不是真正可预测的。通常,使用率很高的阶段与很少使用或不使用的阶段交替出现。”通过转换为HPC服务模式,hhpberlin消除了过剩的容量,无需支付升级费用。 IBM's Turek explains the calculus that different companies go through while assessing their needs. For a biosciences startup with 30 people, "you need computing, but you really can't afford to have 15% of your staff dedicated to it. It's just like you might also say you don't want to have on-staff legal representation, so you'll get that as a service as well." For a bigger company, though, it comes down to weighing the operational expense of an HPC service against the capacity expense of buying an in-house supercomputer or HPC cluster. +IBM的Turek解释了不同公司在评估其需求时所经历的计算过程。对于拥有30名员工的生物科学初创公司来说,“您需要计算,但您实在负担不起15%的员工专心致志。这就像您可能还说过,您不想拥有在职法律代表,因此您也可以将其作为服务获得。”但是,对于一家较大的公司而言,归结为权衡HPC服务的运营费用与购买内部超级计算机或HPC集群的容量费用。 So far, those are the same sorts of arguments you'd have over adopting any cloud service. But the opex vs. capex dilemma can be weighted towards the former by some of the specifics of the HPC market. Supercomputers aren't commodity hardware like storage or x86 servers; they're very expensive, and technological advances can swiftly render them obsolete. As McCormick Stevenson's Krawczyk puts it, "It's like buying a car: as soon as you drive off the lot it starts to depreciate." And for many companies –especially larger and less nimble ones – the process of buying a supercomputer can get hopelessly bogged down. "You're caught up in planning issues, building issues, construction issues, training issues, and then you have to execute an RFP," says IBM's Turek. "You have to work through the CIO. You have to work with your internal customers to make sure there's continuity of service. It's a very, very complex process and not something that a lot of institutions are really excellent at executing." +到目前为止,这些都是您采用任何云服务时都会遇到的相同类型的争论。但是,可以通过HPC市场的某些细节将运营支出与资本支出的困境加权为前者。超级计算机不是诸如存储或x86服务器之类的商用硬件;它们非常昂贵,技术进步会很快使其过时。正如麦考密克·史蒂文森(McCormick Stevenson)的克拉维奇(Krawczyk)所说,“这就像在买车:开车一走,它就会开始贬值。”对于许多公司,尤其是规模较大,灵活性较差的公司,购买超级计算机的过程可能会陷入无望的泥潭。 IBM的Turek说:“您陷入了计划问题,建筑问题,施工问题,培训问题,然后必须执行RFP。” “您必须通过CIO进行工作。您必须与内部客户合作以确保服务的连续性。这是一个非常非常复杂的过程,并不是很多机构在执行方面都非常出色。” Once you choose to go down the services route for HPC, you'll find you get many of the advantages you expect from cloud services, particularly the ability to pay only for HPC power when you need it, which results in an efficient use of resources. Chirag Dekate, Senior Director and Analyst at Gartner, says bursty workloads, when you have short-term needs for high-performance computing, are a key use case driving adoption of HPC  services. +选择了HPC的服务路线后,您会发现您将从云服务中获得了许多期望,特别是仅在需要时才需要为HPC功能付费的能力,从而可以有效利用资源。 Gartner高级总监兼分析师Chirag Dekate表示,当您对高性能计算有短期需求时,突发性工作负载是推动HPC服务采用的关键用例。 "In the manufacturing industry, you tend to have a high peak of HPC activity around the product design stage," he says. "But once the product is designed, HPC resources are less utilized during the rest of the product-development cycle." In contrast, he says, "when you have large, long-running jobs, the economics of the cloud wear down." +他说:“在制造业中,在产品设计阶段,HPC活动往往会达到很高的峰值。” “但是,一旦产品设计完成,在其余产品开发周期中,HPC资源的利用率就会降低。” 相比之下,他说:“当您拥有大量长期运行的工作时,云的经济就会逐渐减弱。” With clever system design, you can integrate those HPC-services bursts of activity with your own in-house conventional computing. Teresa Tung, managing director in Accenture Labs, gives an example: "Accessing HPC via APIs makes it seamless to mix with traditional computing. A traditional AI pipeline might have its training done on a high-end supercomputer at the stage when the model is being developed, but then the resulting trained model that runs predictions over and over would be deployed on other services in the cloud or even devices at the edge." +通过巧妙的系统设计,您可以将这些HPC服务突发事件与您自己的内部常规计算集成在一起。 埃森哲实验室常务董事董德丽举了一个例子:“通过API访问HPC可以无缝地与传统计算混合。在模型构建阶段,传统的AI管道可能会在高端超级计算机上进行培训。 开发出来的软件,但是最终生成的经过反复训练的模型将部署在云中的其他服务上,甚至部署在边缘设备上。” ### It's not for all use cases** ** Use of HPC services lends itself to batch-processing and loosely-coupled use cases. That ties into a common HPC downside: data transfer issues. High-performance computing by its very nature often involves huge data sets, and sending all that information over the internet to a cloud service provider is no simple thing. "We have clients I talk to in the biotech industry who spend $10 million a month on just the data charges," says IBM's Turek. +HPC服务的使用适合批处理和松散耦合的用例。这与HPC的常见缺点有关:数据传输问题。从本质上讲,高性能计算通常涉及庞大的数据集,而将所有这些信息通过Internet发送到云服务提供商并不是一件容易的事。 IBM的Turek说:“我们与生物技术行业的客户交流,他们每月仅在数据费用上就花费1000万美元。” And money isn't the only potential problem. Building a workflow that makes use of your data can challenge you to work around the long times required for data transfer. "When we had our own HPC cluster, local access to the simulation results already produced – and thus an interactive interim evaluation — was of course possible at any time," says hhpberlin's Kilian. "We're currently working on being able to access and evaluate the data produced in the cloud even more efficiently and interactively at any desired time of the simulation without the need to download large amounts of simulation data." +金钱并不是唯一的潜在问题。建立一个利用您的数据的工作流程可能会挑战您在数据传输所需的长时间内工作。 hhpberlin的Kilian说:“当我们拥有自己的HPC集群时,当然可以随时本地访问已经产生的仿真结果,从而进行交互式的临时评估。” “我们目前正在努力,能够在任何所需的模拟时间更高效,交互地访问和评估云中生成的数据,而无需下载大量的模拟数据。” Mike Krawczyk cites another stumbling block: compliance issues. Any service a defense contractor uses needs to be complaint with the International Traffic in Arms Regulations (ITAR), and McCormick Stevenson went with Rescale in part because it was the only vendor they found that checked that box. While more do today, any company looking to use cloud services should be aware of the legal and data-protection issues involved in living on someone else's infrastructure, and the sensitive nature of many of HPC's use cases makes this doubly true for HPC as a service. +Mike Krawczyk提到了另一个绊脚石:合规性问题。国防承包商使用的任何服务都需要向《国际武器交易条例》(ITAR)进行投诉,麦考密克·史蒂文森(McCormick Stevenson)之所以选择Rescale,部分原因是这是他们发现该复选框的唯一供应商。如今,尽管有更多的公司这样做,但任何希望使用云服务的公司都应该意识到生活在其他人的基础架构上所涉及的法律和数据保护问题,而且许多HPC用例的敏感性质使得这对于HPC即服务而言是双重事实。 。 In addition, the IT governance that HPC services require goes beyond regulatory needs. For instance, you'll need to keep track of whether your software licenses permit cloud use ­– especially with specialized software packages written to run on an on-premises HPC cluster. And in general, you need to keep track of how you use HPC services, which can be a tempting resource, especially if you've transitioned from in-house systems where staff was used to having idle HPC capabilities available. For instance, Ron Gilpin, senior director and Azure Platform Services global lead at Avanade, suggests dialing back how many processing cores you use for tasks that aren't time sensitive. "If a job only needs to be completed in an hour instead of ten minutes," he says, "that might use 165 processors instead of 1,000, a savings of thousands of dollars." +此外,HPC服务所需的IT治理超出了监管需求。例如,您需要跟踪您的软件许可证是否允许云使用­ –尤其是针对专门编写在本地HPC群集上运行的软件包。通常,您需要跟踪HPC服务的使用方式,这可能是一个诱人的资源,尤其是当您从习惯于工作人员的内部系统过渡到具有可用的空闲HPC功能时。例如,Avanade全球平台高级主管兼Azure平台服务全球负责人Ron Gilpin建议,回拨您用于非时间敏感任务的处理核心数量。他说:“如果一项工作只需要一个小时而不是十分钟就可以完成,那么它可以使用165个处理器而不是1,000个,从而节省了数千美元。” ### A premium on HPC skills** ** One of the biggest barriers to HPC adoption has always been the unique in-house skills it requires, and HPC services don't magically make that barrier vanish. "Many CIOs have migrated a lot of their workloads into the cloud and they have seen cost savings and increased agility and efficiency, and believe that they can achieve similar results in HPC ecosystems," says Gartner's Dekate. "And a common misperception is that they can somehow optimize human resource cost by essentially moving away from system admins and hiring new cloud experts who can solve their HPC workloads." +一直以来,采用HPC的最大障碍之一就是其所需的独特内部技能,而HPC服务并不能使这种障碍消失。 Gartner的Dekate表示:“许多CIO将许多工作负载迁移到了云中,他们看到了节省成本,提高敏捷性和效率的信念,并且相信他们可以在HPC生态系统中实现类似的结果。” “一个普遍的误解是,他们可以从本质上远离系统管理员,并聘用可以解决其HPC工作负载的新云专家,从而以某种方式优化人力资源成本。” "But HPC is not one of the main enterprise environments," he says. "You're dealing with high-end compute nodes interconnected with high-bandwidth, low-latency networking stacks, along with incredibly complicated application and middleware stacks. Even the filesystem layers in many cases are unique to HPC environments. Not having the right skills can be destabilizing." +他说:“但是HPC并不是主要的企业环境之一。” “您正在处理与高带宽,低延迟网络堆栈以及难以置信的复杂应用程序和中间件堆栈互连的高端计算节点。在许多情况下,甚至文件系统层也是HPC环境所独有的。没有适当的技能 可能会破坏稳定。” But supercomputing skills are in shortening supply, something Dekate refers to as the workforce "greying," in the wake of a generation of developers going to splashy startups rather than academia or the more staid firms where HPC is in use. As a result, vendors of HPC services are doing what they can to bridge the gap. IBM's Turek says that many HPC vets will always want to roll their own exquisitely fine-tuned code and will need specialized debuggers and other tools to help them do that for the cloud. But even HPC newbies can make calls to code libraries built by vendors to exploit supercomputing's parallel processing. And third-party software providers sell turnkey software packages that abstract away much of HPC's complication. +但是超级计算技术却在缩短供应,Dekate将其称为劳动力“灰色”,这是因为一代开发人员将目光投向了新兴的初创公司,而不是学术界或使用HPC的更老套的公司。结果,HPC服务的供应商正在尽其所能弥合差距。 IBM的Turek表示,许多HPC兽医将始终希望推出他们自己精心调整过的代码,并且将需要专门的调试器和其他工具来帮助他们在云中实现这一目标。但是,即使是HPC新手也可以调用供应商构建的代码库,以利用超级计算的并行处理。第三方软件提供商出售的交钥匙软件包可以消除许多HPC复杂性。 Accenture's Tung says the sector needs to lean further into this in order to truly prosper. "HPCaaS has created dramatically impactful new capability, but what needs to happen is making this easy to apply for the data scientist, the enterprise architect, or the software developer," she says. "This includes easy to use APIs, documentation, and sample code. It includes user support to answer questions. It’s not enough to provide an API; that API needs to be fit-for-purpose. For a data scientist this should likely be in Python and easily change out for the frameworks she is already using. The value comes from enabling these users who ultimately will have their jobs improved through new efficiencies and performance, if only they can access the new capabilities." If vendors can pull that off, HPC services might truly bring supercomputing to the masses. +埃森哲的董先生表示,该行业需要进一步倾斜才能真正繁荣。她说:“ ​​HPCaaS已经创建了具有重大影响力的新功能,但是需要做的是使它易于应用于数据科学家,企业架构师或软件开发人员。” “这包括易于使用的API,文档和示例代码。它包含用户回答问题的支持。仅提供API是不够的; API需要适合特定用途。对于数据科学家而言,这可能应该包含在其中。使用Python并轻松地更改她已经在使用的框架。其价值来自使这些用户能够获得新的效率和性能,只要他们能够使用新功能,他们最终将通过新的效率和性能来改善他们的工作。”如果供应商能够做到这一点,那么HPC服务可能真正将超级计算带入大众。 Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. - +加入[Facebook] [3]和[LinkedIn] [4]上的Network World社区,以评论最重要的主题。 -------------------------------------------------------------------------------- via: https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html From d841221c690e833b6810b9b564606b9ba993f5ab Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Sun, 19 Apr 2020 22:31:19 +0800 Subject: [PATCH 186/394] APL --- ...nage complex Git workspaces with Great Teeming Workspaces.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md b/sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md index ef41241e35..c679c29a38 100644 --- a/sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md +++ b/sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 1d5c81b2289c21e78b0f22c32e0a3ee06258ad56 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 19 Apr 2020 22:49:43 +0800 Subject: [PATCH 187/394] =?UTF-8?q?=E6=B8=85=E9=99=A4=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...ecurity tools, and more industry trends.md | 65 ----------- ... leaders for hybrid cloud battles ahead.md | 74 ------------ ...ent from KDE, and more open source news.md | 73 ------------ ...ed Decentralized Alternative to YouTube.md | 107 ------------------ 4 files changed, 319 deletions(-) delete mode 100644 sources/news/20200402 Ansible streaming video series, open source security tools, and more industry trends.md delete mode 100644 sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md delete mode 100644 sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md delete mode 100644 sources/tech/20200406 Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube.md diff --git a/sources/news/20200402 Ansible streaming video series, open source security tools, and more industry trends.md b/sources/news/20200402 Ansible streaming video series, open source security tools, and more industry trends.md deleted file mode 100644 index d2dba3b1cb..0000000000 --- a/sources/news/20200402 Ansible streaming video series, open source security tools, and more industry trends.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ansible streaming video series, open source security tools, and more industry trends) -[#]: via: (https://opensource.com/article/20/4/ansible-security-more-industry-trends) -[#]: author: (Tim Hildred https://opensource.com/users/thildred) - -Ansible streaming video series, open source security tools, and more industry trends -====== -A weekly look at open source community and industry trends. -![Person standing in front of a giant computer screen with numbers, data][1] - -As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. - -## [Ansible 101 by Jeff Geerling: a YouTube streaming series][2] - -> After the incredible response I got from [making my Ansible books free for the rest of March][3] to help people learn new automation skills, I tried to think of some other things I could do to help developers who may be experiencing hardship during the coronavirus pandemic and market upheaval. - -**The impact**: Not everyone is a frontline worker in this crisis, but then not every problem it has created needs one. This is a great example of someone using their resources to help in a unique way. - -## [Open source security tools for cloud and container applications][4] - -> Open-source security tools play an important role in securing your container-based infrastructure. Tools such as Anchore can be used for strong governance capabilities, while on the other hand, Dagda can be used to perform static analysis of known vulnerabilities. Two other tools, OpenSCAP and Clair, also provide good capabilities for vulnerability scanning and compliance management. So, depending upon your business requirements and priorities, you can select the right tool to secure your container investments. - -**The impact**: Containers are Linux, and container security is open source as well. - -## [Cloud cover: Clearing up some misunderstandings about data centres][5] - -> The [carbon footprint of data][6] is becoming more and more of a concern, but there appears to be little economic interest in decreasing the amount of data flowing around the world to mitigate this. In that scenario, finding the most energy-efficient and carbon-neutral ways to run purpose-built data centres could be the only answer. - -**The impact**: I was talking to a colleague who manages a team of virtualization engineers about this very problem. He seemed optimistic about the amount of headway his team could make on improving the energy consumption of things like KVM at the kernel level; though at the moment customers aren't asking for it. I'd guess that if, for example, the price of carbon emissions were to go up for some reason, that situation would change pretty quickly. - -## [Business culture is key in OpenStack network requirements][7] - -> The main question is: What is your [culture][8]? Do you go to a vendor and say, 'Give me your design, tell me what to buy and how to support it'? Starting out, you evaluate systems. What are your options? -> -> If you have siloed folks that work on a particular model of equipment, then OpenStack is probably not for you. If you have people that function at a higher level with some fundamental understanding about the underlying architecture that makes things work, then OpenStack can be very useful for you, and you're much less restricted. - -**The impact:** Not every organization can adopt a given technology. Certainly not without a willingness to change at a fundamental level. - -_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/ansible-security-more-industry-trends - -作者:[Tim Hildred][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/thildred -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) -[2]: https://www.jeffgeerling.com/blog/2020/ansible-101-jeff-geerling-youtube-streaming-series -[3]: https://www.jeffgeerling.com/blog/2020/you-can-get-my-devops-books-free-rest-month -[4]: http://techgenix.com/open-source-security-tools/ -[5]: https://www.siliconrepublic.com/enterprise/data-centres-seamus-dunne-interxion -[6]: https://www.siliconrepublic.com/machines/data-carbon-footprint -[7]: https://searchnetworking.techtarget.com/feature/Business-culture-is-key-in-OpenStack-network-requirements -[8]: https://whatis.techtarget.com/definition/corporate-culture diff --git a/sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md b/sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md deleted file mode 100644 index fbcb14b32d..0000000000 --- a/sources/news/20200408 IBM taps new leaders for hybrid cloud battles ahead.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IBM taps new leaders for hybrid cloud battles ahead) -[#]: via: (https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -IBM taps new leaders for hybrid cloud battles ahead -====== -IBM installs Arvind Krishna as CEO, and appoints Red Hat execs to round out new cloud-oriented team -Stephen Lawson/IDG - -Amid the business chaos COVID-19 is causing, IBM has set its course by [installing][1] Arvind Krishna as CEO and Red Hat CEO Jim Whitehurst as IBM president.  The company also named Red Hat veteran Paul Cormier as CEO of Red Hat. - -Krishna replaces long-time CEO Virginia Rometty, who will  retire at the end of the year, and the package of executive moves solidifies the team that will lead Big Blue into to [hybrid-cloud][2] world where it will battle Amazon, Google and Microsoft. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -Right now, though, that team must also compete in the face the COVID-19 pandemic, an issue [Krishna][4] mentioned in a [letter he posted on LinkedIn][5] on his first day on the job, April 6. - -“During this challenging time, we all need to have empathy, solidarity, and understanding for each other…If there’s one thing that this public health crisis has brought to light it is the ever essential role of IBM in the world. We are the backbone of some of the most critical systems of the world. Our technologies and services help banks run credit-card transactions, businesses run supply chains, telcos connect customers, healthcare providers improve patient care, and companies and cities tackle cyberthreats,” Krishna wrote. - -IBM has been part of the technology community that is helping address COVID-19.  For example, [IBM Research][6] has been developing cloud and AI-powered technologies that can help researchers battle against coronavirus, in part by accelerating COVID-19 drug discovery.  - -IBM is also leading the [COVID-19 High Performance Computing Consortium][7] with AWS, Google, HPE, and Microsoft as well as US National Labs, NASA, and others to bring [high-performance computing][8] systems together to help researchers run massive modeling calculations. - -While COVID-19 is a focus for now, the long term-goal is developing cloud technologies. - -[][9] - -“I believe we can make IBM the most trusted technology partner of the 21st century. For this to happen, we have to ensure that IBM continues to innovate and lead in the transformational journeys our clients are on. Hybrid cloud and AI are two dominant forces driving change for our clients and must have the maniacal focus of the entire company,” he stated. - -### Linux, Kubernetes and containers - -Krishna also wrote about IBM’s strategic cloud directions going forward. “First, we have to deepen our understanding of IBM’s two strategic battles: the journey to hybrid cloud and AI. We all need to understand and leverage IBM’s sources of competitive advantage. Namely, our open source and security leadership, our deep expertise and trust, and the fact that we enable clients to build mission-critical applications once and run them anywhere,” Krishna stated. - -IBM also has to win the battle for architecting the cloud. “There’s a unique window of opportunity for IBM and Red Hat to establish [Linux][10], containers and Kubernetes as the new standard. We can make Red Hat OpenShift the default choice for hybrid cloud in the same way that Red Hat Enterprise Linux is the default choice for the operating system,” Krishna stated. - -When IBM closed its [acquisition][11] of Red Hat last July for $34 billion it was clear it would take on the hybrid-cloud market and now, especially with the current executive team in place, that path is set more solidly. - -Krishna, 57, was a principal architect of IBM’s $34 billion acquisition of Red Hat last year and was IBM’s senior vice president of Cloud and Cognitive Software. Red Hat said Cormier drove more than 25 acquisitions at Red Hat and is credited with pioneering the subscription model that transformed Red Hat from an open-source disruptor to an enterprise-technology mainstay. - -Also as part of the new team, IBM said it tapped Bank of America telecom and cloud-technology executive Howard Boville as senior vice president of cloud platform, overseeing the IBM Cloud. - -Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html - -作者:[Michael Cooney][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.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3518795/ibms-ceo-virginia-rometty-to-be-replaced-by-its-cloud-red-hat-chiefs.html -[2]: https://www.networkworld.com/article/3233132/what-is-hybrid-cloud-computing.html -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.cnbc.com/video/2020/04/06/watch-cnbcs-full-interview-with-new-ibm-ceo-arvind-krishna.html?linkId=85936703 -[5]: https://www.linkedin.com/pulse/my-first-day-ceo-our-journey-together-arvind-krishna/?trackingId=SRWcJy7mSzagoHDTJX%2Br2Q%3D%3D -[6]: https://www.ibm.com/thought-leadership/covid19/ -[7]: https://www.networkworld.com/article/3533426/covid-19-tech-giants-government-agencies-add-supercomputing-to-the-fight.html -[8]: https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html -[9]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[10]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html -[11]: https://www.networkworld.com/article/3317517/the-ibm-red-hat-deal-what-it-means-for-enterprises.html -[12]: https://www.facebook.com/NetworkWorld/ -[13]: https://www.linkedin.com/company/network-world diff --git a/sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md b/sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md deleted file mode 100644 index bdff5b8ce2..0000000000 --- a/sources/news/20200411 New Linux integrity checker from Microsoft, Raspberry Pi-smart TV replacement from KDE, and more open source news.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (New Linux integrity checker from Microsoft, Raspberry Pi smart TV replacement from KDE, and more open source news) -[#]: via: (https://opensource.com/article/20/4/news-april-11) -[#]: author: (Ben Cotton https://opensource.com/users/bcotton) - -New Linux integrity checker from Microsoft, Raspberry Pi smart TV replacement from KDE, and more open source news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this edition of our open source news roundup, we take a look at GNOME Foundation's new contributor program, a new Linux integrity checker from Microsoft, a free software alternative to smart TVs, and more! - -### GNOME Foundation launches a new contributor program - -A key part of keeping open source communities vibrant and healthy is bringing in new contributors. To help promote this, the GNOME Foundation and Endless teamed up to launch the inaugural [Community Engagement Challenge][2]. Phase one launched this week by opening the call for submitting project applications. Candidate projects should be aimed at bringing beginners into open source and encouraging ongoing participation in open source communities. Projects don’t have to be coding, they can also be games, videos, written materials, and so on. - -A panel of judges will select 20 projects to participate in phase two, where ideas will be turned into proofs of concept. At each phase, cash prizes will be awarded. [Proposals][3] are due July 1, 2020. - -### Microsoft announces code integrity checker for Linux - -When you run a program, you want it to be the one you think you’re running. This week, Microsoft announced [Integrity Policy Enforcement][4] (IPE), a Linux Security Model released under the GPLv2. - -IPE is targeted toward specific-purpose devices like network firewalls, not for general-purpose computing. It provides runtime verification that the code being executed matches the desired version. This allows administrators to detect and block altered binaries. - -IPE is currently in the Request for Comments stage on the [linux-security-module][5] mailing list. - -### KDE announces Plasma Bigscreen - -I recently bought a new TV and, if you haven’t been in the market lately, it’s hard to find “dumb” televisions. I didn’t want a smart TV because I worry about the manufacturer abandoning the software and what the device might do with my data. So KDE’s recent [Plasma Bigscreen][6] announcement caught my eye. - -Plasma Bigscreen takes the KDE Plasma interface I use every day and combines it with [Mycroft AI][7] to turn single-board computers into a smart TV. The beta, released last month, includes support for the Raspberry Pi 4 (Model B). - -### In other news - - * [IVPN for Android is now available on F-Droid][8] - * [IBM gives Outreachy $50,000 grant][9] - * [Warren For President Tech Team open source many of their projects][10] - * [Firefox 75.0 is released with a redesigned address bar and distribution via Flatpak][11] - * [LineageOS releases version 17.1 based on Android 10][12] - * [Linux kernel 5.6 released][13] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/news-april-11 - -作者:[Ben Cotton][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/bcotton -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://www.gnome.org/challenge -[3]: https://surveys.gnome.org/index.php/986379?lang=en -[4]: https://microsoft.github.io/ipe/ -[5]: https://lore.kernel.org/linux-security-module/20200406181045.1024164-1-deven.desai@linux.microsoft.com/T/#m297116cd00666428c2ae3e627ff39653ebb691fb -[6]: https://dot.kde.org/2020/03/26/plasma-tv-presenting-plasma-bigscreen -[7]: https://mycroft.ai/ -[8]: https://www.ivpn.net/blog/ivpn-for-android-is-now-available-on-f-droid -[9]: https://developer.ibm.com/blogs/ibm-second-open-source-community-grant-outreachy/ -[10]: https://medium.com/@teamwarren/open-source-tools-from-the-warren-for-president-tech-team-f1f27d2c7551 -[11]: https://www.mozilla.org/en-US/firefox/75.0/releasenotes/ -[12]: https://lineageos.org/Changelog-24/ -[13]: https://lore.kernel.org/lkml/CAHk-=wi9ZT7Stg-uSpX0UWQzam6OP9Jzz6Xu1CkYu1cicpD5OA@mail.gmail.com/ diff --git a/sources/tech/20200406 Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube.md b/sources/tech/20200406 Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube.md deleted file mode 100644 index 6c6c84e084..0000000000 --- a/sources/tech/20200406 Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube) -[#]: via: (https://itsfoss.com/lbry/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Meet LBRY, A Blockchain-based Decentralized Alternative to YouTube -====== - -_**LBRY is a new Blockchain-based, open source platform for sharing digital content. It is gaining popularity as a decentralized alternative to YouTube but LBRY is more than just a video sharing service.**_ - -### LBRY is an open source blockchain based platform for content sharing - -At the core of it, [LBRY][1] is a new protocol which is a peer to peer, decentralized file sharing and payment network secured by [blockchain][2] technology. Anyone can build apps on top of LBRY protocol that interact with digital content on the LBRY network. But these technical stuff is for developers. - -As a user you can use [LBRY platform][3] for watching videos, listening to music and reading eBooks. - -As a content creator, you can use LBRY to share your digital content like video, music, images, podcasts, eBooks etc. - -Unlike YouTube, your activities are not tracked to serve you ads. In fact, LBRY is ad free. If you are logged into the network, you won’t see any ads anywhere on its website. - -### No ads, and you may even earn cryptocurrency for viewing videos on LBRY - -The LBRY is ‘governed’ by its own cryptocurrency called LBC (LBRY Credits). - -Like any other cryptocurrency, you can mine it, buy it or get it from someone else. Content creators can set a price in LBC for streaming their content or they can provide it for free and get tipped in LBC by the viewers. - -Don’t worry, you don’t necessarily need to buy LBC. Since its new, you’ll get LBC as rewards for doing simple tasks as viewing videos, exploring LBRY, following channels etc. In fact, you’ll get a few LBC simply for creating an account at LBRY and setting up your profile. - -![LBRY Rewards Sample][4] - -You’ll also get LBC in rewards for inviting other users to LBRY platform. For example, if you join [LBRY from It’s FOSS invite link][5], both you and I get LBC as reward. - -The LBRY reward system will change once the platform grows. Remember initially Bitcoins were also readily available and now it values thousands of dollars. - -### Open source, peer to peer, blockchain: LBRY ticks all the right blocks for a privacy-aware user - -![LBRY interface][6] - -While the cyptocurrency is essential to create a fair and open marketplace in LBRY, its main feature is the peer to peer, decentralized network using blockchain. LBRY puts emphasis on treating you as user, not a product. - -Everything built to power LBRY is open source. You can find the entire source code on its GitHub repository. - -[LBRY on GitHub][7] - -The [LBRY FAQ page][8] is a good resource to know more about LBRY and how it works. - -### Using LBRY - -![][9] - -If you want to give LBRY a try, you can check out its [video sharing platform][3]. If you are logged in or using its app, you won’t see any ads. - -Creating an account on LBRY will also let you get the LBRY rewards (i.e. the LBC cryptocurrency). You can watch the videos on LBRY web site or on its application. - -I have noticed that video streaming is slightly faster when you use the app instead of web browser. [LBRY app is available][10] for Linux, Windows, macOS, iOS and Android. - -As a web publisher, It’s FOSS is on all major social media channels. We appreciate and respect such decentralized services and try to make a presence on such offbeat platform. You can [find us on Mastodon][11], a [decentralized alternative to Twitter][12]. You can also find It’s FOSS on LBRY. - -While we will be putting our video content primarily on YouTube and Vimeo (for ad-free experience), our YouTube content will be automatically available on LBRY as well. - -So if you are going to use LBRY, you can follow us there to watch all our videos on LBRY. - -[Join LBRY and follow It’s FOSS][5] - -### Conclusion - -There may not be a lot of content on LBRY right now. LBRY is trying to encourage and reward creators who publish on LBRY first instead of YouTube. - -LBRY is in early stages but its team is working hard to become a viable alternative to YouTube. It has an open road map where they have shared an insight into all their future plans. You may [check it out yourself][13]. - -By the way, LBRY is not the only platform of this kind. [PeerTube][14] is a similar service that provides a peer to peer video sharing platform. - -_**If you are someone who doesn’t like tech giants like Google, Microsoft, Huawei ‘spying’ on your data, keeping a profile of you to serve you targeted ads, you may try platforms like PeerTube and LBRY.**_ - -What do you think of LBRY? Are you already using something like LBRY or PeerTube? If not, are you willing to give it a try? What’s your overall feeling about P2P platforms like LBRY? Do share your views in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/lbry/ - -作者:[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://lbry.com/ -[2]: https://en.wikipedia.org/wiki/Blockchain -[3]: https://lbry.tv/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry-rewards-sample.png?ssl=1 -[5]: https://lbry.tv/$/invite/@itsfoss:0 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry.png?ssl=1 -[7]: https://github.com/lbryio/ -[8]: https://lbry.com/faq -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry-interface.jpg?ssl=1 -[10]: https://lbry.com/get -[11]: https://mastodon.social/@itsfoss -[12]: https://itsfoss.com/mastodon-open-source-alternative-twitter/ -[13]: https://lbry.com/roadmap -[14]: https://joinpeertube.org/ From 5f6bcac98e74530fd706e00a4e6dee56aa5a5f74 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Mon, 20 Apr 2020 00:54:12 +0800 Subject: [PATCH 188/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200419=20A=20st?= =?UTF-8?q?ress-free=20guide=20to=20keeping=20WordPress=20sites=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md --- ...uide to keeping WordPress sites updated.md | 116 ++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md diff --git a/sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md b/sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md new file mode 100644 index 0000000000..98ee9b1b1e --- /dev/null +++ b/sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md @@ -0,0 +1,116 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A stress-free guide to keeping WordPress sites updated) +[#]: via: (https://opensource.com/article/20/4/updating-wordpress) +[#]: author: (Sara Kelly https://opensource.com/users/sarapk) + +A stress-free guide to keeping WordPress sites updated +====== +This practical guide to a necessary task will show you how to maximize +site performance and avoid bugs and other issues with regular updates. +![Working from home at a laptop][1] + +We all know how important it is to keep WordPress sites updated. New updates provide the latest bug and security fixes against any nasties lurking on the web. But, more critically, an outdated site can also lead to poor performance, such as slow loading speed or an outdated look and feel. + +Unfortunately, keeping your WordPress site up-to-date is not as easy as clicking a button. There are several components to consider, from theme to plugins to PHP. Even worse, updating too quickly can wreak another kind of havoc. Have you ever experienced the dreaded, "There has been a critical error on your website" warning after an innocent little update? I know I have, many times! + +Here is a practical guide on what to look out for, as well as when and what to update, to ensure your WordPress site works well. + +### Updating WordPress + +Let's start with the basics. Check your WordPress version is up-to-date by visiting Dashboard > Updates. + +![WordPress update screen][2] + +### Choosing a WordPress theme + +Before we deep dive into updating themes, I'd like to take a few steps back. Choose an up-to-date theme from the get-go and do your homework before installing it! There is nothing worse than pouring your heart and soul into customizing a new theme, only to discover it is buggy. + +Questions to ask when choosing a theme include: + + * When was it first created? + * What is the current version available? + * Does the theme provider still maintain an active demo site and helpdesk? + * What do recent reviews say about the theme? + + + +If the theme provider is no longer maintaining the theme, save yourself the trouble and move on. Also, don't assume that just because you paid for a theme, that is necessarily maintained. I recently fell into this trap when I purchased [Pinable][3]. I loved the Pinterest look and feel. However, soon after installation, I noticed the lack of customization within the theme settings, major compatibility issues arose with my plugins, and the customer service was nonexistent. I should have known better. The theme was created in 2013 and selling for a bargain. + +If you already have a theme, then pay attention to how frequently updates become available. If there are never any updates, the theme provider may have closed up shop. It is only a matter of time before the impact of an outdated theme will cause problems. + +A quick aside while we are on the topic—up-to-date themes also give access to the two new alignment options in the WordPress block editor, which enable wide-width and full-width images. These help your blog posts look more professional. While there are a number of [tutorials][4] on the web that show you how to manually update your functions, PHP file, and CSS to enable the new alignment blocks, the code does not always work on older themes (especially masonry themes). + +![Wordpress theme][5] + +### Updating themes + +To check the current version of your theme, go to Appearance > Themes and click on the active theme to see the current version. If an upgrade is available, there will be an alert banner. Click on "update now" to initiate the update. You can also check for updates by going to Dashboard > Updates. + +![Themify screenshot][6] + +If you purchased a theme from a marketplace such as [Envato][7] or [Themify][8], check the theme documentation to learn what is required to initiate updates, as it will not show up automatically in the dashboard. In most cases, you will be required to download and install a specific plugin or manually upload new versions when they become available. In the latter case, you will need to delete or rename the old theme file via your cPanel before you can install the new one. A guide to installing themes via cPanel is available [here][9]. + +If you plan to customize your theme extensively and are worried about the impact of this when upgrading, consider creating a child theme first. A child theme lets you make changes without touching the original theme's code. You can then update your site without losing any customizations you've made. Read more about child themes [here][10]. + +As I said before, the source of most issues tends to be the theme. Learn what is required to keep your theme up to date, and do so regularly. If your theme provider is no longer creating updates, then find a new theme. + +### Easy does it for plugins + +If you manage multiple plugins, then you will be used to the frequent dashboard reminders to update! Before we get onto that, though, let's touch on some basics. + +As a general rule, you don't want to have too many plugins. They slow down the speed of your site by creating more code that the browser has to load. Always delete any inactive plugins. I prefer to manage plugins on the Plugins tab. Here you can see all active and inactive plugins, the current version, and whether an update is available. To update the plugin, simply click "update." + +![Plugin update page][11] + +Nonetheless, I implore you to wait a week or two before installing new updates. Updating my plugins too quickly has caused me no end of grievances. To begin with, updates are prone to human error. Don't be the guinea pig that tests out the latest version. Sometimes, the newest version of a plugin is not compatible with an older version of WordPress or your theme. Check these are up-to-date first. + +### Website down after updating plugins? + +If your site has stopped working or performance has dropped noticeably after updating your plugins, then all is not lost. Forget about those newfangled plugins that promise to test speed and identify buggy plugins (the last thing you want is more plugins)! Disable all your plugins, then activate one at a time while you test the speed and performance of your site on a website such as [Pingdom][12]. This is a great exercise to perform periodically, even if your website has not crashed. Once you identify the plugin causing the problem, delete it. + +In the event you cannot access WordPress because there is a critical error, then you will need to access your files via cPanel and delete all the plugin folders from there ([full instructions here][13]). Don't worry; doing this will not impact your website's content. You can then proceed to reinstall and activate the plugins one-by-one via WordPress. + +Cache plugins tend to be the biggest culprit in my experience. Issues with cache plugins can be minimized by clearing the cache frequently. Do not install multiple cache plugins that perform the same function, as they will only serve to slow down your site. The only way to truly get around cache plugin issues is to either not use them, use a plugin recommended by your hosting provider, or become an expert on cache. [This blog][14] on common cache issues in WordPress is a good place to start. + +### Back up before updating PHP + +If you are concerned about your website speed and have spent enough time browsing Google for answers, then you likely have seen the advice, "You gotta update your PHP!" Please tread carefully with manual PHP updates, though! If you have a good hosting provider, you should never need to do this. Rather, select the option for automatic PHP version management with your host. Newer versions of PHP may not be stable or compatible with the version of WordPress you are running. Let your hosting provider be the one to determine when updates are ready. + +However, if you are adamant that an old version of PHP is causing your website to be slow, take care to follow these steps before initiating an update. First, back up your site. Investing in a premium version of [Jetpack][15] is worth its weight in gold. Jetpack can perform real-time as well as daily backups, depending on your plan. Not to mention, their customer service and troubleshooting support are excellent. Secondly, inform your hosting provider that you plan to update the PHP and seek their advice first. If your host is unable to advise or wants to charge you for the privilege, you should probably think about changing hosts. + +You can update PHP either via cPanel or via your hosting platform under Devs > PHP Manager. After that, you are on your own, as that is where my expertise on PHP ends. + +If you have any other tips or pitfalls regarding updating WordPress, drop them in the comments box below. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/updating-wordpress + +作者:[Sara Kelly][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/sarapk +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) +[2]: https://opensource.com/sites/default/files/uploads/wp_update_1.png (Wordpress update screen) +[3]: https://www.theme-junkie.com/themes/pinable/ +[4]: https://www.billerickson.net/full-and-wide-alignment-in-gutenberg/ +[5]: https://opensource.com/sites/default/files/uploads/wp_theme_2.png (Wordpress theme) +[6]: https://opensource.com/sites/default/files/uploads/themify_3.png (Themify screenshot) +[7]: https://elements.envato.com/ +[8]: https://themify.me/ +[9]: https://hostadvice.com/how-to/how-to-install-a-wordpress-theme-using-cpanel/ +[10]: https://developer.wordpress.org/themes/advanced-topics/child-themes/ +[11]: https://opensource.com/sites/default/files/uploads/plugins_4.png (Plugin update page) +[12]: https://tools.pingdom.com/ +[13]: https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/ +[14]: https://mhthemes.com/support/knb/solving-common-cache-issues-on-wordpress-websites/ +[15]: https://jetpack.com/upgrade/backup/?utm_source=google&utm_campaign=google_jetpack_search_brand_desktop_sg_en&utm_medium=paid_search&utm_term=%2Bwordpress%20%2Bjetpack%20%2Bbackup&creative=379260213317&campaignid=2061290863&utm_content=77066462603&matchtype=b&device=c&network=g&gclid=Cj0KCQjwu6fzBRC6ARIsAJUwa2RuPx5Dzr72eBEtZegsf11MmOBgLiwLX2HcEUXVaULIgv1MdZqGmeAaArmFEALw_wcB&gclsrc=aw.ds From 55587d534b294fd5c86e73074710039f9bbb8e85 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 20 Apr 2020 08:42:36 +0800 Subject: [PATCH 189/394] translated --- ...or creating Raspberry Pi SD card images.md | 75 ------------------- ...or creating Raspberry Pi SD card images.md | 75 +++++++++++++++++++ 2 files changed, 75 insertions(+), 75 deletions(-) delete mode 100644 sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md create mode 100644 translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md diff --git a/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md b/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md deleted file mode 100644 index 133a389f91..0000000000 --- a/sources/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A handy utility for creating Raspberry Pi SD card images) -[#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac) -[#]: author: (James Farrell https://opensource.com/users/jamesf) - -A handy utility for creating Raspberry Pi SD card images -====== -Getting started with Raspberry Pi Imager on a Mac. -![Raspberries with pi symbol overlay][1] - -There are many ways to buy a Raspberry Pi, and depending on who you buy it from, it may or may not come with an operating system already installed on it. Getting an OS onto a Raspberry Pi is a matter of "flashing" an SD card with an OS image. To make this as easy as possible, the [Raspberry Pi Foundation][2] has introduced a Raspberry Pi Imager application, and you can download it for all major platforms. Here's a quick intro to this helpful new utility. - -### Install the Imager - -You can find the Raspberry Pi Imager over at the usual [Raspberry Pi Downloads][3] page. Versions exist for Mac, Ubuntu, and Windows. I will download and demonstrate the Mac version. - -Installation on Mac consists of the usual DMG image that mounts to your desktop, and then a typical installer window appears: - -![Raspberry Pi Imager installer][4] - -Simply drag the cute raspberry icon to the Application folder, and you are done. Invoke that from Launchpad, and you are presented with a series of simple buttons and menus to choose from. It really cannot be simpler than this: - -![Raspberry Pi Imager home screen][5] - -### Images and options available - -The default options contain a variety of images for various Raspberry Pi models. Raspbian is the top choice with two available options for smaller "Lite" and fatter "Full" versions available. The LibreELEC Kodi entertainment system is available in various model-specific builds. Ubuntu 18 and 19 have 32-bit and 64-bit builds available for different Pi models. There is an RPi 4 EEPROM recovery utility and a function to format your card using FAT32. Finally, a generic image installer option is available that I will try out a little later. Pretty handy for a simple and compact utility. - -### Install some images - -I had a 16g micro SD card that I decided to play with. I selected the default Raspbian image, chose my attached USB/SD device, and pressed WRITE. Here is a brief demo: - -![Raspberry Pi Imager demo][6] - -I didn't post the entire sequence there. I believe it downloaded the image as it was writing and took a few minutes on my wireless connection to finish. The process goes through a write and then a verify cycle before it is finished. When it was done, I ejected the device, popped the card into my RPi 3, and was treated to the usual graphical Raspbian setup wizard and desktop environment. - -That wasn't quite enough for me; I get plenty of Linux on a daily basis and was looking for a little more today. I went back to the [Raspberry Pi Downloads][3] page and pulled down the RISC OS image. This process was nearly as easy. Download the RISCOSPi.5.24.zip file, extract it, and find the ro524-1875M.img file. From the Operating System button, I selected the Use Custom option and selected the desired image file. The process was pretty much the same; the only real difference being I had to hunt around my Downloads directory and select an image. Once the file was finished writing, back into the Pi 3, and RISC OS was ready to go. - -### Gripes on USB C - -This is just a silly aside, but how many of you are a bit frustrated with the total inconvenience of USB C these days? I'm using a MacBook Pro, which only has USB C ports, and I am subject to a never-ending swap of adapters to get things done. Take a look at this: - -![USB C adapter][7] - -Yes, that is a USB C to USB A adapter, then a USB to SD card reader, and an SD to micro SD adapter inside. I probably could have found something online to simplify this, but these are the parts I had on hand to support my family's myriad Mac, Windows, and Linux hosts. Enough about that, but I hope you got a chuckle from that insanity. - -### Summary - -The new Raspberry Pi Imager is a simple and effective tool for getting off the ground quickly with Raspberry Pi images. [BalenaEtcher][8] is a similar tool for imaging your removable devices, but this new Raspberry Pi Imager makes the process of common RPi OS installations (like Raspbian) a bit easier by eliminating the steps to fetch those common images. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/raspberry-pi-imager-mac - -作者:[James Farrell][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/jamesf -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay) -[2]: https://www.raspberrypi.org/ -[3]: https://www.raspberrypi.org/downloads/ -[4]: https://opensource.com/sites/default/files/uploads/install_1.png (Raspberry Pi Imager installer) -[5]: https://opensource.com/sites/default/files/uploads/screen_2_0.png (Raspberry Pi Imager home screen) -[6]: https://opensource.com/sites/default/files/uploads/demo_3.gif (Raspberry Pi Imager demo) -[7]: https://opensource.com/sites/default/files/uploads/adapter_4.png (USB C adapter) -[8]: https://www.balena.io/etcher/ diff --git a/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md b/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md new file mode 100644 index 0000000000..c70870d6e0 --- /dev/null +++ b/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md @@ -0,0 +1,75 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (A handy utility for creating Raspberry Pi SD card images) +[#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac) +[#]: author: (James Farrell https://opensource.com/users/jamesf) + +一个方便的用于创建树莓派 SD 卡镜像的程序 +====== +开始在 Mac 上使用 Raspberry Pi Imager +![Raspberries with pi symbol overlay][1] + +有多种购买树莓派的方法,同时树莓派会取决于你从哪里购买的从而可能附带或不附带操作系统。将操作系统安装到树莓派上就是用系统镜像“刷新” SD 卡。为了使之尽可能简单,[树莓派基金会][2]引入了 Raspberry Pi Imager,你可以将其下载到所有主流平台。以下这个有用的新工具介绍。 + +### 安装 Imager + +你通常可以在[树莓派下载][3]页面上找到 Raspberry Pi Imager。它有 Mac、Ubuntu 和 Windows 版本。我将下载并演示 Mac 版本。 + +Mac 的安装包是常规的 DMG 镜像,它会挂载到你的桌面,然后经典的安装界面就会出现: + +![Raspberry Pi Imager installer][4] + +只需将可爱的树莓图标拖到 Application 文件夹,就可以完成。从 Launchpad 中调用它,你会看到一系列简单的按钮和菜单供你选择。真的不能比这更简单了: + +![Raspberry Pi Imager home screen][5] + +### 可用的镜像和选项 + +默认选项包含各种树莓派型号的镜像。Raspbian 是首选,它有两个可用的选项,较小的 “Lite” 版本和较大的 “Full” 版本。LibreELEC Kodi 娱乐系统有各种特定于型号的版本。Ubuntu 18 和 19 有适用于不同树莓派型号的 32 位和 64 位版本。有一个 RPi 4 EEPROM 恢复程序,以及使用 FAT32 格式化卡的功能。最后,有一个通用的镜像安装程序选项,稍后我将进行尝试。这个简单而紧凑的程序非常方便。 + +### 安装一些镜像 + +我决定使用 16g 的 micro SD 卡。我选择了默认的 Raspbian 镜像,选择已连接的 USB/SD 设备,然后按下 WRITE。这是一个简短的演示: + +![Raspberry Pi Imager demo][6] + +我没有在此处发布完整信息。我相信它在下载镜像后写入,对于我的无线连接这花费了几分钟完成。该过程在完成之前先经过写入,然后经过验证周期。完成后,我弹出设备,并将卡插入到我的 RPi 3 中,然后按照通常的图形 Raspbian 安装向导和桌面环境进行设置。 + +这对我来说还不够。我每天都会下载许多 Linux,今天我还在寻找更多。我回到了[树莓派下载][3]页面,并下载了 RISC OS 镜像。这个过程几乎一样容易。下载 RISCOSPi.5.24.zip 文件,将其解压缩,然后找到 ro524-1875M.img 文件。在 “Operating System” 按钮中,我选择了 “Use Custom” 并选择了所需的镜像文件。这个过程几乎是相同的。唯一真正的区别是我必须在下载目录中搜寻并选择一个镜像。文件写完后,回到树莓派 3,RISC OS 可以使用了。 + +### 对 USB C 的抱怨 + +顺便说一句,如今有多少人对 USB C 带来的不便感到沮丧?我使用的是只有 USB C 口的 MacBook Pro,我需要不断更换适配器才能完成工作。看看这个: + +![USB C adapter][7] + +是的,那是一个 USB C 到 USB A 适配器,然后是一个 USB 到 SD 卡读卡器,以及一个 SD 到 micro SD 适配器。我可能可以在网上找到一些东西来简化此过程,但这是支持我家五花八门的 Mac、Windows 和 Linux 主机的部分。够了,但我希望你能从这种混乱中得到一笑。 + +### 总结 + +新的 Raspberry Pi Imager 是一种简单有效的工具来快速烧录树莓派镜像。[BalenaEtcher][8] 是用于对可移动设备进行烧录的类似工具,但是新的 Raspberry Pi Imager 通过消除获取那些常见镜像的步骤,使普通树莓派系统安装(如 Raspbian)更加容易。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/raspberry-pi-imager-mac + +作者:[James Farrell][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/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay) +[2]: https://www.raspberrypi.org/ +[3]: https://www.raspberrypi.org/downloads/ +[4]: https://opensource.com/sites/default/files/uploads/install_1.png (Raspberry Pi Imager installer) +[5]: https://opensource.com/sites/default/files/uploads/screen_2_0.png (Raspberry Pi Imager home screen) +[6]: https://opensource.com/sites/default/files/uploads/demo_3.gif (Raspberry Pi Imager demo) +[7]: https://opensource.com/sites/default/files/uploads/adapter_4.png (USB C adapter) +[8]: https://www.balena.io/etcher/ From 5f78e01ff3fe0a3172f431bea85d83d5fa3b7c33 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 20 Apr 2020 08:48:45 +0800 Subject: [PATCH 190/394] translating --- ...8 Ethernet consortium announces completion of 800GbE spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md b/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md index a7a6bf1c1a..3a687f8800 100644 --- a/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md +++ b/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 772f4d8bbeebfb04a0fe415c3151f39b8c297cfb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Apr 2020 10:43:55 +0800 Subject: [PATCH 191/394] PRF @lxbwolf --- ...28 Getting started with Linux firewalls.md | 96 +++++++++---------- 1 file changed, 43 insertions(+), 53 deletions(-) diff --git a/translated/tech/20200228 Getting started with Linux firewalls.md b/translated/tech/20200228 Getting started with Linux firewalls.md index 93cc37289e..1300d21fcd 100644 --- a/translated/tech/20200228 Getting started with Linux firewalls.md +++ b/translated/tech/20200228 Getting started with Linux firewalls.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Getting started with Linux firewalls) @@ -9,17 +9,18 @@ Linux 防火墙入门教程 ====== -防火墙是你的计算机防止网络入侵的第一道屏障。为确保你的安全,请下载我们的备忘单。 -![Cheat Sheet cover image][1] -合理的防火墙是你的计算机防止网络入侵的第一道屏障。你在家里上网,通常互联网服务提供会在路由中搭建一层防火墙。如果不在家里上网,那么你计算机上的那层防火墙就是仅有的一层,因为配置和控制好你 Linux 电脑上的防火墙很重要。如果你维护一台 Linux 服务器,知道怎么去管理你的防火墙同样重要,只要掌握了这些知识你才能保护你的服务器免于本地或远程非法流量的入侵。 +> 防火墙是你的计算机防止网络入侵的第一道屏障。为确保你的安全,请下载我们的备忘单。 + +![](https://img.linux.net.cn/data/attachment/album/202004/20/104205paugcytauqctqw6c.jpg) + +合理的防火墙是你的计算机防止网络入侵的第一道屏障。你在家里上网,通常互联网服务提供会在路由中搭建一层防火墙。当你离开家时,那么你计算机上的那层防火墙就是仅有的一层,所以配置和控制好你 Linux 电脑上的防火墙很重要。如果你维护一台 Linux 服务器,那么知道怎么去管理你的防火墙同样重要,只要掌握了这些知识你才能保护你的服务器免于本地或远程非法流量的入侵。 ### 安装防火墙 -很多 Linux 发行版本已经自带了防火墙,通常是 `iptables`。它很强大并可以自定义,但配置起来有点复杂。幸运的是,有开发者写出了一些前端界面来帮助用户不需要写冗长的 iptables 规则就可以控制防火墙。 - -在 Fedora,CentOS,Red Hat 和一些类似的发行版本上,默认安装的防火墙软件是 `firewalld`,是用 **firewall-cmd** 命令来配置和控制的。在 Debian 和大部分其他发行版上,可以从你的软件仓库安装 firewalld。Ubuntu 自带的是 Uncomplicated Firewall(ufw),所以你必须打开 **universe** 库才能使用 firewalld: +很多 Linux 发行版本已经自带了防火墙,通常是 `iptables`。它很强大并可以自定义,但配置起来有点复杂。幸运的是,有开发者写出了一些前端程序来帮助用户控制防火墙,而不需要写冗长的 iptables 规则。 +在 Fedora、CentOS、Red Hat 和一些类似的发行版本上,默认安装的防火墙软件是 `firewalld`,通过 `firewall-cmd` 命令来配置和控制。在 Debian 和大部分其他发行版上,可以从你的软件仓库安装 firewalld。Ubuntu 自带的是简单防火墙Uncomplicated Firewall(ufw),所以要使用 firewalld,你必须启用 `universe` 软件仓库: ``` $ sudo add-apt-repository universe @@ -28,87 +29,76 @@ $ sudo apt install firewalld 你还需要停用 ufw: - ``` -`$ sudo systemctl disable ufw` +$ sudo systemctl disable ufw ``` -没有理由*不*用 ufw。它是一个强大的防火墙前端。然而,本文重点讲 firewalld,因为大部分发行版都支持它而且它集成到了 systemd,systemd 是几乎所有发行版都自带的。 - -不管你的发行版是哪个,都要先激活防火墙才能让它生效,激活需要在启动时加载: +没有理由*不用* ufw。它是一个强大的防火墙前端。然而,本文重点讲 firewalld,因为大部分发行版都支持它而且它集成到了 systemd,systemd 是几乎所有发行版都自带的。 +不管你的发行版是哪个,都要先激活防火墙才能让它生效,而且需要在启动时加载: ``` -`$ sudo systemctl enable --now firewalld` +$ sudo systemctl enable --now firewalld ``` -### 理解防火墙的 zone +### 理解防火墙的域 -Firewalld 旨在让防火墙的配置工作尽可能简单。它通过建立 *zone* 来实现这个目标。一个 zone 是一类型的合理、通用的规则,这些规则适配大部分用户的日常需求。 +Firewalld 旨在让防火墙的配置工作尽可能简单。它通过建立zone来实现这个目标。一个域是一组的合理、通用的规则,这些规则适配大部分用户的日常需求。默认情况下有九个域。 - * **trusted:** 接受所有的连接。这是最低级别的防火墙设置,只能在一个完全信任的环境中,如测试实验室或网络中相互都认识的家庭网络中。 - * **home, work, internal: **在这三个 zone 中,接受大部分来的连接。它们每个都会拒绝不活跃的端口进来的流量。这三个都适合用于家庭环境中,因为在家庭环境中不会出现端口模糊的网络流量,在家庭网络中你可以基本信任其他的用户。 - * **public:** 用于公共区域内。这是个极端的设置,当你不信任网络中的其他计算机时使用。只能接收经过选择的和基本安全的连接。 - * **dmz:** DMZ 表示隔离区。这个 zone 多用于可公开访问的计算机,属于某个组织的外部网络不能完全访问内网的计算机。对于个人计算机,它没什么用,但是对某类服务器来说它是个很重要的选项。 - * **external:** 用于外部网络,会开启伪装(你私人网络的地址被映射到一个外网 IP 地址,并隐藏起来)。跟 DMZ 类似,仅接受经过选择的连接,包括 SSH。 - * **block:** 仅接收在本系统中初始化的网络连接。接收到的任何网络连接都会被 **icmp-host-prohibited** 信息拒绝。这个一个极度偏激的设置,对于某类服务器或处于不信任或不安全的环境中的个人计算机来说很重要。 - * **drop:** 接收的所有网络包都被丢弃,没有任何回复。仅能有发送出去的网络连接。比这个设置更极端的办法,只有关闭 WiFi 和拔掉网线。 - - - -你可以查看你发行版本的所有 zone,或通过配置文件 **/usr/lib/firewalld/zones** 来查看管理员设置。举个例子:下面是 Fefora 31 自带的 FedoraWorkstation zone: + * `trusted`:接受所有的连接。这是最不偏执的防火墙设置,只能用在一个完全信任的环境中,如测试实验室或网络中相互都认识的家庭网络中。 + * `home`、`work`、`internal`:在这三个域中,接受大部分进来的连接。它们各自排除了预期不活跃的端口进来的流量。这三个都适合用于家庭环境中,因为在家庭环境中不会出现端口不确定的网络流量,在家庭网络中你一般可以信任其他的用户。 + * `public`:用于公共区域内。这是个偏执的设置,当你不信任网络中的其他计算机时使用。只能接收选定的常见和最安全的进入连接。 + * `dmz`:DMZ 表示隔离区。这个域多用于可公开访问的、位于机构的外部网络、对内网访问受限的计算机。对于个人计算机,它没什么用,但是对某类服务器来说它是个很重要的选项。 + * `external`:用于外部网络,会开启伪装(你的私有网络的地址被映射到一个外网 IP 地址,并隐藏起来)。跟 DMZ 类似,仅接受经过选择的传入连接,包括 SSH。 + * `block`:仅接收在本系统中初始化的网络连接。接收到的任何网络连接都会被 `icmp-host-prohibited` 信息拒绝。这个一个极度偏执的设置,对于某类服务器或处于不信任或不安全的环境中的个人计算机来说很重要。 + * `drop`:接收的所有网络包都被丢弃,没有任何回复。仅能有发送出去的网络连接。比这个设置更极端的办法,唯有关闭 WiFi 和拔掉网线。 +你可以查看你发行版本的所有域,或通过配置文件 `/usr/lib/firewalld/zones` 来查看管理员设置。举个例子:下面是 Fefora 31 自带的 `FedoraWorkstation` 域: ``` $ cat /usr/lib/firewalld/zones/FedoraWorkstation.xml -<?xml version="1.0" encoding="utf-8"?> -<zone> -  <short>Fedora Workstation</short> -  <description>Unsolicited incoming network packets are rejected from port 1 to 1024, except for select network services. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed.</description> -  <service name="dhcpv6-client"/> -  <service name="ssh"/> -  <service name="samba-client"/> -  <port protocol="udp" port="1025-65535"/> -  <port protocol="tcp" port="1025-65535"/> -</zone> + + + Fedora Workstation + Unsolicited incoming network packets are rejected from port 1 to 1024, except for select network services. Incoming packets that are related to outgoing network connections are accepted. Outgoing network connections are allowed. + + + + + + ``` -### 获取当前的 zone - -任何时候你都可以通过 **\--get-active-zones** 选项来查看你是在哪个 zone +### 获取当前的域 +任何时候你都可以通过 `--get-active-zones` 选项来查看你处于哪个域: ``` -`$ sudo firewall-cmd --get-active-zones` +$ sudo firewall-cmd --get-active-zones ``` -输出结果中,会有当前活跃的 zone 名字和分配给它的网络接口。笔记本电脑上,在默认 zone 中通常意味着你有个 WiFi 卡: - +输出结果中,会有当前活跃的域的名字和分配给它的网络接口。笔记本电脑上,在默认域中通常意味着你有个 WiFi 卡: ``` FedoraWorkstation   interfaces: wlp61s0 ``` -### 修改你当前的 zone - -把你的网络接口分配给另一个 zone,就可以改变 zone。例如,把例子中的 **wlp61s0** 卡修改为 public zone: +### 修改你当前的域 +要更改你的域,请将网络接口重新分配到不同的域。例如,把例子中的 `wlp61s0` 卡修改为 public 域: ``` -$ sudo firewall-cmd --change-interface=wlp61s0 \ -\--zone=public +$ sudo firewall-cmd --change-interface=wlp61s0 --zone=public ``` -你可以为一个接口修改活跃的 zone,不管出于什么理由 — 无论你是要出去喝杯咖啡还是感觉有必要增强笔记本电脑的安全策略,无论是你要去工作需要开启某些端口才能进入内联网,还是任何其他的理由。在你凭记忆学会 **firewall-cmd** 命令之前,你只要记住了关键词 ”change“ 和 ”zone“,就可以慢慢掌握,因为按下 **Tab** 时,它的选项会自动补全。 +你可以在任何时候、任何理由改变一个接口的活动域 —— 无论你是要去咖啡馆,觉得需要增加笔记本的安全策略,还是要去上班,需要打开一些端口进入内网,或者其他原因。在你凭记忆学会 `firewall-cmd` 命令之前,你只要记住了关键词 `change` 和 `zone`,就可以慢慢掌握,因为按下 `Tab` 时,它的选项会自动补全。 ### 更多信息 -你可以用你的防火墙干更多的事,比如自定义已存在的 zone,设置默认的 zone,等等。你对防火墙越了解,你在网上的活动就越安全,所以我们创建了一个[备忘单][2]便于速查和参考。 +你可以用你的防火墙干更多的事,比如自定义已存在的域,设置默认域,等等。你对防火墙越了解,你在网上的活动就越安全,所以我们创建了一个[备忘单][2]便于速查和参考。 -### 下载你的 [防火墙备忘单][2] - -David Both分享了他是怎样用树莓派 2 替换他的专用网络防火墙电脑的。 +- 下载你的 [防火墙备忘单][2]。 -------------------------------------------------------------------------------- @@ -117,7 +107,7 @@ via: https://opensource.com/article/20/2/firewall-cheat-sheet 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 5921ebb846f715a5ce951c218c2037ff3816f70c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Apr 2020 10:44:30 +0800 Subject: [PATCH 192/394] PUB @lxbwolf https://linux.cn/article-12130-1.html --- .../20200228 Getting started with Linux firewalls.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200228 Getting started with Linux firewalls.md (98%) diff --git a/translated/tech/20200228 Getting started with Linux firewalls.md b/published/20200228 Getting started with Linux firewalls.md similarity index 98% rename from translated/tech/20200228 Getting started with Linux firewalls.md rename to published/20200228 Getting started with Linux firewalls.md index 1300d21fcd..a8a9749395 100644 --- a/translated/tech/20200228 Getting started with Linux firewalls.md +++ b/published/20200228 Getting started with Linux firewalls.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12130-1.html) [#]: subject: (Getting started with Linux firewalls) [#]: via: (https://opensource.com/article/20/2/firewall-cheat-sheet) [#]: author: (Seth Kenlon https://opensource.com/users/seth) From 36ff13cf13313ef5f638e30092c97b2321a4ad45 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Apr 2020 18:45:02 +0800 Subject: [PATCH 193/394] PRF @wxy --- ...late -wash your hands- in 500 languages.md | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md index 28669c6c39..81f0527796 100644 --- a/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md +++ b/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md @@ -7,41 +7,40 @@ [#]: via: (https://opensource.com/article/20/4/ai-translation) [#]: author: (Daniel Whitenack https://opensource.com/users/datadan) -我是如何用 AI 把 “请洗手”翻译成 500 种语言的? +我是如何用 AI 把“请洗手”翻译成 500 种语言的? ====== > 通过使用人类和机器生成的翻译,可以将关键的健康短语翻译成世界各地的当地语言。 -![Two diverse hands holding a globe][1] +![](https://img.linux.net.cn/data/attachment/album/202004/20/184427f1a2t5z61m5xxo1t.jpg) -你可能不知道,目前世界上有 [7117 种语言][2],不是方言,而是在用的语言! 然而,世界上大部分的数字媒体只采用几十种语言,而像谷歌翻译这样的翻译平台只支持 100 种左右的语言。这样的现实意味着,由于缺乏及时获取信息的机会,全世界有数十亿人被边缘化。当前的冠状病毒(COVID-19)大流行已经让人痛苦地意识到了这一点,凸显了将健康相关的短语(如“请洗手wash your hands”或“保持距离”等)即时、快速翻译成小众语言的必要性。 +你可能不知道,目前世界上有 [7117 种语言][2]在使用,不是方言,而是在用的语言! 然而,世界上许多数字媒体只能使用几十种语言,而像谷歌翻译这样的翻译平台只支持 100 种左右的语言。这样的现实意味着,由于缺乏及时获取信息的机会,全世界有数十亿人被边缘化。当前的冠状病毒(COVID-19)大流行已经让人痛苦地意识到了这一点,凸显了将健康相关的短语(如“请洗手wash your hands”或“保持距离”等)即时、快速翻译成小众语言的必要性。 -为此,我应用了最先进的AI技术,用 544 种语言构建出了与“请洗手”相近的短语并进行了统计(我的 GPU 还在运行)。多语言无监督和监督嵌入Multilingual Unsupervised and Supervised Embeddings(MUSE)方法被用来训练这 544 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。 +为此,我应用了最先进的 AI 技术,用 544 种语言构建出了与“请洗手”相近的短语并进行了统计(我的 GPU 还在运行)。多语言无监督和受监督嵌入Multilingual Unsupervised and Supervised Embeddings(MUSE)方法被用来训练这 544 种语言和英语之间的跨语言单词嵌入。然后,这些嵌入方法可以从现有文档中提取出与目标短语相似的短语。 我与 SIL 国际公司的同事们合作完成了这项工作,他们收集了该短语的更多的人工翻译结果。这些人工翻译结果和我的一些机器翻译结果的组合可以在[这个民族语指南页面][3]上搜索到(机器生成的短语用一个小的机器人图标表示),更多的翻译将在生成/收集到的时候加入。 ### 利用现有的语料库 -SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文件(主要是完成的贝壳书模板、教材和圣经)。这些文件中的每一份文件都有一个英文的对应语,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文件的质量都很高,并与当地语言社区合作进行了翻译和检查。 +SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理着 1600 多个语言项目。因此,当我解决这个特殊的问题时,我知道我们很可能已经多次将“请洗手”和/或类似的短语翻译成了数百种语言,而这一猜测得到了回报。我很快就从我们的档案库中收集到了超过 900 种语言的文档(主要是完成的贝壳书模板、教材和圣经)。这些文档中的每一份都有一个英文的对应版本,其中必然包括“请洗手”和/或类似“请洗脸”这样的短语。此外,这些文档的质量都很高,并与当地语言社区合作进行了翻译和检查。 这是相当多语言的数据集。然而,有两个问题需要克服。首先,这个数据包含了大多数语言的数千种样本,这与训练机器翻译模型所使用的数百万个样本形成了鲜明对比。其次,即使文档中包含目标语言中的“请洗手”这个短语,我们也不知道这个短语在周围文本中的确切位置。 -我们当然可以利用[低资源语言的机器翻译][4]中的一些最新技巧,但要在每一对语言中快速调整翻译模型的自动化方法,还需要一些时间。此外,我们所针对的许多语言都没有现成的可以与之比较评估指标的基线,例如[BLEU 评分][5]。考虑到对冠状病毒大流行的迫切担忧,我们希望比这更快一点(尽管我们计划在将来再来解决这个问题)。 +我们当然可以利用[低资源语言的机器翻译][4]中的一些最新技巧,但是需要花费一些时间来调整自动化方法,以快速适应每种语言对中的翻译模型。此外,我们所针对的许多语言都没有现成的的基线,可以用来比较评估指标(例如 [BLEU 评分][5])。考虑到对冠状病毒大流行的迫切担忧,我们希望比这更快一点(尽管我们计划在将来再来解决这个问题)。 -我选择通过在现有的文档中寻找短语本身或短语的组件(如“请洗”或“你的手”)来尝试构建“请洗手”这个短语。为了找到这些成分,我使用 Facebook Research 的 [多语言无监督和监督嵌入(MUSE)][6]对每个 {英语、目标语言} 对进行跨语言cross-lingual嵌入训练。MUSE 以单语言monolingual的单词嵌入作为输入(我使用 [fasttext][7] 来生成这些词),并使用对抗性方法学习从英语到目标嵌入空间的映射。这个过程的输出是跨语言cross-lingual的单词嵌入。 +我选择通过在现有的文档中寻找短语本身或短语的组件(如“请洗”或“你的手”)来尝试构建“请洗手”这个短语。为了找到这些成分,我使用 Facebook Research 的[多语言无监督和受监督嵌入(MUSE)][6]对每个 {英语、目标语言} 对进行了跨语言cross-lingual嵌入训练。MUSE 以单语言monolingual的单词嵌入作为输入(我使用 [fasttext][7] 来生成这些词),并使用对抗性方法学习了从英语到目标嵌入空间的映射。这个过程的输出是跨语言cross-lingual的单词嵌入。 ![Using fasttext along with MUSE to perform cross-language embedding][8] -一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语成分。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-grams 搜索我预期该短语会出现的地方(根据其在英语平行语中的用法)。使用跨语言嵌入法对 n-grams 进行了矢量化,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-grams 被确定为目标语言匹配。 +一旦产生了跨语言嵌入,我们就可以开始在目标语言文档中寻找短语组件。结果发现,整个文档中清楚地使用了“请洗脸”这个短语以及单独的“手”、“请洗”等词。对于每一种语言,我都通过 n-gram 搜索我预期该短语会出现的地方(根据其在英语的对应版本中的用法)。使用跨语言嵌入法对 n-gram 进行了矢量化处理,并使用各种距离指标与英语短语的矢量化版本进行了比较。在嵌入空间中,与英文短语“最接近”的 n-gram 被确定为与目标语言匹配。 -最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用跨语言嵌入,确保组件短语的组合方式合适。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是伯利兹·克里奥尔Belize Kriol英语的一个例子: +最后,将与英语对应的成分短语进行组合,生成目标语言中的“请洗手”短语。这种组合方式再次利用了跨语言嵌入,以确保以合适方式组合组件。例如,如果我们在目标语言中匹配“请洗脚”这个短语,就必须将“脚”对应的 n-gram 替换成“手”对应的 n-gram。下面是伯利兹·克里奥尔Belize Kriol英语的一个例子: ![][9] -当然,在这个匹配过程中,有一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个字元长的(字元由空格和标点符号隔开)。当然,情况肯定不一定是这样。这可能会造成类似于“和洗的和手你”或类似的不好的词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。 - -我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(只是为了防止我们生成的翻译有问题)。 +当然,在这个匹配过程中,会做一些假设,这个过程完全有可能不能产生语法上正确的预测。例如,我假设在大多数语言中,“手”的单词和“脚”的单词都是一个字元token长的(字元由空格和标点符号隔开)。当然并非总是如此。这可能会造成类似于“和洗和手你”或类似的瑕疵词条。希望我们可以克服其中的一些局限性,并在未来扩展这个系统,但是,现在,我们选择用图形来强化这个想法。 +我们将世界卫生组织的洗手说明改编成了一个 PNG 图片模板。然后,我们把我们翻译和生成的短语,用 Bash 和 Go 脚本的组合将其渲染到洗手图像中。这样,在文字和图像中都强调了正确洗手的理念(以防万一我们生成的翻译很尴尬)。 ![][10] @@ -91,11 +90,11 @@ SIL 国际公司已经完成了 2000 多种语言的语言工作,目前管理 - 我们的系统:yaakuuvaitana nnikiiyauvaa fini - 谷歌翻译:不支持 -构建的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis])或人类注释的跨度进行比较,但我仍然可以验证“洗”(wasim)和“手”(han)分别用在其他必定是谈论洗或手的参考文件中。大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中,能验证更多的译文。 +构造的短语类似于参考翻译,或者似乎是“请洗手”的另一种说法。例如,在保加利亚语中,我预测为“умий ръцете”,而谷歌翻译预测为“Измий си ръцете”。 然而,如果我用谷歌翻译回译我的预测,我还是会得到“请洗手”。有一些不确定的地方,我无法与参考译文(例如,所罗门群岛的 Pijin [pis])或人类注释的跨度进行比较,但我仍然可以验证“洗”(wasim)和“手”(han)分别用在其他必定是谈论洗或手的参考文件中。 大约有 15% 的译文可以用这个方法验证,我希望在收集参考文献字典的过程中能进行更多的验证。 -请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也没有依赖语言对之间的对齐句子。尽管在这种数据非常稀缺、无监督的情况下,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。 +请注意,我最多使用了每种语言中大约 7000 个句子来得到上述译文,即使是意大利语这样的高资源语言也是如此。我也不依赖语言对之间的对齐句子。尽管存在这种数据非常稀缺、无监督的情况,但对于两个系统都支持的语言,我仍然能够获得类似于谷歌翻译的短语。这证明了这种“混合”方法(无监督的单词嵌入+基于规则的匹配)在将短语翻译成数据非常少的语言中的潜在用途。 -注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。 +注意:我绝对不是说这是解决冠状病毒和其他健康相关的信息传播问题的解决方案。这里仍有很多东西需要探索和正式评估,我们正在为此努力。在很多情况下,这种方法无法帮助构建数百种语言的重要信息资料。但是,我认为,我们所有人都应该尝试着为当前危机的相关问题制定创造性的解决方案。也许这只是一个非常大的拼图中的一块。 你可以在[这个民族语言指南][3]上查看经过验证的译文加上人工翻译的完整列表。此外,我们即将以论文的形式对这一系统进行更深入的描述和分析。我们欢迎公众对翻译进行反馈,以帮助系统进行微调,最重要的是,确保将健康信息传递给世界各地的边缘化语言社区。 @@ -116,7 +115,7 @@ via: https://opensource.com/article/20/4/ai-translation 作者:[Daniel Whitenack][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7730ae62fdb55a2dac2e4c384e1ecf7202e16258 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Apr 2020 18:54:56 +0800 Subject: [PATCH 194/394] PUB @wxy https://linux.cn/article-12131-1.html --- ...ng AI to translate -wash your hands- in 500 languages.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {translated/tech => published}/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md (99%) diff --git a/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/published/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md similarity index 99% rename from translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md rename to published/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md index 81f0527796..4117cefacf 100644 --- a/translated/tech/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md +++ b/published/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12131-1.html) [#]: subject: (How I'm using AI to translate 'wash your hands' in 500 languages) [#]: via: (https://opensource.com/article/20/4/ai-translation) [#]: author: (Daniel Whitenack https://opensource.com/users/datadan) From 2abf39ff6a44c30ecb92f2f654eb2cac1e707a05 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 20 Apr 2020 22:30:00 +0800 Subject: [PATCH 195/394] APL --- sources/tech/20200415 Writing Java with Quarkus in VS Code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md index 2d61db71de..4773a04411 100644 --- a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md +++ b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From aeb425f83897117697189ffedbbfc36a9af910ed Mon Sep 17 00:00:00 2001 From: Zioyi Date: Mon, 20 Apr 2020 23:10:50 +0800 Subject: [PATCH 196/394] Update and rename sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md to sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md --- ...mmands to Have Some Fun in the Terminal.md | 343 ------------------ ...mmands to Have Some Fun in the Terminal.md | 343 ++++++++++++++++++ 2 files changed, 343 insertions(+), 343 deletions(-) delete mode 100644 sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md create mode 100644 sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md diff --git a/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md deleted file mode 100644 index 81c05aa211..0000000000 --- a/sources/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md +++ /dev/null @@ -1,343 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (Zioyi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (12 Linux Commands to Have Some Fun in the Terminal) -[#]: via: (https://itsfoss.com/funny-linux-commands/) -[#]: author: (Community https://itsfoss.com/author/itsfoss/) - -12 Linux Commands to Have Some Fun in the Terminal -====== - -_**So, you think Linux terminal is all work and no fun? These funny Linux commands will prove you wrong.**_ - -The Linux terminal is the place to get serious work done. We have plenty of useful [linux command tips and tricks][1] to help you with that. - -But, did you know that you can have a lot of fun using the terminal? Well, if you did not, then you are not alone. Most Linux users see the terminal as an interface that is designed and built for system management and development tasks. - -However, you will be surprised to know that there are tons of [terminal based games][2] and [ASCII games][3] that you can play in the terminal. - -And, in this article, I’m going to explore some interesting, some funny and some ridiculous commands that you can type into the terminal on Linux and have fun! - -### Have some fun in Linux terminal with these commands - -![][4] - -You’ll find a lot of these commands ridiculous or useless but some of them could actually be put to some good use. - -I have added installation instructions for Ubuntu/Debian. If you are using Ubuntu-based distribution, please make sure to [enable universe repository][5] as most of these commands are not in the main repository. - -If you are using Arch, Fedora, SUSE, Solus or any other non-Ubuntu distributions, please use your distribution’s package manager to install these funny Linux commands. - -#### 1\. Run a train in the terminal - -Let’s take a ride in the locomotive and begin our auspicious journey. And I mean it literally! - -The sl command allows you to run a train in your terminal. - -![][6] - -Here’s how to install the command: - -``` -sudo apt install sl -``` - -Once done, you can simply type in the following in the terminal to get started: - -``` -sl -``` - -Impressive, isn’t it? But, hold on. We are not done yet! Apparently, you can fly your locomotive. Just add the option -F, Mr. Potter: - -``` -sl -F -``` - -****This should make the locomotive get wings to fly off from the terminal window! - -#### 2\. Add the Matrix effect to your Linux terminal - -Remember the iconic sci-fi movie [The Matrix][7]? The green text falling down on the terminal became an identity of Matrix. - -You can have this Matrix digital rain on your Linux box as well! You just need to install **cmatrix** and type it in the terminal. - -![][8] - -Installing cmatrix on Debian/Ubuntu Linux: - -``` -sudo apt install cmatrix -``` - -Now, all you have to do is type the following to get the matrix screen on terminal: - -``` -cmatrix -``` - -Press Ctrl+C to stop it, Mr. Anderson. - -**Recommended Read:** - -![][9] - -#### [Watch Star Wars In Linux Terminal via Telnet][10] - -Watch Star Wars in ASCII art Linux terminal. - -#### 3\. Let there be fire - -Keep your fire extinguisher handy because now you are going to start a fire in your terminal! - -![][11] - -To get it installed, here’s what you have to type: - -``` -sudo apt install libaa-bin -``` - -Once done start a fire in your terminal by entering: - -``` -aafire -``` - -Press Ctrl+C to stop it. - -#### 4\. Fortune ~~Cookie~~ Command - -Want to know your fortune but there are no fortune cookies around you? - -Not to worry, you just need to type “fortune” on your terminal and press enter. The terminal will display a random sentence just like you usually get in fortune cookies. - -![][12] - -Install it with: - -``` -sudo apt install fortune -``` - -Once done, simply type in the command below to know your fortune: - -``` -fortune -``` - -Now this is one of the commands here that you could actually use. You can use it as message of the day so that in a multi-user environment, all the users will see a random fortune cookie when they login. - -You may also add it to your bashrc file so that it shows you a random message as soon as you log in to the terminal. - -#### 5\. Pet lover? This is for you - -Oneko is a little fun command that will change your regular cursor into a mouse and creates a curious little cat who will chase your cursor once you move it. It’s not limited to just the terminal. You can keep on working while the cat chases the cursor. - -Now, that’s something fun to do specially if you have kids at home. - -![][13] - -Install Oneko with this command: - -``` -sudo apt install oneko -``` - -Run it with this command: - -``` -oneko -``` - -In case you want a dog instead of a cat, type: - -``` -oneko -dog -``` - -There are a few more types of cats available. You can get that information by using oneko –help. To stop it, use Ctrl+C. - -#### 6\. Little brother is watching you - -Xeyes is a tiny gui program that let the user draws a pair of ever watching eyes! It will follow your mouse cursor constantly. Run the command and see it yourself! - -![][14] - -You can install it using this command: - -``` -sudo apt install xeyes -``` - -And then use it with this: - -``` -xeyes -``` - -Press Ctrl+C to stop it. - -#### Let the terminal speak for you - -To try out this command, make sure you have turned on your speakers. [eSpeak][15] is a fun command that gives your terminal a voice. Yes, you heard that right. - -Install the package first: - -``` -sudo apt install espeak -``` - -Next, you need to simply type in the command along with a text that you want to listen as audio: - -``` -espeak "Type what your computer says" -``` - -Whatever you place in the double quotes, your computer is obligated to say! It’s like [echo command in Linux][16]. But instead of printing, it speaks. - -#### Toilet (but it has nothing to do with a washroom) - -This sounds weird, yes. But, it’s just a command that transforms a text into large ASCII characters. - -![][17] - -Install toilet with this command: - -``` -sudo apt install toilet -``` - -Once done, you just need to type in: - -``` -toilet sample text you want -``` - -I don’t know why this little program is called toilet. - -#### What does the ~~fox~~ cow say? - -Cowsay is a command that displays a cow using ASCII characters in the terminal. And by using this command you can instruct the cow to say anything you want. - -Not to be confused with any audio – it will just display a text (like you usually see in a comic book). - -![Cowsay Cowthink][18] - -Install ****cowsay: - -``` -sudo apt install cowsay -``` - -Once you have it installed, you just need to type in: - -``` -cowsay "your text" -``` - -Whatever you place in the double quotes, your cow is obligated to say! I have seen a few sysadmins using it to display the message of the day. Maybe you can do the same. You may even combine it with fortune command. - -#### Banner Command - -The banner command works just like the toilet command but it is limited to print only 10 characters at most. - -![][19] - -You can install banner command like this: - -``` -sudo apt install sysvbanner -``` - -Then use it in the following way: - -``` -banner "Welcome" -``` - -Replace content in the double quotes and you shall have your desired text displayed. - -#### Yes command - -![][20] - -The “yes” command helps you to loop an automated response until you terminate the command. This command will print the exact same thing indefinitely. If you want to produce huge amounts of junk text fast, then this command will work like a charm. - -You may also use it to provide a yes to a command (if it prompts for it). For example, the apt upgrade command asks for your confirmation, you can use it like this: - -``` -yes | sudo apt upgrade -``` - -You don’t need to install any package for it. Yes command is already available. - -Terminate the yes command loop, simply press **CTRL + C**. - -#### Get a new identity, well, sort of - -Want to generate a random fake identity? I give you the command “rig”. Once you place this in the terminal, it will generate a fake identity. - -![][21] - -Install rig with this command: - -``` -sudo apt install rig -``` - -Then simply type this: - -``` -rig -``` - -It may be used in scripts or web-apps that displays random information but I haven’t done anything of that sort on my own. - -**Wrapping Up** - -I hope you liked this list of fun Linux commands. Which command do you like the most here? Do you know some other such amusing commands? Do share it with us in the comment section. - -![][22] - -### Srimanta Koley - -A passionate writer, a distrohopper and an open source enthusiast, Srimanta is extremely fond of everything related to technology. He loves to read books and has an unhealthy addiction to the 90s! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/funny-linux-commands/ - -作者:[Community][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/itsfoss/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-command-tricks/ -[2]: https://itsfoss.com/best-command-line-games-linux/ -[3]: https://itsfoss.com/best-ascii-games/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fun-linux-commands.png?ssl=1 -[5]: https://itsfoss.com/ubuntu-repositories/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sl-command.jpg?ssl=1 -[7]: https://en.wikipedia.org/wiki/The_Matrix -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/matrix-screen-command.png?ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png?fit=732%2C462&ssl=1 -[10]: https://itsfoss.com/star-wars-linux/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fire-command.png?ssl=1 -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fortune-command.jpg?ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/oneko-command.jpg?ssl=1 -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/xeyes-command.jpg?ssl=1 -[15]: https://itsfoss.com/espeak-text-speech-linux/ -[16]: https://linuxhandbook.com/echo-command/ -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/toilet-command.jpg?ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cowsay-cowthink.jpg?ssl=1 -[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/banner-command.jpg?ssl=1 -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/yes-yourtext.jpg?ssl=1 -[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/rig-command.jpg?ssl=1 -[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1 diff --git a/sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md new file mode 100644 index 0000000000..13538cc7cf --- /dev/null +++ b/sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -0,0 +1,343 @@ +[#]: collector: (lujun9972) +[#]: translator: (Zioyi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (12 Linux Commands to Have Some Fun in the Terminal) +[#]: via: (https://itsfoss.com/funny-linux-commands/) +[#]: author: (Community https://itsfoss.com/author/itsfoss/) + +12个有趣的Linux终端命令 +====== + +_**你觉得Linux终端里只有无趣的工作吗?那你一定不知道下面这些有趣的Linux命令吧。**_ + +Linux终端是用来完成复杂的工作的,我们有很多有用的[linux命令奇技淫巧][1]来帮助你。 + +但是,你知道你还可以用终端来做很多有趣的是吗?如果你不知道,没关系,大多数Linux用户也都只把终端视为一个用来管理系统和执行任务的交互接口。 + +然而,如果你知道这里有些你可以在终端玩的[基于终端的游戏][2]和[ASCII码游戏][3],你一定会大吃一惊。 + +在这篇文章中,我将会探索一些有趣的、可笑的、荒谬的命令来让你可以在终端中找点乐子! + +### 用这些命令在Linux终端中找点乐子 + +![][4] + +你可能会觉得这些命令荒谬或没用,但是有一些还是可以被好好利用的。 + +我已经添加了Ubuntu/Debian的安装组件,如果你使用基于Ubuntu的发行版,请确保[启用通用仓库][5]因为大多数命令不在主仓库中。 + +如果你使用Arch、Fedora、SUSE、Solus或者其他非Ubuntu的发行版,请使用你的发行版包管理工具去安装这些有趣的Linux命令。 + +#### 1\. 在终端开一辆火车 + +让我们坐上火车,来一场说走就走的旅行的,没错,就是字面意思! + +sl命令可以让你在终端运行一辆火车。 + +![][6] + +安装方法: + +``` +sudo apt install sl +``` + +完成后,你只要在终端输入下面的命令就可以开始 + +``` +sl +``` + +很精彩,对吧?但等等,我们还没结束!你还可以让你的火车飞起来,只要加上参数-F,Magic: + +``` +sl -F +``` + +**这样会让火车长出翅膀飞出终端窗口!** + +#### 2\. 给你的Linux终端加上矩阵效果 + +还记得科幻电影[黑客帝国][7]吗?掉落在终端的绿字变成一个矩阵符号。 + +你也可以在你的Linux电脑里有这样的矩阵数字雨!你只需要安装**cmatric**然后在终端输入它就行。 + +![][8] + +在Debian/Ubuntu Linux上安装cmatrix: + +``` +sudo apt install cmatrix +``` + +现在,你要做的就是输入下面的命令,在终端就会有矩阵屏幕了: + +``` +cmatrix +``` + +按住Ctrl+C来停止它,黑客先生。 + +**推荐阅读:** + +![][9] + +#### [通过Telnet在Linux终端看星际大战][10] + +在Linux终端看星际大战。 + +#### 3\. 让这里着火 + +拿好灭火器因为接下来你要在你的终端里点火了! + +![][11] + +想安装它,你要输入: + +``` +sudo apt install libaa-bin +``` + +完成后,你输入下面的命令,你的终端就会燃起一团火焰: + +``` +aafire +``` + +按住Ctril+C来停止它。 + +#### 4\. 幸运饼干命令 + +想知道你的运气怎样但身边没有幸运饼干? + +别担心,你只需在终端打出“fortune”然后按下回车。终端将会显示出一个你的幸运语就像你从幸运饼干里得到的一样。 + +![][12] + +安装它: + +``` +sudo apt install fortune +``` + +完成后,只要在命令行打出下面的内容,你就会知道你的运气怎样: + +``` +fortune +``` + +这是一个你可以实际去使用的命令。你可以用它作为每日消息,这样在多用户环境下,每个用户登录后都会得到一个“幸运饼干”。 + +你也可以把它添加到bashrc文件,这样当你登进终端你就会看到了。 + +#### 5\. 宠物爱好者?这是给你准备的 + +Oneko是一个有趣的命令,可以把你的光标变成一只老鼠,然后创造一只猫,一旦你移动光标,就会来追你。这不仅局限于终端。当猫追逐光标时,你可以继续工作。 + +如果你家里有孩子这一定很有趣。 + +![][13] + +用下面的命令安装Oneko + +``` +sudo apt install oneko +``` + +用下面的命令运行它: + +``` +oneko +``` + +如果你不喜欢猫,喜欢狗,输入: + +``` +oneko -dog +``` + +这里有很多种小宠物,你可以用oneko -help获取信息。用Ctrl+C终止它。 + +#### 6\. 有个小兄弟在看着你 + +Xeyes是一个很小的GUI程序,它可以绘制出一双眼睛一直盯着你!它会不断跟随您的鼠标光标,运行命令自己看看! + +![][14] + +你可以用下面命令安装: + +``` +sudo apt install xeyes +``` + +然后这样用它: + +``` +xeyes +``` + +按住Ctrl+C终止它。 + +#### 7\. Let the terminal speak for you +#### 7\. 让终端帮你讲话 + +打开你的扬声器,你来试试这个命令,[eSpeak][15]是一个有趣的命令,它可以让你的终端说话。是的,你没听错。 + +先安装这个包: + +``` +sudo apt install espeak +``` + +接下来,你只需要输入在命令行中输入你想听到的话: + +``` +espeak "Type what your computer says" +``` + +无论你在双引号里面填什么,你的电脑都会复述出来!它就像[在Linux中的echo命令][16],但不是打印出来,而是说出来。 + +#### 8\. 卫生间(但它不能洗衣服) + +这听起来有点奇怪,是的。但是,这只是一个命令,用来将文本转换成大的ASCII字符。 + +![][17] + +用这个命令安装toilet: + +``` +sudo apt install toilet +``` + +完成后,你只需输入: + +``` +toilet sample text you want +``` + +我也不知道为啥这个小程序叫卫生间。 + +#### 9\. 那个牛说什么? + +Cowsay是一个在终端中用ASCII字符展示出一头牛的命令。通过这个命令,你可以控制牛说出你想说的话。 + +别纠结声音,它只展示文本(就是你看漫画书一样)。 + +![Cowsay Cowthink][18] + +安装**cowsay**: + +``` +sudo apt install cowsay +``` + +安装完成后,你只要输入: + +``` +cowsay "your text" +``` + +无论你在双引号里填什么,你的牛都会说!我看到一些系统管理员用它来展示每天的消息。你也可以这样,你甚至可以把它和fortune命令结合。 + +#### 10\. Banner命令 + +banner命令与toilet命令相似,但它限制最多只能打印10个字符。 + +![][19] + +你可以这样安装banner命令: + +``` +sudo apt install sysvbanner +``` + +然后这样运行: + +``` +banner "Welcome" +``` + +替换双引号里的内容,你将会得到你想要的展示内容。 + +#### 11\. Yes命令 + +![][20] + +yes命令帮助你在循环中自动响应直到终止命令。这个命令将会一直打印相同的内容。如果你想快速生成大量垃圾文本,那么此命令将像超级按钮一样工作。 + +你也可以使用它为命令提供“yes”(如果提示)。例如,apt upgrade命令会要求你确认,你可以像这样使用它: + +``` +yes | sudo apt upgrade +``` + +你不需要安装任何包,Yes命令已经存在了。 + +想要终止yes命令循环,只需按住**CTRL+C**。 + +#### 12\. 得到一个新的身份 + +要生成一个随机的假身份吗?我推荐你用rig命令。你在终端运行它,就会生成一个假的身份。 + +![][21] + +用这个命令安装rig: + +``` +sudo apt install rig +``` + +只需像这样输入: + +``` +rig +``` + +它可能被用在脚本或者web应用中展示随机信息,但我自己还没做过什么。 + +**结尾** + +我希望你会喜欢这个有趣的Linux命令列表。你最喜欢哪个命令呢?你还知道其他有趣的命令吗?请在评论部分与我们分享。 + +![][22] + +### Srimanta Koley + +Srimanta是一位热情的作家、发行者、开源爱好者,非常喜欢与技术相关的所有内容。他喜欢读书,特别是90年的书! +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/funny-linux-commands/ + +作者:[Community][a] +选题:[lujun9972][b] +译者:[Zioyi](https://github.com/Zioyi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/itsfoss/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-command-tricks/ +[2]: https://itsfoss.com/best-command-line-games-linux/ +[3]: https://itsfoss.com/best-ascii-games/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fun-linux-commands.png?ssl=1 +[5]: https://itsfoss.com/ubuntu-repositories/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/sl-command.jpg?ssl=1 +[7]: https://en.wikipedia.org/wiki/The_Matrix +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/matrix-screen-command.png?ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/12/Star-Wars-Linux-Terminal-2.png?fit=732%2C462&ssl=1 +[10]: https://itsfoss.com/star-wars-linux/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fire-command.png?ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/fortune-command.jpg?ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/oneko-command.jpg?ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/xeyes-command.jpg?ssl=1 +[15]: https://itsfoss.com/espeak-text-speech-linux/ +[16]: https://linuxhandbook.com/echo-command/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/toilet-command.jpg?ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cowsay-cowthink.jpg?ssl=1 +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/banner-command.jpg?ssl=1 +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/yes-yourtext.jpg?ssl=1 +[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/rig-command.jpg?ssl=1 +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/srimanta.jpg?ssl=1 From 19f26ef6a288e2c89b5d9fc0a61f6448f28160c6 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Mon, 20 Apr 2020 23:19:55 +0800 Subject: [PATCH 197/394] Revert "APL:20200415 writing java with quarkus in vs code" --- sources/tech/20200415 Writing Java with Quarkus in VS Code.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md index 4773a04411..2d61db71de 100644 --- a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md +++ b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (wxy) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8c02f7d05b6ac60dc9830ce7dfd6118bf5960bd3 Mon Sep 17 00:00:00 2001 From: Zioyi Date: Mon, 20 Apr 2020 23:29:49 +0800 Subject: [PATCH 198/394] fix archive --- ...20200417 12 Linux Commands to Have Some Fun in the Terminal.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources/translated => translated/tech}/20200417 12 Linux Commands to Have Some Fun in the Terminal.md (100%) diff --git a/sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md similarity index 100% rename from sources/translated/20200417 12 Linux Commands to Have Some Fun in the Terminal.md rename to translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md From c13e3dfd6615ccc048e51166f7e9df4ffc969b24 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 21 Apr 2020 00:53:50 +0800 Subject: [PATCH 199/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20MystiQ?= =?UTF-8?q?:=20A=20Free=20and=20Open=20Source=20Audio/Video=20Converter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md --- ...e and Open Source Audio-Video Converter.md | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md diff --git a/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md new file mode 100644 index 0000000000..cfddc43c54 --- /dev/null +++ b/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md @@ -0,0 +1,97 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter) +[#]: via: (https://itsfoss.com/mystiq/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +MystiQ: A Free and Open Source Audio/Video Converter +====== + +_**Brief: MystiQ is a new open-source video converter tool available for Linux and Windows. It uses FFMPEG underneath and provides you a neat and clean graphical interface based on Qt.**_ + +### MystiQ, a QT-based GUI Frontend for FFmpeg + +![][1] + +An audio/video conversion tool always comes in handy for every computer user across multiple platforms. + +For that very same reason, I thought it would be a great idea to highlight the [MystiQ app][2] – which is a relatively new video/audio converter tool available for Linux and Windows users. As of now, there’s no support for macOS – but it could arrive in the near future. + +MystiQ is a graphical frontend for [FFmpeg][3] based on [Qt 5 user interface][4]. Now, you can always [install and use ffmpeg in Linux command line][5] but that’s not very comfortable, is it? This is why tools like [Handbrake][6] and MystiQ exist to make our life easier. + +Since MystiQ is based on FFmpeg, you can use it for some basic video editing like trimming a video, rotating it etc. + +Let’s have a look at its features. + +### Features of MystiQ video converter + +![][7] + +Even though the MystiQ app is fairly new to the scene – it packs a good set of essential features. Here’s an overview of what it offers: + + * Video conversion + * Audio conversion (extracting the audio from the video as well) + * Formats supported: MP4, WEBM, MKV, MP3, MOV, OGG, WAV, ASF, FLV, 3GP, M4A, and a few others. + * Cross-platform (Windows & Linux) + * Packages for both 32-bit and 64-bit systems available + * Ability to tweak the audio quality (sample rate, bit rate, etc,.) for conversion + * **Basic video editing capabilities** (clipping the video, inserting a subtitle, rotating the video, scaling the video, etc) + * Convert your color video to black and white + * Several presets available to easily convert a video for the best quality or for the best compression. + + + +**Recommended Read:** + +![][8] + +#### [Easily Convert Audio File Formats with SoundConverter in Linux][9] + +If you are looking for converting audio file formats to wav, mp3, ogg or any other format, SoundConverter is the tool you need in Linux. + +### Installing MystiQ + +You may not find it listed in your software center – but it is quite easy to get it installed on a Linux distro. + +It provides an **.AppImage file** and **.deb/.rpm** files (with 32-bit and 64-bit packages). If you’re curious, you can read [how to use the AppImage file][10] if you want to use that. + +You can also find their [GitHub page][11] and look at the source code or any recent pre-release packages if you want to help them test the software to improve it. + +You can download the installer files for both Linux and Windows from its official website. + +[Download MystiQ][2] + +**Wrapping Up** + +For this quick highlight article, I used [Pop!_OS][12] 20.04 to test the MytiQ converter app and I had no issues converting video and audio files. And, the conversion was fast enough for an average user like me. + +Feel free to try it out and let me know your thoughts on it! Also, if you’ve been using another tool to convert videos and audio on Linux, what is it? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/mystiq/ + +作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-converter-ft.jpg?ssl=1 +[2]: https://mystiqapp.com/ +[3]: https://www.ffmpeg.org/ +[4]: https://www.qt.io/ +[5]: https://itsfoss.com/ffmpeg/ +[6]: https://itsfoss.com/handbrake/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-options.jpg?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/Convert-audio-file-format-linux.png?fit=800%2C450&ssl=1 +[9]: https://itsfoss.com/sound-converter-linux/ +[10]: https://itsfoss.com/use-appimage-linux/ +[11]: https://github.com/swl-x/MystiQ/ +[12]: https://system76.com/pop From d5d81143d11d35a7df17f0a96b37bcf7434bf259 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 21 Apr 2020 00:55:20 +0800 Subject: [PATCH 200/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200420=204=20Gi?= =?UTF-8?q?t=20scripts=20I=20can't=20live=20without?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200420 4 Git scripts I can-t live without.md --- ...0420 4 Git scripts I can-t live without.md | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 sources/tech/20200420 4 Git scripts I can-t live without.md diff --git a/sources/tech/20200420 4 Git scripts I can-t live without.md b/sources/tech/20200420 4 Git scripts I can-t live without.md new file mode 100644 index 0000000000..93f084f11f --- /dev/null +++ b/sources/tech/20200420 4 Git scripts I can-t live without.md @@ -0,0 +1,202 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 Git scripts I can't live without) +[#]: via: (https://opensource.com/article/20/4/git-extras) +[#]: author: (Vince Power https://opensource.com/users/vincepower) + +4 Git scripts I can't live without +====== +The Git Extras repo hosts more than 60 scripts that add to Git's basic +functionality. Here's how to install, use, and contribute to it. +![Person using a laptop][1] + +In 2005, [Linus Torvalds][2] created [Git][3] to replace the proprietary distributed source control management solution that he had previously used to maintain the Linux kernel. Since then, Git has become a dominant version-control solution for open source and cloud-native development teams. + +Even feature-rich applications like Git don't have every feature that people want or need, so they make the effort to create them. In the case of Git, that person would be [TJ Holowaychuk][4]. His [Git Extras][5] project hosts more than 60 "extras" with features that expand Git's basic functionality. + +### Using Git Extras + +Here's how to use four of the most popular Git Extras. + +#### git-ignore + +git-ignore is a convenient extra that allows you to manually add file types and comments to the **.git-ignore** file without having to open a text editor. It works with both the global ignore file for your user account and the individual ignore file for the repository you are working in. + +Executing git-ignore without a parameter will list the global ignore file first, then the local ignore files. + + +``` +$ git ignore +Global gitignore: /home/alice/.gitignore +# Numerous always-ignore extensions +*.diff +*.err +*.orig +*.rej +*.swo +*.swp +*.vi +*~ +*.sass-cache + +# OS or Editor folders +Thumbs.db +\--------------------------------- +Local gitignore: .gitignore +nbproject +``` + +#### git-info + +git-info retrieves all the information you need to get your head in the context of a repo you are working with. It includes any remote URLs, remote branches, local branches, configuration info, and the last commit. + + +``` +$ git info + +## Remote URLs: + +origin      [git@github.com][6]:sampleAuthor/git-extras.git (fetch) +origin      [git@github.com][6]:sampleAuthor/git-extras.git (push) + +## Remote Branches: + +origin/HEAD -> origin/master +origin/myBranch + +## Local Branches: + +myBranch +* master + +## Most Recent Commit: + +commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7 +Author: Sample Author <[sampleAuthor@gmail.com][7]> + +Added git-info command. + +Type ´git log´ for more commits, or ´git show <commit id>´ for full commit details. + +## Configuration (.git/config): + +color.diff=auto +color.status=auto +color.branch=auto +user.name=Sample Author +user.email=[sampleAuthor@gmail.com][7] +core.repositoryformatversion=0 +core.filemode=true +core.bare=false +core.logallrefupdates=true +core.ignorecase=true +remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* +remote.origin.url=[git@github.com][6]:mub/git-extras.git +branch.master.remote=origin +branch.master.merge=refs/heads/master +``` + +#### git-mr and git-pr + +These extras do similar things and work in basically the same way. + + * git-mr checks out a merge request from GitLab + * git-pr checks out a pull request on GitHub + + + +In either case, you just need the merge or pull request number or the full URL, and it will fetch the remote reference, check out the branch, and adjust the config, so Git knows which branch it will replace. + + +``` +$ git mr 51 +From gitlab.com:owner/repository + * [new ref]         refs/merge-requests/51/head -> mr/51 +Switched to branch 'mr/51' +``` + +#### git-release + +By combining **commit**, **tag**, and **push** into a single command, git-release saves a lot of keystrokes for executing three commands that often run in sequence. + +To commit with a specific **<tagname>** and a custom message: + + +``` +`$ git release 0.1.0 -m <+ powerful feature added>` +``` + +#### Other extras + +These are just four of the 60+ Git Extras in the repo. To access the full list of commands available in Git Extras, either review the [Commands.md][8] file in the source repository or run the following command after you install Git Extras. + + +``` +`$ git extras --help` +``` + +### Install Git Extras + +The main prerequisite for Git Extras is having the command-line version of Git installed. If you plan to build from source, you also need additional utilities (e.g., **make**) to be available. + +If you are using a recent version of macOS, Git Extras installation is best handled using [Homebrew][9] (as with most open source tools): + + +``` +`$ brew install git-extras` +``` + +On Linux, Git Extras is available on each platform's native package manager. Sometimes, you need to enable an extra repository, like [EPEL][10] on CentOS, then run a single command: + + +``` +`$ sudo yum install git-extras` +``` + +Full installation instructions for other Linux distributions, BSD, and other platforms are available in the [Installation.md][11] file in the repository. + +### Contributing + +Do you have a piece of functionality you think is missing from Git and have built or want to build a script to handle it? Why not share it with the world by making it part of the Git Extras distribution! + +To do so, contribute the functionality to the Git Extras repository. There are more specific details in the [CONTRIBUTING.md][12] file in the repository, but the basics are easy: + + 1. Create a Bash script that handles the functionality. + 2. Create a basic man file so people will know how to use it. + 3. Update the command list and completion scripts to let people know the functionality exists. + 4. Run the integrity check to make sure you didn't break anything. + 5. Create a pull request for your functionality. + + + +Contributing to Git Extras will go a long way towards making life a little easier for your fellow Git users. You can learn more about it in the project's [README][13]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/git-extras + +作者:[Vince Power][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/vincepower +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://en.wikipedia.org/wiki/Linus_Torvalds +[3]: https://git-scm.com/ +[4]: https://github.com/tj +[5]: https://github.com/tj/git-extras +[6]: mailto:git@github.com +[7]: mailto:sampleAuthor@gmail.com +[8]: https://github.com/tj/git-extras/blob/master/Commands.md +[9]: https://brew.sh/ +[10]: https://fedoraproject.org/wiki/EPEL +[11]: https://github.com/tj/git-extras/blob/master/Installation.md +[12]: https://github.com/tj/git-extras/blob/master/CONTRIBUTING.md +[13]: https://github.com/tj/git-extras/blob/master/Readme.md From 858a8a7ee3ae9ac0512a507a43d957f6ffaa8d4b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 21 Apr 2020 00:56:45 +0800 Subject: [PATCH 201/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200420=20New=20?= =?UTF-8?q?open=20source=20GIS=20projects=20for=20Kubernetes=20application?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200420 New open source GIS projects for Kubernetes applications.md --- ...IS projects for Kubernetes applications.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20200420 New open source GIS projects for Kubernetes applications.md diff --git a/sources/tech/20200420 New open source GIS projects for Kubernetes applications.md b/sources/tech/20200420 New open source GIS projects for Kubernetes applications.md new file mode 100644 index 0000000000..a8fdec6e71 --- /dev/null +++ b/sources/tech/20200420 New open source GIS projects for Kubernetes applications.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (New open source GIS projects for Kubernetes applications) +[#]: via: (https://opensource.com/article/20/4/gis-kubernetes) +[#]: author: (Adam Timm https://opensource.com/users/timmam) + +New open source GIS projects for Kubernetes applications +====== +pg_tileserv and pg_featureserv make it easier for developers to add +location services to Kubernetes applications. +![A map with a route highlighted][1] + +Spatial data from geographic information systems (GIS) is all around us. From smartphones that make our lives better and more convenient to precision agriculture that is increasing the amount of food farmers can produce while reducing the cost, whether or not we realize it, almost every part of our lives is touched by spatial data. + +This increase of spatial data is simultaneously bringing an increase of open spatial datasets that people can consume and use to build all sorts of new applications. However, these types of datasets have not always been easy to work with. Also, due to the size of some of the geographic data, they can be difficult to bring to modern application deployment frameworks such as Kubernetes. + +To help with these issues, [Crunchy Data][2] recently announced two new open source projects, [pg_tileserv][3] and [pg_featureserv][4], to make it easier to develop cloud-native spatial applications. These projects, part of open source [Crunchy Spatial][5], help developers leverage the robust [PostGIS][6] geospatial database extension to [PostgreSQL][7] without having to write complex SQL statements. + +So what are pg_tileserv and pg_featuresev, how do they make it easier for developers to add location services to their Kubernetes applications, and what does this mean for the future of spatial applications? + +### Traditional GIS vs. modern spatial microservices + +Traditionally, when an organization or individual works with spatial data, they start with a product that grew up as a GIS. There are many high-quality open source GIS products ([QGIS][8], [GeoServer][9], [GeoNode][10], etc.), but they may not align with modern, cloud-native approaches to software design. + +The popularity of Kubernetes creates challenges for these legacy applications around automation and deployment, as they require a lot of manual configuration, for example, when data sources are added and modified. In many setups, these spatial applications must exist outside Kubernetes and cannot leverage many of the conveniences it provides. + +In contrast, modern spatial services should be driven by the spatial data that they are processing and serving out. They should align with modern software development practices and scale efficiently and integrate easily with developer workflows. + +Applications that are spatially aware also need to ensure they can handle the unique characteristics of spatial data (e.g., geometries, projections, etc.). To do all of this in independent microservices can be challenging unless you have a highly capable database to do the majority of the work for you. This is where pg_tileserv and pg_featureserv help, as both projects leverage the power of PostGIS, an open source geospatial extension to PostgreSQL, to provide advanced spatial capabilities from a simple REST framework + +### Generate map vector tiles with pg_tileserv + +![pg_tileserv][11] + +pg_tileserv is a lightweight vector tile server written in Go that enables you to generate [vector tiles][12] directly from PostGIS. It does this by implementing the **ST_AsMVT()** function in a best-practice method that translates an HTTP request to the database. It includes common defaults that allow you to pass a database connection URL to the server and be up and running in no time. There's no heavyweight software to install and configure, and it's designed for cloud-native GIS applications. + +For specific examples on how to use it, check out our blog posts on [tile serving][13] and [spatial tile serving with PostgreSQL functions][14]. + +### Annotate your maps with pg_featureserv + +![pg_featureserv][15] + +pg_featureserv is a lightweight service written in Go that enables you to serve features directly out of PostGIS. It implements the [OGC API][16] for features and provides a standard REST endpoint for your spatial data and functions contained in PostGIS. Just like pg_tileserv, there's no heavyweight software to install; just pass a database connection URL to your PostGIS database, and you're off to the races. For a specific example of how to use it, check out our post on [querying spatial features][17]. + +### Focus on spatial data, not GIS + +With our deep background in developing PostGIS and building PostGIS-backed applications, we wanted to help developers unlock all the value of spatial data in a way that is easy to deploy, scale, and maintain. As the source code of pg_tileserv and pg_featureserv show, we are just leveraging functions already in PostGIS. This allows developers to quickly add spatial data to their applications and data scientists to focus on the data. + +![GIS architecture][18] + +The benefits of this approach are: + + * Faster performance because PostgreSQL and PostGIS are doing the work for you + * Less configuration to maintain because the database structure is the configuration + * By design, it runs in the cloud at enterprise scale from the start + * Shorter times to update customer-facing applications—when you update your data in the database, your application is updated instantly + * Ability to focus more on maintaining your data and delivering value to your users and less on wrangling software + + + +Also, since these services respond to the configuration of your database, they also expose functions contained in the database. Rather than developing their data functions to incorporate them into software later, data scientists can create functions in the database that are immediately made available via a REST API. The software begins to fade into the background so an organization can focus on the data. + +Suffice it to say, we're pretty excited about these new geospatial services, and we definitely want your feedback on them. Feel free to check out [pg_tileserve][3] and [pg_featureserv][4], try deploying them alongside your PostGIS databases with the [PostgreSQL Operator][19], and share your feedback in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/gis-kubernetes + +作者:[Adam Timm][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/timmam +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/map_route_location_gps_path.png?itok=RwtS4DsU (A map with a route highlighted) +[2]: https://www.crunchydata.com/ +[3]: https://github.com/CrunchyData/pg_tileserv +[4]: https://github.com/CrunchyData/pg_featureserv +[5]: https://www.crunchydata.com/products/crunchy-spatial/ +[6]: https://postgis.net/ +[7]: https://www.postgresql.org +[8]: https://www.qgis.org/en/site/ +[9]: http://geoserver.org/ +[10]: http://geonode.org/ +[11]: https://opensource.com/sites/default/files/pg_tileserv.jpg (pg_tileserv) +[12]: https://info.crunchydata.com/blog/dynamic-vector-tiles-from-postgis +[13]: https://info.crunchydata.com/blog/crunchy-spatial-tile-serving +[14]: https://info.crunchydata.com/blog/crunchy-spatial-tile-serving-with-postgresql-functions +[15]: https://opensource.com/sites/default/files/pg_featureserv.jpg (pg_featureserv) +[16]: http://www.ogcapi.org/ +[17]: https://info.crunchydata.com/blog/crunchy-spatial-querying-spatial-features-with-pg_featureserv +[18]: https://opensource.com/sites/default/files/uploads/architecture_0.png (GIS architecture) +[19]: https://github.com/CrunchyData/postgres-operator From 69f8d72714849b526a49f7b4f290498f47afe03d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 21 Apr 2020 00:57:39 +0800 Subject: [PATCH 202/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200420=20Why=20?= =?UTF-8?q?I=20use=20open=20source=20technology=20for=20web=20development?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200420 Why I use open source technology for web development.md --- ...n source technology for web development.md | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 sources/tech/20200420 Why I use open source technology for web development.md diff --git a/sources/tech/20200420 Why I use open source technology for web development.md b/sources/tech/20200420 Why I use open source technology for web development.md new file mode 100644 index 0000000000..03a2ea4148 --- /dev/null +++ b/sources/tech/20200420 Why I use open source technology for web development.md @@ -0,0 +1,102 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why I use open source technology for web development) +[#]: via: (https://opensource.com/article/20/4/open-source-web-development) +[#]: author: (Jimmy McArthur https://opensource.com/users/jimmymcarthur) + +Why I use open source technology for web development +====== +Micro-frontends with an API-driven approach power the OpenStack +Foundation's platforms. +![Text editor on a browser, in blue][1] + +Every day, millions of people all over the world access the [OpenStack Foundation][2]'s (OSF) web properties to learn about open infrastructure. This level of usage requires a platform and toolsets that are fast, flexible, and affordable—and this is where open source comes in. Not only that, but given that we work for an open source software foundation, we naturally incorporate open source technologies into everything we do, including web development. + +### Considerations for web development + +When thinking about web development technologies, we must consider how we manage our software lifecycles. All software development includes some sort of [lifecycle management][3] with the opportunity to plan, analyze, design, and implement the code. Our web development team usually works on the fly, often under tight deadlines, and with other departments. That means our requirements and workflow must be flexible enough to allow for quick iterations, updates, and corrections. I'd rather push out something quickly and, if needed, go back in and make things pixel perfect after the fact. + +Our team also has to consider all the stakeholders involved in the website, including our talented marketing teams who aren't familiar with Git workflows. That led us, like many others, to utilize a content management system (CMS), so those professionals can make updates without having to use Git. + +### Building a CMS-agnostic web architecture + +In order to uphold this need for flexibility, traditionally, we relied on an open source CMS, [SilverStripe][4]. However, our requirements quickly outgrew the system. So, we built a standalone API and use static micro-sites with [React][5] JavaScript components to pull data into custom-designed presentation layers. We use this system in everything from mobile apps to websites to digital signs. This has become known as a [Jamstack][6] architecture. We found this model was extensible enough that it allowed us to move our data anywhere while being CMS-agnostic. + +When adopting this API-driven workflow, we realized that our data was used in many different places and presented in many different ways. Across our seven web properties, we share everything from graphics to dynamic content. A standard CMS won't do this without a lot of custom development work along with either cron jobs or costly database queries. + +When things are API-driven, you can access all these different datasets across a variety of platforms while largely protecting your infrastructure from major traffic spikes. For example, the OSF collaborated with [Tipit][7], the OSF's digital design and development partner, to develop a completely open source end-to-end event management software. Our event-schedule data is presented on web pages, mobile apps, and digital signage. It's the same data, managed from a single place, but with different presentation layers, formats, and platforms. + +### Open source identity access management + +A cornerstone of moving to a decentralized Jamstack architecture is the need to establish identity and access rights. When using JavaScript to call for things in an API, we may need to require authentication and authorization. Therefore, we had to separate the identity provider from any individual implementation. There are two concepts to this: identity (authN) and identity access management (authZ). The identity provider confirms who you are, while access management confirms what roles and permissions you have to do different things. One of the first requirements when developing the event-management software was to establish a standalone identity provider. + +Enter [OpenStackID][8], which is an [OpenID Connect][9] with oAuth2 SSO solution. OpenStackID started out as a more secure way for users to log into [Openstack.org][10] and manage their profiles. Even as the number of websites and event apps we manage grows, this creates a seamless authentication experience for users. The access-management portion allows us to build standalone React-based apps that use the identity provider to determine if a particular user has the rights to do the things they want to do in that specific application. + +One thing that runs through everyone's mind—especially in a global open source community—is privacy. It's a large factor in creating our web and event properties. With OpenStackID, users can log into their [OpenStackID account][11] and set application permissions using the OAuth 2 console. If they decide they no longer want their app associated with their OpenStackID, they can simply remove permissions. + +For example, we have users for our events that do not want their personal information to be associated with their presence at our conferences. The way the platforms are set up, all personally identifiable data is managed securely on the OpenID server, and it's not shared between applications unless the user strictly enables it. Beyond that, we never share things like the events a user attends or pieces of their user profile unless it's completely anonymized, or they specifically allow it in order to remain aligned with the [Four Opens][12] or our community philosophy. + +### Better web infrastructure using open source + +Taking our considerations and shifting toward a more flexible implementation of a CMS has helped our teams collaborate more effectively. Most importantly, we continue to follow our community values by providing great privacy and security options thanks to open source technology. + +If you're interested in our approach, check out the OSF Foundation website's [source code][13]. You can also access the following source code repos to see the approach in action: + + * [Zuul website][14] + * [Airship website][15] + * [StarlingX website][16] + * [Kata Containers website][17] + * [MOC and Open Infra Labs website][18] + * [Open Stack Foundation website][19] + * [Open Infrastructure Summit admin][20] + * [Open Infrastructure Summit CFP][21] + * [Open Infrastructure Summit Signage][22] + * [OpenStack Survey GraphQL API to access survey data and reports][23] + * [OpenStack Survey Graphene API to feed summit reports][24] + * [OpenStackID authentication system][25] + * [OpenStackID resource server][26] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-web-development + +作者:[Jimmy McArthur][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/jimmymcarthur +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) +[2]: https://osf.dev/ +[3]: https://en.wikipedia.org/wiki/Systems_development_life_cycle +[4]: https://www.silverstripe.org/ +[5]: https://reactjs.org/ +[6]: https://jamstack.org/ +[7]: https://www.tipit.net/ +[8]: https://opendev.org/explore/repos?q=openstackid&tab=&sort=recentupdate +[9]: https://openid.net/connect/ +[10]: http://Openstack.org +[11]: https://openstackid.org/ +[12]: https://osf.dev/about/four-opens/ +[13]: https://github.com/OpenStackweb/openstack-org +[14]: https://opendev.org/zuul/zuul-website +[15]: https://github.com/AirshipWeb/airship-website +[16]: https://github.com/StarlingXWeb/starlingx-website +[17]: https://github.com/kata-containers/www.katacontainers.io +[18]: https://github.com/OpenStackweb/openinfralabs-website +[19]: https://github.com/OpenStackweb/osf-website +[20]: https://github.com/OpenStackweb/summit-admin +[21]: https://github.com/OpenStackweb/call-for-presentations +[22]: https://github.com/OpenStackweb/openstacksignage +[23]: https://github.com/OpenStackweb/openstack-survey-api +[24]: https://github.com/OpenStackweb/summit-reports-api +[25]: https://opendev.org/osf/openstackid +[26]: https://opendev.org/osf/openstackid-resources From ae7d7e2330d71fcaf13b7c6a73a23da61ebcc000 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Tue, 21 Apr 2020 01:07:06 +0800 Subject: [PATCH 203/394] TSL --- ...orkspaces with Great Teeming Workspaces.md | 149 ++++++++---------- 1 file changed, 65 insertions(+), 84 deletions(-) rename {sources => translated}/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md (83%) diff --git a/sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md b/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md similarity index 83% rename from sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md rename to translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md index c679c29a38..db5f0bf1ca 100644 --- a/sources/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md +++ b/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md @@ -7,155 +7,136 @@ [#]: via: (https://opensource.com/article/20/2/git-great-teeming-workspaces) [#]: author: (Daniel Gryniewicz https://opensource.com/users/dang) -Manage complex Git workspaces with Great Teeming Workspaces +使用 Great Teeming Workspaces 管理复杂的 Git 工作空间 ====== -GTWS is a set of scripts that make it easy to have development -environments for different projects and different versions of a project. +GTWS 是一系列脚本,这些脚本能让我们在开发环境中管理一个有不同项目和不同版本的工程时变得更简单。 ![Coding on a computer][1] -Great Teeming Workspaces ([GTWS][2]) is a complex workspace management package for Git that makes it easy to have development environments for different projects and different versions of a project. +[GTWS][2] 是一个 Git 的复杂工作空间管理工具包,可以让我们在开发环境中管理一个有不同项目和不同版本的工程时变得更简单。 -Somewhat like Python [venv][3], but for languages other than Python, GTWS handles workspaces for multiple versions of multiple projects. You can create, update, enter, and leave workspaces easily, and each project or version combination has (at most) one local origin that syncs to and from the upstream—all other workspaces update from the local origin. - -### Layout +有点像 Python 的 [venv][3],但不是为 Python 语言准备的。GTWS 用来处理多项目的多个版本的工作空间。你可以很容易地创建、更新、进入和离开工作空间,每个项目或版本的组合(最多)有一个本地的 origin,用来与 upstream 同步 — 其余的所有工作空间都从本地的 origin 更新。 +### 部署 ``` ${GTWS_ORIGIN}/<project>/<repo>[/<version>] ${GTWS_BASE_SRCDIR}/<project>/<version>/<workspacename>/{<repo>[,<repo>...]} ``` -Each level in the source tree (plus the homedir for globals) can contain a **.gtwsrc** file that maintains settings and Bash code relevant to that level. Each more specific level overrides the higher levels. +源目录的每一级(包括全局的 home 目录)可以包含一个 **.gtwsrc** 文件,这个文件中维护与当前级相关的设置和 bash 代码。每一级的配置会覆盖上一级。 -### Setup - -Check out GTWS with: +### 安装 +用下面的命令检出 GTWS: ``` `git clone https://github.com/dang/gtws.git` ``` -Set up your **${HOME}/.gtwsrc**. It should include **GTWS_ORIGIN** and optionally **GTWS_SETPROMPT**. - -Add the repo directory to your path: +配置你的 **${HOME}/.gtwsrc**。它应该包含 **GTWS_ORIGIN**,也可以再包含 **GTWS_SETPROMPT**。 +把仓库目录加到环境变量中: ``` `export PATH="${PATH}:/path/to/gtws` ``` -### Configuration +### 配置 -Configuration is via cascading **.gtwsrc** files. It walks the real path down from the root, and each **.gtwsrc** file it finds is sourced in turn. More specific files override less specific files. +通过级联 **.gtwsrc** 文件来进行配置。它从根目录向下遍历,会执行在每级目录中找到的 **.gtwsrc** 文件。下级目录的文件会覆盖上一级。 -Set the following in your top-level **~/.gtws/.gtwsrc**: +在你最上层的文件 **~/.gtws/.gtwsrc** 中进行如下设置: - * **GTWS_BASE_SRCDIR:** This is the base of all the projects' source trees. It defaults to **$HOME/src**. - * **GTWS_ORIGIN:** This sets the location of the origin Git trees. It defaults to **$HOME/origin**. - * **GTWS_SETPROMPT:** This is optional. If it's set, the shell prompt will have the workspace name in it. - * **GTWS_DEFAULT_PROJECT:** This is the project used when no project is given or known. If it is not given, projects must be specified on the command line. - * **GTWS_DEFAULT_PROJECT_VERSION:** This is the default version to check out. It defaults to **master**. + * **GTWS_BASE_SRCDIR:** 所有项目源文件目录树的 base。默认为 **$HOME/src**。 + * **GTWS_ORIGIN:** 指定 origin git 目录树的路径。默认为 **$HOME/origin**。 + * **GTWS_SETPROMPT:** 可选配置。如果配置了这个参数,shell 提示符会有工作空间的名字。 + * **GTWS_DEFAULT_PROJECT:** 不指定项目或项目未知时默认的项目名。如果不指定,使用命令行时必须指明项目。 + * **GTWS_DEFAULT_PROJECT_VERSION:** 检出的默认版本。默认为 **master**。 +在每个项目的根目录进行以下设置: + * **GTWS_PROJECT:** 项目的名字(和 base 目录)。 + * **gtws_project_clone:** 这个函数用于克隆一个项目的指定版本。如果未定义,它会假定项目的 origin 对每一个版本都有一个单独的目录,这样会导致克隆一堆 Git 仓库。 + * **gtws_project_setup:** 在克隆完所有的仓库后,可以选择是否调用这个函数,调用后可以对项目进行必要的配置,如在 IDE 中配置工作空间。 -Set the following at the project level of each project: +在项目版本级进行以下设置: - * **GTWS_PROJECT:** The name (and base directory) of the project. - * **gtws_project_clone:** This function is used to clone a specific version of a project. If it is not defined, then it is assumed that the origin for the project contains a single directory per version, and that contains a set of Git repos to clone. - * **gtws_project_setup:** This optional function is called after all cloning is done and allows any additional setup necessary for the project, such as setting up workspaces in an IDE. + * **GTWS_PROJECT_VERSION:** 项目的版本。用于正确地从 origin 拉取代码。类似 Git 中的分支名字。 +下面这些参数可以在目录树的任意地方进行配置,如果能生效,它们可以被重写多次: + * **GTWS_PATH_EXTRA:** 这些是工作空间中加到路径后的额外的路径元素。 + * **GTWS_FILES_EXTRA:** 这些是不在版本控制内,但应该在工作空间中被检出的额外的文件。这些文件包括 **.git/info/exclude**,每个文件都与仓库的 base 相关联。 -Set this at the project version level: +### origin 目录 - * **GTWS_PROJECT_VERSION:** This is the version of the project. It's used to pull from the origin correctly. In Git, this is likely the branch name. +**GTWS_ORIGIN** (大部分脚本中)指向拉取和推送的原始 Git 检出目录。 - - -These things can go anywhere in the tree and can be overridden multiple times, if it makes sense: - - * **GTWS_PATH_EXTRA:** These are extra path elements to be added to the path inside the workspace. - * **GTWS_FILES_EXTRA:** These are extra files not under version control that should be copied into each checkout in the workspace. This includes things like **.git/info/exclude**, and each file is relative to the base of its repo. - - - -### Origin directories - -**GTWS_ORIGIN** (in most scripts) points to the pristine Git checkouts to pull from and push to. - -Layout of **${GTWS_ORIGIN}**: +**${GTWS_ORIGIN}** 部署: * **/<project>** - * This is the base for repos for a project. - * If **gtws_project_clone** is given, this can have any layout you desire. - * If **gtws_project_clone** is not given, this must contain a single subdirectory named **git** that contains a set of bare Git repos to clone. + * 这是一个项目的仓库 base。 + * 如果指定了 **gtws_project_clone**,你可以配置任意的部署路径。 + * 如果没有指定 **gtws_project_clone**,这个路径下必须有个名为 **git** 的子目录,且 **git** 目录下有一系列用来克隆的裸 Git 仓库。 +### 工作流示例 +假设你有一个项目名为 **Foo**,它的 upstream 为 **github.com/foo/foo.git**。这个仓库有个名为 **bar** 的子模块,它的 upstream 是 **github.com/bar/bar.git**。Foo 项目在 master 分支开发,使用稳定版本的分支。 -### Workflow example +为了能在 Foo 中使用 GTWS,你首先要配置目录结构。本例中假设你使用默认的目录结构。 -Suppose you have a project named **Foo** that has an upstream repository at **github.com/foo/foo.git**. This repo has a submodule named **bar** with an upstream at **github.com/bar/bar.git**. The Foo project does development in the master branch and uses stable version branches. - -Before you can use GTWS with Foo, first you must set up the directory structure. These examples assume you are using the default directory structure. - - * Set up your top level **.gtwsrc**: + * 配置你最上层的 **.gtwsrc**: * **cp ${GTWS_LOC}/examples/gtwsrc.top ~/.gtwsrc** - * Edit **~/.gtwsrc** and change as necessary. - * Create top-level directories: + * 根据需要修改 **~/.gtwsrc**。 + * 创建顶级目录: * **mkdir -p ~/origin ~/src** - * Create and set up the project directory: + * 创建并配置项目目录: * **mkdir -p ~/src/foo** **cp ${GTWS_LOC}/examples/gtwsrc.project ~/src/foo/.gtwsrc** - * Edit **~/src/foo/.gtwsrc** and change as necessary. - * Create and set up the master version directory: + * 根据需要修改 **~/src/foo/.gtwsrc**。 + * 创建并配置 master 版本目录: * **mkdir -p ~/src/foo/master** **cp ${GTWS_LOC}/examples/gtwsrc.version ~/src/foo/master/.gtwsrc** - * Edit **~/src/foo/master/.gtwsrc** and change as necessary. - * Go to the version directory and create a temporary workspace to set up the mirrors: + * 根据需要修改 **~/src/foo/master/.gtwsrc**。 + * 进入版本目录并创建一个临时工作空间来配置镜像: * **mkdir -p ~/src/foo/master/tmp** **cd ~/src/foo/master/tmp git clone --recurse-submodules git://github.com/foo/foo.git cd foo -gtws-mirror -o ~/origin -p foo** - * This will create **~/origin/foo/git/foo.git** and **~/origin/foo/submodule/bar.git**. - * Future clones will clone from these origins rather than from upstream. - * This workspace can be deleted now. +gtws-mirror -o ~/origin -p foo**(译注:这个地方原文有误,不加 `-s` 参数会报错) + * 上面命令会创建 **~/origin/foo/git/foo.git** 和 **~/origin/foo/submodule/bar.git**。 + * 以后的克隆操作会从这些 origin 而不是 upstream 克隆。 + * 现在可以删除工作空间了。 +到现在为止,Foo 的 master 分支的工作可以结束了。假设你现在想修复一个 bug,名为 **bug1234**。你可以脱离你当前的工作空间为修复这个 bug 单独创建一个工作空间,之后在新创建的工作空间中开发。 - -At this point, work can be done on the master branch of Foo. Suppose you want to fix a bug named **bug1234**. You can create a workspace for this work to keep it isolated from anything else you're working on, and then work within this workspace. - - * Go to the version directory, and create a new workspace: + * 进入版本目录,创建一个新的工作空间: * **cd ~/src/foo/master mkws bug1234** - * This creates **bug1234/**, and inside it checks out Foo (and its submodule **bar**) and makes **build/foo** for building it. - * Enter the workspace. There are two ways to do this: + * 上面的命令创建了 **bug1234/**,在这个目录下检出了 Foo(和它的子模块 **bar**),并创建了 **build/foo** 来构建它。 + * 有两种方式进入工作空间: * **cd ~/src/foo/master/bug1234 startws** -or +或者 **cd ~/src/foo/master/** **startws bug1234** - * This starts a subshell within the bug1234 workspace. This shell has the GTWS environment plus any environment you set up in your stacked **.gtwsrc** files. It also adds the base of the workspace to your CD path, so you can **cd** into relative paths from that base. - * At this point, you can do work on bug1234, build it, test it, and commit your changes. When you're ready to push to upstream, do this:  + * 上面的命令在 bug1234 工作空间中开启了一个子 shell。这个 shell 有 GTWS 的环境和你在各级 **.gtwsrc** 文件中设置的环境。它也把你工作空间的 base 路径加入到了 CD,因此你可以从 base 路径 **cd** 到相关的目录中。 + * 现在你可以修复 bug1234了,构建、测试、提交你的修改。当你可以把代码推送到 upstream 时,执行下面的命令: **cd foo wspush**  - * **wspush** will push the branch associated with your workspace—first to your local origin and then to the upstream. - * If upstream changes. you can sync your local checkout using:  + * **wspush** 会把代码推送到与你工作空间相关的分支 — 先推送到本地的 origin,再推送到 upstream。 + * 当 upstream 有修改时,你可以用下面的命令同步到本地: **git sync** - * This envokes the **git-sync** script in GTWS, which will update your checkout from the local origin. To update the local origin, use:  + * 上面的命令调用了 GTWS 的 **git-sync** 脚本,会从本地 origin 更新代码。使用下面的命令来更新本地的 origin: **git sync -o**  - * This will update your local origin and submodules' mirrors, then use those to update your checkout. **git-sync** has other nice features. - * When you're done using the workspace, just exit the shell: + * 上面的命令会更新你本地的 origin 和子模块的镜像,然后用那些命令来更新你的检出仓库的代码。**git-sync** 也有一些其他的很好的工鞥。 + * 当要结束工作空间中的工作时,直接退出 shell: **exit** - * You can re-enter the workspace at any time and have multiple shells in the same workspace at the same time. - * When you're done with a workspace, you can remove it using the **rmws** command or just remove its directory tree.  - * There is a script named **tmws** that enters a workspace within tmux, creating a set of windows/panes that are fairly specific to my workflow.  Feel free to modify it to suit your needs. - - - -### The script + * 你可以在任何时间重复进入工作空间,也可以在同一时间在相同的工作空间中开多个 shell。 + * 当你不需要某个工作空间时,你可以使用 **rmws** 来删除它,或者直接删除它的目录树。 + * 还有一个脚本 **tmws** 使用 tmux 进入工作空间,能创建一系列的窗口/窗格,这完美契合我的工作流。你可以根据你自己的需求来修改它。 +### 脚本内容 ``` #!/bin/bash @@ -1157,7 +1138,7 @@ via: https://opensource.com/article/20/2/git-great-teeming-workspaces 作者:[Daniel Gryniewicz][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[lxbwolf](https://github.com/lxbwolf) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 039f085be3478c108286f5f27144c38741fd36f6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Apr 2020 08:44:24 +0800 Subject: [PATCH 204/394] translated --- ...20200413 How to install Python on Linux.md | 159 ------------------ ...20200413 How to install Python on Linux.md | 157 +++++++++++++++++ 2 files changed, 157 insertions(+), 159 deletions(-) delete mode 100644 sources/tech/20200413 How to install Python on Linux.md create mode 100644 translated/tech/20200413 How to install Python on Linux.md diff --git a/sources/tech/20200413 How to install Python on Linux.md b/sources/tech/20200413 How to install Python on Linux.md deleted file mode 100644 index 07d4aa4087..0000000000 --- a/sources/tech/20200413 How to install Python on Linux.md +++ /dev/null @@ -1,159 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to install Python on Linux) -[#]: via: (https://opensource.com/article/20/4/install-python-linux) -[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor) - -How to install Python on Linux -====== -Step-by-step instructions for installing the latest Python instead of -(or alongside) an older version on Linux. -![OpenStack source code \(Python\) in VIM][1] - -[Python][2] is now the [most popular][3], most used programming language. Python's simple syntax and low learning curve make it the ultimate choice for beginners as well as professional developers. Python is also a very versatile programming language. It's used nearly everywhere—from web development to artificial intelligence—really anywhere other than mobile development. - -If you're using Python, there's a good chance you're a developer (or want to become one), and Linux is a great platform for creating software. But when you're working with Python every day, you sometimes want to stay up to date with the very latest version. You may not want to replace the default install of Python on your system just to test drive the latest one, so this article explains how to install the latest version of Python 3 on Linux without replacing the version provided by your distribution. - -Use the **python --version terminal** command to check whether Python is already installed and, if so, which version you have. If Python is not installed on your Linux system, or you want to install an updated version, follow the steps below. - -### Step-by-step installation instructions - -#### **Step 1:** First, install development packages required to build Python. - -#### On Debian: - - -``` -$ sudo apt update -$ sudo apt install build-essential zlib1g-dev \ -libncurses5-dev libgdbm-dev libnss3-dev \ -libssl-dev libreadline-dev libffi-dev curl -``` - -#### On Fedora: - - -``` -`$ sudo dnf groupinstall development` -``` - -#### Step 2: Download the stable latest release of Python 3 - -Visit the [official Python website][4] and download the latest version of Python 3. After the download is complete, you hav a **.tar.xz** archive file (a "tarball") containing the source code of Python. - -#### Step 3: Extract the tarball - -Once the download is complete, extract the tarball by either using the extractor application of your choice or the [Linux **tar** command][5], for example: - - -``` -`$ tar -xf Python-3.?.?.tar.xz` -``` - -#### Step 4: Configure the script - -Once the Python tarball has been extracted, navigate to the configure script and execute it in your Linux terminal with: - - -``` -$ cd Python-3.* -./configure -``` - -The configuration may take some time. Wait until it is successfully finishes before proceeding. - -#### Step 5: Start the build process - -If you already have a version of Python installed on your system and you want to install the new version alongside it, use this command: - - -``` -`$ sudo make altinstall` -``` - -The build process may take some time. - -If you want to replace your current version of Python with this new version, you should uninstall your current Python package using your package manager (such as **apt** or **dnf**) and then install: - - -``` -`$ sudo make install` -``` - -However, it's generally preferable to install software as a package (such as a **.deb** or **.rpm** file) so your system can track and update it for you. Because this article assumes the latest Python isn't yet packaged yet, though, you probably don't have that option. In that case, you can either install Python with **altinstall** as suggested, or rebuild an existing Python package using the latest source code. That's an advanced topic and specific to your distribution, so it's out of scope for this article. - -#### Step 6: Verify the installation - -If you haven't encountered any errors, the latest Python is now installed on your Linux system. To verify it, write one of these commands in your terminal: - - -``` -`python3 --version` -``` - -or - - -``` -`python --version` -``` - -If the output says **Python 3.x**, Python 3 has been successfully installed. - -### Create a virtual environment (optional) - -Python provides a package known as **venv** (virtual environment), which helps you isolate a program directory or package from other ones. - -To create a virtual environment, enter the following in the Python terminal (in this example, assume the version of Python you've installed is in the **3.8** series): - - -``` -`python3.8 -m venv example` -``` - -This command creates a new directory (which I've named **example**), with some subdirectories. - -To activate the virtual environment, enter: - - -``` -$ source example/bin/activate -(example) $ -``` - -Notice that your terminal prompt (**$**) is now preceeded by an environment name. - -To deactivate the virtual environment, use the **deactivate** command: - - -``` -`(example) $ deactivate` -``` - -### Conclusion - -Python is a fun language that's developed and improved frequently. Getting familiar with new features is easy, once you understand how to install the latest release without interfering with the stable version provided from your distribution. - -If you have any feedback or questions, please leave them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/install-python-linux - -作者:[Vijay Singh Khatri][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/vijaytechnicalauthor -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openstack_python_vim_1.jpg?itok=lHQK5zpm (OpenStack source code (Python) in VIM) -[2]: https://www.python.org/ -[3]: http://pypl.github.io/PYPL.html -[4]: http://python.org -[5]: https://opensource.com/article/17/7/how-unzip-targz-file diff --git a/translated/tech/20200413 How to install Python on Linux.md b/translated/tech/20200413 How to install Python on Linux.md new file mode 100644 index 0000000000..af38718735 --- /dev/null +++ b/translated/tech/20200413 How to install Python on Linux.md @@ -0,0 +1,157 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to install Python on Linux) +[#]: via: (https://opensource.com/article/20/4/install-python-linux) +[#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor) + +如何在 Linux 上安装 Python +====== +在 Linux 上安装最新 Python (或并列多个)而不是老版本的分步说明。 +![OpenStack source code \(Python\) in VIM][1] + +[Python][2] 现在是[最受欢迎][3],最常用的编程语言。Python 的简单语法和较低的学习曲线使其成为初学者和专业开发人员的最终选择。Python 还是一种非常通用的编程语言。从 Web 开发到人工智能,它几乎在除了移动开发的所有地方都有使用。 + +如果你使用的是 Python,那么你很有可能是一名开发人员(或想成为一名开发人员),而 Linux 是创建软件的绝佳平台。但是,当你每天使用 Python 时,有时你希望使用最新版本。你可能不想仅仅为了测试最新版本的系统而替换了默认的 Python 安装,因此本文说明了如何在 Linux 上安装最新版本的 Python 3,而不替换发行版提供的版本。 + +使用 **python --version terminal** 命令检查是否已安装 Python,如果已安装,那么检查是哪个版本。如果你的 Linux 系统上未安装 Python,或者你想安装更新的版本,请按照以下步骤操作。 + +### 分步安装说明 + +#### **步骤 1:**首先,安装构建 Python 所需的开发包。 + +#### 在 Debian 上: + + +``` +$ sudo apt update +$ sudo apt install build-essential zlib1g-dev \ +libncurses5-dev libgdbm-dev libnss3-dev \ +libssl-dev libreadline-dev libffi-dev curl +``` + +#### 在 Fedora 上: + + +``` +`$ sudo dnf groupinstall development` +``` + +#### 步骤 2:下载稳定的最新版本的 Python 3 + +访问[官方 Python 网站][4]并下载最新版本的 Python3。下载完成后,你会有一个 **.tar.xz** 归档文件(“tarball”),其中包含 Python 的源代码。 + +#### 步骤 3:解压 tarball + +下载完成后,使用解压程序或 [Linux 的 **tar** 命令][5]解压压缩包,例如: + +``` +`$ tar -xf Python-3.?.?.tar.xz` +``` + +#### 步骤 4:配置脚本 + +解压 Python 压缩包后,进入 configure 脚本所在目录并在 Linux 终端中使用以下命令执行该脚本: + + +``` +$ cd Python-3.* +./configure +``` + +配置可能需要一些时间。等待直到成功完成,然后再继续。 + +#### 步骤 5:开始构建过程 + +如果你的系统上已经安装了某个版本的 Python,并且希望同时安装新版本的 Python,请使用以下命令: + + +``` +`$ sudo make altinstall` +``` + +构建过程可能需要一些时间。 + +如果要使用此版本替换当前版本的 Python,那么应使用包管理器(例如 **apt** 或 **dnf**)卸载当前的 Python 包,然后安装: + + +``` +`$ sudo make install` +``` + +但是,通常最好将软件作为包安装(例如 **.deb** 或 **.rpm** 文件),以便系统可以为你跟踪和更新它。因为本文假设尚未打包最新的 Python,所以你可能没有这个选择。在这种情况下,你可以按照建议使用 **altinstall** 来安装 Python,或者使用最新的源代码重建现有的 Python 包。这是一个高级主题,并且特定于你的发行版,因此不在本文讨论范围之内。 + +#### 步骤 6:验证安装 + +如果你没有遇到任何错误,那么现在你的 Linux 系统上已安装了最新的 Python。要进行验证,请在终端中输入以下命令之一: + + +``` +`python3 --version` +``` + +或者 + + +``` +`python --version` +``` + +如果输出显示 **Python 3.x**,那么说明 Python 3 已成功安装。 + +### 创建虚拟环境(可选) + +Python 提供了名为 **venv**(虚拟环境)的软件包,可帮助你将程序目录或软件包与其他目录或软件包隔离。 + +要创建虚拟环境,请在 Python 终端中输入以下内容(在此示例中,假定你安装的 Python 版本为 **3.8** 系列): + + +``` +`python3.8 -m venv example` +``` + +该命令创建一个带有一些子目录的新目录(我将其命名为 **example**)。 + +要激活虚拟环境,请输入: + + +``` +$ source example/bin/activate +(example) $ +``` + +请注意,你的终端提示符(**$**)现在以环境名称开头。 + +要停用虚拟环境,请使用 **deactivate** 命令: + + +``` +`(example) $ deactivate` +``` + +### 总结 + +Python 是一种有趣的语言,经常被开发和改进。一旦了解了如何安装最新版本而又不干扰发行版提供的稳定版本,熟悉新功能将很容易。 + +如果你有任何反馈或问题,请在评论中提出。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/install-python-linux + +作者:[Vijay Singh Khatri][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/vijaytechnicalauthor +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openstack_python_vim_1.jpg?itok=lHQK5zpm (OpenStack source code (Python) in VIM) +[2]: https://www.python.org/ +[3]: http://pypl.github.io/PYPL.html +[4]: http://python.org +[5]: https://opensource.com/article/17/7/how-unzip-targz-file From 1d54018ac3bdbb1c2102800d0819d55ac19a9dd0 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 21 Apr 2020 08:48:06 +0800 Subject: [PATCH 205/394] translating --- .../20200416 How to package Python applications for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200416 How to package Python applications for Linux.md b/sources/tech/20200416 How to package Python applications for Linux.md index 24e8343038..a765f4a536 100644 --- a/sources/tech/20200416 How to package Python applications for Linux.md +++ b/sources/tech/20200416 How to package Python applications for Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 36ee8b0ab66e0f65244ad170d0120d1000256e16 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 21 Apr 2020 09:06:18 +0800 Subject: [PATCH 206/394] Rename sources/tech/20200420 Why I use open source technology for web development.md to sources/talk/20200420 Why I use open source technology for web development.md --- ...200420 Why I use open source technology for web development.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200420 Why I use open source technology for web development.md (100%) diff --git a/sources/tech/20200420 Why I use open source technology for web development.md b/sources/talk/20200420 Why I use open source technology for web development.md similarity index 100% rename from sources/tech/20200420 Why I use open source technology for web development.md rename to sources/talk/20200420 Why I use open source technology for web development.md From 4b51ab8866b7c7f40e39193db2f211d6f7b4e583 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Apr 2020 09:45:22 +0800 Subject: [PATCH 207/394] PRF @geekpi --- ...20200413 How to install Python on Linux.md | 72 +++++++++---------- 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/translated/tech/20200413 How to install Python on Linux.md b/translated/tech/20200413 How to install Python on Linux.md index af38718735..eebb701a9c 100644 --- a/translated/tech/20200413 How to install Python on Linux.md +++ b/translated/tech/20200413 How to install Python on Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to install Python on Linux) @@ -9,21 +9,22 @@ 如何在 Linux 上安装 Python ====== -在 Linux 上安装最新 Python (或并列多个)而不是老版本的分步说明。 -![OpenStack source code \(Python\) in VIM][1] -[Python][2] 现在是[最受欢迎][3],最常用的编程语言。Python 的简单语法和较低的学习曲线使其成为初学者和专业开发人员的最终选择。Python 还是一种非常通用的编程语言。从 Web 开发到人工智能,它几乎在除了移动开发的所有地方都有使用。 +> 在 Linux 上安装最新 Python,替代或与老版本并存的分步说明。 + +![](https://img.linux.net.cn/data/attachment/album/202004/21/094500u63lnlgukgnjb0t0.jpg) + +[Python][2] 现在是[最流行][3]、最常用的编程语言。Python 的简单语法和较低的学习曲线使其成为初学者和专业开发人员的终极选择。Python 还是一种非常通用的编程语言。从 Web 开发到人工智能,它几乎在除了移动开发的所有地方都有使用。 如果你使用的是 Python,那么你很有可能是一名开发人员(或想成为一名开发人员),而 Linux 是创建软件的绝佳平台。但是,当你每天使用 Python 时,有时你希望使用最新版本。你可能不想仅仅为了测试最新版本的系统而替换了默认的 Python 安装,因此本文说明了如何在 Linux 上安装最新版本的 Python 3,而不替换发行版提供的版本。 -使用 **python --version terminal** 命令检查是否已安装 Python,如果已安装,那么检查是哪个版本。如果你的 Linux 系统上未安装 Python,或者你想安装更新的版本,请按照以下步骤操作。 +使用 `python --version` 终端命令检查是否已安装 Python,如果已安装,那么检查是哪个版本。如果你的 Linux 系统上未安装 Python,或者你想安装更新的版本,请按照以下步骤操作。 ### 分步安装说明 -#### **步骤 1:**首先,安装构建 Python 所需的开发包。 - -#### 在 Debian 上: +#### 步骤 1:首先,安装构建 Python 所需的开发包 +在 Debian 上 ``` $ sudo apt update @@ -32,29 +33,27 @@ libncurses5-dev libgdbm-dev libnss3-dev \ libssl-dev libreadline-dev libffi-dev curl ``` -#### 在 Fedora 上: - +在 Fedora 上: ``` -`$ sudo dnf groupinstall development` +$ sudo dnf groupinstall development ``` -#### 步骤 2:下载稳定的最新版本的 Python 3 +#### 步骤 2:下载最新的稳定版本的 Python 3 -访问[官方 Python 网站][4]并下载最新版本的 Python3。下载完成后,你会有一个 **.tar.xz** 归档文件(“tarball”),其中包含 Python 的源代码。 +访问[官方 Python 网站][4]并下载最新版本的 Python 3。下载完成后,你会有一个 `.tar.xz` 归档文件(“tarball”),其中包含 Python 的源代码。 #### 步骤 3:解压 tarball -下载完成后,使用解压程序或 [Linux 的 **tar** 命令][5]解压压缩包,例如: +下载完成后,使用解压程序或 [Linux 的 tar 命令][5]解压压缩包,例如: ``` -`$ tar -xf Python-3.?.?.tar.xz` +$ tar -xf Python-3.?.?.tar.xz ``` #### 步骤 4:配置脚本 -解压 Python 压缩包后,进入 configure 脚本所在目录并在 Linux 终端中使用以下命令执行该脚本: - +解压 Python 压缩包后,进入 `configure` 脚本所在目录并在 Linux 终端中使用以下命令执行该脚本: ``` $ cd Python-3.* @@ -67,73 +66,66 @@ $ cd Python-3.* 如果你的系统上已经安装了某个版本的 Python,并且希望同时安装新版本的 Python,请使用以下命令: - ``` -`$ sudo make altinstall` +$ sudo make altinstall ``` 构建过程可能需要一些时间。 -如果要使用此版本替换当前版本的 Python,那么应使用包管理器(例如 **apt** 或 **dnf**)卸载当前的 Python 包,然后安装: - +如果要使用此版本替换当前版本的 Python,那么应使用包管理器(例如 `apt` 或 `dnf`)卸载当前的 Python 包,然后安装: ``` -`$ sudo make install` +$ sudo make install ``` -但是,通常最好将软件作为包安装(例如 **.deb** 或 **.rpm** 文件),以便系统可以为你跟踪和更新它。因为本文假设尚未打包最新的 Python,所以你可能没有这个选择。在这种情况下,你可以按照建议使用 **altinstall** 来安装 Python,或者使用最新的源代码重建现有的 Python 包。这是一个高级主题,并且特定于你的发行版,因此不在本文讨论范围之内。 +但是,通常最好以软件包的形式(例如 `.deb` 或 `.rpm` 文件)来安装软件,以便系统可以为你跟踪和更新它。因为本文假设尚未打包最新的 Python,所以你可能没有这个选择。在这种情况下,你可以按照建议使用 `altinstall` 来安装 Python,或者使用最新的源代码重构现有的 Python 包。这是一个高级主题,并且特定于你的发行版,因此不在本文讨论范围之内。 #### 步骤 6:验证安装 如果你没有遇到任何错误,那么现在你的 Linux 系统上已安装了最新的 Python。要进行验证,请在终端中输入以下命令之一: - ``` -`python3 --version` +python3 --version ``` 或者 - ``` -`python --version` +python --version ``` -如果输出显示 **Python 3.x**,那么说明 Python 3 已成功安装。 +如果输出显示 `Python 3.x`,那么说明 Python 3 已成功安装。 ### 创建虚拟环境(可选) -Python 提供了名为 **venv**(虚拟环境)的软件包,可帮助你将程序目录或软件包与其他目录或软件包隔离。 - -要创建虚拟环境,请在 Python 终端中输入以下内容(在此示例中,假定你安装的 Python 版本为 **3.8** 系列): +Python 提供了名为 `venv`(虚拟环境)的软件包,可帮助你将程序目录或软件包与其他目录或软件包隔离。 +要创建虚拟环境,请在 Python 终端中输入以下内容(在此示例中,假定你安装的 Python 版本为 `3.8` 系列): ``` -`python3.8 -m venv example` +python3.8 -m venv example ``` -该命令创建一个带有一些子目录的新目录(我将其命名为 **example**)。 +该命令创建一个带有一些子目录的新目录(我将其命名为 `example`)。 要激活虚拟环境,请输入: - ``` $ source example/bin/activate (example) $ ``` -请注意,你的终端提示符(**$**)现在以环境名称开头。 - -要停用虚拟环境,请使用 **deactivate** 命令: +请注意,你的终端提示符(`$`)现在以环境名称开头。 +要停用虚拟环境,请使用 `deactivate` 命令: ``` -`(example) $ deactivate` +(example) $ deactivate ``` ### 总结 -Python 是一种有趣的语言,经常被开发和改进。一旦了解了如何安装最新版本而又不干扰发行版提供的稳定版本,熟悉新功能将很容易。 +Python 是一种有趣的语言,它的开发和改进非常频繁。一旦了解了如何安装最新版本而又不干扰发行版提供的稳定版本,熟悉新功能将很容易。 如果你有任何反馈或问题,请在评论中提出。 @@ -144,7 +136,7 @@ via: https://opensource.com/article/20/4/install-python-linux 作者:[Vijay Singh Khatri][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From eab03a33e511769e5e97663f7c15f2922c482fc8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Apr 2020 09:45:56 +0800 Subject: [PATCH 208/394] PUB @geekpi https://linux.cn/article-12132-1.html --- .../20200413 How to install Python on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200413 How to install Python on Linux.md (98%) diff --git a/translated/tech/20200413 How to install Python on Linux.md b/published/20200413 How to install Python on Linux.md similarity index 98% rename from translated/tech/20200413 How to install Python on Linux.md rename to published/20200413 How to install Python on Linux.md index eebb701a9c..7a152a5489 100644 --- a/translated/tech/20200413 How to install Python on Linux.md +++ b/published/20200413 How to install Python on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12132-1.html) [#]: subject: (How to install Python on Linux) [#]: via: (https://opensource.com/article/20/4/install-python-linux) [#]: author: (Vijay Singh Khatri https://opensource.com/users/vijaytechnicalauthor) From a72323745edc2feff272a1bf80e5979c37435368 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Apr 2020 22:28:03 +0800 Subject: [PATCH 209/394] PRF @messon007 --- ...ource cloud native projects to consider.md | 214 +++++++++--------- 1 file changed, 106 insertions(+), 108 deletions(-) diff --git a/translated/tech/20190814 9 open source cloud native projects to consider.md b/translated/tech/20190814 9 open source cloud native projects to consider.md index 9ccb1fc0ab..6832854007 100644 --- a/translated/tech/20190814 9 open source cloud native projects to consider.md +++ b/translated/tech/20190814 9 open source cloud native projects to consider.md @@ -1,208 +1,206 @@ [#]: collector: (lujun9972) [#]: translator: (messon007) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (9 open source cloud native projects to consider) [#]: via: (https://opensource.com/article/19/8/cloud-native-projects) [#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo) -值得考虑的9个开源的云原生项目 +值得关注的 9 个开源云原生项目 ====== -工作中用了容器?熟悉这些出自云原生计算基金会的项目? -![clouds in the sky with blue pattern][1] +> 工作中用了容器?熟悉这些出自云原生计算基金会的项目吗? + +![](https://img.linux.net.cn/data/attachment/album/202004/21/222735oa1wib1wgypoiwpp.jpg) 随着用容器来开发应用的实践变得流行,[云原生应用][2]也在增长。云原生应用的定义为: -> "云原生技术被用于开发应用程序,这些应用通过将服务打包在容器中来完成构建,被部署为微服务,并通过敏捷的DevOps流程和持续集成工作流在弹性基础设施上管理。" -这个定义提到了构成云原生应用的4个元素: +> “云原生技术用于开发使用打包在容器中的服务所构建的应用程序,以微服务的形式部署,并通过敏捷的 DevOps 流程和持续交付工作流在弹性基础设施上进行管理。” + +这个定义提到了构成云原生应用的不可或缺的四个元素: 1. 容器 2. 微服务 3. DevOps 4. 持续集成和持续交付 (CI/CD) - -尽管这些技术各有各自独特的历史,但它们相互补充,共同导致了云原生应用和工具在短时间内惊人的指数级增长。这个[云原生计算基金会][4]信息图呈现了当今云原生应用生态的规模和广度。 +尽管这些技术各有各自独特的历史,但它们之间却相辅相成,在短时间内实现了云原生应用和工具的惊人的指数级增长。这个[云原生计算基金会(CNCF)][4]信息图呈现了当今云原生应用生态的规模和广度。 ![Cloud-Native Computing Foundation applications ecosystem][5] -云原生计算基金会项目 +*云原生计算基金会项目* -我想说,瞧着吧!这仅仅是一个开始。正如NodeJS的出现引发了无休止的JavaScript工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。 +我想说,瞧着吧!这仅仅是一个开始。正如 NodeJS 的出现引发了无数的 JavaScript 工具的爆炸式增长一样,容器技术的普及也推动了云原生应用的指数增长。 -好消息是,有几个组织负责监管这些技术并将它们融合在一起。 其中之一是[**Open Containers Initiative(OCI)**][6],它是一个轻量级的,开放的治理机构(或项目),“它是在Linux基金会的主持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是** CNCF **,“它是一个致力于使云原生计算具有通用性和可持续性的开源软件基金会”。 +好消息是,有几个组织负责监管并将这些技术连接在一起。 其中之一是 [开放容器倡议][6]Open Containers Initiative(OCI),它是一个轻量级的、开放的治理机构(或项目),“它是在 Linux 基金会的支持下形成的,其明确目的是创建开放的行业标准的容器格式和运行时。” 另一个是 CNCF,它是“一个致力于使云原生计算普及和可持续发展的开源软件基金会”。 + +通常除了围绕云原生应用建立社区之外,CNCF 还帮助项目围绕其云原生应用建立结构化管理。CNCF 创建了成熟等级的概念(沙箱级、孵化级或毕业级),分别与下图中的“创新者”、“早期采用者”和“早期大量应用”相对应。 -除了常见的围绕云原生应用建立社区之外,CNCF还帮助项目基于其云原生应用建立结构化的管理。CNCF创建了成熟等级的概念(沙箱级,孵化级或毕业级),分别与下图中的“创新者”,“早期采用者”和“早期大量应用”相对应。 ![CNCF project maturity levels][7] -CNCF项目成熟等级 +*CNCF 项目成熟等级* -CNCF为每个成熟等级制定了详细的[标准][8](为方便读者而列在下面)。 获得技术监督委员会(TOC)三分之二的同意才能转为孵化或毕业级。 +CNCF 为每个成熟等级制定了详细的[标准][8](为方便读者而列在下面)。获得技术监督委员会(TOC)三分之二的同意才能转为孵化或毕业级。 -### 沙箱级 +**沙箱级** -> 要想成为沙箱级,一个项目必须至少有两个TOC赞助商。 有关详细过程,请参见《 CNCF沙箱指南v1.0》。 +> 要想成为沙箱级,一个项目必须至少有两个 TOC 赞助商。 有关详细过程,请参见《CNCF 沙箱指南 v1.0》。 +**孵化级** -### 孵化级 - ->注意:孵化级是我们期望对项目进行全面尽职调查的起点。 +> 注:孵化级是我们期望对项目进行全面的尽职调查的起点。 > ->要进入孵化阶段,项目除了满足沙箱阶段的要求之外还要满足: +> 要进入孵化级,项目除了满足沙箱级的要求之外还要满足: > -> *证明至少有三个独立的最终用户已成功将其用于生产,且TOC判断这些最终用户具有足够的质量和范围。 -> *合入者的数量要合理。合入者定义为具有合入权的人。即可以接受对部分或全部项目贡献的人。 -> *演示有大量正在进行的提交和合并的贡献。 -> *由于这些指标可能会根据项目的类型,范围和大小而有很大差异,因此TOC对足以满足这些标准的活动级别拥有最终决策权 +> * 证明至少有三个独立的最终用户已成功将其用于生产,且 TOC 判断这些最终用户具有足够的质量和范围。 +> * 提交者的数量要合理。提交者定义为具有提交权的人,即可以接受部分或全部项目贡献的人。 +> * 显示出有大量持续提交和合并贡献。 +> * 由于这些指标可能会根据项目的类型、范围和大小而有很大差异,所以 TOC 有权决定是否满足这些标准的活动水平。 +**毕业级** - -### 毕业级 - ->要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足: +> 要从沙箱或孵化级毕业,或者要使一个新项目作为已毕业项目加入,项目除了必须满足孵化级的标准外还要满足: > -> *至少有两个组织的提交者。 -> *已获得并维护了“核心基础设施计划最佳实践徽章”。 -> *已完成独立和第三方安全审核,并发布了具有与以下示例类似的范围和质量的结果(包括已解决的关键漏洞):和所有关键毕业之前需要解决漏洞。 -> *采用CNCF行为准则。 -> *明确定义项目治理和提交流程。最好将其排布在GOVERNANCE.md文件中,并引用显示当前提交者和荣誉提交者的OWNERS.md文件。 -> *至少有主仓的项目采用者的公开列表(例如,ADOPTERS.md或项目网站上的徽标)。 -> *获得TOC的多数票,进入毕业阶段。如果项目能够证明足够的成熟度,则可以尝试直接从沙箱过渡到毕业。项目可以无限期保持孵化状态,但是通常预计它们会在两年内毕业。 +> * 至少有两个来自组织的提交者。 +> * 已获得并保持了“核心基础设施计划最佳实践徽章”。 +> * 已完成独立的第三方安全审核,并发布了具有与以下示例类似的范围和质量的结果(包括已解决的关键漏洞):,并在毕业之前需要解决所有关键的漏洞。 +> * 采用《CNCF 行为准则》。 +> * 明确规定项目治理和提交流程。最好将其列在 `GOVERNANCE.md` 文件中,并引用显示当前提交者和荣誉提交者的 `OWNERS.md` 文件。 +> * 至少有一个主仓的项目采用者的公开列表(例如,`ADOPTERS.md` 或项目网站上的徽标)。 +> * 获得 TOC 的绝大多数票,进入毕业阶段。如果项目能够表现出足够的成熟度,则可以尝试直接从沙箱级过渡到毕业级。项目可以无限期保持孵化状态,但是通常预计它们会在两年内毕业。 -## 值得考虑的9个项目 +### 值得关注的 9 个项目 -本文不可能涵盖所有的CNCF项目,我将介绍最有趣的9个“已毕业和孵化中”的开源项目。 +本文不可能涵盖所有的 CNCF 项目,我将介绍最有趣的 9 个毕业和孵化的开源项目。 名称|授权类型|简要描述 ---|---|--- [Kubernetes][9] | Apache 2.0 | 容器编排平台 [Prometheus][10] | Apache 2.0 | 系统和服务监控工具 [Envoy][11] | Apache 2.0 | 边缘和服务代理 -[rkt][12] | Apache 2.0 | Pod原生的容器引擎 +[rkt][12] | Apache 2.0 | Pod 原生的容器引擎 [Jaeger][13] | Apache 2.0 | 分布式跟踪系统 -[Linkerd][14] | Apache 2.0 | 无感服务网格 -[Helm][15] | Apache 2.0 | Kubernetes包管理器 +[Linkerd][14] | Apache 2.0 | 透明服务网格 +[Helm][15] | Apache 2.0 | Kubernetes 包管理器 [Etcd][16] | Apache 2.0 | 分布式键值存储 -[CRI-O][17] | Apache 2.0 | 专门用于Kubernetes的轻量级运行时环境 +[CRI-O][17] | Apache 2.0 | 专门用于 Kubernetes 的轻量级运行时环境 我也创建了视频材料来介绍这些项目。 -## 毕业项目 +- [video](https://youtu.be/3cDxYO2GK4w) -已毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了CNCF的准则。 以下是三个最受欢迎的开源CNCF毕业项目。 (请注意,其中一些描述来源于项目的网站并被做了改编。) +### 毕业项目 -### Kubernetes +毕业的项目被认为是成熟的,已被许多组织采用的,并且严格遵守了 CNCF 的准则。以下是三个最受欢迎的开源 CNCF 毕业项目。(请注意,其中一些描述来源于项目的网站并被做了改编。) -Kubernetes! 我们如何在不提及Kubernetes的情况下谈论云原生应用程序? Google发明的Kubernetes无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 +#### Kubernetes(希腊语“舵手”) -什么是容器编排平台? 通常,一个容器引擎本身可以管理几个容器。 但是,当您谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。 这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署,管理,网络和可用性来帮助管理大量的容器。 +Kubernetes! 说起云原生应用,怎么能不提 Kubernetes 呢? Google 发明的 Kubernetes 无疑是最著名的基于容器的应用程序的容器编排平台,而且它还是一个开源工具。 -Docker Swarm和Mesosphere Marathon也是容器编排引擎,但是可以肯定地说Kubernetes在竞争中胜出(至少现在是这样)。Kubernetes还诞生了容器即服务(CaaS)平台如[OKD][18],它是Origin社区针对Kubernetes的发行版,并成了[Red Hat OpenShift][19]的一部分。 +什么是容器编排平台?通常,一个容器引擎本身可以管理几个容器。但是,当你谈论数千个容器和数百个服务时,管理这些容器变得非常复杂。这就是容器编排引擎的用武之地。容器编排引擎通过自动化容器的部署、管理、网络和可用性来帮助管理大量的容器。 -想开始学习请访问[Kubernetes GitHub仓库][9],并从[Kubernetes文档][20]页面访问其文档和学习资源。 +Docker Swarm 和 Mesosphere Marathon 也是容器编排引擎,但是可以肯定地说,Kubernetes 已经赢得了这场比赛(至少现在是这样)。Kubernetes 还催生了像 [OKD][18] 这样的容器即服务(CaaS)平台,它是 Kubernetes 的 Origin 社区发行版,并成了 [Red Hat OpenShift][19] 的一部分。 -### Prometheus +想开始学习,请访问 [Kubernetes GitHub 仓库][9],并从 [Kubernetes 文档][20]页面访问其文档和学习资源。 -Prometheus是2012年在SoundCloud上构建的一个开源系统监控和告警工具。之后,许多公司和组织都使用了Prometheus,并且该项目拥有非常活跃的开发者和用户群体。 现在,它是一个独立于公司的独立维护的开源项目。 +#### Prometheus(普罗米修斯) + +Prometheus 是 2012 年在 SoundCloud 上构建的一个开源的系统监控和告警工具。之后,许多公司和组织都采用了 Prometheus,并且该项目拥有非常活跃的开发者和用户群体。现在,它已经成为一个独立的开源项目,独立于公司之外进行维护。 ![Prometheus’ architecture][21] -Prometheus的架构 +*Prometheus 的架构* -理解Prometheus的最简单方法是可视化一个生产系统,该系统需要24(小时)x365天都可以正常运行。 没有哪个系统是完美的,也有减少故障的技术(称为容错系统)。 但是,如果出现问题,最重要的是尽快识别它。 这就是像Prometheus这样的监控工具的用武之地。Prometheus不仅是容器监控工具,它在云原生应用公司中也最受欢迎。 此外,其他开源监视工具,包括[Grafana][22],都借鉴了Prometheus。 +理解 Prometheus 的最简单方法是可视化一个生产系统,该系统需要 24(小时)x 365(天)都可以正常运行。没有哪个系统是完美的,也有减少故障的技术(称为容错系统),但是,如果出现问题,最重要的是尽快发现问题。这就是像 Prometheus 这样的监控工具的用武之地。Prometheus 不仅仅是一个容器监控工具,但它在云原生应用公司中最受欢迎。此外,其他开源监视工具,包括 [Grafana][22],都借助了 Prometheus。 -开始使用Prometheus的最佳方法是下载其[GitHub仓库][10]。 在本地运行Prometheus很容易,但是您需要安装一个容器引擎。 您可以在[Prometheus网站][23]上查看详细的文档。 +开始使用 Prometheus 的最佳方法是下载其 [GitHub 仓库][10]。在本地运行 Prometheus 很容易,但是你需要安装一个容器引擎。你可以在 [Prometheus 网站][23]上查看详细的文档。 -### Envoy +### Envoy(使者) -Envoy(或Envoy代理)是专为云原生应用设计的开源的边缘代理和服务代理。 由Lyft创建的Envoy是为单一服务和应用而设计的高性能的C++分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。 基于对Nginx,HAProxy,硬件负载均衡器和云负载均衡器等方案了解的基础上,Envoy与每个应用相伴(并行)运行,并对网络进行了高度抽象,最终以平台无关的方式来提供通用功能。 +Envoy(或 Envoy 代理)是专为云原生应用设计的开源的边缘代理和服务代理。由 Lyft 创建的 Envoy 是为单一服务和应用而设计的高性能的 C++ 开发的分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。Envoy 建立在 Nginx、HAProxy、硬件负载均衡器和云负载均衡器等解决方案的基础上,Envoy 与每个应用相伴(并行)运行,并通过提供平台无关的方式提供通用特性来抽象网络。 -当基础设施中的所有服务流量都经过一个Envoy网格时,很容易就可以通过连贯的监测来可视化问题域,调整整体性能,并在单个位置添加基础功能。基本上,Envoy代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。 +当基础设施中的所有服务流量都经过 Envoy 网格时,很容易就可以通过一致的可观测性来可视化问题域,调整整体性能,并在单个位置添加基础功能。基本上,Envoy 代理是一个可帮助组织为生产环境构建容错系统的服务网格工具。 -服务网格应用有很多替代方案,例如Uber的[Linkerd][24](下面会讨论)和[Istio][25]。 Istio通过将其部署为[Sidecar][26]并利用了[Mixer][27]的配置模型,实现了对Envoy的扩展。 Envoy的显著特性有: +服务网格应用有很多替代方案,例如 Uber 的 [Linkerd][24](下面会讨论)和 [Istio][25]。Istio 通过将其部署为 [Sidecar][26] 并利用了 [Mixer][27] 的配置模型,实现了对 Envoy 的扩展。Envoy 的显著特性有: - *所有的“table stakes(入场筹码,引申为基础必备特性)”特性(与控制平面(例如Istio)组合时) - *带载运行时99%数据可达到低延时 - *将L3/L4过滤器作为核心,支持额外的L7过滤器 - *支持gRPC和HTTP / 2(上行/下行) -   *由API驱动,并支持动态配置和热重载 - *重点关注指标收集,跟踪和整体可监测性 +* 包括所有的“入场筹码table stakes(LCTT 译注:引申为基础必备特性)”特性(与 Istio 这样的控制平面组合时) +* 带载运行时 99% 数据可达到低延时 +* 可以作为核心的 L3/L4 过滤器,提供了开箱即用的 L7 过滤器 +* 支持 gRPC 和 HTTP/2(上行/下行) +* 由 API 驱动,并支持动态配置和热重载 +* 重点关注指标收集、跟踪和整体可监测性 +要想了解 Envoy,证实其能力并实现其全部优势,需要丰富的生产级环境运行的经验。你可以在其[详细文档][28]或访问其 [GitHub][11] 仓库了解更多信息。 -要想了解Envoy,证实其能力并意识到其全部优势,需要丰富的在生产级环境运行的经验。 您可以在[详细文档][28]或访问其[GitHub][11]仓库了解更多信息。 +### 孵化项目 -## 孵化项目 +下面是六个最流行的开源的 CNCF 孵化项目。 -下面是最流行的开源的CNCF孵化项目中的六个。 +#### rkt(火箭) -### rkt +rkt, 读作“rocket”,是一个 Pod 原生的容器引擎。它有一个命令行接口用来在 Linux 上运行容器。从某种意义上讲,它和其他容器如 [Podman][29]、Docker 和 CRI-O 相似。 -rkt, 拼为"rocket", 是一个pod原生的容器引擎。它有一个命令行接口用来在Linux上运行容器。从某种意义上讲,它和其他容器如[Podman][29], Docker和CRI-O相似。 +rkt 最初是由 CoreOS (后来被 Red Hat 收购)开发的,你可以在其网站上找到详细的[文档][30],以及在 [GitHub][12] 上访问其源代码。 -rkt最初由CoreOS开发(后来被Red Hat收购),您可以在其网站上找到详细的[文档][30],以及在[GitHub][12]上访问其源代码。 +#### Jaeger(贼鸥) -### Jaeger +Jaeger 是一个开源的端到端的分布式追踪系统,适用于云端应用。在某种程度上,它是像 Prometheus 这样的监控解决方案。但它有所不同,因为其使用场景有所扩展: -Jaeger是面向云原生应用的开源的端到端的分布式跟踪系统。 在某种程度上,它是像Prometheus这样的监控解决方案。但它有所不同,因为其使用场景有所扩展: +* 分布式事务监控 +* 性能和延时优化 +* 根因分析 +* 服务依赖性分析 +* 分布式上下文传播 - * 分布式事务监控 - * 性能和延时优化 - * 根因分析 - * 服务的依赖分析 - * 分布式上下文传播 +Jaeger 是一项 Uber 打造的开源技术。你可以在其网站上找到[详细文档][31],以及在 [GitHub][13] 上找到其源码。 +#### Linkerd +像创建 Envoy 代理的 Lyft 一样,Uber 开发了 Linkerd 开源解决方案用于生产级的服务维护。在某些方面,Linkerd 就像 Envoy 一样,因为两者都是服务网格工具,旨在提供平台级的可观测性、可靠性和安全性,而无需进行配置或代码更改。 -Jaeger是Uber建立的开源的技术。 您可以在其网站上找到[详细文档][31],以及在GitHub上找到其[源码][13]。 +但是,两者之间存在一些细微的差异。 尽管 Envoy 和 Linkerd 充当代理并可以通过所连接的服务进行上报,但是 Envoy 并不像 Linkerd 那样被设计为 Kubernetes Ingress 控制器。Linkerd 的显著特点包括: -### Linkerd +* 支持多种平台(Docker、Kubernetes、DC/OS、Amazon ECS 或任何独立的机器) +* 内置服务发现抽象,可以将多个系统联合在一起 +* 支持 gRPC、HTTP/2 和 HTTP/1.x请 求和所有的 TCP 流量 -像创建Envoy代理的Lyft一样,Uber开发了Linkerd开源解决方案用于生产级的服务维护。在某些方面,Linkerd就像Envoy一样,因为两者都是服务网格工具,旨在提供平台级的可观测性,可靠性和安全性,而无需进行配置或代码更改。 +你可以在 [Linkerd 网站][32]上阅读有关它的更多信息,并在 [GitHub][14] 上访问其源码。 -但是,两者之间存在一些细微的差异。 尽管Envoy和Linkerd充当代理并可以通过所连接的服务进行上报,但是Envoy并不像Linkerd那样被设计为Kubernetes Ingress控制器。 Linkerd的显著功能包括: +#### Helm(舵轮) - *支持多种平台(Docker,Kubernetes,DC / OS,Amazon ECS或单机) - *内置服务发现抽象将多个系统集成在一起 - *支持gRPC,HTTP / 2和HTTP / 1.x请求和所有的TCP流量 +Helm 基本上就是 Kubernetes 的包管理器。如果你使用过 Apache Maven、Maven Nexus 或类似的服务,你就会理解 Helm 的作用。Helm 可帮助你管理 Kubernetes 应用程序。它使用“Helm Chart”来定义、安装和升级最复杂的 Kubernetes 应用程序。Helm 并不是实现此功能的唯一方法;另一个流行的概念是 [Kubernetes Operators][33],它被 Red Hat OpenShift 4 所使用。 +你可以按照其文档中的[快速开始指南][34]或 [GitHub 指南][15]来试用 Helm。 -您可以在[Linkerd网站][32]上阅读有关它的更多信息,并在[GitHub][14]上访问其源码。 +#### Etcd -### Helm +Etcd 是一个分布式的、可靠的键值存储,用于存储分布式系统中最关键的数据。其主要特性有: -Helm基本上是Kubernetes的软件包管理器。 如果您使用过Apache Maven,Maven Nexus或类似的服务,您就会理解Helm的作用。 Helm可帮助您管理Kubernetes应用程序。 它使用“Helm图”来定义,安装和升级最复杂的Kubernetes应用程序。 Helm并不是实现此功能的唯一方法; 另一个流行的概念是[Kubernetes Operators][33],它被Red Hat OpenShift 4所使用。 +* 定义明确的、面向用户的 API(gRPC) +* 自动 TLS,可选的客户端证书验证 +* 速度(可达每秒 10,000 次写入) +* 可靠性(使用 Raft 实现分布式) -您可以按照其文档中的[快速开始指南][34]或[GitHub指南][15]来试用Helm。 +Etcd 是 Kubernetes 和许多其他技术的默认的内置数据存储方案。也就是说,它很少独立运行或作为单独的服务运行;相反,它以集成到 Kubernetes、OKD/OpenShift 或其他服务中的形式来运作。还有一个 [etcd Operator][35] 可以用来管理其生命周期并解锁其 API 管理功能: -### Etcd +你可以在 [etcd 文档][36]中了解更多信息,并在 [GitHub][16]上访问其源码。 -Etcd是用于分布式系统中最关键数据的分布式的,可靠的键值存储。 其主要特性有: +#### CRI-O - *定义明确的,面向用户的API(gRPC) - *客户端证书验证可选的自动TLS - *速度(可达每秒10,000次写入) - *可靠性(使用Raft实现分布式) +CRI-O 是 Kubernetes 运行时接口的 OCI 兼容实现。CRI-O 用于各种功能,包括: -Etcd是Kubernetes和许多其他技术的默认的内置数据存储方案。也就是说,它很少独立运行或作为单独的服务运行; 相反,它利用了集成到Kubernetes,OKD / OpenShift或其他服务中的一个。 还有[etcd Operator][35]来管理其生命周期并解锁其API管理功能: +* 使用 runc(或遵从 OCI 运行时规范的任何实现)和 OCI 运行时工具运行 +* 使用容器/镜像进行镜像管理 +* 使用容器/存储来存储和管理镜像层 +* 通过容器网络接口(CNI)来提供网络支持 -您可以在[etcd文档][36]中了解更多信息,并在GitHub上访问其[源码][16]。 - -### CRI-O - -CRI-O是Kubernetes运行时接口的OCI兼容实现。CRI-O用于各种功能,包括: - - *使用runc(或遵从OCI运行时规范的任何实现)和OCI运行时工具运行 - *使用容器/镜像进行镜像管理 - *使用容器/存储来存储和管理镜像层 - *通过容器网络接口(CNI)来提供网络支持 - -CRI-O提供了大量的[文档][37],包括指南,教程,文章,甚至播客,您还可以访问其[GitHub页面][17]。 +CRI-O 提供了大量的[文档][37],包括指南、教程、文章,甚至播客,你还可以访问其 [GitHub 页面][17]。 * * * -我错过了其他有趣且开源的云原生项目吗? 请在评论中提醒我。 +我错过了其他有趣且开源的云原生项目吗?请在评论中提醒我。 + -------------------------------------------------------------------------------- via: https://opensource.com/article/19/8/cloud-native-projects @@ -210,7 +208,7 @@ via: https://opensource.com/article/19/8/cloud-native-projects 作者:[Bryant Son][a] 选题:[lujun9972][b] 译者:[messon007](https://github.com/messon007) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 024afe741ecff53cf874923b75d68d5293d3a9ef Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Apr 2020 22:31:44 +0800 Subject: [PATCH 210/394] PUB @messon007 https://linux.cn/article-12135-1.html --- ...814 9 open source cloud native projects to consider.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) rename {translated/tech => published}/20190814 9 open source cloud native projects to consider.md (99%) diff --git a/translated/tech/20190814 9 open source cloud native projects to consider.md b/published/20190814 9 open source cloud native projects to consider.md similarity index 99% rename from translated/tech/20190814 9 open source cloud native projects to consider.md rename to published/20190814 9 open source cloud native projects to consider.md index 6832854007..0c2ffabd03 100644 --- a/translated/tech/20190814 9 open source cloud native projects to consider.md +++ b/published/20190814 9 open source cloud native projects to consider.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (messon007) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12135-1.html) [#]: subject: (9 open source cloud native projects to consider) [#]: via: (https://opensource.com/article/19/8/cloud-native-projects) [#]: author: (Bryant Son https://opensource.com/users/brsonhttps://opensource.com/users/marcobravo) @@ -116,7 +116,7 @@ Prometheus 是 2012 年在 SoundCloud 上构建的一个开源的系统监控和 开始使用 Prometheus 的最佳方法是下载其 [GitHub 仓库][10]。在本地运行 Prometheus 很容易,但是你需要安装一个容器引擎。你可以在 [Prometheus 网站][23]上查看详细的文档。 -### Envoy(使者) +#### Envoy(使者) Envoy(或 Envoy 代理)是专为云原生应用设计的开源的边缘代理和服务代理。由 Lyft 创建的 Envoy 是为单一服务和应用而设计的高性能的 C++ 开发的分布式代理,同时也是为由大量微服务组成的服务网格架构而设计的通信总线和通用数据平面。Envoy 建立在 Nginx、HAProxy、硬件负载均衡器和云负载均衡器等解决方案的基础上,Envoy 与每个应用相伴(并行)运行,并通过提供平台无关的方式提供通用特性来抽象网络。 @@ -197,8 +197,6 @@ CRI-O 是 Kubernetes 运行时接口的 OCI 兼容实现。CRI-O 用于各种功 CRI-O 提供了大量的[文档][37],包括指南、教程、文章,甚至播客,你还可以访问其 [GitHub 页面][17]。 -* * * - 我错过了其他有趣且开源的云原生项目吗?请在评论中提醒我。 -------------------------------------------------------------------------------- From 0c36d0e031235fae564f22d21c5f3ec0f5d08437 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Apr 2020 23:24:30 +0800 Subject: [PATCH 211/394] PRF @geekpi --- ...or creating Raspberry Pi SD card images.md | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md b/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md index c70870d6e0..70285bfa91 100644 --- a/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md +++ b/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (A handy utility for creating Raspberry Pi SD card images) @@ -9,10 +9,12 @@ 一个方便的用于创建树莓派 SD 卡镜像的程序 ====== -开始在 Mac 上使用 Raspberry Pi Imager + +> 开始在 Mac 上使用 Raspberry Pi Imager。 + ![Raspberries with pi symbol overlay][1] -有多种购买树莓派的方法,同时树莓派会取决于你从哪里购买的从而可能附带或不附带操作系统。将操作系统安装到树莓派上就是用系统镜像“刷新” SD 卡。为了使之尽可能简单,[树莓派基金会][2]引入了 Raspberry Pi Imager,你可以将其下载到所有主流平台。以下这个有用的新工具介绍。 +有多种购买树莓派的方法,根据你的购买渠道的不同,可能附带或不附带操作系统。要在树莓派上安装操作系统,只需将操作系统镜像 “闪存” 到 SD 卡即可。为了使之尽可能简单,[树莓派基金会][2]推出一个 Raspberry Pi Imager 实用程序,你可以在所有主流平台上下载它。下面就来简单介绍一下这个有用的新工具。 ### 安装 Imager @@ -22,7 +24,7 @@ Mac 的安装包是常规的 DMG 镜像,它会挂载到你的桌面,然后 ![Raspberry Pi Imager installer][4] -只需将可爱的树莓图标拖到 Application 文件夹,就可以完成。从 Launchpad 中调用它,你会看到一系列简单的按钮和菜单供你选择。真的不能比这更简单了: +只需将可爱的树莓图标拖到“应用”文件夹,就可以完成。从启动台中调用它,你会看到一系列简单的按钮和菜单供你选择。真的不能比这更简单了: ![Raspberry Pi Imager home screen][5] @@ -32,13 +34,13 @@ Mac 的安装包是常规的 DMG 镜像,它会挂载到你的桌面,然后 ### 安装一些镜像 -我决定使用 16g 的 micro SD 卡。我选择了默认的 Raspbian 镜像,选择已连接的 USB/SD 设备,然后按下 WRITE。这是一个简短的演示: +我决定使用 16g 的 micro SD 卡。我选择了默认的 Raspbian 镜像,选择已连接的 USB/SD 设备,然后按下 “WRITE” 按钮。这是一个简短的演示: ![Raspberry Pi Imager demo][6] -我没有在此处发布完整信息。我相信它在下载镜像后写入,对于我的无线连接这花费了几分钟完成。该过程在完成之前先经过写入,然后经过验证周期。完成后,我弹出设备,并将卡插入到我的 RPi 3 中,然后按照通常的图形 Raspbian 安装向导和桌面环境进行设置。 +我没有在此处发布整个操作过程。我认为它是在写入的时候下载了镜像,对于我的无线连接这花费了几分钟。该过程在完成之前要先经过写入,然后经过验证环节。完成后,我弹出设备,并将卡插入到我的树莓派 3 中,然后按照通常的图形 Raspbian 安装向导和桌面环境进行设置。 -这对我来说还不够。我每天都会下载许多 Linux,今天我还在寻找更多。我回到了[树莓派下载][3]页面,并下载了 RISC OS 镜像。这个过程几乎一样容易。下载 RISCOSPi.5.24.zip 文件,将其解压缩,然后找到 ro524-1875M.img 文件。在 “Operating System” 按钮中,我选择了 “Use Custom” 并选择了所需的镜像文件。这个过程几乎是相同的。唯一真正的区别是我必须在下载目录中搜寻并选择一个镜像。文件写完后,回到树莓派 3,RISC OS 可以使用了。 +这对我来说还不够。我每天都会下载许多 Linux,今天我还在寻找更多。我回到了[树莓派下载][3]页面,并下载了 RISC OS 镜像。这个过程几乎一样容易。下载 RISCOSPi.5.24.zip 文件,将其解压缩,然后找到 ro524-1875M.img 文件。在 “Operating System” 按钮中,我选择了 “Use Custom” 并选择了所需的镜像文件。这个过程几乎是相同的。唯一真正的不同是我必须在下载目录中搜寻并选择一个镜像。文件写完后,回到树莓派 3,RISC OS 可以使用了。 ### 对 USB C 的抱怨 @@ -46,11 +48,11 @@ Mac 的安装包是常规的 DMG 镜像,它会挂载到你的桌面,然后 ![USB C adapter][7] -是的,那是一个 USB C 到 USB A 适配器,然后是一个 USB 到 SD 卡读卡器,以及一个 SD 到 micro SD 适配器。我可能可以在网上找到一些东西来简化此过程,但这是支持我家五花八门的 Mac、Windows 和 Linux 主机的部分。够了,但我希望你能从这种混乱中得到一笑。 +是的,那是一个 USB C 到 USB A 适配器,然后是一个 USB 到 SD 卡读卡器,以及一个 SD 到 micro SD 适配器。我可能可以在网上找到一些东西来简化此过程,但这些都是我手头有的部件,以支持我家五花八门的 Mac、Windows 和 Linux 主机。说到这里就不多说了,但我希望你能从这些疯狂的东西中得到一个笑点。 ### 总结 -新的 Raspberry Pi Imager 是一种简单有效的工具来快速烧录树莓派镜像。[BalenaEtcher][8] 是用于对可移动设备进行烧录的类似工具,但是新的 Raspberry Pi Imager 通过消除获取那些常见镜像的步骤,使普通树莓派系统安装(如 Raspbian)更加容易。 +新的 Raspberry Pi Imager 是一种简单有效的工具,可以快速烧录树莓派镜像。[BalenaEtcher][8] 是用于对可移动设备进行烧录的类似工具,但是新的 Raspberry Pi Imager 通过省去了获取那些常见镜像的步骤,使普通树莓派系统安装(如 Raspbian)更加容易。 -------------------------------------------------------------------------------- @@ -59,7 +61,7 @@ via: https://opensource.com/article/20/4/raspberry-pi-imager-mac 作者:[James Farrell][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 76a90602890d470e26805fe4eaf24e2bd32be653 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 21 Apr 2020 23:32:24 +0800 Subject: [PATCH 212/394] PUB @geekpi https://linux.cn/article-12136-1.html --- ... handy utility for creating Raspberry Pi SD card images.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200413 A handy utility for creating Raspberry Pi SD card images.md (98%) diff --git a/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md b/published/20200413 A handy utility for creating Raspberry Pi SD card images.md similarity index 98% rename from translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md rename to published/20200413 A handy utility for creating Raspberry Pi SD card images.md index 70285bfa91..9fd472c01d 100644 --- a/translated/tech/20200413 A handy utility for creating Raspberry Pi SD card images.md +++ b/published/20200413 A handy utility for creating Raspberry Pi SD card images.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12136-1.html) [#]: subject: (A handy utility for creating Raspberry Pi SD card images) [#]: via: (https://opensource.com/article/20/4/raspberry-pi-imager-mac) [#]: author: (James Farrell https://opensource.com/users/jamesf) From af5bcac0b200667e223b853f0cbd67a200d6f755 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 00:53:54 +0800 Subject: [PATCH 213/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200422=20How=20?= =?UTF-8?q?to=20Check=20the=20Available=20Network=20Interfaces,=20Associat?= =?UTF-8?q?ed=20IP=20Addresses,=20MAC=20Addresses,=20and=20Interface=20Spe?= =?UTF-8?q?ed=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md --- ...Addresses, and Interface Speed on Linux.md | 202 ++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md diff --git a/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md b/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md new file mode 100644 index 0000000000..ca7e8fe2aa --- /dev/null +++ b/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md @@ -0,0 +1,202 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux) +[#]: via: (https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux +====== + +By default when you set up the server you will configure the primary network interface. + +This is part of the build work that everyone does. + +Sometimes you may need to configure an additional network interface for several reasons. + +This could be a network bonding/teaming or high availability or a separate interface for application requirements or backups. + +To do so, you need to know how many interfaces your computer has and their speed to configure it. + +There are many commands to check for available network interfaces, but we only use the IP command. + +Later we will write a separate article with all these tools. + +In this tutorial, we will show you the Available Network Interface Card (NIC) information, such as the interface name, associated IP address, MAC address, and interface speed. + +### What’s IP Command + +**[IP command][1]** is similar to ifconfig, which is used to for assigning Static IP Address, Route & Default Gateway, etc., + +``` +# ip a + +1: lo: mtu 65536 qdisc noqueue state UNKNOWN + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever +2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000 + link/ether fa:16:3e:a0:7d:5a brd ff:ff:ff:ff:ff:ff + inet 192.168.1.101/24 brd 192.168.1.101 scope global eth0 + inet6 fe80::f816:3eff:fea0:7d5a/64 scope link + valid_lft forever preferred_lft forever +``` + +### What’s ethtool Command + +The ethtool is used to query or control network driver and hardware settings. + +``` +# ethtool eth0 +``` + +### 1) How to Check the Available Network Interfaces on Linux Using the IP Command + +When you run the IP command without any arguments, it gives you plenty of information, but if you only need the available network interfaces, use the following customized IP command. + +``` +# ip a |awk '/state UP/{print $2}' + +eth0: +eth1: +``` + +### 2) How to Check the IP Address of a Network Interface on Linux Using the IP Command + +If you only want to see which IP address is assigned to which interface, use the following customized IP command. + +``` +# ip -o a show | cut -d ' ' -f 2,7 +or +ip a |grep -i inet | awk '{print $7, $2}' + +lo 127.0.0.1/8 +192.168.1.101/24 +192.168.1.102/24 +``` + +### 3) How to Check the Network Interface Card MAC Address on Linux Using the IP Command + +If you only want to see the network interface name and the corresponding MAC address, use the following format. + +To check a specific network interface MAC address. + +``` +# ip link show dev eth0 |awk '/link/{print $2}' +00:00:00:55:43:5c +``` + +To check MAC address for all network interface. + +``` +# vi /opt/scripts/mac-addresses.sh + +#!/bin/sh +ip a |awk '/state UP/{print $2}' | sed 's/://' | while read output; +do +echo $output: +ethtool -P $output +done +``` + +Run the below shell script to get the MAC address for multiple network interfaces. + +``` +# sh /opt/scripts/mac-addresses.sh + +eth0: +Permanent address: 00:00:00:55:43:5c +eth1: +Permanent address: 00:00:00:55:43:5d +``` + +### 4) How to Check the Network Interface Port Speed on Linux Using the ethtool Command + +If you want to check the network interface port speed on Linux, use the ethtool command. + +To check the speed of a particular network interface port. + +``` +# ethtool eth0 |grep "Speed:" + +Speed: 10000Mb/s +``` + +To check the port speed for all network interfaces. + +``` +# vi /opt/scripts/port-speed.sh + +#!/bin/sh +ip a |awk '/state UP/{print $2}' | sed 's/://' | while read output; +do +echo $output: +ethtool $output |grep "Speed:" +done +``` + +Run the below shell script to get the port speed for multiple network interfaces. + +``` +# sh /opt/scripts/port-speed.sh + +eth0: +Speed: 10000Mb/s +eth1: +Speed: 10000Mb/s +``` + +### 5) Shell Script to Verify Network Interface Card Information + +This **[shell script][2]** allows you to gather all of the above information, such as network interface names, IP addresses of network interfaces, MAC addresses of network interfaces, and the speed of a network interface port. + +``` +# vi /opt/scripts/nic-info.sh + +#!/bin/sh +hostname +echo "-------------" +for iname in $(ip a |awk '/state UP/{print $2}') +do +echo "$iname" +ip a | grep -A2 $iname | awk '/inet/{print $2}' +ip a | grep -A2 $iname | awk '/link/{print $2}' +ethtool $iname |grep "Speed:" +done +``` + +Run the below shell script to check network card information. + +``` +# sh /opt/scripts/nic-info.sh + +vps.2daygeek.com +---------------- +eth0: +192.168.1.101/24 +00:00:00:55:43:5c +Speed: 10000Mb/s +eth1: +192.168.1.102/24 +00:00:00:55:43:5d +Speed: 10000Mb/s +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/ + +作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/ip-command-configure-network-interface-usage-linux/ +[2]: https://www.2daygeek.com/category/shell-script/ From 3f7f92f8752007ee6802f40fee6ff44f2b4c70c9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:00:34 +0800 Subject: [PATCH 214/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200422=20Things?= =?UTF-8?q?=20You=20Should=20Know=20About=20Ubuntu=2020.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md --- ...ings You Should Know About Ubuntu 20.04.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md diff --git a/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md b/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md new file mode 100644 index 0000000000..48ac52bece --- /dev/null +++ b/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md @@ -0,0 +1,129 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Things You Should Know About Ubuntu 20.04) +[#]: via: (https://itsfoss.com/ubuntu-20-04-faq/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Things You Should Know About Ubuntu 20.04 +====== + +[Ubuntu 20.04 release][1] is just around the corner and you may have a few questions and doubts regarding upgrades, installation etc. + +I hosted some Q&A sessions on various social media channels to answer doubts of readers like you. + +I am going to list these common questions about Ubuntu 20.04 with their answers. I hope it helps you clear the doubts you have. And if you still have questions, feel free to ask in the comment section below. + +### Ubuntu 20.04: Your Questions Answered + +![][2] + +Just to clarify, some of the answers here maybe influenced by my personal opinion. If you are an experienced Ubuntu user, some of the questions may sound _silly_ to you but it not to the new Ubuntu users. + +#### When will Ubuntu 20.04 be released? + +Ubuntu 20.04 LTS is releasing on 23rd April 2020. All the participating flavors like Kubuntu, Lubuntu, Xubuntu, Budgie, MATE etc will have their 20.04 release available on the same day. + +#### What are the system requirements for Ubuntu 20.04? + +For the default GNOME version, you should have a minimum 4 GB of RAM, 2 GHz dual core processor and at least 25 GB of disk space. + +Other [Ubuntu flavors][3] may have different system requirements. + +#### Can I use Ubuntu 20.04 on 32-bit systems? + +No, not at all. You cannot use Ubuntu 20.04 on 32-bit systems. Even if you are using 32-bit Ubuntu 18.04, you cannot upgrade to Ubuntu 20.04. There is ISO for 32-bit systems for past several years. + +![Error while upgrading 32-bit Ubuntu 18.04 to Ubuntu 20.04][4] + +#### Can I use Wine on Ubuntu 20.04? + +Yes, you can still use Wine on Ubuntu 20.04 as the 32-bit lib support is still there for packages needed by Wine and [Steam Play][5]. + +#### Do I have to pay for Ubuntu 20.04 or purchase a license? + +No, Ubuntu is completely free to use. You don’t have to buy a license key or activate Ubuntu like you do in Windows. + +The download section of Ubuntu requests you to donate some money but it’s up to you if you want to give some money for developing this awesome operating system. + +#### What GNOME version does it have? + +Ubuntu 20.04 has GNOME 3.36. + +#### Does Ubuntu 20.04 have better performance than Ubuntu 18.04? + +Yes, in several aspects. Ubuntu 20.04 installs faster and it even boost faster. I have shown the performance comparison in the video below at 4:40 minutes. + +The scroll, Windows animation and other UI elements are more fluid and give a smoother experience in GNOME 3.36. + +#### How long will Ubuntu 20.04 be supported? + +It is a long-term support (LTS) release and like any LTS release, it will be supported for five years. Which means that Ubuntu 20.04 will get security and maintenance updates until April 2025. + +#### Will I lose data while upgrading to Ubuntu 20.04? + +You can upgrade to Ubuntu 20.04 from Ubuntu 19.10 or Ubuntu 18.04. You don’t need to create a live USB and install from it. All you need is a good internet connection that can download around 1.5 GB of data. + +Upgrading from an existing system doesn’t harm your files. You should have all your files as it is and most of your existing software should be either have the same version or upgraded versions. + +If you have used some third-party tools or [additional PPA][6], the upgrade procedure will disable them. You can enable these additional repositories again if they are available for Ubuntu 20.04. + +Upgrading takes like an hour and after a restart, you will be logged in to the newer version. + +Though your data will not be touched and you won’t lose system files and configurations, it is always a good idea to make backup of important data externally. + +#### When will I get to upgrade to Ubuntu 20.04? + +![][7] + +If you are using Ubuntu 19.10 and have correct update settings in place (as mentioned in the earlier sections), you should be notified for upgrading to Ubuntu 20.04 within a few days of Ubuntu 18.04 release. + +For Ubuntu 18.04 users, it may take some weeks before they are officially notified of the availability of Ubuntu 18.04. Probably, you may get the prompt after the first point release of Ubuntu 20.04.1. + +#### If I upgrade to Ubuntu 20.04, can I downgrade to 19.10 or 18.04? + +No, you cannot. While upgrading to a newer version is easy, there is no option to downgrade.  If you want to go back to Ubuntu 18.04, you’ll have [install Ubuntu 18.04][8] again. + +#### I am using Ubuntu 18.04 LTS. Should I Upgrade to Ubuntu 20.04 LTS? + +That depends upon you. If you are impressed by the new features in Ubuntu 20.04 and want to get your hands on it, you should upgrade. + +If you want a more stable system, I advise waiting for the first point release Ubuntu 20.04.1 release that will have bug fixes in the new release. 20.04.1 should typically be coming approximately two months after the release of Ubuntu 20.04. + +In either case, I recommend upgrading to Ubuntu 20.04 sooner or later. Ubuntu 20.04 has newer kernel, performance improvement and above all newer versions of software available in the repository. + +Make a backup on external disk and with a good internet connectivity, the upgrade should not be an issue. + +#### Should I do a fresh install of Ubuntu 20.04 or upgrade to it from 18.04/19.10? + +If you have a choice, make a backup of your data and do a fresh install of Ubuntu 20.04. + +Upgrading to 20.04 from an existing version is a convenient option. However, in my opinion, it still keeps some traces/packages of the older version. A fresh install is always cleaner. + +#### Any other questions about Ubuntu 20.04? + +If you have any other doubts regarding Ubuntu 20.04, please feel free to leave a comment below. If you think some other information should be added to the list, please let me know. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-20-04-faq/ + +作者:[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/ubuntu-20-04-release-features/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu_20_04_faq.jpg?ssl=1 +[3]: https://itsfoss.com/which-ubuntu-install/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-32-bit.jpg?ssl=1 +[5]: https://itsfoss.com/steam-play/ +[6]: https://itsfoss.com/ppa-guide/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/upgrade-ubuntu-20-04.jpg?ssl=1 +[8]: https://itsfoss.com/install-ubuntu/ From b551ddfdda71a18754e404704cd34a5c96afb70d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:01:13 +0800 Subject: [PATCH 215/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20How=20?= =?UTF-8?q?I=20use=20Hugo=20for=20my=20classroom's=20open=20source=20CMS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md --- ...Hugo for my classroom-s open source CMS.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md diff --git a/sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md b/sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md new file mode 100644 index 0000000000..bef4b09a9a --- /dev/null +++ b/sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I use Hugo for my classroom's open source CMS) +[#]: via: (https://opensource.com/article/20/4/hugo-classroom) +[#]: author: (Peter Cheer https://opensource.com/users/petercheer) + +How I use Hugo for my classroom's open source CMS +====== +This open source software streamlines text editing while leaving room +for customization. +![Digital hand surrounding by objects, bike, light bulb, graphs][1] + +People love Markdown text with good reason—it is easy to write, easy to read, easy to edit, and it can be converted to a wide range of other text mark up formats. While Markdown text is very good for content creation and manipulation, it imposes limitations on the options for content display. + +If we could combine the virtues of Markdown with the power and flexibility of Cascading Style Sheets, HTML5, and JavaScript, that would be something special. One of the programs trying to do this is [Hugo][2]. Hugo was created in 2013 by Steve Francia; it is cross-platform and open source under an Apache 2.0 license with an active developer community and a growing user base. + +The basic concept is that pieces of content, such as web pages or blog posts, written in Markdown and associated with metadata, are converted into HTML and combined with templates and themes to produce a complete web site. The power and flexibility come through these themes and templates or changing the default behaviors of Hugo. This power comes with a degree of unavoidable complexity, but there are lots of [pre-built templates][3] available if you lack the time or inclination to make your own. + +Installing Hugo on my Linux machine was quick and easy. Starting a new project is as simple as typing **hugo new site quickstart** at the command line which creates a new project with this folder structure: + + * **archetypes**: Content template files that contain preconfigured front matter metadata (date, title, draft). You can create new archetypes with custom front matter fields. + * **assets**: Stores all the files, which are processed by Hugo Pipes (e.g., CSS/Sass files). This directory is not created by default. + * **config.toml**: The default site config file. + * **content**: Where all the content Markdown files live. + * **data**: Used to store configuration files that can be used by Hugo when generating your website. + * **layouts**: Stores templates as .html files. + * **static**: Stores all the static content—images, CSS, JavaScript, etc. + * **themes**: For the Hugo theme of your choice. + + + +The Markdown files in the content folder can be created manually or by Hugo and edited with any text editor or your Markdown creation tool of choice. If created manually, you will need to add any metadata that is needed. I prefer to use [Ghostwriter][4] for writing Markdown. Images are usually kept in a sub-folder in the static folder. Site development can proceed quickly, as Hugo includes a web server for testing and pre-viewing. + +To check your work, type **hugo server** at the command line to start the server. By default, Hugo will not publish: + + * Content with a future **publishdate** value. + * Content with **draft: true** status. + * Content with a past **expirydate** value. + + + +Adding **hugo server -D** will include draft articles, and Hugo can be configured to mark all new articles as draft. After starting the web server, you can see your work in a web browser at localhost:1313. Once the server is started by default, it will automatically reload the browser window when it detects a change to one of your files. + +There are tasks Markdown cannot do that need some HTML code. Hugo recognizes this but believes in keeping Markdown code as clean, simple, and uncluttered as possible. Hugo does this with shortcodes such as **{{< youtube id= "w7Ft2ymGmfc" autoplay= "true">}}**, which will embed the YouTube video with id. w7Ft2ymGmfc. There are quite a few pre-built shortcodes for common tasks, but it is also possible to create your own for particular jobs. + +I work in education quite a lot and wanted to include some interactive puzzles and questions on my Hugo-generated website. To get the output looking like this: + +![JClic shortcode][5] + +I created the activities with an open source Java program called [JClic][6], exported them as HTML5, put that into static/activities/excel, and displayed it in an iframe. + +The HTML code, which would spoil the nice clean Markdown content, looks like this: + + +``` +    <[iframe][7] +       src="/activity/excel/index.html" +       title="Activity" +       height="400" +       frameborder="0" +       marginwidth="0" +       marginheight="0" +       scrolling="no" +       style="border: 1px solid #CCC; border-width: 1px; margin-bottom: 20px; width: 100%;" +       allowfullscreen="true"> +    </[iframe][7]> +``` + +The code is saved in layouts/shortcodes as **activity.html** + +This makes the shortcode placed inside my Markdown file **{{<activity>}}**, which is much neater. + +When your project is ready, you can build it with the **hugo** command; this will create a public folder and generate the website in it. Hugo has a number of built-in deployment options for different hosting providers—basically, you deploy your site by copying the public folder to your production web server. There is a lot more to Hugo that I haven't even gotten to yet, including configuration options, importing content from other static site generators and Wordpress, display data from JSON files, syntax highlighting of source code, and the fact that it is very fast (an advantage when working with large sites). + +In many software tools, ease-of-use comes at the expense of flexibility, or vice-versa; Hugo makes a largely successful attempt at including both. For basic use with Markdown content and a pre-built theme, Hugo is easy to use and produces rapid results. Alternatively, if you have the need to alter the configuration settings or dive in and create your own themes, shortcodes, templates, or metadata schemes, that choice is open to you. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/hugo-classroom + +作者:[Peter Cheer][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/petercheer +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesk12_rh_021x_0.png?itok=fvorN0e- (Digital hand surrounding by objects, bike, light bulb, graphs) +[2]: https://gohugo.io/ +[3]: https://themes.gohugo.io/ +[4]: http://github.com/wereturtle/ghostwriter +[5]: https://opensource.com/sites/default/files/uploads/jclic_shortcode.png (JClic shortcode) +[6]: https://clic.xtec.cat/legacy/en/index.html +[7]: http://december.com/html/4/element/iframe.html From c832e9cdb82144acafba47bd12e77648bdc1a065 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:02:06 +0800 Subject: [PATCH 216/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20Using?= =?UTF-8?q?=20Python=20to=20visualize=20COVID-19=20projections?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200421 Using Python to visualize COVID-19 projections.md --- ...ython to visualize COVID-19 projections.md | 255 ++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 sources/tech/20200421 Using Python to visualize COVID-19 projections.md diff --git a/sources/tech/20200421 Using Python to visualize COVID-19 projections.md b/sources/tech/20200421 Using Python to visualize COVID-19 projections.md new file mode 100644 index 0000000000..96fcb61521 --- /dev/null +++ b/sources/tech/20200421 Using Python to visualize COVID-19 projections.md @@ -0,0 +1,255 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using Python to visualize COVID-19 projections) +[#]: via: (https://opensource.com/article/20/4/python-data-covid-19) +[#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta) + +Using Python to visualize COVID-19 projections +====== +I'll demonstrate how to create two visualizations of the spread of a +virus across the globe, provided open data and using open source +libraries. +![Colorful sound wave graph][1] + +Using [Python][2] and some graphing libraries, you can project the total number of confirmed cases of COVID-19, and also display the total number of deaths for a country (this article uses India as an example) on a given date. Humans sometimes need help interpreting and processing the meaning of data, so this article also demonstrates how to create an animated horizontal bar graph for five countries, showing the variation of cases by date. + +### Projecting confirmed cases and deaths for India + +This is done in three steps. + +#### 1\. Download data + +Scientific data isn't always open, but fortunately, many modern science and healthcare organizations are eager to share information with each other and the public. Data about COVID-19 cases is available online, and it's updated frequently. + +To parse the data, you first must download it:  + +Load the data directly into a Pandas DataFrame. Pandas provides a function, **read_csv()**, which can take a URL and give back a DataFrame object, as shown below: + + +``` +import pycountry +import plotly.express as px +import pandas as pd +URL_DATASET = r'' +df1 = pd.read_csv(URL_DATASET) +print(df1.head(3))  # Get first 3 entries in the dataframe +print(df1.tail(3))  # Get last 3 entries in the dataframe +``` + +The top row of the data set contains column names: + + 1. Date + 2. Country + 3. Confirmed + 4. Recovered + 5. Deaths + + + +The output of the **head** query includes a unique identifier (not listed as a column) plus an entry for each column: + + +``` +0 2020-01-22 Afghanistan 0 0 0 +1 2020-01-22 Albania 0 0 0 +1 2020-01-22 Algeria 0 0 0 +``` + +The output of the **tail** query is similar but contains the tail end of the data set: + + +``` +12597 2020-03-31 West Bank and Gaza 119 18 1 +12598 2020-03-31 Zambia 35 0 0 +12599 2020-03-31 Zimbabwe 8 0 1 +``` + +From the output, you can see that the DataFrame (**df1**) has the following columns: + + 1. Date + 2. Country + 3. Confirmed + 4. Recovered + 5. Dead + + + +Further, you can see that the **Date** column has entries starting from January 22 to March 31. This database is updated daily, so you will have current values. + +#### 2\. Select data for India + +In this step, we will select only those rows in the DataFrame that include India. This is shown in the script below: + + +``` +#### ----- Step 2 (Select data for India)---- +df_india = df1[df1['Country'] == 'India'] +print(df_india.head(3)) +``` + +#### 3\. Plot data + +Here we create a bar chart. We will put the dates on the X-axis and the number of confirmed cases and the number of deaths on the Y-axis. There are a few noteworthy things about this part of the script which are as follows: + + * The line of code: **plt.rcParams["_figure.figsize"_]=20,20** is meant only for Jupyter. So remove it if you are using some other IDE. + + * Notice the line of code: **ax1 = plt.gca()**. To ensure that both the plots i.e. for confirmed cases as well as for deaths are plotted on the same graph, we need to give to the second graph the **ax** object of the plot. So we use **gca()** to do this. (By the way, 'gca' stands for 'get current axis'). + + + + +The complete script is given below: + + +``` +#  Author:- Anurag Gupta # email:- [999.anuraggupta@gmail.com][3] +%matplotlib inline +import matplotlib.pyplot as plt +import pandas as pd + +#### ----- Step 1 (Download data)---- +URL_DATASET = r'' +df1 = pd.read_csv(URL_DATASET) +# print(df1.head(3))  # Uncomment to see the dataframe + +#### ----- Step 2 (Select data for India)---- +df_india = df1[df1['Country'] == 'India'] +print(df_india.head(3)) + +#### ----- Step 3 (Plot data)---- +# Increase size of plot +plt.rcParams["figure.figsize"]=20,20  # Remove if not on Jupyter +# Plot column 'Confirmed' +df_india.plot(kind = 'bar', x = 'Date', y = 'Confirmed', color = 'blue') + +ax1 = plt.gca() +df_india.plot(kind = 'bar', x = 'Date', y = 'Deaths', color = 'red', ax = ax1) +plt.show() +``` + +The entire script is [available on GitHub][4]. + +### Creating an animated horizontal bar graph for five countries + +Note for Jupyter: To run this in Jupyter as a dynamic animation rather than as a static png, you need to add a magic command at the beginning of your cell, namely: **%matplotlib notebook**. This will keep the figure alive instead of displaying a static png file and can hence also show animations. If you are on another IDE, remove this line. + +#### 1\. Download the data + +This step is exactly the same as in the previous script, and therefore, it need not be repeated. + +#### 2\. Create a list of all dates + +If you examine the data you downloaded, you notice that it has a column **Date**. Now, this column has a date value for each country. So the same date is occurring a number of times. We need to create a list of dates with only unique values. This will be used on the X-axis of our bar charts. We have a line of code like: **list_dates = df[_‘Date’_].unique()**. The **unique()** method will pick up only the unique values for each date. + +#### 3\. Pick five countries and create an **ax** object + +Take a list of five countries. (You can choose whatever countries you prefer, or even increase or decrease the number of countries). I have also taken a list of five colors for the bars of each country. (You can change this too if you like). One important line of code here is: **fig, ax = plt.subplots(figsize=(15, 8))**. This is needed to create an **ax** object. + +#### 4\. Write the call back function + +If you want to do animation in Matplotlib, you need to create an object of a class called **matplotlib.animation.FuncAnimation**. The signature of this class is available online. The constructor of this class, apart from other parameters, also takes a parameter called **func**, and you have to give this parameter a callback function. So in this step, we will write the callback function, which is repeatedly called in order to render the animation. + +#### 5\. Create **FuncAnimation** object + +This step has partly been explained in the previous step. + +Our code to create an object of this class is: + + +``` +my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, +                    frames= list_dates, blit=True, +                    interval=20) +``` + +The three important parameters to be given are: + + * **fig**, which must be given a fig object, which we created earlier. + * **func**, which must be the call back function. + * **frames**, which must contain the variable on which the animation is to be done. Here in our case, it will be the list of dates we created earlier. + + + +#### 6\. Save the animation to an mp4 file + +You can save the animation created into an mp4 file. But for this you need **ffmpeg**. You can download this using pip by **pip install ffmpeg-python**, or using conda (on Jupyter) **install -c conda-forge ffmpeg**. + +And finally, you can run the animation using **plt.show()**. Please note that on many platforms, the **ffmpeg** may not work properly and may require further "tweaking." + + +``` +%matplotlib notebook +#  Author:- Anurag Gupta # email:- [999.anuraggupta@gmail.com][3] +import pandas as pd +import matplotlib.pyplot as plt +import matplotlib.animation as animation +from time import sleep + +#### ---- Step 1:- Download data +URL_DATASET = r'' +df = pd.read_csv(URL_DATASET, usecols = ['Date', 'Country', 'Confirmed']) +# print(df.head(3)) # uncomment this to see output + +#### ---- Step 2:- Create list of all dates +list_dates = df['Date'].unique() +# print(list_dates) # Uncomment to see the dates + +#### --- Step 3:- Pick 5 countries. Also create ax object +fig, ax = plt.subplots(figsize=(15, 8)) +# We will animate for these 5 countries only +list_countries = ['India', 'China', 'US', 'Italy', 'Spain'] +# colors for the 5 horizontal bars +list_colors = ['black', 'red', 'green', 'blue', 'yellow'] + +### --- Step 4:- Write the call back function +# plot_bar() is the call back function used in FuncAnimation class object +def plot_bar(some_date): +    df2 = df[df['Date'].eq(some_date)] +    ax.clear() +    # Only take Confirmed column in descending order +    df3 = df2.sort_values(by = 'Confirmed', ascending = False) +    # Select the top 5 Confirmed countries +    df4 = df3[df3['Country'].isin(list_countries)] +    # print(df4)  # Uncomment to see that dat is only for 5 countries +    sleep(0.2)  # To slow down the animation +    # ax.barh() makes a horizontal bar plot. +    return ax.barh(df4['Country'], df4['Confirmed'], color= list_colors) + +###----Step 5:- Create FuncAnimation object--------- +my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, +                    frames= list_dates, blit=True, +                    interval=20) + +### --- Step 6:- Save the animation to an mp4 +# Place where to save the mp4. Give your file path instead +path_mp4 = r'C:\Python-articles\population_covid2.mp4'   +# my_anim.save(path_mp4, fps=30, extra_args=['-vcodec', 'libx264']) +my_anim.save(filename = path_mp4, writer = 'ffmpeg', +             fps=30, +             extra_args= ['-vcodec', 'libx264', '-pix_fmt', 'yuv420p']) +plt.show() +``` + +The complete script is [available on GitHub][5]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/python-data-covid-19 + +作者:[AnuragGupta][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/999anuraggupta +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://opensource.com/resources/python +[3]: mailto:999.anuraggupta@gmail.com +[4]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_india +[5]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_animated From ce078aeb7444deeae8ca7f63413dd26a7660bb40 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:03:01 +0800 Subject: [PATCH 217/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20How=20?= =?UTF-8?q?I=20use=20Python=20to=20map=20the=20global=20spread=20of=20COVI?= =?UTF-8?q?D-19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200421 How I use Python to map the global spread of COVID-19.md --- ...on to map the global spread of COVID-19.md | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 sources/tech/20200421 How I use Python to map the global spread of COVID-19.md diff --git a/sources/tech/20200421 How I use Python to map the global spread of COVID-19.md b/sources/tech/20200421 How I use Python to map the global spread of COVID-19.md new file mode 100644 index 0000000000..2f5f8dbef0 --- /dev/null +++ b/sources/tech/20200421 How I use Python to map the global spread of COVID-19.md @@ -0,0 +1,170 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I use Python to map the global spread of COVID-19) +[#]: via: (https://opensource.com/article/20/4/python-map-covid-19) +[#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta) + +How I use Python to map the global spread of COVID-19 +====== +Create a color coded geographic map of the potential spread of the virus +using these open source scripts. +![Globe up in the clouds][1] + +The spread of disease is a real concern for a world in which global travel is commonplace. A few organizations track significant epidemics (and any pandemic), and fortunately, they publish their work as open data. The raw data can be difficult for humans to process, though, and that's why data science is so vital. For instance, it could be useful to visualize the worldwide spread of COVID-19 with Python and Pandas. + +It can be hard to know where to start when you're faced with large amounts of raw data. The more you do it, however, the more patterns begin to emerge. Here's a common scenario, applied to COVID-19 data: + + 1. Download COVID-19 country spread daily data into a Pandas DataFrame object from GitHub. For this, you need the Python Pandas library. + 2. Process and clean the downloaded data and make it suitable for visualizing. The downloaded data (as you will see for yourself) is in quite good condition. The one problem with this data is that it uses the names of countries, but it's better to use three-digit ISO 3 codes. To generate the three-digit ISO 3 codes, use a small Python library called pycountry. Having generated these codes, you can add an extra column to our DataFrame and populate it with these codes. + 3. Finally, for the visualization, use the **express** module of a library called Plotly. This article uses what are called choropleth maps (available in Plotly) to visualize the worldwide spread of the disease. + + + +### Step 1: Corona data + +We will download the latest corona data from: + + + +We will load the data directly into a Pandas DataFrame. Pandas provides a function, **read_csv()**, which can take a URL and return a DataFrame object as shown below: + + +``` +import pycountry +import plotly.express as px +import pandas as pd +URL_DATASET = r'' +df1 = pd.read_csv(URL_DATASET) +print(df1.head(3))  # Get first 3 entries in the dataframe +print(df1.tail(3))  # Get last 3 entries in the dataframe +``` + +The screenshot of output (on Jupyter) is: + +![Jupyter screenshot][2] + +From output, you can see that the DataFrame (df1) has the following columns: + + 1. Date + 2. Country + 3. Confirmed + 4. Recovered + 5. Dead + + + +Further, you can see that the **Date** column has entries starting from January 22 to March 31. This database is updated daily, so you will get the current values. + +### Step 2: Cleaning and modifying the data frame + +We need to add another column to this DataFrame, which has the three-letter ISO alpha-3 codes. To do this, I followed these steps: + + 1. Create a list of all countries in the database. This was required because in the **df**, in the column **Country**, each country was figuring for each date. So in effect, the **Country** column had multiple entries for each country. To do this, I used the **unique().tolist()** functions. + 2. Then I took a dictionary **d_country_code** (initially empty) and populated it with keys consisting of country names and values consisting of their three-letter ISO codes. + 3. To generate the three-letter ISO code for a country, I used the function **pycountry.countries.search_fuzzy(country)**. You need to understand that the return value of this function is a "list of **Country** objects." I passed the return value of this function to a name country_data. Further, in this list of objects, the first object i.e., at index 0, is the best fit. Further, this **\** object has an attribute **alpha_3**. So, I can "access" the 3 letter ISO code by using **country_data[0].alpha_3**. However, it is possible that some country names in the DataFrame may not have a corresponding ISO code (For example, disputed territories). So, for such countries, I gave an ISO code of "i.e. a blank string. Further, you need to wrap this code in a try-except block. The statement: **print(_‘could not add ISO 3 code for ->'_, country)** will give a printout of those countries for which the ISO 3 codes could not be found. In fact, you will find such countries as shown with white color in the final output. + 4. Having got the three-letter ISO code for each country (or an empty string for some), I added the country name (as key) and its corresponding ISO code (as value) to the dictionary **d_country_code**. For adding these, I used the **update()** method of the Python dictionary object. + 5. Having created a dictionary of country names and their codes, I added them to the DataFrame using a simple for loop. + + + +### Step 3: Visualizing the spread using Plotly + +A choropleth map is a map composed of colored polygons. It is used to represent spatial variations of a quantity. We will use the express module of Plotly conventionally called **px**. Here we show you how to create a choropleth map using the function: **px.choropleth**. + +The signature of this function is: + + +``` +`plotly.express.choropleth(data_frame=None, lat=None, lon=None, locations=None, locationmode=None, geojson=None, featureidkey=None, color=None, hover_name=None, hover_data=None, custom_data=None, animation_frame=None, animation_group=None, category_orders={}, labels={}, color_discrete_sequence=None, color_discrete_map={}, color_continuous_scale=None, range_color=None, color_continuous_midpoint=None, projection=None, scope=None, center=None, title=None, template=None, width=None, height=None)` +``` + +The noteworthy points are that the **choropleth()** function needs the following things: + + 1. A geometry in the form of a **geojson** object. This is where things are a bit confusing and not clearly mentioned in its documentation. You may or may not provide a **geojson** object. If you provide a **geojson** object, then that object will be used to plot the earth features, but if you don't provide a **geojson** object, then the function will, by default, use one of the built-in geometries. (In our example here, we will use a built-in geometry, so we won't provide any value for the **geojson** argument) + 2. A pandas DataFrame object for the attribute **data_frame**. Here we provide our DataFrame ie **df1** we created earlier. + 3. We will use the data of **Confirmed** column to decide the color of each country polygon. + 4. Further, we will use the **Date** column to create the **animation_frame**. Thus as we slide across the dates, the colors of the countries will change as per the values in the **Confirmed** column. + + + +The complete code is given below: + + +``` +import pycountry +import plotly.express as px +import pandas as pd +# ----------- Step 1 ------------ +URL_DATASET = r'' +df1 = pd.read_csv(URL_DATASET) +# print(df1.head) # Uncomment to see what the dataframe is like +# ----------- Step 2 ------------ +list_countries = df1['Country'].unique().tolist() +# print(list_countries) # Uncomment to see list of countries +d_country_code = {}  # To hold the country names and their ISO +for country in list_countries: +    try: +        country_data = pycountry.countries.search_fuzzy(country) +        # country_data is a list of objects of class pycountry.db.Country +        # The first item  ie at index 0 of list is best fit +        # object of class Country have an alpha_3 attribute +        country_code = country_data[0].alpha_3 +        d_country_code.update({country: country_code}) +    except: +        print('could not add ISO 3 code for ->', country) +        # If could not find country, make ISO code ' ' +        d_country_code.update({country: ' '}) + +# print(d_country_code) # Uncomment to check dictionary   + +# create a new column iso_alpha in the df +# and fill it with appropriate iso 3 code +for k, v in d_country_code.items(): +    df1.loc[(df1.Country == k), 'iso_alpha'] = v + +# print(df1.head)  # Uncomment to confirm that ISO codes added +# ----------- Step 3 ------------ +fig = px.choropleth(data_frame = df1, +                    locations= "iso_alpha", +                    color= "Confirmed",  # value in column 'Confirmed' determines color +                    hover_name= "Country", +                    color_continuous_scale= 'RdYlGn',  #  color scale red, yellow green +                    animation_frame= "Date") + +fig.show() +``` + +The output is something like the following: + +![Map][3] + +You can download and run the [complete code][4]. + +To wrap up, here are some excellent resources on choropleth in Plotly: + + * + * [https://plotly.com/python/reference/#choropleth][5] + + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/python-map-covid-19 + +作者:[AnuragGupta][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/999anuraggupta +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-globe.png?itok=_drXt4Tn (Globe up in the clouds) +[2]: https://opensource.com/sites/default/files/uploads/jupyter_screenshot.png (Jupyter screenshot) +[3]: https://opensource.com/sites/default/files/uploads/map_2.png (Map) +[4]: https://github.com/ag999git/jupyter_notebooks/blob/master/corona_spread_visualization +[5]: tmp.azs72dmHFd#choropleth From da9a56c71925de5916b0687d0ec34cf78a4322b3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:05:53 +0800 Subject: [PATCH 218/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20IoT=20?= =?UTF-8?q?offers=20a=20way=20to=20track=20COVID-19=20via=20connected=20th?= =?UTF-8?q?ermometers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md --- ...ack COVID-19 via connected thermometers.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md diff --git a/sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md b/sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md new file mode 100644 index 0000000000..a3ba9f972e --- /dev/null +++ b/sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md @@ -0,0 +1,54 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (IoT offers a way to track COVID-19 via connected thermometers) +[#]: via: (https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +IoT offers a way to track COVID-19 via connected thermometers +====== +The COVID-19 pandemic has catapulted one manufacturer of connected thermometers to national prominence, as Kinsa provides a possible window into the spread of the disease. +[Kinsa / Leaflet / OpenStreetMap / CARTO][1] + +A company called Kinsa is leveraging [IoT][2] tech to create a network of connected thermometers, collecting a huge amount of anonymous health data that could offer insights into the current and future pandemics. + +The company’s founder and CEO, Inder Singh, said that the ability to track fever levels across the U.S. in close to real time could be a crucial piece of information for both the public at large and for decision-makers in the healthcare sector and government. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] + +The system’s networking technology is relatively straightforward – the thermometer connects via Bluetooth to an app on the user’s phone, which reports anonymized data back to Kinsa’s cloud over the Internet. Singh emphasizes that the company only organizes data down to the county level, and asserts that identifying individuals through Kinsa’s data is more or less impossible. + +“We’re not providing PII, we’re not providing identified data,” he said. “The app just guides you to the care and services you need.” + +Armed with the temperature reading and some basic demographic information about the person whose temperature was taken and their other symptoms, the app can offer rudimentary guidance about whether a visit to the doctor is needed or not, and whether the user’s area is seeing unusual levels of fever. + +However, the real value is in the aggregated data that Kinsa analyzes and breaks out on its [U.S. Health Weather Map][1], gleaned from the million-plus thermometers in the company’s ecosystem. The idea, according to Singh, is to provide the public with a way to make more informed decisions about their health. + +“It’s very participatory,” he said. “Everyone gets the data, and everyone can respond.” + +Kinsa still sells its thermometers directly to consumers, but plans are afoot for the company to collaborate more closely with local governments, health authorities and even school districts – Singh said that Kinsa is already partnering with two U.S. states (which he declined to name), and several city governments, including St. Augustine, Florida. + +“Our hope is that we can figure out how to build a scalable model – we’re never gonna scale globally by just selling $20 thermometers,” he said. The goal is to become widespread enough that the product can act as a meaningful early warning system for the healthcare sector. + +Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html + +作者:[Jon Gold][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.networkworld.com/author/Jon-Gold/ +[b]: https://github.com/lujun9972 +[1]: https://healthweather.us/?mode=Atypical +[2]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world From 4e02c2825405b7599643d3977d245191a63ed918 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:06:50 +0800 Subject: [PATCH 219/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20How=20?= =?UTF-8?q?to=20take=20advantage=20of=20Linux's=20extensive=20vocabulary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md --- ...vantage of Linux-s extensive vocabulary.md | 273 ++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md diff --git a/sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md b/sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md new file mode 100644 index 0000000000..249d9d84f5 --- /dev/null +++ b/sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md @@ -0,0 +1,273 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to take advantage of Linux's extensive vocabulary) +[#]: via: (https://www.networkworld.com/article/3539011/how-to-takke-advantage-of-linuxs-extensive-vocabulary.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +How to take advantage of Linux's extensive vocabulary +====== +Linux systems don't only know a lot of words, it has commands that can help you use them by finding words that are on the tip of your tongue or fixing your typos. +Sandra Henry-Stocker + +While you might not think of Linux as a writing tutor, it does have some commendable language skills – at least when it comes to English. While the average American probably has a vocabulary between 20,000 and 50,000 words, Linux can claim over 100,000 words (spellings, not definitions). And you can easily put this vocabulary to work for you in a number of ways. Let’s look at how Linux can help with your word challenges. + +### Help with finding words + +First, let’s focus on finding words.If you use the **wc** command to count the number of words in the **/usr/share/dict/words** file on your system, you should see something like this: + +``` +$ wc -l /usr/share/dict/words +102402 /usr/share/dict/words +``` + +As you can see, the **words** file on this system contains 102,402 words. So, when you’re trying to nail down just the right word and are having trouble, you stand a good chance of finding it on your system by remembering (or guessing at) some part of it. But you'll need a little help narrowing down those 102,402 words to a group worth your time to review. In this command, we’re looking for words that start with the letters “revi”. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] + +``` +$ grep ^reviv /usr/share/dict/words +revival +revival's +revivalist +revivalist's +revivalists +revivals +revive +revived +revives +revivification +revivification's +revivified +revivifies +revivify +revivifying +reviving +``` + +That’s sixteen words that start with the string “revi”. The **^** character represents the beginning of the word and, as you might have suspected, each word in the file is on a line by itself. + +A good number of the words in the **/usr/share/dict/words** file are names. If you want to  find words regardless of whether they're capitalized, add the **-i** (ignore case) option to your **grep** command. + +``` +$ grep -i ^wool /usr/share/dict/words +Woolf +Woolf's +Woolite +Woolite's +Woolongong +Woolongong's +Woolworth +Woolworth's +wool +... +``` + +You can also look for words that end in or contain a certain string of letters. In this next command, we look for words that contain the string “nativ” at any location. + +``` +$ grep 'nativ' /usr/share/dict/words +alternative +alternative's +alternatively +alternatives +imaginative +imaginatively +native +native's +natives +nativities +nativity +nativity's +nominative +nominative's +nominatives +unimaginative +``` + +In this next command, we look for words that end in “emblance”, the **$** character representing the end of the line. Only two words in the **words** file fit the bill. + +[][2] + +``` +$ grep 'emblance$' /usr/share/dict/words +resemblance +semblance +``` + +If we, for some reason, want to find words with exactly 21 letters, we could use this command: + +``` +$ grep '^.....................$' /usr/share/dict/words +counterintelligence's +electroencephalograms +electroencephalograph +``` + +On the other hand, making sure we've typed the correct number of dots can be tedious. This next command is little easier to manage: + +``` +$ grep -E '^[[:alpha:]]{21}$' /usr/share/dict/words +electroencephalograms +electroencephalograph +``` + +This command does the same thing: + +``` +$ grep -E '^\w{21}$' /usr/share/dict/words +electroencephalograms +electroencephalograph +``` + +The one important difference between these commands is that the one with the dots matches any string of 21 characters. The two specifying "alpha" or "\w" only match letters, so they find only two matching words. + +Now let’s look for words that contain 20 letters (or more) in a row. + +``` +$ grep -E '(\w{20})' /usr/share/dict/words +Andrianampoinimerina +Andrianampoinimerina's +counterrevolutionaries +counterrevolutionary +counterrevolutionary's +electroencephalogram +electroencephalogram's +electroencephalograms +electroencephalograph +electroencephalograph's +electroencephalographs +uncharacteristically +``` + +That command returns words with apostrophes because they contain 20 letters in a row before they get to that point. + +Next, we’ll check out words with 21 or more characters. The 1 and 20 in combination with the **v** (invert) option in this command cause **grep** to skip over words with anywhere from 1 to 20 characters. + +``` +$ grep -vwE '\w{1,20}' /usr/share/dict/words +counterrevolutionaries +electroencephalograms +electroencephalograph +electroencephalographs +``` + +In this next command, we look for words that start with “ex” and have four additional letters. + +``` +$ grep '^ex.\{4\}$' /usr/share/dict/words +exacts +exalts +exam's +exceed +excels +except +excess +excise +excite +excuse +… +``` + +In case you're curious, the **words** file on this system contains 43 such words: + +``` +$ grep '^ex.\{4\}$' /usr/share/dict/words | wc -l +43 +``` + +To get help with spelling, you should try **aspell**. It can help you with individual words or run a spell check scan through an entire text file. In this first example, we ask **aspell** to help with a single word. It finds the word we’re after along with a couple other possibilities. + +### Checking a word + +``` +$ aspell -a +@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7) +prolifferate <== entered word +& prolifferate 3 0: proliferate, proliferated, proliferates <== replacement options +``` + +If **aspell** doesn’t provide a list of words, that means that the spelling you offered was correct. Here's an example: + +``` +$ aspell -a +@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7) +proliferate <== entered text +* <== no suggestions +``` + +Typing **^C** (control-c) exits **aspell**. + +### Checking a file + +When checking a file with **aspell**, you get suggestions for each misspelled word. When **aspell** spots typos, it highlights the misspelled words one at a time and gives you a chance to choose from a list of properly spelled words that are similar enough to the misspelled words to be good candidates for replacing them. + +To start checking a file, type **aspell -c** followed by the file name. + +``` +$ aspell -c thesis +``` + +You'll see something like this: + +``` +This thesis focusses on … + +1) focuses 6) Fosse's +2) focused 7) flosses +3) cusses 8) courses +4) fusses 9) focus +5) focus's 0) fuses +i) Ignore I) Ignore all +r) Replace R) Replace all +a) Add l) Add Lower +b) Abort x) Exit +``` + +Make your selection by pressing the key listed next to the word you want (1, 2, etc.) and **aspell** will replace the misspelled word in the file and move on to the next one if there are others. Notice that you also have options to replace the word by typing another one. Press "x" when you're done. + +### Help with crossword puzzles + +If you’re working on a crossword puzzle and need to find a five-letter word that starts with a “d” and has a “u” as its fourth letter, you can use a command like this: + +``` +$ grep -i '^d..u.$' /usr/share/dict/words +datum +debug +debut +demur +donut +``` + +### Help with word scrambles + +If you’re working on a puzzle that requires you to de-scramble the letters in a string until you've found a proper word, you can offer the list of letters to grep like this example in which **grep** turns the letters "yxusonlia" into the word “anxiously”. + +``` +$ grep -P '^(?:([yxusonlia])(?!.*?\1)){9}$' /usr/share/dict/words +anxiously +``` + +Linux’s word skills are impressive and sometimes even fun. Whether you're hoping to find words you can't quite call to mind or get a little help cheating on word puzzles, Linux offers some clever options. + +Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3539011/how-to-takke-advantage-of-linuxs-extensive-vocabulary.html + +作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/newsletters/signup.html +[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[3]: https://www.facebook.com/NetworkWorld/ +[4]: https://www.linkedin.com/company/network-world From 459216f29a79edf4a89088180ec8f5e3b7777a60 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 22 Apr 2020 01:08:07 +0800 Subject: [PATCH 220/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200421=20How=20?= =?UTF-8?q?underwater=20Internet=20of=20Things=20will=20work?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200421 How underwater Internet of Things will work.md --- ...underwater Internet of Things will work.md | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 sources/talk/20200421 How underwater Internet of Things will work.md diff --git a/sources/talk/20200421 How underwater Internet of Things will work.md b/sources/talk/20200421 How underwater Internet of Things will work.md new file mode 100644 index 0000000000..16503a8143 --- /dev/null +++ b/sources/talk/20200421 How underwater Internet of Things will work.md @@ -0,0 +1,61 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How underwater Internet of Things will work) +[#]: via: (https://www.networkworld.com/article/3538393/how-underwater-internet-of-things-will-work.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +How underwater Internet of Things will work +====== +Lasers will be used to power underwater devices and transmit data below the ocean's surface. +North Sea Port + +More than two-thirds of the world's surface is covered by water. It plays an important role in our economic existence, including in major verticals such as oil and gas, shipping and tourism. + +As the Internet of Things proliferates, questions arise as to how IoT will manifest itself underwater given that radio waves degrade over distance in seawater, and underwater acoustic communication (which does actually work okay) is easily eavesdropped on and isn't stealthy. + +To make the underwater Internet of Things happen, light is the answer, some say. Researchers at King Abdullah University of Science and Technology (KAUST) in Thuwal, Saudi Arabia, are proposing underwater optical communications. They're investigating simultaneous lightwave information and power transfer (SLIPT) configurations, which they're using to transmit energy and data to underwater electronic devices. Recently, the researchers announced a breakthrough experiment in which they were able to achieve an underwater, two-way transmission of data and power over 1.5 yards between a solar panel-equipped sensor and a receiver. + +The SLIPT system will be more usable than wires strung. And in the case of human underwater equipment inspections, for example, SLIPT will be less prone to error than hand signals and less prone to audible confusion than ultrasound voice-based communicators. Remarkably, to this day, hand signals are still a common form of communication between divers. + +"SLIPT can help charge devices in inaccessible locations where continuous powering is costly or not possible," said Jose Filho, a PhD student at KAUST, [in an article][1] on the school's web site. + +Filho, who has been involved in developing the laser project, envisages ships or boats on the water's surface beaming optical communications to underwater vehicles or IoT sensors on the ocean floor. The lasers would simultaneously communicate with and power underwater robots and devices. Return data is relayed to the surface vessel, which then communicates to land bases or data centers via RF (radio). + +Surface buoys – or even unmanned aerial vehicles (drones) flying well above turbulent waves – could be used to inject power down to the seabed surface and, at the same time, receive data, researchers believe. + +[][2] + +The school explains that there's still much development that needs to be performed before SLIPT is operational, but it sees potential. "Underwater optical communication provides an enormous bandwidth and is useful for reliably transmitting information over several meters," co-first author Abderrahmen Trichili said in the article. + +KAUST, located on the Red Sea coast, has been involved in this area of technical exploration for some years. It was involved in developing some early, record-breaking underwater data communications. In 2015 it ran a 4.8 gigabit per second, 16-QAM-OFDM transmission with a 450-nanometer laser. OFDM, or Orthogonal Frequency Division Multiplexing, splits single data streams into multiple channels to reduce interference. + +Interestingly, seas and oceans are becoming increasingly important to data centers. Large swaths of the world's population are found on or near coasts, rather than inland, and we're seeing a shift towards edge-style computing that positions resources closer to sources of data. There's also a need for compute cooling, which ocean water can provide. Even wave energy as a method of powering servers means sea and data are becoming intertwined. + +Microsoft launched an [undersea water-cooling data center][3] 117 feet below the water surface in 2018. Additionally, garden-hose-sized cables carry almost all global, public Internet traffic [underwater, across oceans and between continents][4]. It's not done through satellite, as many imagine. + +So, this is not a brand-new synergy. Apart from the eco-monitoring drivers, one of the likeliest and most important reasons that ocean-based computing is being explored keenly is that there isn't any rent payable or jurisdictional ownership on the high seas. + +Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538393/how-underwater-internet-of-things-will-work.html + +作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/ +[b]: https://github.com/lujun9972 +[1]: https://discovery.kaust.edu.sa/en/article/952/the-power-of-light-for-internet-of-underwater-things +[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[3]: https://www.networkworld.com/article/3283332/microsoft-launches-undersea-free-cooling-data-center.html +[4]: https://www.networkworld.com/article/3004465/how-vulnerable-are-the-internets-undersea-cables.html +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 46ec4304097bb247006a03802892bbfabff9af85 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 22 Apr 2020 08:52:03 +0800 Subject: [PATCH 221/394] translated --- ...ium announces completion of 800GbE spec.md | 56 ------------------- 1 file changed, 56 deletions(-) delete mode 100644 sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md diff --git a/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md b/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md deleted file mode 100644 index 3a687f8800..0000000000 --- a/sources/news/20200418 Ethernet consortium announces completion of 800GbE spec.md +++ /dev/null @@ -1,56 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ethernet consortium announces completion of 800GbE spec) -[#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Ethernet consortium announces completion of 800GbE spec -====== -The specification for 800GbE doubles the maximum speed of the current Ethernet standard, but also tweaks other aspects including latency. -Martyn Williams/IDGNS - -The industry-backed Ethernet Technology Consortium has announced the completion of a specification for 800 Gigabit Ethernet technology. - -Based on many of the technologies used in the current top-end 400 Gigabit Ethernet protocol, the new spec is formally known as 800GBASE-R. The consortium that designed it (then known as the 25 Gigabit Ethernet Consortium) was also instrumental in developing the 25, 50, and 100 Gigabit Ethernet protocols and includes Broadcom, Cisco, Google, and Microsoft among its members. - -**[ Now see [the hidden cause of slow internet and how to fix it][1].]** - -The 800GbE spec adds new media access control (MAC) and physical coding sublayer (PCS) methods, which tweaks these functions to distribute data across eight physical lanes running at a native 106.25Gbps. (A lane can be a copper twisted pair or in optical cables, a strand of fiber or a wavelength.)  The 800GBASE-R specification is built on two 400 GbE 2xClause PCSs to create a single MAC which operates at a combined 800Gbps. - -And while the focus is on eight 106.25G lanes, it's not locked in. It is possible to run 16 lanes at half the speed, or 53.125Gbps. - -The new standard offers half the latency of 400G Ethernet specification, but the new spec also cuts the forward error correction (FEC) overhead on networks running at 50 Gbps, 100 Gbps, and 200 Gbps by half, thus reducing the packet-processing load on the NIC. - -By lowering latency this will feed the need for speed in latency-sensitive applications like [high-performance computing][2] and artificial intelligence, where lots of data needs to be moved around as fast as possible. - -[][3] - -Doubling from 400G to 800G wasn’t too great of a technological leap. It meant adding more lanes at the same transfer rate, with a few tweaks. But breaking a terabit, something Cisco and other networking firms have been talking about for a decade, will require a significant reworking of the technology and won’t be an easy fix. - -It likely won’t be cheap, either. 800G works with existing hardware and 400GbE switches are not cheap, running as high as six figures. Moving past the terabit barrier with a major revision to the technology will likely be even more expensive. But for hyperscalers and HPC customers, that’s par for the course. - -The ETC didn’t say when to expect new hardware supporting the 800G, but given its modest change to existing specs, it could appear this year, assuming the pandemic-induced shutdown doesn’t throw a monkey wrench into plans. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html - -作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3107744/internet/the-hidden-cause-of-slow-internet-and-how-to-fix-it.html -[2]: https://www.networkworld.com/article/3444399/high-performance-computing-do-you-need-it.html -[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world From 1cc8c0fb0b95d6bc7fd0664f99ec08b86fc0524a Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 22 Apr 2020 08:52:44 +0800 Subject: [PATCH 222/394] translated --- ...ium announces completion of 800GbE spec.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md diff --git a/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md b/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md new file mode 100644 index 0000000000..3ef20c7cb4 --- /dev/null +++ b/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md @@ -0,0 +1,53 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Ethernet consortium announces completion of 800GbE spec) +[#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html) +[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) + +以太网联盟宣布完成 800Gb 以太网规范 +====== +800Gb 以太网规范使当前以太网标准的最高速度提高了一倍,但同时也对包括延迟在内的其他方面进行了调整。 +Martyn Williams/IDGNS + +由业界支持的以太网技术联盟已宣布完成 800Gb 以太网技术规范。 + +它基于当前高端 400Gb 以太网协议中使用的许多技术,新规范正式称为 800GBASE-R。设计它的联盟(当时称为 25Gb 以太网联盟)在开发 25、50 和 100Gb 以太网协议方面也发挥了重要作用,其成员包括 Broadcom、Cisco、Google 和 Microsoft。 + +800Gb 以太网规范增加了新的媒体访问控制(MAC)和物理编码子层(PCS)方法,新规范对这些功能进行了调整,来使用 8 条 106.25Gbps 的物理通道分发数据。(通道可以是铜双绞线,也可以是光缆,一束光纤或光波。)800GBASE-R 规范建立在两个 400 GbE 2xClause PCS 之上,以创建一个以 800Gbps 的总速率运行的单个 MAC。 + +尽管主要是使用八条 106.25Gb 通道,但这并不是固定的。它可以以一半的速度 (53.125Gbps) 使用 16 条通道。 + +新标准提供了 400G 以太网规范的一半延迟,但是新规范也将运行在 50 Gbps、100 Gbps 和 200 Gbps 的网络上的前向纠错(FEC)开销减少了一半,从而减少了网卡上的数据包处理负担。 + +通过降低延迟,这将满足对延迟敏感的应用(例如[高性能计算][2]和人工智能)中对速度的需求,在这些应用中,需要尽可能快地移动大量数据。 + +[][3] + +从 400G 增加到 800G 并不是技术上大的飞跃。这意味着要以相同的传输速率添加更多通道,并进行一些调整。但是,要想突破 Tb,Cisco 和其他网络公司已经讨论了十年了,这将需要对技术进行重大修改,而且并非易事。 + +新技术可能也不便宜。800G 可与现有硬件一起使用,而 400Gb 以太网交换机价格不菲,高达六位数。对技术进行重大修改,越过 Tb 障碍,可能会变得更加昂贵。但是对于大客户和高性能计算客户而言,这是预料之中的。 + +ETC 并未透露何时会支持 800G 的新硬件,但鉴于其对现有规格的适度更改,它可能会在今年出现,前提是疫情引起的停滞不会影响它。 + +加入 [Facebook][4] 和 [LinkedIn][5] 上的 Network World 社区,评论热门主题。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html + +作者:[Andy Patrizio][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.networkworld.com/author/Andy-Patrizio/ +[b]: https://github.com/lujun9972 +[2]: https://www.networkworld.com/article/3444399/high-performance-computing-do-you-need-it.html +[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world \ No newline at end of file From c4b95ab13c0cec165a4a76ace9044e38c301a8cd Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 22 Apr 2020 08:54:25 +0800 Subject: [PATCH 223/394] translating --- ...0421 MystiQ- A Free and Open Source Audio-Video Converter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md index cfddc43c54..4b793e918a 100644 --- a/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md +++ b/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 204457e381c45cb6ee198346cc60a465209a0d7c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Apr 2020 16:15:22 +0800 Subject: [PATCH 224/394] PRF @geekpi --- ...ium announces completion of 800GbE spec.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md b/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md index 3ef20c7cb4..d97f52e94b 100644 --- a/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md +++ b/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md @@ -1,38 +1,36 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Ethernet consortium announces completion of 800GbE spec) [#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html) [#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) -以太网联盟宣布完成 800Gb 以太网规范 +以太网技术联盟宣布完成 800Gb 以太网规范 ====== -800Gb 以太网规范使当前以太网标准的最高速度提高了一倍,但同时也对包括延迟在内的其他方面进行了调整。 -Martyn Williams/IDGNS -由业界支持的以太网技术联盟已宣布完成 800Gb 以太网技术规范。 +> 800Gb 以太网规范使当前以太网标准的最高速度提高了一倍,但同时也对包括延迟在内的其他方面进行了调整。 -它基于当前高端 400Gb 以太网协议中使用的许多技术,新规范正式称为 800GBASE-R。设计它的联盟(当时称为 25Gb 以太网联盟)在开发 25、50 和 100Gb 以太网协议方面也发挥了重要作用,其成员包括 Broadcom、Cisco、Google 和 Microsoft。 +![](https://images.techhive.com/images/article/2017/05/170522-networking-2-100723415-large.jpg) -800Gb 以太网规范增加了新的媒体访问控制(MAC)和物理编码子层(PCS)方法,新规范对这些功能进行了调整,来使用 8 条 106.25Gbps 的物理通道分发数据。(通道可以是铜双绞线,也可以是光缆,一束光纤或光波。)800GBASE-R 规范建立在两个 400 GbE 2xClause PCS 之上,以创建一个以 800Gbps 的总速率运行的单个 MAC。 +由业界支持的以太网技术联盟Ethernet Technology Consortium(ETC)已宣布完成 800Gb 以太网技术规范。 + +新规范基于当前高端 400Gb 以太网协议中使用的许多技术,新规范正式称为 800GBASE-R。设计它的联盟(当时称为 25Gb 以太网联盟)在开发 25、50 和 100Gb 以太网协议方面也发挥了重要作用,其成员包括 博通、思科、谷歌和微软。 + +800Gb 以太网规范增加了新的介质访问控制media access control(MAC)和物理编码子层physical coding sublayer(PCS)方法,新规范对这些功能进行了调整,来使用 8 条 106.25Gbps 的物理通道分发数据。(通道可以是铜双绞线,也可以是光缆,一束光纤或光波。)800GBASE-R 规范建立在两个 400 GbE 2xClause PCS 之上,以创建一个以 800Gbps 的总速率运行的单个 MAC。 尽管主要是使用八条 106.25Gb 通道,但这并不是固定的。它可以以一半的速度 (53.125Gbps) 使用 16 条通道。 -新标准提供了 400G 以太网规范的一半延迟,但是新规范也将运行在 50 Gbps、100 Gbps 和 200 Gbps 的网络上的前向纠错(FEC)开销减少了一半,从而减少了网卡上的数据包处理负担。 +新标准提供了 400G 以太网规范的一半延迟,但是新规范也将运行在 50 Gbps、100 Gbps 和 200 Gbps 的网络上的前向纠错forward error correction(FEC)开销减少了一半,从而减少了网卡上的数据包处理负担。 通过降低延迟,这将满足对延迟敏感的应用(例如[高性能计算][2]和人工智能)中对速度的需求,在这些应用中,需要尽可能快地移动大量数据。 -[][3] +从 400G 增加到 800G 并不是太大的技术飞跃。它意味着在相同的传输速率下增加更多的通道,再做一些调整。但是,要想突破 Tb 级,Cisco 和其他网络公司已经讨论了十年了,这将需要对技术进行重大修改,而且并非易事。 -从 400G 增加到 800G 并不是技术上大的飞跃。这意味着要以相同的传输速率添加更多通道,并进行一些调整。但是,要想突破 Tb,Cisco 和其他网络公司已经讨论了十年了,这将需要对技术进行重大修改,而且并非易事。 +新技术可能也不便宜。800G 可与现有硬件一起使用,而 400Gb 以太网交换机价格不菲,高达六位数。对技术进行重大修改,越过 Tb 障碍,可能会变得更加昂贵。但是对于大客户和高性能计算客户而言,这也是情理之中的事。 -新技术可能也不便宜。800G 可与现有硬件一起使用,而 400Gb 以太网交换机价格不菲,高达六位数。对技术进行重大修改,越过 Tb 障碍,可能会变得更加昂贵。但是对于大客户和高性能计算客户而言,这是预料之中的。 - -ETC 并未透露何时会支持 800G 的新硬件,但鉴于其对现有规格的适度更改,它可能会在今年出现,前提是疫情引起的停滞不会影响它。 - -加入 [Facebook][4] 和 [LinkedIn][5] 上的 Network World 社区,评论热门主题。 +ETC 并未透露何时会支持 800G 的新硬件,但考虑到它对现有规格的变化不大,它可能会在今年出现,前提是疫情引起的停滞不会影响它。 -------------------------------------------------------------------------------- @@ -41,7 +39,7 @@ via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces- 作者:[Andy Patrizio][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -50,4 +48,4 @@ via: https://www.networkworld.com/article/3538529/ethernet-consortium-announces- [2]: https://www.networkworld.com/article/3444399/high-performance-computing-do-you-need-it.html [3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) [4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world \ No newline at end of file +[5]: https://www.linkedin.com/company/network-world From 8cca21d4ecf5daa1781cdc663f4bea979f35eed7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Apr 2020 16:15:54 +0800 Subject: [PATCH 225/394] PUB @geekpi https://linux.cn/article-12138-1.html --- ...Ethernet consortium announces completion of 800GbE spec.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20200418 Ethernet consortium announces completion of 800GbE spec.md (98%) diff --git a/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md b/published/20200418 Ethernet consortium announces completion of 800GbE spec.md similarity index 98% rename from translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md rename to published/20200418 Ethernet consortium announces completion of 800GbE spec.md index d97f52e94b..c909b1fb0e 100644 --- a/translated/news/20200418 Ethernet consortium announces completion of 800GbE spec.md +++ b/published/20200418 Ethernet consortium announces completion of 800GbE spec.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12138-1.html) [#]: subject: (Ethernet consortium announces completion of 800GbE spec) [#]: via: (https://www.networkworld.com/article/3538529/ethernet-consortium-announces-completion-of-800gbe-spec.html) [#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) From d3b203461730a97dbda8314d10a52926d4ea9484 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Apr 2020 21:02:01 +0800 Subject: [PATCH 226/394] APL --- sources/tech/20190712 What is Silverblue.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20190712 What is Silverblue.md b/sources/tech/20190712 What is Silverblue.md index c23a45b9f8..0cb2914f00 100644 --- a/sources/tech/20190712 What is Silverblue.md +++ b/sources/tech/20190712 What is Silverblue.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 25a39d7934b87680798cc699719fb937bdc1d2f8 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 22 Apr 2020 23:04:18 +0800 Subject: [PATCH 227/394] TSL --- sources/tech/20190712 What is Silverblue.md | 98 ------------------- .../tech/20190712 What is Silverblue.md | 98 +++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 sources/tech/20190712 What is Silverblue.md create mode 100644 translated/tech/20190712 What is Silverblue.md diff --git a/sources/tech/20190712 What is Silverblue.md b/sources/tech/20190712 What is Silverblue.md deleted file mode 100644 index 0cb2914f00..0000000000 --- a/sources/tech/20190712 What is Silverblue.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is Silverblue?) -[#]: via: (https://fedoramagazine.org/what-is-silverblue/) -[#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/) - -What is Silverblue? -====== - -![][1] - -Fedora Silverblue is becoming more and more popular inside and outside the Fedora world. So based on feedback from the community, here are answers to some interesting questions about the project. If you do have any other Silverblue related questions, please leave it in the comments section and we will try to answer them in a future article. - -### What is Silverblue? - -Silverblue is a codename for the new generation of the desktop operating system, previously known as Atomic Workstation. The operating system is delivered in images that are created by utilizing the _[rpm-ostree][2]_ [project][2]. The main benefits of the system are speed, security, atomic updates and immutability. - -### What does “Silverblue” actually mean? - -“Team Silverblue” or “Silverblue” in short doesn’t have any hidden meaning. It was chosen after roughly two months when the project, previously known as Atomic Workstation was rebranded. There were over 150 words or word combinations reviewed in the process. In the end _Silverblue_ was chosen because it had an available domain as well as the social network accounts. One could think of it as a new take on Fedora’s blue branding, and could be used in phrases like “Go, Team Silverblue!” or “Want to join the team and improve Silverblue?”. - -### What is ostree? - -[OSTree or libostree is a project][3] that combines a “git-like” model for committing and downloading bootable filesystem trees, together with a layer to deploy them and manage the bootloader configuration. OSTree is used by rpm-ostree, a hybrid package/image based system that Silverblue uses. It atomically replicates a base OS and allows the user to “layer” the traditional RPM on top of the base OS if needed. - -### Why use Silverblue? - -Because it allows you to concentrate on your work and not on the operating system you’re running. It’s more robust as the updates of the system are atomic. The only thing you need to do is to restart into the new image. Also, if there’s anything wrong with the currently booted image, you can easily reboot/rollback to the previous working one, if available. If it isn’t, you can download and boot any other image that was generated in the past, using the _ostree_ command. - -Another advantage is the possibility of an easy switch between branches (or, in an old context, Fedora releases). You can easily try the _[Rawhide][4]_ or _[updates-testing][5]_ branch and then return back to the one that contains the current stable release. Also, you should consider Silverblue if you want to try something new and unusual. - -### What are the benefits of an immutable OS? - -One of the main benefits is security. The base operating system is mounted as read-only, and thus cannot be modified by malicious software. The only way to alter the system is through the _rpm-ostree_ utility. - -Another benefit is robustness. It’s nearly impossible for a regular user to get the OS to the state when it doesn’t boot or doesn’t work properly after accidentally or unintentionally removing some system library. Try to think about these kind of experiences from your past, and imagine how Silverblue could help you there. - -### How does one manage applications and packages in Silverblue? - -For graphical user interface applications, [Flatpak][6] is recommended, if the application is available as a flatpak. Users can choose between Flatpaks from either Fedora and built from Fedora packages and in Fedora-owned infrastructure, or Flathub that currently has a wider offering. Users can install them easily through GNOME Software, which already supports Fedora Silverblue. - -One of the first things users find out is there is no _dnf_ preinstalled in the OS. The main reason is that it wouldn’t work on Silverblue — and part of its functionality was replaced by the _rpm-ostree_ command. Users can overlay the traditional packages by using the _rpm-ostree install PACKAGE_. But it should only be used when there is no other way. This is because when the new system images are pulled from the repository, the system image must be rebuilt every time it is altered to accommodate the layered packages, or packages that were removed from the base OS or replaced with a different version. - -Fedora Silverblue comes with the default set of GUI applications that are part of the base OS. The team is working on porting them to Flatpaks so they can be distributed that way. As a benefit, the base OS will become smaller and easier to maintain and test, and users can modify their default installation more easily. If you want to look at how it’s done or help, take a look at the official [documentation][7]. - -### What is Toolbox? - -[_Toolbox_][8] is a project to make containers easily consumable for regular users. It does that by using _podman_’s rootless containers. _Toolbox_ lets you easily and quickly create a container with a regular Fedora installation that you can play with or develop on, separated from your OS. - -### Is there any Silverblue roadmap? - -Formally there isn’t any, as we’re focusing on problems we discover during our testing and from community feedback. We’re currently using Fedora’s [Taiga][9] to do our planning. - -### What’s the release life cycle of the Silverblue? - -It’s the same as regular Fedora Workstation. A new release comes every 6 months and is supported for 13 months. The team plans to release updates for the OS bi-weekly (or longer) instead of daily as they currently do. That way the updates can be more thoroughly tested by QA and community volunteers before they are sent to the rest of the users. - -### What is the future of the immutable OS? - -From our point of view the future of the desktop involves the immutable OS. It’s safest for the user, and Android, ChromeOS, and the last macOS Catalina all use this method under the hood. For the Linux desktop there are still problems with some third party software that expects to write to the OS. HP printer drivers are a good example. - -Another issue is how parts of the system are distributed and installed. Fonts are a good example. Currently in Fedora they’re distributed in RPM packages. If you want to use them, you have to overlay them and then restart to the newly created image that contains them. - -### What is the future of standard Workstation? - -There is a possibility that the Silverblue will replace the regular Workstation. But there’s still a long way to go for Silverblue to provide the same functionality and user experience as the Workstation. In the meantime both desktop offerings will be delivered at the same time. - -### How does Atomic Workstation or Fedora CoreOS relate to any of this? - -Atomic Workstation was the name of the project before it was renamed to Fedora Silverblue. - -Fedora CoreOS is a different, but similar project. It shares some fundamental technologies with Silverblue, such as _rpm-ostree_, _toolbox_ and others. Nevertheless, CoreOS is a more minimal, container-focused and automatically updating OS. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/what-is-silverblue/ - -作者:[Tomáš Popela][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://fedoramagazine.org/author/tpopela/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/what-is-fedora-silverblue-816x345.jpg -[2]: https://rpm-ostree.readthedocs.io/en/latest/ -[3]: https://ostree.readthedocs.io/en/latest/ -[4]: https://fedoraproject.org/wiki/Releases/Rawhide -[5]: https://fedoraproject.org/wiki/QA:Updates_Testing -[6]: https://flatpak.org/ -[7]: https://docs.fedoraproject.org/en-US/flatpak/tutorial/ -[8]: https://github.com/debarshiray/toolbox -[9]: https://teams.fedoraproject.org/project/silverblue/ diff --git a/translated/tech/20190712 What is Silverblue.md b/translated/tech/20190712 What is Silverblue.md new file mode 100644 index 0000000000..afc855d820 --- /dev/null +++ b/translated/tech/20190712 What is Silverblue.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What is Silverblue?) +[#]: via: (https://fedoramagazine.org/what-is-silverblue/) +[#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/) + +何谓 Silverblue? +====== + +![][1] + +Fedora Silverblue 在 Fedora 世界内外越来越受欢迎。因此,根据社区的反馈,以下是关于这个项目的一些有趣问题的答案。如果你有任何其他与 Silverblue 相关的问题,请在评论区留言,我们会在未来的文章中回答。 + +### 何谓 Silverblue? + +Silverblue 是新一代桌面操作系统的代号,之前被称为 Atomic Workstation。该操作系统是通过利用 [rpm-ostree 项目][2]创建的映像来交付的。这种系统的主要优点是速度、安全性、原子更新和不变性。 + +### “Silverblue”到底是什么意思? + +“Team Silverblue” 或简称 “Silverblue”,没有任何隐藏的含义。该项目以前被称为 Atomic Workstation,大约两个月后更名时选中了这个名字。在这个过程中,审查过 150 多个单词或单词组合。最终选择了 “Silverblue”,因为它有一个可用的域名以及社交网络账号。人们可以把它看成是 Fedora 的蓝色品牌的一个新的品牌形象,可以用在诸如“加油,Silverblue 团队!”或“想加入该团队,改进 Silverblue 吗?”这样的短语中。 + +### 何谓 ostree? + +[OSTree 或 libostree 是一个项目][3],它结合了一个类似 Git 的提交和下载可引导文件系统树的模型,以及用于部署它们和管理引导加载程序配置的层。OSTree 被 rpm-ostree 所使用,这是 Silverblue 使用的一个基于包/镜像的混合系统。它原子化地复制了一个基础操作系统,并允许用户在需要时在基础操作系统之上 "分层 "传统的 RPM。 + +### 为何使用 Silverblue? + +因为它可以让你专注于你的工作,而不是你正在运行的操作系统。因为系统的更新是原子式的,所以它更稳健。你唯一需要做的事情就是重新启动到新的镜像中。此外,如果当前启动的镜像有什么问题,你可以很容易地重启/回滚到之前可以工作的镜像,如果有的话。如果没有,你可以使用 `ostree` 命令下载并启动过去生成的任何其他镜像。 + +另一个好处是可以在不同的分支(或者用旧的语境说就是 Fedora 版本)之间轻松切换。你可以轻松地尝试 [Rawhide][4] 或 [updates-testing][5] 分支,然后返回到包含当前稳定版本的分支。另外,如果你想尝试一些新奇的东西,也可以考虑试试 Silverblue。 + +### 不可变的操作系统有什么好处? + +其中一个主要的好处是安全。基础操作系统是以只读的形式挂载的,因此不能被恶意软件修改。唯一可以改变系统的方法是通过 `rpm-ostree` 实用程序。 + +另一个好处是健壮性。普通用户几乎不可能在不小心或无意中删除了一些系统库后,让操作系统恢复到不启动或无法正常工作的状态。试着想想你过去的这些经历,就可以明白 Silverblue 如何帮助你。 + +### 如何在 Silverblue 中管理应用程序和包? + +对于图形化用户界面的应用程序,建议使用 [Flatpak][6],如果应用程序是以 Flatpak 的形式提供的话。用户可以选择来自 Fedora 的 Flatpak,和从 Fedora 包及 Fedora 自己的基础架构中构建的 Flatpak,或者目前有更广泛的交付的 Flathub。用户可以通过已经支持 Fedora Silverblue 的 GNOME “软件”轻松安装它们。 + +用户首先发现的一件事就是操作系统中没有预装 `dnf`。主要原因是它不能在 Silverblue 上工作 —— 它的部分功能被 `rpm-ostree` 命令所取代。用户可以通过使用 `rpm-ostree install PACKAGE` 来层叠传统的软件包。但只有在没有其他方法的情况下,才应该使用这种方式。这是因为从存储库中提取新的系统镜像时,每次更改系统镜像时都必须重新构建系统镜像,以容纳分层的包或从基础操作系统中删除或替换为其他版本的包。 + +Fedora Silverblue 自带的默认 GUI 应用程序集是基础操作系统的一部分。团队正在努力将它们移植到 Flatpak 上,这样它们就可以通过这种方式分发。其中一个好处是,基础操作系统将变得更小,更容易维护和测试,用户可以更容易修改他们的默认安装环境。如果你想看一下它是怎么做的,或者有什么帮助,可以看看官方的 [文档][7]。 + +### 什么是 Toolbox? + +[Toolbox][8] 是一个让普通用户可以轻松使用容器的项目。它通过使用 podman 的无 root 容器来实现。Toolbox 可以让你在常规的 Fedora 安装中轻松、快速地创建一个容器,你可以在这个容器上折腾或开发,而与你的操作系统分离。 + +### Silverblue 有路线图吗? + +形式上没有,因为我们正在关注在测试过程中发现的问题和社区的反馈。我们目前正在使用 Fedora 的 [Taiga][9] 来进行规划。 + +### Silverblue 的发布周期是多少? + +它和普通的 Fedora Workstation 是一样的。每 6 个月发布一次新版本,支持期为 13 个月。团队计划每两周(或更长时间)发布一次更新,而不是像现在这样每天发布一次。这样一来,更新可以在发送给其他用户之前,由 QA 和社区志愿者进行更彻底的测试。 + +### 不可变操作系统的未来前景如何? + +从我们的角度来看,桌面的未来涉及到了不可变的操作系统。这对用户来说是最安全的,Android、ChromeOS、ChromeOS、最近的 macOS Catalina 全都在底层采用了这种方式。而对于 Linux 桌面来说,一些第三方软件期望写到操作系统的问题还是存在的。HP 打印机驱动程序就是一个很好的例子。 + +另一个问题是系统中的部分软件如何分发和安装。字体就是一个很好的例子。目前在 Fedora 中,它们是以 RPM 包的形式分发的。如果你想使用它们,你必须层叠它们,然后重新启动到新创建的包含它们的镜像中。 + +### 标准版 Workstation 的前景如何? + +Silverblue 有可能会取代普通的Workstation版本。但 Silverblue 要提供与Workstation版本相同的功能和用户体验,还有很长的路要走。在此期间,这两款桌面产品将同时推出。 + +### Atomic Workstation或 Fedora CoreOS 与这些有什么关系? + +Atomic Workstation 是在更名为 Fedora Silverblue 之前的项目名称。 + +Fedora CoreOS 是一个不同但相似的项目。它与 Silverblue 共享一些基本技术,如 `rpm-ostree`、`toolbox` 等。尽管如此,CoreOS 是一个更简约、专注于容器、自动更新的操作系统。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/what-is-silverblue/ + +作者:[Tomáš Popela][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/tpopela/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2019/07/what-is-fedora-silverblue-816x345.jpg +[2]: https://rpm-ostree.readthedocs.io/en/latest/ +[3]: https://ostree.readthedocs.io/en/latest/ +[4]: https://fedoraproject.org/wiki/Releases/Rawhide +[5]: https://fedoraproject.org/wiki/QA:Updates_Testing +[6]: https://flatpak.org/ +[7]: https://docs.fedoraproject.org/en-US/flatpak/tutorial/ +[8]: https://github.com/debarshiray/toolbox +[9]: https://teams.fedoraproject.org/project/silverblue/ From cb5c005b09e2df578446dd47e3c24c86dd95237b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 23 Apr 2020 00:53:43 +0800 Subject: [PATCH 228/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200423=20Differ?= =?UTF-8?q?ence=20Between=20YUM=20and=20RPM=20Package=20Manager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200423 Difference Between YUM and RPM Package Manager.md --- ...nce Between YUM and RPM Package Manager.md | 110 ++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 sources/tech/20200423 Difference Between YUM and RPM Package Manager.md diff --git a/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md b/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md new file mode 100644 index 0000000000..8b2a0c3b3b --- /dev/null +++ b/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Difference Between YUM and RPM Package Manager) +[#]: via: (https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Difference Between YUM and RPM Package Manager +====== + +Package managers play a key role in the Linux system. + +It allows you to install, update, view, search and delete software packages to suit your needs. + +Each of the distributions has their own set of package managers and use them based on your Linux distributions. + +RPM is one of the oldest traditional package managers, designed to work on Red Hat-based systems such as Red Hat Enterprise Linux (RHEL), CentOS, Fedora and openSUSE (which is based on suse Enterprise Linux). + +But when it comes to dependency resolution and package update (full system update/upgrade), there is an prominent limitation for RPM package manager. + +If you want to know the **[difference between yum and dnf package manager][1]** go to the following article. + +This means that yum can download and install all required dependencies automatically, but rpm will tell you to install a list of dependencies, and then you have to manually install them. + +This is practically impossible and time consuming when you want to install a group of packages using the **[rpm command][2]**. + +That’s where the **[YUM Package Manager][3]** comes in handy and solve both problems. + +### What’s RPM? + +RPM refers to RPM Package Manager (formerly known as Red Hat Package Manager) is a powerful, command-line package management tool developed for the Red Hat operating system. + +It is now used as a core component in many Linux distributions such as Centos, Fedora, Oracle Linux, openSUSE and Mageia. + +RPM Package Manager allows you to install, upgrade, delete, query and verify packages on RPM-based Linux systems. + +RPM files comes with the `.rpm` extension. The RPM package consists of an archive file, that contains libraries and dependencies for a specific package, that do not conflict with other packages installed on your system. + +There are many front-end tools available on Linux to install the RPM package that make the installation process more efficiently compared to the RPM tool, especially for handling dependencies. + +If you want to know more about the front-end package manager of Linux distributions, go to the link below. + + * **[List of Front-ent Command-line Package Manager for Linux][4]** + + + +If you would like GUI package manager for Linux, go to the link below. + + * **[List of GUI Package Manager for Linux][5]** + + + +### What’s YUM? + +Yum is a free and open-source command-line package-management application for Linux operating systems that uses the RPM Package Manager. + +Yum is a front-end tool for rpm that automatically solves dependencies for packages. + +It installs RPM software packages from distribution official repositories and other third-party repositories. + +Yum allows you to install, update, search and remove packages from your system. + +If you want to keep your system up-to-date, you can enable automatic updates via yum-cron. + +Also, it allows you to exclude a package or packages from the yum update if you need to. + +Yum is installed by default and you do not need to install it. + +S.No | RPM | YUM +---|---|--- +1 | Red Hat introduced RPM in 1997. | Yellowdog UPdater (YUP) was developed in 1999-2001 and YUM replaced the original YUP utility in 2003. +2 | RPM stands for RPM Package manager (formally known as Red Hat package manager) | YUM stands for Yellowdog Updater Modified. +3 | The RPM File Naming Convention is as follows. +httpd-2.4.6-92.el7.x86_64.rpm +httpd - Name of the actual package +2.4.6 - Version of package release +92 - Subversion of package release +el7 - Red Hat Version +x86_64 - Hardware architecture +rpm - File extension | It uses the rpm database in the backend. +4 | It doesn't resolve dependencies, you must install them manually. | It automatically resolves dependencies and install them simultaneously (any package will be installed with its dependencies). +5 | This allows you to install multiple versions of the package at once | This does not allow and shows that the package is already installed. +6 | When installing a package using the RPM command you must provide the exact location of the ".rpm" package. | You can install any package available in the repository, but you only need to know the package name. +7 | RPM is not dependent on YUM | It is a frontend tool that uses the RPM package manager on the backend to manage packages. +8 | It is difficult to manage RPM in terms of package installation | YUM is the easiest way to manage RPM packages. +9 | RPM doesn't allow you to upgrade the entire system to the latest available version | YUM allows you to upgrade your system to the latest available version (minor version upgrade, for example, 7.0 to 7.x) +10 | RPM doesn't allow you to automatically update/upgrade packages installed on your system | YUM allows you to automatically update/upgrade the updates available on your system. +11 | It doesn't use the online repository to perform any actions. | It relies entirely on the online repository to do all the work. +12 | RPM is a package format and it is a low-level package manager that does basic things. | This is a top-level front-end package manager that can do everything you need. + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/ + +作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ +[2]: https://www.2daygeek.com/linux-rpm-command-examples-manage-packages-fedora-centos-rhel-systems/ +[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ +[4]: https://www.2daygeek.com/list-of-command-line-package-manager-for-linux/ +[5]: https://www.2daygeek.com/list-of-graphical-frontend-tool-for-linux-package-manager/ From 43a9bf2fb9bd4771f753508db03129932b3db4bb Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 23 Apr 2020 08:48:15 +0800 Subject: [PATCH 229/394] translating --- ...o package Python applications for Linux.md | 179 ------------------ ...o package Python applications for Linux.md | 177 +++++++++++++++++ 2 files changed, 177 insertions(+), 179 deletions(-) delete mode 100644 sources/tech/20200416 How to package Python applications for Linux.md create mode 100644 translated/tech/20200416 How to package Python applications for Linux.md diff --git a/sources/tech/20200416 How to package Python applications for Linux.md b/sources/tech/20200416 How to package Python applications for Linux.md deleted file mode 100644 index a765f4a536..0000000000 --- a/sources/tech/20200416 How to package Python applications for Linux.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to package Python applications for Linux) -[#]: via: (https://opensource.com/article/20/4/package-python-applications-linux) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -How to package Python applications for Linux -====== -Learn how to use dh_virtualenv to make your Python applications -installable as .deb packages. -![Python in a tree][1] - -One way to make Python applications installable on Debian-based operating systems (such as Debian or [Elementary OS][2]) is by using the [dh_virtualenv][3] tool. It builds a **.deb** package that wraps a Python virtual environment around an application and deploys it upon installing. - -In this article, I will explain how to use it with the example of building a package containing the [HTTPie][4] tool to test HTTP APIs from the command line without having to activate a virtual environment. - -### Packaging with dh_virtualenv - -First, you need to install the tools that dh_virtualenv needs. dh_virtualenv's [documentation][5] provides all of the installation options. On my Debian-based system, I entered: - - -``` -`apt-get install dh-virtualenv devscripts` -``` - -While the [devscripts][6] package is not required, it will simplify doing the subsequent operations. - -Now, create a directory to keep the sources. Since this is a local, unofficial, packaging of HTTPie, I called it **myhttp**. Next, let's create some files inside **myhttp** to provide metadata to the Debian build system. - -First, create the **debian/control** file: - - -``` -Source: myhttp -Section: python -Priority: extra -Maintainer: Jan Doe <[jandoe@example.org][7]> -Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8) -Standards-Version: 3.9.5 - -Package: myhttp -Architecture: any -Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends} -Depends: ${misc:Depends} -Description: http client - Useful for doing stuff -``` - -So what is all this information about? As the [Debian documentation][8] puts it: - -> "Lines 1–7 are the control information for the source package. Lines 9–13 are the control information for the binary package." - -Here's my take: - - * the **section** value is mostly meaningless for our case, but needs to be there. It's meaningful to provide information to the guided UI installer, which is not relevant for this package. - * The extra **Priority** value is the right priority for 3rd party packages like this one. - * It is highly recommended to put real contact details in the **Maintainer** field. It does not have to be your personal e-mail, though -- "Infrastructure Team <[infra-team-list@company.example.com][9]>", for example, if the package is maintained by the team and you would like issues to be sent to the team's mail alias. - * The **build-depends** field indicates that you need debhelper, python, and dh-virtualenv to build the package: the package build process will make sure those dependencies are installed at package build time. - * The **standards version** is mostly for human consumption. It indicates which guide you are following. This guide is based on the official documentation of dh-virtualenv, which is based on the 3.9.5 guide from Debian. It is almost always the best choice to name the binary package and the source package the same. - * The **Architecture** field should be **Any** because a virtual environment might include some architecture-specific files: otherwise, the field would be better chosen as **all**. - * Keep the **pre-depends** list as-is: pre-depends is a pretty strict form of dependencies, and it is rare that you need anything more than the minimum suggested here. The dependencies are usually calculated accurately by the build system, so there is no reason to specify them manually. - * If your package is mostly for internal use, then the **Description** might only specify minimal information and a link to the company wiki; otherwise, more details might be useful. - - - -Then create the **debian/compat** file, which [exists mostly for historical purposes][10]: - - -``` -`$ echo "9" > debian/compat` -``` - -Next, create the changelog to tell package users what has changed since the last release. The easiest way is to use **dch --create** to create a template and then fill in the values. - -Filled in, it looks like: - - -``` -myhttp (2.0.0-1) stable; urgency=medium - -  * Initial release. - - -- Jan Doe <[jandoe@example.org][7]>  Fri, 27 Mar 2020 01:09:22 +0000 -``` - -Now you need to tell the tool to install HTTPie, but which version? - -Create a **requirements.in** file that has loose versions: - - -``` -`httpie` -``` - -In general, the loose requirements file will only contain direct dependencies of your project and will specify minimum versions if needed. It is not always necessary to specify the minimum versions: the tools are usually biased towards tightening the dependencies towards "latest version possible". In the case where your Debian package corresponds to one internal Python package, a common case in internal applications, the loose requirements file will look similar: just one line with the name of the package. - -Then use **pip-compile** (which is available by installing the PyPI package **pip-tools**): - - -``` -`$ pip-compile requirements.in > requirements.txt` -``` - -This will produce a strict dependency file called **requirements.txt**: - - -``` -# -# This file is autogenerated by pip-compile -# To update, run: -# -#    pip-compile requirements.in -# -certifi==2019.11.28       # via requests -chardet==3.0.4            # via requests -httpie==2.0.0             # via -r requirements.in -idna==2.9                 # via requests -pygments==2.6.1           # via httpie -requests==2.23.0          # via httpie -urllib3==1.25.8           # via requests -``` - -Finally, write a **debian/rules** file for creating the package. Since dh_virtualenv does all the hard work, the rules file is simple: - - -``` -#!/usr/bin/make -f - -%: -        dh $@ --with python-virtualenv --python /usr/bin/python3.7 -``` - -Be sure to specify the Python interpreter. By default, it will use the interpreter in **/usr/bin/python**, which is Python 2, but you should use a [supported version of Python][11]. - -The writing is finished; all that's left is to build the package: - - -``` -`$ debuild -b -us -uc` -``` - -This will produce a file in the parent directory with a name like **myhttp_2.0.0-1_amd64.deb**. This file can be installed on any compatible operating system. - -In general, it's best to build Debian packages that are intended for a specific platform, such as Debian 10.0, on the same platform. - -You can store this Debian package in a repository and install it on all relevant systems with, for example, [Ansible][12]. - -### Conclusion - -Packaging applications for Debian-based operating systems is a multi-step process. Using dh_virtualenv will make the process straightforward. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/package-python-applications-linux - -作者:[Moshe Zadka][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/moshez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-python.jpg?itok=F2PYP2wT (Python in a tree) -[2]: https://opensource.com/article/19/12/pantheon-linux-desktop -[3]: https://dh-virtualenv.readthedocs.io/en/latest/ -[4]: https://opensource.com/article/19/8/getting-started-httpie -[5]: https://dh-virtualenv.readthedocs.io/en/1.1/tutorial.html -[6]: http://man.he.net/man1/devscripts -[7]: mailto:jandoe@example.org -[8]: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control -[9]: mailto:infra-team-list@company.example.com -[10]: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat -[11]: https://opensource.com/article/19/11/end-of-life-python-2 -[12]: https://opensource.com/resources/what-ansible diff --git a/translated/tech/20200416 How to package Python applications for Linux.md b/translated/tech/20200416 How to package Python applications for Linux.md new file mode 100644 index 0000000000..a44918f7cd --- /dev/null +++ b/translated/tech/20200416 How to package Python applications for Linux.md @@ -0,0 +1,177 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to package Python applications for Linux) +[#]: via: (https://opensource.com/article/20/4/package-python-applications-linux) +[#]: author: (Moshe Zadka https://opensource.com/users/moshez) + +如何为 Linux 打包 Python 应用 +====== +了解如何使用 dh_virtualenv 来让你的 Python 应用可作为 .deb 包安装。 +![Python in a tree][1] + +一种让 Python 应用可在基于 Debian 的操作系统(例如 Debian 或 [Elementary OS][2])上安装的方法是使用 [dh_virtualenv][3] 工具。它会构建一个封装了 Python 虚拟环境的 **.deb** 包,并在安装时进行部署。 + +在本文中,我将以构建包含 [HTTPie][4] 工具的包为例,说明如何无需激活虚拟环境即可从命令行测试 HTTP API。 + +### 使用 dh_virtualenv 打包 + +首先,你需要安装 dh_virtualenv 所需的工具。dh_virtualenv 的[文档][5]提供了所有安装选项。在基于 Debian 的系统上,我输入: + +``` +`apt-get install dh-virtualenv devscripts` +``` + +尽管不需要 [devscripts][6] 包,但它将简化后续操作。 + +现在,创建一个目录来保存源码。由于这是 HTTPie 的本地非官方打包,因此我将其称为 **myhttp**。 接下来,让我们在 **myhttp** 内创建一些文件以向 Debian 构建系统提供元数据。 + +首先,创建 **debian/control** 文件: + + +``` +Source: myhttp +Section: python +Priority: extra +Maintainer: Jan Doe <[jandoe@example.org][7]> +Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8) +Standards-Version: 3.9.5 + +Package: myhttp +Architecture: any +Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends} +Depends: ${misc:Depends} +Description: http client + Useful for doing stuff +``` + +那么这些是什么信息呢? [Debian 文档][8]指出: + +>“第 1–7 行是源码包的控制信息。第 9–13 行是二进制包的控制信息。” + +以下是我使用的: + + * **section** 的值对于我们来说大多没有意义,但需要存在。它对提供 UI 安装程序信息是有意义的,这与此包无关。 + * 额外的 **Priority** 值是像这样的第三方包的正确优先级。 + * 强烈建议在 **Maintainer** 字段中填写正确的联系人信息。但是,如果包由团队维护,并且你希望将问题发送到团队的邮件别名,例如 “Infrastructure Team <[infra-team-list@company.example.com][9]>”,那这不一定是你的个人邮箱。 + * **build-depends** 字段标识你需要 debhelper、python 和 dh-virtualenv 来构建包:包生成过程将确保这些依赖项在包构建时安装。 + * **standards version** 字段主要给人看。它表明你遵循的指南。本指南基于 dh-virtualenv 的官方文档,它是基于 Debian 的 3.9.5 指南。最好一直将源码包和二进制包命名相同。 + * **Architecture** 字段应为 **Any**,因为除非虚拟环境可能包含一些特定于体系结构的文件。否则,最好选择该字段为 **any**。 + * 保持 Pre-Depends 列表为当前的样式:预依赖是一种非常严格的依赖关系形式,你很少会需要比建议的最小依赖更多的依赖项。依赖项通常由构建系统准确计算,因此没有理由手动指定它们。 + * 如果你的包主要用于内部,那么 **Description** 字段只需要最少的信息或者指向公司 wiki 的链接,不然详细信息更有用。 + + + +然后创建 **debian/compat** 文件,它[主要出于历史目的而存在][10]: + + +``` +`$ echo "9" > debian/compat` +``` + +接下来,创建更新日志以告知包用户自上一发行版以来发生了什么变化。最简单的方法是使用 **dch --create** 创建模板,然后填写值。 + +填写后,它看起来像: + + +``` +myhttp (2.0.0-1) stable; urgency=medium + +  * Initial release. + + -- Jan Doe <[jandoe@example.org][7]>  Fri, 27 Mar 2020 01:09:22 +0000 +``` + +现在你需要告诉工具安装 HTTPie,但是哪个版本? + +创建一个宽松版本的 **requirements.in** 文件: + + +``` +`httpie` +``` + +通常,宽松的需求文件将仅包含项目的直接依赖项,并在需要时指定最低版本。 不一定总是需要指定最低版本:这些工具通常偏向于将依赖关系转化为“可能的最新版本”。如果你的 Debian 包与一个内部 Python 包相对应,这是内部应用中的一种常见情况,那么宽松的需求文件看起来将很相似:仅包含包名的一行。 + +然后使用 **pip-compile**(可通过安装 PyPI 包 **pip-tools** 获得): + + +``` +`$ pip-compile requirements.in > requirements.txt` +``` + +这会生成一个严格的依赖文件,名为 **requirements.txt**: + + +``` +# +# This file is autogenerated by pip-compile +# To update, run: +# +#    pip-compile requirements.in +# +certifi==2019.11.28       # via requests +chardet==3.0.4            # via requests +httpie==2.0.0             # via -r requirements.in +idna==2.9                 # via requests +pygments==2.6.1           # via httpie +requests==2.23.0          # via httpie +urllib3==1.25.8           # via requests +``` + +最后,写一个 **debian/rules** 文件来创建包。因为 dh_virtualenv 会处理所有困难的事,因此规则文件很简单: + + +``` +#!/usr/bin/make -f + +%: +        dh $@ --with python-virtualenv --python /usr/bin/python3.7 +``` + +确保指定 Python 解释器。默认它会使用 **/usr/bin/python**,这是 Python2,但是你应该使用一个[受支持的 Python 版本][11] + +完成了,接下来就是构建包: + + +``` +`$ debuild -b -us -uc` +``` + +这会在父目录生成一个类似 **myhttp_2.0.0-1_amd64.deb** 的文件。该文件可在任何兼容的系统上安装。 + +通常,最好在同一平台上构建用于特定平台(例如 Debian 10.0)的 Debian 包。 + +你可以将此 Debian 包保存在存仓库中,并使用例如 [Ansible][12] 的工具将其安装在所有相关系统上。 + +### 总结 + +给基于 Debian 的系统的打包应用是一个有多个步骤的过程。使用 dh_virtualenv 将使过程变得简单。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/package-python-applications-linux + +作者:[Moshe Zadka][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/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-python.jpg?itok=F2PYP2wT (Python in a tree) +[2]: https://opensource.com/article/19/12/pantheon-linux-desktop +[3]: https://dh-virtualenv.readthedocs.io/en/latest/ +[4]: https://opensource.com/article/19/8/getting-started-httpie +[5]: https://dh-virtualenv.readthedocs.io/en/1.1/tutorial.html +[6]: http://man.he.net/man1/devscripts +[7]: mailto:jandoe@example.org +[8]: https://www.debian.org/doc/manuals/maint-guide/dreq.en.html#control +[9]: mailto:infra-team-list@company.example.com +[10]: https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat +[11]: https://opensource.com/article/19/11/end-of-life-python-2 +[12]: https://opensource.com/resources/what-ansible From b2e9e40b782dcfe6d188b07be3acbc52df12df2f Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 23 Apr 2020 08:52:35 +0800 Subject: [PATCH 230/394] translating --- ...IP Addresses, MAC Addresses, and Interface Speed on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md b/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md index ca7e8fe2aa..a16a007124 100644 --- a/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md +++ b/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8bd8f9d08e788ed8252a6c5a5687775e935d8b94 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 09:49:51 +0800 Subject: [PATCH 231/394] PRF @wxy --- ...te web tutorials with Reveal.js and Git.md | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md b/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md index 5466f55d81..f5ad4bf06b 100644 --- a/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md +++ b/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Create web tutorials with Reveal.js and Git) @@ -10,9 +10,9 @@ 使用 Reveal.js 和 Git 创建网页教程 ====== -> 通过这个简单的工作流程创建的研讨会幻灯片,可以在任何浏览器、设备和平台上一致地查看。 +> 通过这个简单的工作流程创建的研讨会幻灯片,可以在任何浏览器、设备和平台上获得一致的查看效果。 -![Person reading a book and digital copy][1] +![](https://img.linux.net.cn/data/attachment/album/202004/23/094800ohkpbjd3zbj0dj0d.jpg) 无论你是学习者还是教师,你可能都会认识到采用幻灯片放映来传播知识的在线研讨会workshop的价值。如果你曾经偶然看到过这样一个逐页、逐章设置的井井有条的教程,你可能会想知道创建这样的一个网站有多难。 @@ -20,9 +20,9 @@ ### 介绍 -当我开始将学习内容放到网上置时,体验并不是很好。我想要的是一种可重复的、一致的、易于维护的东西,因为我的内容会随着我的教学技术而进步。 +当我开始将学习内容放到网上置时,体验并不是很好。我想要的是一种可重复的、一致的、易于维护的东西,因为我的内容会随着我教学的技术发展而变化。 -我尝试了许多交付模型,从 [Asciidoctor][2] 这样的低级代码生成器到在单个 PDF 文件中放置教程。全都不能让我满意。当我举办现场的在座研讨会时,我喜欢使用幻灯片放映,因此我想知道我是否可以为自己的在线的,自定进度的研讨会体验做同样的事情。 +我尝试了许多交付模型,从 [Asciidoctor][2] 这样的低级代码生成器到在单个 PDF 文件中放置教程。全都不能让我满意。当我举办现场的在座研讨会时,我喜欢使用幻灯片放映,因此我想知道我是否可以为我自己的在线的,自定进度的研讨会体验做同样的事情。 经过一番挖掘,我为创建无痛的研讨会网站打下了基础。当时我已经在使用一个演示文稿生成框架,这对我来说是很有帮助的,因为这个框架可以产生对网站友好的格式(HTML)。 @@ -33,13 +33,13 @@ * 研讨会的想法(这是你的问题,我帮不了你) * 用于研讨会幻灯片的 Reveal.js * GitLab 项目仓库 - * 你最喜欢的 HTML 代码编辑器 + * 你常用的 HTML 代码编辑器 * Web 浏览器 * 在你的机器上安装好 Git 如果这个列表看起来令人望而生畏,那么有一个快速入门的方法,不需要把所有的东西一个个都拉到一起。你可以用我的模板项目来给你提供幻灯片和项目设置的入门教程。 -本文假设你熟悉 Git 和托管在 Git 平台(如 GitLab)上的项目。如果你需要指导或教程,请查看我们的[Git 入门系列][3]。 +本文假设你熟悉 Git 和在 Git 平台(如 GitLab)上托管项目。如果你需要指导或教程,请查看我们的[Git 入门系列][3]。 首先,将模板项目克隆到本地机器上。 @@ -49,7 +49,7 @@ $ git clone https://gitlab.com/eschabell/beginners-guide-automated-workshops.git 为此设置一个新的 GitLab 项目,导入模板项目作为初始导入。 -研讨会网站有一些重要的文件。在**根目录**下,你会发现一个名为 `.gitlab-ci.yml` 的文件,当你向主分支提交修改时(即合并拉取请求到 `master` 分支),这个文件会作为触发器。它可以触发将 `slides` 目录的全部内容复制到 GitLab 项目的 `website` 文件夹中。 +研讨会网站有一些重要的文件。在**根目录**下,你会发现一个名为 `.gitlab-ci.yml` 的文件,当你向主分支提交修改时(即将拉取请求合并到 `master` 分支),这个文件会作为触发器。它可以触发将 `slides` 目录的全部内容复制到 GitLab 项目的 `website` 文件夹中。 我把它托管在我的 GitLab 账户中,名为 `beginners-guide-automated-workshops`。当它部署完毕后,你可以在浏览器中通过导航到下列地址查看 `slides` 目录的内容: @@ -79,7 +79,7 @@ https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME] * `images` 目录 * `index.html`文件 -在你喜欢的 HTML/CSS 编辑器中打开每一个文件,然后进行下面描述的修改。你用哪个编辑器并不重要,我更喜欢 [RubyMine IDE][5],因为它能在本地浏览器中提供页面预览。这对我在将内容推送到研讨会网站之前测试内容时很有帮助。 +在你常用的 HTML/CSS 编辑器中打开每一个文件,然后进行下面描述的修改。你用哪个编辑器并不重要,我更喜欢 [RubyMine IDE][5],因为它能在本地浏览器中提供页面预览。这对我在将内容推送到研讨会网站之前测试内容时很有帮助。 #### default.css 文件 @@ -91,7 +91,7 @@ https://[YOUR_USERNAME].gitlab.io/[YOUR_PROJECT_NAME] font-family: "Red Hat Display", "Overpass", san-serif; ``` -如果你使用的是非标准字体类型,则必须在以下行中将其导入(与 Overpass 字体类型相同): +如果你使用的是非标准字体类型,则必须在以下行中将其导入(Overpass 字体类型就是这样做的): ``` @import url('SOME_URL'); @@ -105,7 +105,7 @@ background: url("…/…/images/backgrounds/basic.png") 要设置一个默认背景,只需将这一行指向你要使用的图片。 -#### images 目录 +#### images 目录 顾名思义,`images` 目录是用来存储你想在研讨会幻灯片上使用的图片。例如,我通常会把展示研讨会主题进展的截图放在我的个人幻灯片上。 @@ -131,7 +131,6 @@ background: url("…/…/images/backgrounds/basic.png") 现在继续到 `body` 部分。你会注意到它被分成了许多 `section` 标签。`body` 的开头包含了一个注释,说明你正在为每个标有 `section` 的打开和关闭的标签创建幻灯片。 - ```
@@ -156,9 +155,9 @@ background: url("…/…/images/backgrounds/basic.png") ``` -这张幻灯片有两个区域,用 `div` 标签划分。用空格隔开了标题和作者。 +这张幻灯片有两个区域,用 `div` 标签分隔。用空格隔开了标题和作者。 -如果你有一定的 HTML 使用知识,可以尝试各种东西来开发你的研讨会。你使用浏览器预览结果的时候真的很方便。有些 IDE 提供了本地查看修改,但你也可以打开 `index.html` 文件查看你的修改,然后再推送到资源库中。 +如果你有一定的 HTML 使用知识,可以尝试各种东西来开发你的研讨会。使用浏览器预览结果的时候真的很方便。有些 IDE 提供了本地查看修改,但你也可以打开 `index.html` 文件查看你的修改,然后再推送到资源库中。 一旦你对你的研讨会感到满意,推送你的修改,然后等待它们通过持续集成管道。它们将像模板项目一样被托管在 。 @@ -166,7 +165,7 @@ background: url("…/…/images/backgrounds/basic.png") 要了解更多关于这个工作流程可以做什么,请查看下面的示例研讨会和托管了研讨会集合的网站。所有这些都是基于本文中描述的工作流程。 -研讨会的例子: +研讨会例子: * [Red Hat Process Automation Manage workshop][6] * [JBoss Travel Agency BPM Suite online workshop][7] @@ -177,7 +176,7 @@ background: url("…/…/images/backgrounds/basic.png") * [Application development in the cloud workshop][9] * [Portfolio architecture: Workshops for creating impactful architectural diagrams][10] -我希望这本新手指南和模板研讨会项目能让你看到,在开发和维护工作室网站的过程中,可以轻松、无痛地完成。我也希望这个工作流程能让你的研讨会受众几乎在任何设备上都能完全访问你的内容,这样他们就能从你分享的知识中学习到你的知识。 +我希望这本新手指南和模板研讨会项目能让你看到,在开发和维护研讨会网站的过程中,可以轻松、无痛地完成。我也希望这个工作流程能让你的研讨会受众几乎在任何设备上都能完全访问你的内容,这样他们就能从你分享的知识中学习到你的知识。 -------------------------------------------------------------------------------- @@ -186,7 +185,7 @@ via: https://opensource.com/article/20/4/create-web-tutorial-git 作者:[Eric D. Schabell][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 33649a710666f0fe066a14da68feadf998f45e9c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 09:50:57 +0800 Subject: [PATCH 232/394] PUB @wxy https://linux.cn/article-12139-1.html --- .../20200408 Create web tutorials with Reveal.js and Git.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200408 Create web tutorials with Reveal.js and Git.md (99%) diff --git a/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md b/published/20200408 Create web tutorials with Reveal.js and Git.md similarity index 99% rename from translated/tech/20200408 Create web tutorials with Reveal.js and Git.md rename to published/20200408 Create web tutorials with Reveal.js and Git.md index f5ad4bf06b..8d549aceaf 100644 --- a/translated/tech/20200408 Create web tutorials with Reveal.js and Git.md +++ b/published/20200408 Create web tutorials with Reveal.js and Git.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12139-1.html) [#]: subject: (Create web tutorials with Reveal.js and Git) [#]: via: (https://opensource.com/article/20/4/create-web-tutorial-git) [#]: author: (Eric D. Schabell https://opensource.com/users/eschabell) From 923725556c3fc4dfac376a360071e70b5a424e62 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 12:06:36 +0800 Subject: [PATCH 233/394] APL --- .../20200423 Difference Between YUM and RPM Package Manager.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md b/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md index 8b2a0c3b3b..3afb4f3d9b 100644 --- a/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md +++ b/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2a11ad1751cba0985b70742b6e1d158eff86a2df Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 12:57:35 +0800 Subject: [PATCH 234/394] TSL --- ...nce Between YUM and RPM Package Manager.md | 110 ------------------ ...nce Between YUM and RPM Package Manager.md | 89 ++++++++++++++ 2 files changed, 89 insertions(+), 110 deletions(-) delete mode 100644 sources/tech/20200423 Difference Between YUM and RPM Package Manager.md create mode 100644 translated/tech/20200423 Difference Between YUM and RPM Package Manager.md diff --git a/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md b/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md deleted file mode 100644 index 3afb4f3d9b..0000000000 --- a/sources/tech/20200423 Difference Between YUM and RPM Package Manager.md +++ /dev/null @@ -1,110 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Difference Between YUM and RPM Package Manager) -[#]: via: (https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -Difference Between YUM and RPM Package Manager -====== - -Package managers play a key role in the Linux system. - -It allows you to install, update, view, search and delete software packages to suit your needs. - -Each of the distributions has their own set of package managers and use them based on your Linux distributions. - -RPM is one of the oldest traditional package managers, designed to work on Red Hat-based systems such as Red Hat Enterprise Linux (RHEL), CentOS, Fedora and openSUSE (which is based on suse Enterprise Linux). - -But when it comes to dependency resolution and package update (full system update/upgrade), there is an prominent limitation for RPM package manager. - -If you want to know the **[difference between yum and dnf package manager][1]** go to the following article. - -This means that yum can download and install all required dependencies automatically, but rpm will tell you to install a list of dependencies, and then you have to manually install them. - -This is practically impossible and time consuming when you want to install a group of packages using the **[rpm command][2]**. - -That’s where the **[YUM Package Manager][3]** comes in handy and solve both problems. - -### What’s RPM? - -RPM refers to RPM Package Manager (formerly known as Red Hat Package Manager) is a powerful, command-line package management tool developed for the Red Hat operating system. - -It is now used as a core component in many Linux distributions such as Centos, Fedora, Oracle Linux, openSUSE and Mageia. - -RPM Package Manager allows you to install, upgrade, delete, query and verify packages on RPM-based Linux systems. - -RPM files comes with the `.rpm` extension. The RPM package consists of an archive file, that contains libraries and dependencies for a specific package, that do not conflict with other packages installed on your system. - -There are many front-end tools available on Linux to install the RPM package that make the installation process more efficiently compared to the RPM tool, especially for handling dependencies. - -If you want to know more about the front-end package manager of Linux distributions, go to the link below. - - * **[List of Front-ent Command-line Package Manager for Linux][4]** - - - -If you would like GUI package manager for Linux, go to the link below. - - * **[List of GUI Package Manager for Linux][5]** - - - -### What’s YUM? - -Yum is a free and open-source command-line package-management application for Linux operating systems that uses the RPM Package Manager. - -Yum is a front-end tool for rpm that automatically solves dependencies for packages. - -It installs RPM software packages from distribution official repositories and other third-party repositories. - -Yum allows you to install, update, search and remove packages from your system. - -If you want to keep your system up-to-date, you can enable automatic updates via yum-cron. - -Also, it allows you to exclude a package or packages from the yum update if you need to. - -Yum is installed by default and you do not need to install it. - -S.No | RPM | YUM ----|---|--- -1 | Red Hat introduced RPM in 1997. | Yellowdog UPdater (YUP) was developed in 1999-2001 and YUM replaced the original YUP utility in 2003. -2 | RPM stands for RPM Package manager (formally known as Red Hat package manager) | YUM stands for Yellowdog Updater Modified. -3 | The RPM File Naming Convention is as follows. -httpd-2.4.6-92.el7.x86_64.rpm -httpd - Name of the actual package -2.4.6 - Version of package release -92 - Subversion of package release -el7 - Red Hat Version -x86_64 - Hardware architecture -rpm - File extension | It uses the rpm database in the backend. -4 | It doesn't resolve dependencies, you must install them manually. | It automatically resolves dependencies and install them simultaneously (any package will be installed with its dependencies). -5 | This allows you to install multiple versions of the package at once | This does not allow and shows that the package is already installed. -6 | When installing a package using the RPM command you must provide the exact location of the ".rpm" package. | You can install any package available in the repository, but you only need to know the package name. -7 | RPM is not dependent on YUM | It is a frontend tool that uses the RPM package manager on the backend to manage packages. -8 | It is difficult to manage RPM in terms of package installation | YUM is the easiest way to manage RPM packages. -9 | RPM doesn't allow you to upgrade the entire system to the latest available version | YUM allows you to upgrade your system to the latest available version (minor version upgrade, for example, 7.0 to 7.x) -10 | RPM doesn't allow you to automatically update/upgrade packages installed on your system | YUM allows you to automatically update/upgrade the updates available on your system. -11 | It doesn't use the online repository to perform any actions. | It relies entirely on the online repository to do all the work. -12 | RPM is a package format and it is a low-level package manager that does basic things. | This is a top-level front-end package manager that can do everything you need. - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/ - -作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ -[2]: https://www.2daygeek.com/linux-rpm-command-examples-manage-packages-fedora-centos-rhel-systems/ -[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ -[4]: https://www.2daygeek.com/list-of-command-line-package-manager-for-linux/ -[5]: https://www.2daygeek.com/list-of-graphical-frontend-tool-for-linux-package-manager/ diff --git a/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md b/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md new file mode 100644 index 0000000000..c0bf8b7352 --- /dev/null +++ b/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md @@ -0,0 +1,89 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Difference Between YUM and RPM Package Manager) +[#]: via: (https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +YUM 和 RPM 包管理器的不同之处 +====== + +软件包管理器在 Linux 系统中扮演着重要的角色。它允许你安装、更新、查看、搜索和删除软件包,以满足你的需求。 + +每个发行版都有自己的一套包管理器,依据你的 Linux 发行版来分别使用它们。 + +RPM 是最古老的传统软件包管理器之一,它是为基于 Red Hat 的系统设计的,如 Red Hat Enterprise Linux(RHEL)、CentOS、Fedora 和 openSUSE(它基于 suse Enterprise Linux)等系统。但在依赖解析和包更新(全系统更新/升级)方面,RPM 包管理器有一个突出的限制。 + +> 如果你想知道 [YUM 和 DNF 包管理器的区别][1]请参考该文章。 + +这意味着 yum 可以自动下载并安装所有需要的依赖项,但 rpm 会告诉你安装一个依赖项列表,然后你必须手动安装。 + +当你想用 [rpm 命令][2] 安装一组包时,这实际上是不可能的,而且很费时间。 + +这时,[YUM 包管理器][3] 就派上了用场,解决了这两个问题。 + +### 什么是 RPM? + +RPM 指的是 RPM Package Manager(原名 Red Hat Package Manager),是一个功能强大的命令行包管理工具,是为 Red Hat 操作系统开发的。 + +它现在被用作许多 Linux 发行版的核心组件,如 Centos、Fedora、Oracle Linux、openSUSE 和 Mageia 等。 + +RPM 软件包管理器允许你在基于 RPM 的 Linux 系统上安装、升级、删除、查询和验证软件包。 + +RPM 文件的扩展名为 `.rpm`。RPM 包由一个存档文件组成,其中包含了一个特定包的库和依赖关系,这些库和依赖关系与系统上安装的其他包不冲突。 + +在 Linux 上有很多前端工具可以用来安装 RPM 包,与 RPM 工具相比,这些工具可以使安装过程更加高效,尤其是在处理依赖关系方面。 + +如果你想了解更多关于 Linux 发行版的前端包管理器的信息,请到下面的链接。 + +* [Linux 命令行包管理器列表][4] + +如果你想了解 Linux 的 GUI 包管理器,请到下面的链接。 + +* [Linux GUI 包管理器列表][5] + +### 什么是 YUM? + +Yum 是一个 Linux 操作系统上的自由开源的命令行包管理程序,它使用 RPM 包管理器。Yum 是一个 RPM 的前端工具,可以自动解决软件包的依赖关系。它可以从发行版官方仓库和其他第三方仓库中安装 RPM 软件包。 + +Yum 允许你在系统中安装、更新、搜索和删除软件包。如果你想让你的系统保持更新,你可以通过 yum-cron 启用自动更新。 + +此外,如果你需要的话,它还允许你在 `yum update` 中排除一个或多个软件包。 + +Yum 是默认安装的,你不需要安装它。 + +编号 | RPM | YUM +--- | --- | --- +1 | 红帽在 1997 年引入了 RPM | Yellowdog UPdater(YUP)开发于 1999-2001 年,YUM 于 2003 年取代了原来的 YUP 工具 +2 | RPM 代表 RPM Package manager(原名 Red Hat package manager) | YUM 代表 Yellowdog Updater Modified +3 | RPM 文件的命名规则如下,`httpd-2.4.6-92.el7.x86_64.rpm`:`httpd` - 实际的包名;`2.4.6` - 包发布版本号;`92` - 包发布子版本号;`el7` - Red Hat 版本;`x86_64` - 硬件架构;`rpm` - 文件扩展名 | 后台使用 rpm 数据库 +4 | 不解析依赖关系,你必须手动安装依赖 | 可以自动解析依赖关系并同时安装它们(任何包都会和它的依赖关系一起安装) +5 | 允许你同时安装多个版本的软件包 | 不允许,并显示该软件包已经安装 +6 | 当使用 RPM 命令安装一个软件包时,你必须提供 `.rpm` 软件包的确切位置 | 你可以安装仓库中的任何软件包,而你只需要知道软件包的名称就可以了 +7 | RPM 不依赖于 YUM | 它是一个前端工具,在后台使用 RPM 包管理器来管理包 +8 | RPM 在安装包的管理方面比较难 | YUM 是最简单的管理 RPM 包的方法 +9 | RPM 不能让你将整个系统升级到最新的版本 | YUM 可以让你将系统升级到最新的版本(例如 7.0 到 7.x 的小版本升级) +10 | RPM 不能让你自动更新/升级安装在系统上的软件包 | YUM 可以让你自动更新/升级系统上的更新 +11 | 不使用在线仓库来执行任何操作 | 完全依赖在线仓库来完成所有的工作 +12 | RPM 是一种包格式,它也是一个底层的包管理器,只做基本的事情 | 这是一个上层的包管理器前端,它可以完成你所需要的一切工作 + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ +[2]: https://www.2daygeek.com/linux-rpm-command-examples-manage-packages-fedora-centos-rhel-systems/ +[3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ +[4]: https://www.2daygeek.com/list-of-command-line-package-manager-for-linux/ +[5]: https://www.2daygeek.com/list-of-graphical-frontend-tool-for-linux-package-manager/ From abe4def77fa4e490e7d6af75df733452c493b278 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 23 Apr 2020 13:09:56 +0800 Subject: [PATCH 235/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020191220=20The=20?= =?UTF-8?q?Difference=20Between=20DNF=20and=20YUM,=20Why=20is=20Yum=20Repl?= =?UTF-8?q?aced=20by=20DNF=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md --- ...DNF and YUM, Why is Yum Replaced by DNF.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md diff --git a/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md new file mode 100644 index 0000000000..01d6522274 --- /dev/null +++ b/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The Difference Between DNF and YUM, Why is Yum Replaced by DNF?) +[#]: via: (https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +The Difference Between DNF and YUM, Why is Yum Replaced by DNF? +====== + +**[Yum Package Manager][1]** has been replaced by **[DNF Package Manager][2]** since many long-standing issues in Yum remain unresolved. + +These problems include poor performance, excessive memory usage, slowdown for dependency resolution. + +DNF uses “libsolv” for dependency resolution, developed and maintained by SUSE to improve performance. + +It was written mostly in python, and it has its own way of coping with dependency resolution. + +Its API is not fully documented, and its extension system only allows Python plugins. + +Yum is a front-end tool for rpm that manages dependencies and repositories, and then uses RPM to install, download, and remove packages. + +Why would they want to build a new tool instead of fixing existing problems? + +Ales Kozamblak explained that the fixing was not technically feasible and that the yum team was not ready to accept the changes immediately. + +Also, the big challenge is that there are 56K lines for yum, but only 29K lines for DNF. + +So there is no way to fix it, except the fork. + +However yum was working fine. + +S.No | DNF (Dandified YUM) | YUM (Yellowdog Updater, Modified) +---|---|--- +1 | DNF uses libsolv for dependency resolution, developed and maintained by SUSE. | YUM uses the public API for dependency resolution +2 | API is fully documented | API is not fully documented +3 | It is written in C, C++, Python | It is written only in Python +4 | DNF is currently used in Fedora, Red Hat Enterprise Linux 8 (RHEL), CentOS 8, OEL 8 and Mageia 6/7. | YUM is currently used in Red Hat Enterprise Linux 6/7 (RHEL), CentOS 6/7, OEL 6/7. +5 | DNf supports various extensions | Yum supports only Python based extension +6 | The API is well documented so it's easy to create new features | It is very difficult to create new features because the API is not properly documented. +7 | The DNF uses less memory when synchronizing the metadata of the repositories. | The YUM uses excessive memory when synchronizing the metadata of the repositories. +8 | DNF uses a satisfiability algorithm to solve dependency resolution (It's using a dictionary approach to store and retrieve package and dependency information). | Yum dependency resolution gets sluggish due to public API. +9 | All performance is good in terms of memory usage and dependency resolution of repository metadata. | Over all performance is poor in terms of many factors. +10 | DNF Update: If a package contains irrelevant dependencies during a DNF update process, the package will not be updated. | YUM will update a package without verifying this. +11 | If the enabled repository does not respond, dnf will skip it and continue the transaction with the available repositories. | If a repository is not available, YUM will stop immediately. +12 | dnf update and dnf upgrade equals. | It's different in yum +13 | The dependencies on package installation are not updated | Yum offered an option for this behavior +14 | Clean Up Package Removal: When removing a package, dnf automatically removes any dependency packages not explicitly installed by the user. | Yum didn’t do this +15 | Repo Cache Update Schedule: By default, ten minutes after the system boots, updates to configured repositories are checked by dnf hourly. This action is controlled by the system timer unit named "/usr/lib/systemd/system/dnf-makecache.timer". | Yum do this too. +16 | Kernel packages are not protected by dnf. Unlike Yum, you can delete all kernel packages, including one that runs. | Yum will not allow you to remove the running kernel +17 | libsolv: for solving packages and reading repositories. + +hawkey: hawkey, library providing simplified C and Python API to libsolv. + +librepo: library providing C and Python (libcURL like) API for downloading linux repository metadata and packages. + +libcomps: Libcomps is alternative for yum.comps library. It’s written in pure C as library and there’s bindings for python2 and python3 | Yum does not use separate libraries to perform this function. +18 | DNF contains 29k lines of code | Yum contains 56k lines of code +19 | DNF was developed by Ales Kozumplik | YUM was developed by Zdenek Pavlas, Jan Silhan and team members + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ + +作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/ +[2]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ From 1eceb9a7806a1ab38a46758b52b2a56d18c5db98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 23 Apr 2020 14:06:22 +0800 Subject: [PATCH 236/394] Translated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原文中的菜单应该是 路径 ,作者写成 对象 了。在翻译的时候直接改过来了 --- ... make a Halloween lantern with Inkscape.md | 188 ------------------ ... make a Halloween lantern with Inkscape.md | 188 ++++++++++++++++++ 2 files changed, 188 insertions(+), 188 deletions(-) delete mode 100644 sources/tech/20191014 How to make a Halloween lantern with Inkscape.md create mode 100644 translated/tech/20191014 How to make a Halloween lantern with Inkscape.md diff --git a/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md b/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md deleted file mode 100644 index 25324f030e..0000000000 --- a/sources/tech/20191014 How to make a Halloween lantern with Inkscape.md +++ /dev/null @@ -1,188 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to make a Halloween lantern with Inkscape) -[#]: via: (https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape) -[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) - -How to make a Halloween lantern with Inkscape -====== -Use open source tools to make a spooky and fun decoration for your -favorite Halloween haunt. -![Halloween - backlit bat flying][1] - -The spooky season is almost here! This year, decorate your haunt with a unique Halloween lantern made with open source! - -Typically, a portion of a lantern's structure is opaque to block the light from within. What makes a lantern a lantern are the parts that are missing: windows cut from the structure so that light can escape. While it's impractical for lighting, a lantern with windows in spooky shapes and lurking silhouettes can be atmospheric and a lot of fun to create. - -This article demonstrates how to create your own lantern using [Inkscape][2]. If you don't have Inkscape, you can install it from your software repository on Linux or download it from the [Inkscape website][3] on MacOS and Windows. - -### Supplies - - * Template ([A4][4] or [Letter][5] size) - * Cardstock (black is traditional) - * Tracing paper (optional) - * Craft knife, ruler, and cutting mat (a craft cutting machine/laser cutter can be used instead) - * Craft glue - * LED tea-light "candle" -_Safety note:_ Only use battery-operated candles for this project. - - - -### Understanding the template - -To begin, download the correct template for your region (A4 or Letter) from the links above and open it in Inkscape. - -* * * - -* * * - -* * * - -**![Lantern template screen][6]** - -The gray-and-white checkerboard background is see-through (in technical terms, it's an _alpha channel_.) - -The black base forms the lantern. Right now, there are no windows for light to shine through; the lantern is a solid black base. You will use the **Union** and **Difference** options in Inkscape to design the windows digitally. - -The dotted blue lines represent fold scorelines. The solid orange lines represent guides. Windows for light should not be placed outside the orange boxes. - -To the left of the template are a few pre-made objects you can use in your design. - -### To create a window or shape - - 1. Create an object that looks like the window style you want. Objects can be created using any of the shape tools in Inkscape's left toolbar. Alternately, you can download Creative Commons- or Public Domain-licensed clipart and import the PNG file into your project. - 2. When you are happy with the shape of the object, turn it into a **Path** (rather than a **Shape**, which Inkscape sees as two different kinds of objects) by selecting **Object > Object to Path** in the top menu. - - - -![Object to path menu][7] - - 3. Place the object on top of the base shape. - 4. Select both the object and the black base by clicking one, pressing and holding the Shift key, then selecting the other. - 5. Select **Object > Difference** from the top menu to remove the shape of the object from the base. This creates what will become a window in your lantern. - - - -![Object > Difference menu][8] - -### To add an object to a window - -After making a window, you can add objects to it to create a scene. - -**Tips:** - - * All objects, including text, must be connected to the base of the lantern. If not, they will fall out after cutting and leave a blank space. - * Avoid small, intricate details. These are difficult to cut, even when using a machine like a laser cutter or a craft plotter. - - - 1. Create or import an object. - 2. Place the object inside the window so that it is touching at least two sides of the base. - 3. With the object selected, choose **Object > Object to Path** from the top menu. - - - -![Object to path menu][9] - - 4. Select the object and the black base by clicking on each one while holding the Shift key). - 5. Select **Object > Union** to join the object and the base. - - - -### Add text - -Text can either be cut out from the base to create a window (as I did with the stars) or added to a window (which blocks the light from within the lantern). If you're creating a window, only follow steps 1 and 2 below, then use **Difference** to remove the text from the base layer. - - 1. Select the Text tool from the left sidebar to create text. Thick, bold fonts work best. - -![Text tool][10] - - 2. Select your text, then choose **Path > Object to Path** from the top menu. This converts the text object to a path. Note that this step means you can no longer edit the text, so perform this step _only after_ you're sure you have the word or words you want. - - 3. After you have converted the text, you can press **F2** on your keyboard to activate the **Node Editor** tool to clearly show the nodes of the text when it is selected with this tool. - - - - -![Text selected with Node editor][11] - - 4. Ungroup the text. - 5. Adjust each letter so that it slightly overlaps its neighboring letter or the base. - - - -![Overlapping the text][12] - - 6. To connect all of the letters to one another and to the base, re-select all the text and the base, then select **Path > Union**. - -![Connecting letters and base with Path > Union][13] - - - - -### Prepare for printing - -The following instructions are for hand-cutting your lantern. If you're using a laser cutter or craft plotter, follow the techniques required by your hardware to prepare your files. - - 1. In the **Layer** panel, click the **Eye** icon beside the **Safety** layer to hide the safety lines. If you don't see the Layer panel, reveal it by selecting **Layer > Layers** from the top menu. - 2. Select the black base. In the **Fill and Stroke** panel, set the fill to **X** (meaning _no fill_) and the **Stroke** to solid black (that's #000000ff to fans of hexes). - - - -![Setting fill and stroke][14] - - 3. Print your pattern with **File > Print**. - - 4. Using a craft knife and ruler, carefully cut around each black line. Lightly score the dotted blue lines, then fold. - -![Cutting out the lantern][15] - - 5. To finish off the windows, cut tracing paper to the size of each window and glue it to the inside of the lantern. - -![Adding tracing paper][16] - - 6. Glue the lantern together at the tabs. - - 7. Turn on a battery-powered LED candle and place it inside your lantern. - - - - -![Completed lantern][17] - -Now your lantern is complete and ready to light up your haunt. Happy Halloween! - -How to make Halloween bottle labels with Inkscape, GIMP, and items around the house. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape - -作者:[Jess Weichler][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/cyanide-cupcake -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/halloween_bag_bat_diy.jpg?itok=24M0lX25 (Halloween - backlit bat flying) -[2]: https://opensource.com/article/18/1/inkscape-absolute-beginners -[3]: http://inkscape.org -[4]: https://www.dropbox.com/s/75qzjilg5ak2oj1/papercraft_lantern_A4_template.svg?dl=0 -[5]: https://www.dropbox.com/s/8fswdge49jwx91n/papercraft_lantern_letter_template%20.svg?dl=0 -[6]: https://opensource.com/sites/default/files/uploads/lanterntemplate_screen.png (Lantern template screen) -[7]: https://opensource.com/sites/default/files/uploads/lantern1.png (Object to path menu) -[8]: https://opensource.com/sites/default/files/uploads/lantern2.png (Object > Difference menu) -[9]: https://opensource.com/sites/default/files/uploads/lantern3.png (Object to path menu) -[10]: https://opensource.com/sites/default/files/uploads/lantern4.png (Text tool) -[11]: https://opensource.com/sites/default/files/uploads/lantern5.png (Text selected with Node editor) -[12]: https://opensource.com/sites/default/files/uploads/lantern6.png (Overlapping the text) -[13]: https://opensource.com/sites/default/files/uploads/lantern7.png (Connecting letters and base with Path > Union) -[14]: https://opensource.com/sites/default/files/uploads/lantern8.png (Setting fill and stroke) -[15]: https://opensource.com/sites/default/files/uploads/lantern9.jpg (Cutting out the lantern) -[16]: https://opensource.com/sites/default/files/uploads/lantern10.jpg (Adding tracing paper) -[17]: https://opensource.com/sites/default/files/uploads/lantern11.jpg (Completed lantern) diff --git a/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md b/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md new file mode 100644 index 0000000000..5e1424ed02 --- /dev/null +++ b/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md @@ -0,0 +1,188 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to make a Halloween lantern with Inkscape) +[#]: via: (https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape) +[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) + +如何使用 Inkscape 制作万圣节灯笼 +====== +使用开源软件为你最喜欢的万圣节灯笼制作一个有趣和怪异的装饰品。 +![万圣节 - 背光飞行的蝙蝠][1] + +闹鬼的季节快到了!今年,使用开源软件装饰一个独一无二的万圣节灯笼! + +灯笼的一部分结构体是不透明的,以阻挡内部的光线。灯笼之所以成为灯笼,是因为其去掉了一些东西 :从结构体上切下的窗户,这样光线就可以射出。虽然照明不实用,但是一个有着怪异形状窗户和隐藏暗色轮廓的灯笼却可以令人兴奋,并创造出很多乐趣。 + +这篇演示如何使用 [Inkscape][2] 创建你自己的灯笼。如果还没有 Inkscape ,在 Linux 上,你可以从软件包存储库中安装它,在 MacOS 和 Windows 上,你可以从[Inkscape 网站][3] 上下载它. + +### 使用材料 + + * 模板 ([A4][4] 或 [Letter][5] 大小) + * 卡片纸 (黑色是传统色) + * 描图纸 (可选) + * 裁纸刀,尺子, 切割垫板 (可使用工艺切割机/激光切割机代替) + * 工艺胶 + * LED 茶灯"蜡烛" + +_安全注意事项:_ 这个项目只使用电池操作的蜡烛。 + + + +### 理解模板 + +首先,从什么的链接下载你所在区域 (A4 或 Letter) 的合适的模板,然后在 Inkscape 中打开它。 + +* * * + +* * * + +* * * + +**![灯笼模板荧光屏][6]** + +灰白色的棋盘格背景是透明的(从技术角度来说,它是 _alpha 通道_。) + +黑色基板构成了灯笼。现在,没有窗口可以让光线穿过;灯笼有一个非镂空的黑色基板。你将在 Inkscape 中使用 **并集** 和 **差集** 选项来数字化的设计窗户。 + +蓝色虚线表示折线。橙色实线表示参考线。采光窗户不应该放在橙色盒子的外面。 + +模板的左侧是你可以在你设计中使用的一些预先制作好的对象。 + +### 来创建一个窗户或形状 + + 1. 创建一个看起来像你想要的窗口样式的对象。可以使用 Inkscape 左侧工具栏中的一些形状工具来创建对象。此外,你可以下载 Creative Commons- 或 Public Domain-licensed 剪贴画,并导入 PNG 文件到你的项目中。 + 2. 当你对对象满意时,在顶部菜单中选择 **路径 > 对象转化成路径** 将其转换为一个 **路径** (而不是一个 **形状** ,Inkscape 视其为两个不同的目标)。 + + + +![对象到路径菜单][7] + + 3. 在基板形状的上面放置目标。 + 4. 选择目标和黑色基板。通过先单击一个,并按住 Shift 按键,再选择另一个来完成。 + 5. 从顶部菜单选择 **路径 > 差集** 来从基板的对象中移除形状。这将创建灯笼中的一个窗户。 + + + +![路径 > 差集 菜单][8] + +### 添加一个对象到一个窗户中 + +在制作一个窗户后,你可以添加对象到其中来创建一个景色绘画。 + +**提示:** + + * 所有的对象,包括文本,必须连接到灯笼的基板,否则,在切割后会掉落下来,并留下一片空白区。 + * 避免小而复杂的细微之处。即使使用激光切割机或工艺切割机等机器,也很难切割这些细微之处。 + + + 1. 创建或导入一个对象。 + 2. 放置对象到窗口内,以便它至少接触基板的两侧。 + 3. 选择对象后,从顶部菜单选择 **连接 > 对象转化成路径** 。 + + + +![对象到路径 菜单][9] + + 4. 选择对象和黑色基板,通过在按住 Shift 按键的同时单击每一个来完成。 + 5. 选择 **路径 > 并集** 来使对象和基板合二为一。 + + + +### 添加文本 + +文本可以从创建一个窗户的基板上剪下来(就像我对星星所做的那样),或者也可以添加到一个窗户上(它在独挡来自灯笼内部的光线)。如果你正在创建一个窗户,只需要执行下面的步骤1和步骤2,然后使用 **差集** 来从基板层移除文本。 + + 1. 从左侧边栏中选择文本工具来创建文本。粗体字体效果最好。 + +![文本工具][10] + + 2. 选择你的文本,然后从顶部菜单选择 **路径 > 对象转化成路径** 。这将转换文本对象为一个路径。注意,这个步骤意味着你将不能再编辑该文本,所以,_只有当_ 你确定你拥有想要的单词后,执行这个步骤。 + + 3. 在你转换文本后,你可以按键盘上的 **F2** 来激活 **节点编辑器** 工具,当选择使用这个工具时,可以清楚地显示文本的节点。 + + + + +![选中的文本使用节点编辑器][11] + + 4. 取消文本分组。 + 5. 调整每个字母,以便使其与相邻字母或基板稍微重叠。 + + + +![重叠文本][12] + + 6. 为将所有的字母彼此连接并连接到基板,重新选择所有文本和基板,然后选择 **路径 > 并集**。 + +![使用 路径 > 并集 连接字母和基板][13] + + + + +### 准备打印 + +下面是手工切割灯笼的说明。如果使用激光切割机或工艺切割机,遵循硬件所需要的技巧来准备好你的文件。 + + 1. 在 **图层** 面板中,单击 **安全** 图层旁边的**眼睛** 图标来隐藏安全线。如果你看不到图层面板,通过顶部菜单选择 **图层 > 图层** 来显示它。 + 2. 选择黑色基板。在 **填充和笔划** 面板中,设置填充为 **X** (意味着 _不填充_),设置 **笔划** 为纯黑色(对于巫法的粉丝来说是 #000000ff )。 + + + +![设置填充和笔划][14] + + 3. 使用 **文件 > 打印** 来打印你的图案样本。 + + 4. 使用一把工艺刀和直尺,小心地绕着每一条黑线切割。在蓝色虚线上轻划,然后折叠。 + +![裁剪灯笼][15] + + 5. 为完成窗户的制作,剪切摹图纸到每个窗户的大小,然后粘贴它到灯笼的内侧。 + +![添加摹图纸][16] + + 6. 在折条处把灯笼的粘在一起。 + + 7. 接通电池供电的 LED 蜡烛,并放置它到你灯笼中。 + + + + +![完成灯笼][17] + +现在你的灯笼已经完成并准备好照亮你的诡异的装饰品。万圣节快乐! + +如何使用 Inkscape,GIMP 制作万圣节瓶子标签和家用物品。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape + +作者:[Jess Weichler][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cyanide-cupcake +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/halloween_bag_bat_diy.jpg?itok=24M0lX25 (Halloween - backlit bat flying) +[2]: https://opensource.com/article/18/1/inkscape-absolute-beginners +[3]: http://inkscape.org +[4]: https://www.dropbox.com/s/75qzjilg5ak2oj1/papercraft_lantern_A4_template.svg?dl=0 +[5]: https://www.dropbox.com/s/8fswdge49jwx91n/papercraft_lantern_letter_template%20.svg?dl=0 +[6]: https://opensource.com/sites/default/files/uploads/lanterntemplate_screen.png (Lantern template screen) +[7]: https://opensource.com/sites/default/files/uploads/lantern1.png (Object to path menu) +[8]: https://opensource.com/sites/default/files/uploads/lantern2.png (Object > Difference menu) +[9]: https://opensource.com/sites/default/files/uploads/lantern3.png (Object to path menu) +[10]: https://opensource.com/sites/default/files/uploads/lantern4.png (Text tool) +[11]: https://opensource.com/sites/default/files/uploads/lantern5.png (Text selected with Node editor) +[12]: https://opensource.com/sites/default/files/uploads/lantern6.png (Overlapping the text) +[13]: https://opensource.com/sites/default/files/uploads/lantern7.png (Connecting letters and base with Path > Union) +[14]: https://opensource.com/sites/default/files/uploads/lantern8.png (Setting fill and stroke) +[15]: https://opensource.com/sites/default/files/uploads/lantern9.jpg (Cutting out the lantern) +[16]: https://opensource.com/sites/default/files/uploads/lantern10.jpg (Adding tracing paper) +[17]: https://opensource.com/sites/default/files/uploads/lantern11.jpg (Completed lantern) From da9a8024d79bb21fb42cf8c45f97b89a7c68db6b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 15:46:15 +0800 Subject: [PATCH 237/394] PRF @messon007 --- ... the internet backbone and how it works.md | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/translated/talk/20200313 What is the internet backbone and how it works.md b/translated/talk/20200313 What is the internet backbone and how it works.md index d8294dba3c..716d6e5154 100644 --- a/translated/talk/20200313 What is the internet backbone and how it works.md +++ b/translated/talk/20200313 What is the internet backbone and how it works.md @@ -1,53 +1,53 @@ [#]: collector: (lujun9972) [#]: translator: (messon007) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What is the internet backbone and how it works) [#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html) [#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) -互联网的骨干网是什么以及它是怎样工作的 +什么是互联网骨干网,它是怎样工作的 ====== -一级互联网服务提供商(ISP)将其高速光纤网络连接在一起,形成互联网的骨干网,实现在不同地理区域之间高效地传输流量。[Gerd Altmann][1] [(CC0)][2] + +> 一级互联网服务提供商(ISP)将其高速光纤网络连接在一起,形成互联网的骨干网,实现在不同地理区域之间高效地传输流量。 + +![](https://images.idgesg.net/images/article/2018/04/global_network_connections_by_gerd_altmann_cc0_via_pixabay_1200x800-100754306-large.jpg) 互联网会产生大量的计算机到计算机的流量,要确保所有流量都可以在世界上任何地方之间传输,就需要大量汇聚的高速网络,这些网络统称为互联网骨干网,但是它是如何工作的呢? ### 互联网的骨干网是什么? -像任何其他网络一样,Internet由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的各个高速光纤网络而构成的Internet骨干网。 -各个独立的核心网络由一级互联网服务提供商(ISP),大型运营商所拥有。他们的网络连接在一起。这些提供商包括AT&T,CenturyLink,Cogent Communications,德国电信,全球电信和技术(GTT),NTT Communications,Sprint,Tata Communications,意大利Sparkle电信,Telia Carrier和Verizon。 +像任何其他网络一样,互联网由接入链路组成,这些接入链路将流量传输到高带宽路由器,路由器又将流量从源地址通过最佳可用路径传输到目的地址。其核心是由相互连接的、彼此对等的各个高速光纤网络而构成的互联网骨干网。 -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] +单个独立的核心网络由一级互联网服务提供商(ISP)所拥有。他们的网络连接在一起。这些提供商包括 AT&T、CenturyLink、Cogent Communications,、Deutsche Telekom、Global Telecom and Technology (GTT)、NTT Communications、Sprint、Tata Communications,、Telecom Italia Sparkle、Telia Carrier和 Verizon。 -通过将这些长途网连接在一起,一级ISP们创建了一个他们可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地ISP网络来有效地将流量传输到其目的地。 +通过将这些长途网连接在一起,一级 ISP 们创建了一个他们可以访问整个路由表的单一的全球性网络,因此他们可以通过逐步层次化地增加本地 ISP 网络来有效地将流量传输到其目的地。 -除了物理连接之外,这些骨干提供商还通过一致的网络协议TCP/IP融合在一起。它们实际上是两个协议,传输控制协议和IP协议,它们在计算机之间建立连接,以确保连接可靠并将消息格式化为数据包。 +除了物理连接之外,这些骨干网提供商还通过一致的网络协议 TCP/IP 融合在一起,这实际上是两个协议,传输控制协议transport control protocol互联网协议internet protocol,它们在计算机之间建立连接,以确保连接可靠,并将消息格式化为数据包。 -### 互联网交接点(IXP)将骨干连接在一起 +### 互联网交接点(IXP)将骨干网连接在一起 -骨干ISP在对等点,中立位置通过高速交换机和路由器连接其网络。这些通常由第三方(有时是非营利组织)提供,以促进骨干网的统一。 +骨干网 ISP 在中立位置的对等点通过高速交换机和路由器连接其网络。这些通常由第三方(有时是非营利组织)提供,以促进骨干网的统一。 -有1级ISP的参与有助于为IXP提供资金,但是在称为无结算的对等关系中,彼此之间不收取从其他1级ISP传输流量的费用。此类协议消除了可能导致互联网性能下降的潜在财务纠纷。 - -[][4] +参与的一级 ISP 会帮助资助 IXP,但不向其他一级 ISP 收取流量传输费用,这种关系称为无结算对等。这种协议消除了可能导致互联网性能下降的潜在财务纠纷。 ### 骨干网有多快? -互联网骨干网由最快的路由器组成,可以提供100Gbps的线路速度。这些路由器由包括Cisco,Extreme,Huawei,Juniper和Nokia在内的供应商制造,使用边界网关协议(BGP)在彼此之间路由流量。 + +互联网骨干网由最快的路由器组成,可以提供 100Gbps 的线路速度。这些路由器由包括 Cisco、Extreme、华为、Juniper 和 Nokia 在内的供应商制造,使用边界网关协议(BGP)在彼此之间路由流量。 ### 流量是如何进入骨干网的 -1级ISP之下是小的2级和3级ISP。 +在 1 级 ISP 之下是规模较小的 2 级和 3 级 ISP。 -3级(ISP)提供商为企业和消费者提供了Internet接入服务。这些提供商自己没有接入互联网骨干网,因此,他们自己无法将其客户连接到数十亿台互联网上的计算机。 +3 级 ISP 为企业和消费者提供了互联网接入服务。这些提供商自己没有接入互联网骨干网,因此,他们自己无法将其客户连接到数十亿台互联网上的计算机。 -购买一级(ISP)提供商的接入权非常昂贵。通常3级ISP与具有自己网络的2级(区域)ISP签订合同,利用2级ISP的网络将流量传输到有限的地理区域,但不能传输到所有Internet上的设备。 +购买一级 ISP 提供商的接入非常昂贵。通常 3 级 ISP 与拥有自己网络的 2 级(区域)ISP 签订合同,利用 2 级 ISP 的网络将流量传输到有限的地理区域,但不能传输到所有互联网上的设备。 -为此,2级ISP与1级ISP签约以访问全球骨干网,并以这种方式使客户可以访问整个Internet。 +为此,2 级 ISP 与 1 级 ISP 签约以访问全球骨干网,并以这种方式使客户可以访问整个互联网。 -这种方式使得来自世界一侧的计算机的流量能够连接到另一侧的计算机。流量从源计算机流向3级ISP,再路由到2级ISP,再路由到1级骨干网提供商,再路由到正确的2级ISP,最后路由到提供该数据的3级接入提供商连接的目标计算机。 +这种方式使得来自世界一侧的计算机的流量能够连接到另一侧的计算机。流量从源计算机流向 3 级 ISP,再路由到 2 级 ISP,再路由到 1 级骨干网提供商,再路由到正确的 2 级 ISP,最后路由到提供该数据的 3 级接入提供商连接的目标计算机。 -加入[Facebook][5]和[LinkedIn][6]上的Network World社区,就可以评论最前沿的话题。 -------------------------------------------------------------------------------- via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html @@ -55,7 +55,7 @@ via: https://www.networkworld.com/article/3532318/what-is-the-internet-backbone- 作者:[Tim Greene][a] 选题:[lujun9972][b] 译者:[messon007](https://github.com/messon007) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 56824d6b5daa64e152253186368fe68fe67ac21a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 15:46:51 +0800 Subject: [PATCH 238/394] PUB @geekpi https://linux.cn/article-12141-1.html --- ...20200313 What is the internet backbone and how it works.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/talk => published}/20200313 What is the internet backbone and how it works.md (98%) diff --git a/translated/talk/20200313 What is the internet backbone and how it works.md b/published/20200313 What is the internet backbone and how it works.md similarity index 98% rename from translated/talk/20200313 What is the internet backbone and how it works.md rename to published/20200313 What is the internet backbone and how it works.md index 716d6e5154..5e120b20da 100644 --- a/translated/talk/20200313 What is the internet backbone and how it works.md +++ b/published/20200313 What is the internet backbone and how it works.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (messon007) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12141-1.html) [#]: subject: (What is the internet backbone and how it works) [#]: via: (https://www.networkworld.com/article/3532318/what-is-the-internet-backbone-and-how-it-works.html) [#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) From 77257fdd10424d9a4e945ef3e530eb10fff3f74f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 23:56:06 +0800 Subject: [PATCH 239/394] PRF @geekpi --- ...o package Python applications for Linux.md | 112 ++++++++---------- 1 file changed, 52 insertions(+), 60 deletions(-) diff --git a/translated/tech/20200416 How to package Python applications for Linux.md b/translated/tech/20200416 How to package Python applications for Linux.md index a44918f7cd..a5e40e7df9 100644 --- a/translated/tech/20200416 How to package Python applications for Linux.md +++ b/translated/tech/20200416 How to package Python applications for Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to package Python applications for Linux) @@ -9,146 +9,138 @@ 如何为 Linux 打包 Python 应用 ====== -了解如何使用 dh_virtualenv 来让你的 Python 应用可作为 .deb 包安装。 -![Python in a tree][1] -一种让 Python 应用可在基于 Debian 的操作系统(例如 Debian 或 [Elementary OS][2])上安装的方法是使用 [dh_virtualenv][3] 工具。它会构建一个封装了 Python 虚拟环境的 **.deb** 包,并在安装时进行部署。 +> 了解如何使用 dh_virtualenv 来让你的 Python 应用可作为 .deb 包安装。 -在本文中,我将以构建包含 [HTTPie][4] 工具的包为例,说明如何无需激活虚拟环境即可从命令行测试 HTTP API。 +![](https://img.linux.net.cn/data/attachment/album/202004/23/235547iztz5d955t9s9b5t.jpg) + +在基于 Debian 的操作系统(例如 Debian 或 [Elementary OS][2])上安装 Python 应用的一种方法是使用 [dh_virtualenv][3] 工具。它可以构建一个 `.deb` 包,在应用之外封装了一个 Python 虚拟环境,并在安装时进行部署。 + +在本文中,我将以构建一个包含 [HTTPie][4] 工具的包为例来解释如何使用它,以便在无需激活虚拟环境的情况下从命令行测试 HTTP API。 ### 使用 dh_virtualenv 打包 -首先,你需要安装 dh_virtualenv 所需的工具。dh_virtualenv 的[文档][5]提供了所有安装选项。在基于 Debian 的系统上,我输入: +首先,你需要安装 `dh_virtualenv` 所需的工具。`dh_virtualenv` 的[文档][5]提供了所有安装选项。在基于 Debian 的系统上,我输入: ``` -`apt-get install dh-virtualenv devscripts` +apt-get install dh-virtualenv devscripts ``` -尽管不需要 [devscripts][6] 包,但它将简化后续操作。 +尽管不需要 [devscripts][6] 包,但它可以简化后续操作。 -现在,创建一个目录来保存源码。由于这是 HTTPie 的本地非官方打包,因此我将其称为 **myhttp**。 接下来,让我们在 **myhttp** 内创建一些文件以向 Debian 构建系统提供元数据。 - -首先,创建 **debian/control** 文件: +现在,创建一个目录来保存源码。由于这是一个本地的、非官方的 HTTPie 打包,因此我将其称为 `myhttp`。接下来,让我们在 `myhttp` 内创建一些文件,向 Debian 构建系统提供元数据。 +首先,创建 `debian/control` 文件: ``` Source: myhttp Section: python Priority: extra -Maintainer: Jan Doe <[jandoe@example.org][7]> -Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8) +Maintainer: Jan Doe +Build-Depends: debhelper (>= 9), python3.7, dh-virtualenv (>= 0.8) Standards-Version: 3.9.5 Package: myhttp Architecture: any -Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends} +Pre-Depends: dpkg (>= 1.16.1), python3.7, ${misc:Pre-Depends} Depends: ${misc:Depends} Description: http client - Useful for doing stuff + Useful for doing stuff ``` -那么这些是什么信息呢? [Debian 文档][8]指出: +那么这些是什么信息呢?正如 [Debian 文档][8]指出的: >“第 1–7 行是源码包的控制信息。第 9–13 行是二进制包的控制信息。” 以下是我使用的: - * **section** 的值对于我们来说大多没有意义,但需要存在。它对提供 UI 安装程序信息是有意义的,这与此包无关。 - * 额外的 **Priority** 值是像这样的第三方包的正确优先级。 - * 强烈建议在 **Maintainer** 字段中填写正确的联系人信息。但是,如果包由团队维护,并且你希望将问题发送到团队的邮件别名,例如 “Infrastructure Team <[infra-team-list@company.example.com][9]>”,那这不一定是你的个人邮箱。 - * **build-depends** 字段标识你需要 debhelper、python 和 dh-virtualenv 来构建包:包生成过程将确保这些依赖项在包构建时安装。 - * **standards version** 字段主要给人看。它表明你遵循的指南。本指南基于 dh-virtualenv 的官方文档,它是基于 Debian 的 3.9.5 指南。最好一直将源码包和二进制包命名相同。 - * **Architecture** 字段应为 **Any**,因为除非虚拟环境可能包含一些特定于体系结构的文件。否则,最好选择该字段为 **any**。 - * 保持 Pre-Depends 列表为当前的样式:预依赖是一种非常严格的依赖关系形式,你很少会需要比建议的最小依赖更多的依赖项。依赖项通常由构建系统准确计算,因此没有理由手动指定它们。 - * 如果你的包主要用于内部,那么 **Description** 字段只需要最少的信息或者指向公司 wiki 的链接,不然详细信息更有用。 - - - -然后创建 **debian/compat** 文件,它[主要出于历史目的而存在][10]: +* `Section` 的值对于我们来说大多没有意义,但需要存在。它对给引导式 UI 安装程序提供信息是有意义的,但对于这个包来说,没有意义。 +* `Priority` 对像这样的第三方包的正确值是 `extra`。 +* 强烈建议在 `Maintainer` 字段中填写正确的联系人信息。但不一定非得是你的个人电子邮件,如果包由团队维护,并且你希望将问题发送到团队的邮件别名,例如 `Infrastructure Team `。 +* `Build-Depends` 字段标识你需要 `debhelper`、`python` 和 `dh-virtualenv` 来构建包:包构建过程中将确保这些依赖项在包构建时已安装。 +* `Standards-Version` 字段主要给人看。它表明你遵循的指南。本指南基于 `dh-virtualenv` 的官方文档,它是基于 Debian 的 3.9.5 指南。最好一直将源码包和二进制包命名相同。 +* `Architecture` 字段应为 `Any`,因为除非虚拟环境可能包含一些特定于体系结构的文件。否则,最好选择该字段为 `any`。 +* 保持 `Pre-Depends` 列表不变:它是一种非常严格的依赖关系形式,你很少会需要比这里建议的最小依赖更多的依赖项。依赖项通常由构建系统准确计算,因此没有理由手动指定它们。 +* 如果你的包主要用于内部,那么 `Description` 字段可能只需要最少的信息或者指向公司 wiki 的链接,不然更多的信息会更有用。 +然后创建 `debian/compat` 文件,它[主要出于历史目的而存在][10]: ``` -`$ echo "9" > debian/compat` +$ echo "9" > debian/compat ``` -接下来,创建更新日志以告知包用户自上一发行版以来发生了什么变化。最简单的方法是使用 **dch --create** 创建模板,然后填写值。 +接下来,创建更新日志以告知包用户自上次发布以来发生了什么变化。最简单的方法是使用 `dch --create` 创建模板,然后填写值。 填写后,它看起来像: - ``` myhttp (2.0.0-1) stable; urgency=medium -  * Initial release. + * Initial release. - -- Jan Doe <[jandoe@example.org][7]>  Fri, 27 Mar 2020 01:09:22 +0000 + -- Jan Doe Fri, 27 Mar 2020 01:09:22 +0000 ``` 现在你需要告诉工具安装 HTTPie,但是哪个版本? -创建一个宽松版本的 **requirements.in** 文件: - +创建一个宽松版本的 `requirements.in` 文件: ``` -`httpie` +httpie ``` -通常,宽松的需求文件将仅包含项目的直接依赖项,并在需要时指定最低版本。 不一定总是需要指定最低版本:这些工具通常偏向于将依赖关系转化为“可能的最新版本”。如果你的 Debian 包与一个内部 Python 包相对应,这是内部应用中的一种常见情况,那么宽松的需求文件看起来将很相似:仅包含包名的一行。 - -然后使用 **pip-compile**(可通过安装 PyPI 包 **pip-tools** 获得): +通常,宽松的需求文件将仅包含项目的直接依赖项,并在需要时指定最低版本。不一定总是需要指定最低版本:这些工具通常偏向于将依赖关系转化为“可能的最新版本”。如果你的 Debian 包与一个内部 Python 包相对应,这是内部应用中的一种常见情况,那么宽松的需求文件看起来将很相似:仅包含包名的一行。 +然后使用 `pip-compile`(可通过安装 PyPI 包 `pip-tools` 获得): ``` -`$ pip-compile requirements.in > requirements.txt` +$ pip-compile requirements.in > requirements.txt ``` -这会生成一个严格的依赖文件,名为 **requirements.txt**: - +这会生成一个严格的依赖文件,名为 `requirements.txt`: ``` # # This file is autogenerated by pip-compile # To update, run: # -#    pip-compile requirements.in +# pip-compile requirements.in # -certifi==2019.11.28       # via requests -chardet==3.0.4            # via requests -httpie==2.0.0             # via -r requirements.in -idna==2.9                 # via requests -pygments==2.6.1           # via httpie -requests==2.23.0          # via httpie -urllib3==1.25.8           # via requests +certifi==2019.11.28 # via requests +chardet==3.0.4 # via requests +httpie==2.0.0 # via -r requirements.in +idna==2.9 # via requests +pygments==2.6.1 # via httpie +requests==2.23.0 # via httpie +urllib3==1.25.8 # via requests ``` -最后,写一个 **debian/rules** 文件来创建包。因为 dh_virtualenv 会处理所有困难的事,因此规则文件很简单: - +最后,写一个 `debian/rules` 文件来创建包。因为 `dh_virtualenv` 会处理所有困难的事,因此规则文件很简单: ``` #!/usr/bin/make -f %: -        dh $@ --with python-virtualenv --python /usr/bin/python3.7 + dh $@ --with python-virtualenv --python /usr/bin/python3.7 ``` -确保指定 Python 解释器。默认它会使用 **/usr/bin/python**,这是 Python2,但是你应该使用一个[受支持的 Python 版本][11] +确保指定 Python 解释器。默认它会使用 `/usr/bin/python`,这是 Python2,但是你应该使用一个[受支持的 Python 版本][11]。 完成了,接下来就是构建包: - ``` -`$ debuild -b -us -uc` +$ debuild -b -us -uc ``` -这会在父目录生成一个类似 **myhttp_2.0.0-1_amd64.deb** 的文件。该文件可在任何兼容的系统上安装。 +这会在父目录生成一个类似 `myhttp_2.0.0-1_amd64.deb` 的文件。该文件可在任何兼容的系统上安装。 通常,最好在同一平台上构建用于特定平台(例如 Debian 10.0)的 Debian 包。 -你可以将此 Debian 包保存在存仓库中,并使用例如 [Ansible][12] 的工具将其安装在所有相关系统上。 +你可以将此 Debian 包保存在软件仓库中,并使用例如 [Ansible][12] 的工具将其安装在所有相关系统上。 ### 总结 -给基于 Debian 的系统的打包应用是一个有多个步骤的过程。使用 dh_virtualenv 将使过程变得简单。 +给基于 Debian 的系统的打包应用是一个有着多个步骤的过程。使用 `dh_virtualenv` 将使过程变得简单明了。 -------------------------------------------------------------------------------- @@ -157,7 +149,7 @@ via: https://opensource.com/article/20/4/package-python-applications-linux 作者:[Moshe Zadka][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 56c99bf74e599cd436b2864f212f84af1e345c69 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 23 Apr 2020 23:56:35 +0800 Subject: [PATCH 240/394] PUB @geekpi https://linux.cn/article-12143-1.html --- .../20200416 How to package Python applications for Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200416 How to package Python applications for Linux.md (99%) diff --git a/translated/tech/20200416 How to package Python applications for Linux.md b/published/20200416 How to package Python applications for Linux.md similarity index 99% rename from translated/tech/20200416 How to package Python applications for Linux.md rename to published/20200416 How to package Python applications for Linux.md index a5e40e7df9..95b6bba528 100644 --- a/translated/tech/20200416 How to package Python applications for Linux.md +++ b/published/20200416 How to package Python applications for Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12143-1.html) [#]: subject: (How to package Python applications for Linux) [#]: via: (https://opensource.com/article/20/4/package-python-applications-linux) [#]: author: (Moshe Zadka https://opensource.com/users/moshez) From 46a62210b98fe3e77c866736324439affc261cb5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 24 Apr 2020 01:03:41 +0800 Subject: [PATCH 241/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200424=20Ubuntu?= =?UTF-8?q?=2020.04=20LTS=20Released.=20Download=20Now!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md --- ...Ubuntu 20.04 LTS Released. Download Now.md | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md diff --git a/sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md new file mode 100644 index 0000000000..9eb9a036c7 --- /dev/null +++ b/sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md @@ -0,0 +1,127 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Ubuntu 20.04 LTS Released. Download Now!) +[#]: via: (https://itsfoss.com/download-ubuntu-20-04/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Ubuntu 20.04 LTS Released. Download Now! +====== + +_**Brief: Ubuntu 20.04 LTS Focal Fossa has been finally released. Here is a quick recap of the new features and the download links for Ubuntu 20.04** **and the official flavours for it**._ + +The wait is finally over. Ubuntu 20.04 LTS has finally arrived and is available to download! + +![][1] + +If you were already using Ubuntu 19.10, you may not notice a lot of noticeable differences – but the list of improvements that I’m looking at is indeed impressive. + +If you’re curious about what’s new, I’ll mention a few key highlights for this release. + +### Ubuntu 20.04: What’s new? + +Considering the previous 18.04 LTS release, Ubuntu 20.04 LTS involves a lot of visual changes and under-the-hood improvements as well. + +Of course, with the addition of [GNOME 3.36][2], a major visual upgrade and the performance improvement is quite obvious. Here’s a video highlighting what’s new in Ubuntu 20.04: + +You can also dive into one of our articles highlighting [new features of Ubuntu 20.04][3], if you’re curious. + +In either case, let me just give you some highlights: + + * GNOME 3.36 is the default desktop + * The performance has improved a lot + * The new Yaru theme is gorgeous, comes in dark mode as well + * You won’t have to see the Amazon app anymore, it’s gone for good! + * Improved [ZFS][4] support + * You get the latest [Linux Kernel 5.4][5] (LTS) + * Adds exFAT support + * Improved hardware and graphics support + * Updated software Python 3.8.2 + * Wireguard is being backported to Linux Kernel 5.4 to be utilized on Ubuntu 20.04 + + + +If you want to see the features in detail and in action, please watch this video highlighting the best features of 20.04 LTS: + +[Subscribe to our YouTube channel for more Linux videos][6] + +In case you’re new to Ubuntu and have questions about Ubuntu 20.04, we also have a quick [Ubuntu 20.04 FAQ][7] article for you. + +### Upgrade to Ubuntu 20.04 from 18.04 and 19.10 + +If you are already using Ubuntu 18.04 or 19.10, you can easily upgrade to Ubuntu 20.04 from within your system. + +This way, your files and most of the applications settings remain as it is while you start using the new version without reinstalling it from the ISO. + +You can read this detailed tutorial to learn [how to upgrade Ubuntu to a newer version][8]. + +Please note that if you are using Lubuntu 18.04, you must not upgrade to Lubuntu 20.04. Lubuntu 18.04 used Lxde desktop while later versions use LXQt desktop. Upgrading this way result in conflicts and possible broken system. + +### Download Ubuntu 20.04 LTS + +You can grab the ISO or the torrent file, depending on what you prefer: + +[Ubuntu 20.04 LTS (ISO)][9] + +[Ubuntu 20.04 LTS (Torrent)][10] + +Please follow this tutorial to learn [how to install Ubuntu][11]. + +### Download Ubuntu 20.04 LTS Official Flavours + +If you want to grab an official flavour of Ubuntu with a different desktop environment, please follow the links below. + +[Ubuntu MATE 20.04 LTS][12] + +[Kubuntu 20.04 LTS][13] + +[Xubuntu 20.04 LTS][14] + +[Ubuntu Budgie 20.04 LTS][15] + +[Ubuntu Studio 20.04 LTS][16] + +[Lubuntu 20.04 LTS][17] + +If you don’t find the latest ISO/torrent file listed in their respective official sites, simply head to [cdimages.ubuntu.com][18] to find all the flavours listed. + +Next, navigate to the **name-of-the-distro** -> **releases** -> **20.04** -> **release** and then you should find the links to the ISO and the torrent files listed. + +If you have questions, please refer to this article that answers [frequently asked questions about Ubuntu 20.04][7]. If you are going to install it, do check our recommended [things to do after installing Ubuntu 20.04][19]. + +Enjoy Ubuntu 20.04 LTS Focal Fossa! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/download-ubuntu-20-04/ + +作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Ubuntu-20.04-LTS-released.png?ssl=1 +[2]: https://itsfoss.com/gnome-3-36-release/ +[3]: https://itsfoss.com/ubuntu-20-04-release-features/ +[4]: https://itsfoss.com/what-is-zfs/ +[5]: https://itsfoss.com/linux-kernel-5-4/ +[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[7]: https://itsfoss.com/ubuntu-20-04-faq/ +[8]: https://itsfoss.com/upgrade-ubuntu-version/ +[9]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso +[10]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso.torrent +[11]: https://itsfoss.com/install-ubuntu/ +[12]: https://ubuntu-mate.org/download/amd64/focal/ +[13]: https://kubuntu.org/getkubuntu/ +[14]: https://xubuntu.org/download/ +[15]: https://ubuntubudgie.org/downloads/ +[16]: https://ubuntustudio.org/ +[17]: https://lubuntu.me/downloads/ +[18]: http://cdimages.ubuntu.com/ +[19]: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/ From 5878f65d3237e7e504b08d85f8a788031f250a9e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 24 Apr 2020 01:04:33 +0800 Subject: [PATCH 242/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200424=2016=20T?= =?UTF-8?q?hings=20to=20do=20After=20Installing=20Ubuntu=2020.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md --- ...ngs to do After Installing Ubuntu 20.04.md | 283 ++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md diff --git a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md new file mode 100644 index 0000000000..cca31a0426 --- /dev/null +++ b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md @@ -0,0 +1,283 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (16 Things to do After Installing Ubuntu 20.04) +[#]: via: (https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +16 Things to do After Installing Ubuntu 20.04 +====== + +_**Here is a list of tweaks and things to do after installing Ubuntu 20.04, to get a smoother and better desktop Linux experience.**_ + +[Ubuntu 20.04 LTS brings plenty of new features][1] and visual changes. If you choose to install Ubuntu 20.04, let me show you a few recommended steps that you can follow to get started with it. + +### 16 Things to do after installing Ubuntu 20.04 LTS “Focal Fossa” + +![][2] + +The steps I am going to mention here are my recommendation. You may ignore a few customization or tweaks if they don’t suit your need and interest. + +Similarly, some steps may seem too simple but essential for someone completely new to Ubuntu. + +A number of suggestions here are suited for the default Ubuntu 20.04 with GNOME desktop. So please check [which Ubuntu version][3] and [which desktop environment][4] you are using. + +Let’s get started with the list of things to do after installing Ubuntu 20.04 LTS codenamed Focal Fossa. + +#### 1\. Get your system ready by updating and enabling additional repos + +The first thing you should do after installing Ubuntu or any other Linux distribution is to update it. Linux works on a local database of available packages. And this cache needs to be synced in order for you to be able to install any software. + +It is very easy to update Ubuntu. You can run the software updater from the menu (press Windows key and search for software updater): + +![Software Updater in Ubuntu 20.04][5] + +You may also use the following command in the terminal to update your system: + +``` +sudo apt update && sudo apt upgrade +``` + +Next, you should make sure that you have [universe and multiverse repositories enabled][6]. You’ll have access to a lot more software with these repositories. I also recommend reading about [Ubuntu repositories][6] to learn the basic concept behind it. + +Search for Software & Updates in the menu: + +![Software & Updates Settings][7] + +Make sure to check the boxes in front of the repositories: + +![Enable additional repositories][8] + +#### 2\. Install media codecs to play MP3, MPEG4 and other media files + +If you want to play media files like MP3, MPEG4, AVI etc, you’ll need to install media codecs. Ubuntu doesn’t install it by default because of copyright issues in various countries. + +As an individual, you can install these media codecs easily [using the Ubuntu Restricted Extra package][9]. This will install media codecs, Adobe Flash player and [Microsoft True Type Fonts in your Ubuntu system][10]. + +You can install it by [clicking this link][11] (it will asked to be open in software center) or use this command: + +``` +sudo apt install ubuntu-restricted-extras +``` + +If you encounter the EULA or the license screen, remember to use the tab key to select between the options and then hit enter to confirm your choice. + +![Press tab to select OK and press enter][12] + +#### 3\. Install software from the software center or the web + +Now that you have set up the repositories and updated the package cache, you should start installing software that you need. + +There are several ways of [installing applications in Ubuntu][13]. The easiest and the official way is to use the Software Center. + +![Ubuntu Software Center][14] + +If you want some recommendation about software, please refer to this extensive [list of Ubuntu applications for different purposes][15]. + +Some software vendors provide .deb files to easily install their application. You may get the deb files from their website. For example, to [install Google Chrome on Ubuntu][16], you can get the deb file from its website and double click on it to start the installation. + +#### 4\. Enjoy gaming with Steam Proton and GameMode + +[Gaming on Linux][17] has come a long way. You are not restricted to a handful of games included by default. You can [install Steam on Ubuntu][18] and enjoy a good number of games. + +[Steam’s new P][19][r][19][oton project][19] enables you to play a number of Windows-only games on Linux. In addition to that, Ubuntu 20.04 comes with [Feral Interactive’s GameMode][20] installed by default. + +The GameMode automatically adjust Linux system performance to give more priority to games than other background processes. + +This means some games that support the GameMode (like [Rise of Tomb Raiders][21]) should have improved performance on Ubuntu. + +#### 5\. Manage auto-updates (for intermediate and experts) + +Recently, Ubuntu has started to automatically download and install security updates that are essential to your system. This is a security feature as a regular user, you should leave it as it is, + +But if you like to do everything on your own and this auto-update is frequently leading you to [“Unable to lock the administration directory” error][22], maybe you can change the auto updates behavior. + +You can opt for the Show immediately so that it notifies you of security updates as soon as they are available instead of automatically installing. + +![Control the auto updates settings][23] + +#### 6\. Control automatic suspend and screenlock for laptops + +If you are using Ubuntu 20.04 on a laptop then you may want to pay attention to a few power and screenlock settings. + +If your laptop is on battery mode, Ubuntu will suspend the system after 20 minutes of inactivity. This is done to save battery power. Personally, I don’t like it and thus I disable it. + +Similarly, if you leave your system for a few minutes, it automatically locks the screen. I don’t like this behavior as well so I prefer disabling it. + +![Power Settings in Ubuntu 20.04][24] + +#### 7\. Enjoy dark mode + +One of the [most talked about features of Ubuntu 20.04][25] is the dark mode. You can enable the dark mode by going into Settings and selecting it under Appearance section. + +![Enable Dark Theme Ubuntu][26] + +You may have to do some [additional tweaking to get full dark mode in Ubuntu 20.04][27]. + +#### 8\. Control desktop icons and launcher + +If you want a minimal looking desktop, you can disable the icons on the desktop. You can also disable the launcher from the left side and the appindicators in the top panel. + +All this can be controlled via the new GNOME Extensions that is already available by default. + +![][28] + +By the way, you can also change the position of the launcher to the bottom or to the right by going to the Settings->Appearance. + +#### 9\. Use emojis (smileys) and special characters or disable it from the search + +Ubuntu provides an easy way to use smiley or the emoticons. There is a dedicated application called Characters installed by default. It basically gives you [Unicode][29] of the emojis. + +Not only emojis, you can use it to get the unicode for French, German, Russian and Latin characters. Clicking on the symbol gives you the opportunity to copy the unicode and when you paste this code, your chosen symbol should be typed. + +![Emoji Ubuntu][30] + +You’ll find these special characters and emoticons appearing in the desktop search as well. You can copy them from the search results as well. + +![Emojis appear in desktop search][31] + +If you don’t want to see them in search results, you should disable their access to the search feature. The next section discuss how to do that. + +#### 10\. Master the desktop search + +The GNOME desktop has a powerful search feature. Most people use it for searching installed applications but it is more than just that. + +Press the super key (Windows key) and search for something. It will show any applications that matches that search term, followed by system settings and matching applications available in the software center. + +![Desktop search][32] + +Not only that, the search can also find text inside files. If you are using the calendar, it can also find your meetings and reminders. You can even do quick calculations in the search and copy its result. + +![Quick Calculations Ubuntu Search][33] + +You can control what can be searched and in which order by going into Settings. + +![][34] + +#### 11\. Use nightlight feature to reduce eye strain at night + +If you use your computer or smartphone at night, you should use the night light feature to reduce eye strain. I feel that it helps a lot. + +The night light feature adds a yellow tint to the screen which is less pinching than the white light. + +You can enable night light in the Settings -> Displays and switching to Night Light tab. You can set the ‘yellowness’ as per your liking. + +![Nightlight feature][35] + +#### 12\. Got a 2K/4K screen? Use fractional scaling to get bigger icons and fonts + +If you feel that the icons, fonts, folders everything looks too small on your HiDPI screen, you can take advantage of the fractional scaling. + +Enabling fractional scaling gives you more options to increase the size between 100% to 200%. You can choose the scaling size that suits your preference. + +![Enable fractional scaling from Settings -> Displays][36] + +#### 13\. Explore GNOME Extensions to extend the usability of GNOME desktop + +The GNOME desktop has tiny plugins or add-ons called Extensions. You should [learn to use GNOME extensions][37] to extend the usability of your system. + +As you can see in the image below, the weather extension shows the weather information in the top panel. A tiny but useful thing. You may also take a look at some of [best GNOME extensions][38] here. Don’t install all of them, use only those that are useful to you. + +![Weather Extension][39] + +#### 14\. Enable ‘do not disturb’ mode and focus on work + +If you want to concentrate on work, disabling desktop notifications would come handy. You can easily enable ‘do not disturb’ mode and mute all notifications. + +![Enable ‘Do Not Disturb’ to get rid of desktop notifications][40] + +These notifications will still be in the message tray so that you can read them later but they won’t pop up on the desktop anymore. + +#### 15\. Clean your system + +This is something you don’t need to do right after installing Ubuntu. But keeping it in mind will help you. + +Over the time, your system will have significant amount of packages that won’t be needed anymore. You can remove them all in one go with this command: + +``` +sudo apt autoremove +``` + +There are other [ways to clean Ubuntu to free disk space][41] but this is the easiest and safest. + +#### 16\. Tweak and customize the GNOME desktop to your liking + +I highly recommend [installing GNOME Tweaks tool][42]. This will give you access to a few additional settings to tweak. + +![Gnome Tweaks Tool][43] + +For example, you can [display battery percentage][44], [fix right click in touchpad issue][45], change shell theme, change mouse pointer speed, display date and week numbers, change application window behavior etc. + +There is no end to customization and I cannot probably most of them here. This is why I recommend [reading these articles][42] about [customizing GNOME desktop][46]. + +You can also [install new themes in Ubuntu][47] though personally, I like the default theme in this release. This is the first time that I have stuck with the default icons and theme in an Ubuntu release. + +#### What do you do after installing Ubuntu? + +If you are an Ubuntu beginner, I recommend [going through this collection of Ubuntu tutorials][48] to get started with it. + +So these were my recommendations. What are the steps you follow after installing Ubuntu? Share your favorite things and I might update this article with your suggestions. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/ + +作者:[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/ubuntu-20-04-release-features/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/things-to-do-after-installing-ubuntu-20-04.jpg?ssl=1 +[3]: https://itsfoss.com/how-to-know-ubuntu-unity-version/ +[4]: https://itsfoss.com/find-desktop-environment/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updater-ubuntu-20-04.jpg?ssl=1 +[6]: https://itsfoss.com/ubuntu-repositories/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updates-settings-ubuntu-20-04.jpg?ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/extra-repositories-ubuntu-20.jpg?ssl=1 +[9]: https://itsfoss.com/install-media-codecs-ubuntu/ +[10]: https://itsfoss.com/install-microsoft-fonts-ubuntu/ +[11]: https://ubuntu-restricted-extras/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg?ssl=1 +[13]: https://itsfoss.com/remove-install-software-ubuntu/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-center-ubuntu-20.png?resize=800%2C509&ssl=1 +[15]: https://itsfoss.com/best-ubuntu-apps/ +[16]: https://itsfoss.com/install-chrome-ubuntu/ +[17]: https://itsfoss.com/linux-gaming-guide/ +[18]: https://itsfoss.com/install-steam-ubuntu-linux/ +[19]: https://itsfoss.com/steam-play/ +[20]: https://github.com/FeralInteractive/gamemode +[21]: https://en.wikipedia.org/wiki/Rise_of_the_Tomb_Raider +[22]: https://itsfoss.com/could-not-get-lock-error/ +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/auto-updates-ubuntu.png?resize=800%2C361&ssl=1 +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/power-settings-ubuntu-20-04.png?fit=800%2C591&ssl=1 +[25]: https://www.youtube.com/watch?v=lpq8pm_xkSE +[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-dark-theme-ubuntu.png?ssl=1 +[27]: https://itsfoss.com/dark-mode-ubuntu/ +[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/disable-dock-ubuntu-20-04.png?ssl=1 +[29]: https://en.wikipedia.org/wiki/List_of_Unicode_characters +[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/emoji-ubuntu.jpg?ssl=1 +[31]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/emojis-desktop-search-ubuntu.jpg?ssl=1 +[32]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-desktop-search-1.jpg?ssl=1 +[33]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/quick-calculations-ubuntu-search.jpg?ssl=1 +[34]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/search-settings-control-ubuntu.png?resize=800%2C534&ssl=1 +[35]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/nightlight-ubuntu-20-04.png?ssl=1 +[36]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/fractional-scaling-ubuntu.jpg?ssl=1 +[37]: https://itsfoss.com/gnome-shell-extensions/ +[38]: https://itsfoss.com/best-gnome-extensions/ +[39]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/weather-extension-ubuntu.jpg?ssl=1 +[40]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/do-not-distrub-option-ubuntu-20-04.png?ssl=1 +[41]: https://itsfoss.com/free-up-space-ubuntu-linux/ +[42]: https://itsfoss.com/gnome-tweak-tool/ +[43]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-tweaks-tool-ubuntu-20-04.png?fit=800%2C551&ssl=1 +[44]: https://itsfoss.com/display-battery-ubuntu/ +[45]: https://itsfoss.com/fix-right-click-touchpad-ubuntu/ +[46]: https://itsfoss.com/gnome-tricks-ubuntu/ +[47]: https://itsfoss.com/install-themes-ubuntu/ +[48]: https://itsfoss.com/getting-started-with-ubuntu/ From d4b65fc799876fc42788c9c14efc0464b5092021 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 24 Apr 2020 01:06:17 +0800 Subject: [PATCH 243/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200423=20Gettin?= =?UTF-8?q?g=20to=20know=20our=20new,=20virtual=20world?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200423 Getting to know our new, virtual world.md --- ... Getting to know our new, virtual world.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/tech/20200423 Getting to know our new, virtual world.md diff --git a/sources/tech/20200423 Getting to know our new, virtual world.md b/sources/tech/20200423 Getting to know our new, virtual world.md new file mode 100644 index 0000000000..70eebbbeee --- /dev/null +++ b/sources/tech/20200423 Getting to know our new, virtual world.md @@ -0,0 +1,72 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Getting to know our new, virtual world) +[#]: via: (https://opensource.com/article/20/4/virtual-community-management) +[#]: author: (Patricia Dugan https://opensource.com/users/patricia-dugan) + +Getting to know our new, virtual world +====== +Our current forced physical separation could generate innovations that +actually bring our communities closer together. +![Women in computing and open source v5][1] + +Witnessing the ongoing global impact of COVID-19 is a profoundly affecting experience that continues to humble us all in ways we couldn't have anticipated. Technology organizations are quickly evolving within this new reality, in which all of our human interactions are virtual until further notice. + +### Virtual open source community management + +When it comes to nurturing cultures designed to promote and reward open source innovation—as well as communities' economic, technological, and physical wellbeing—I can best speak to those I help build and manage. I believe communities should be built by weaving a tapestry of demographics and ranges of expertise. They should do this in a way that facilitates rich communication and empowers those building open source software to share knowledge with each other. + +The move to virtual connection and digitalized events only makes these methods more crucial. + +I'll share an example. Recently, I was speaking with a pillar of the Traefik open source community, known as a [Traefik Ambassador][2], based in Turkey, over video conference about a potential webinar. He suggested that, instead, we expand the speaker set to include other community members. Soon, we'd invited other contributors from Poland and Switzerland. We met online, and out of that conversation, the webinar has evolved into a collaborative series with community members taking turns presenting insights and melding different types of software together. What struck me was that if we'd had this conversation just one month ago, it would have simply focused on the creation of an asset. Now, contributors are bonding over a purpose-driven creation, with greater intention around facilitating innovation and excitement. + +Based on my experience building and growing open source communities, I believe that this new era of virtual connection offers an unprecedented opportunity for innovation and growth—as long as it is managed with equal focus on the people creating it. Below are five observations on how the world of open source can positively shape the future of innovation in a virtual and seemingly uncertain world. + +### The virtual world is flat. + +Open source communities, teams, and backing companies provide an exceptional model of how to accelerate innovation. That's especially true in these extraordinary times. At its core, open source democratizes the development process, something we see replicated more widely in our new virtual ecosystems. As the opportunity for input becomes more inclusive, organizations are seeing a flattening in infrastructure, both in communications and in operations. Existing hierarchical power structures are weakening as more voices are heard, and the best ideas are given the chance to rise to the top through greater exposure. + +As social distancing makes backchannel and handshake agreements much more complicated to execute, I predict that the traditional dance required to access and take positions in leadership will be replaced by flatter, more open methods that ultimately produce fresher—and better—perspectives. Online communication has a way of laying bare the real substance of interactions and ideas, bolstering meritocracy that's central to the strength of open source. + +### The virtual world is fast. + +This "flattening" structural shift has the potential to increase the pace and quality of innovation, as virtual events and communications widen the spotlight to now shine a light on previously unseen contributors. Creative minds among engineers, developers, and others outside of traditional leadership positions will leverage their comfort with the web and virtual channels to find each other and collaborate faster. This is nothing new for those in open source, and I expect organizations still clinging to legacy approaches will find themselves investing in learning how to implement flatter, virtual communications structures, and beginning to build them into traditional operational models. This means doubling down on efficiency and being willing to let go of the ["it's always been done this way"][3] mentality. + +### The virtual world needs community. + +Developers can conserve energy attending virtual events: there's no commute, nor other distractions from the work at hand. Working remotely and connecting only via virtual mediums enables open source contributors to create, share, and use code just about as fast as their brains allow, empowering rapid code contributions, collaborations, and new solutions produced with velocity. + +While this shift may result in productivity gains, organizations must be careful of creating the impression that a team member's most important asset is their brain. When open source developers were asked what the best part of their job was, [62% claimed it was their "personal passion."][4] Recognizing individuals as unique contributors to open source communities is necessary and essential to development—both technical and human. During this period, when we're hitting the pause button on in-person interaction, remote interactions via chats, video conferences, and phone calls will enable the human moments necessary for growth and connection. Those in open source rely on the power of community, and this extraordinary time will require the continuous and earnest commitment to it. + +### The virtual world is composed of individuals. + +The potential for greater innovation and meritocracy through virtual-only channels will only be realized if communities, organizations, and individuals also pursue and achieve wellness. It's crucial for the interpersonal bonds that maintain our energy and psychological health—traditionally forged through real-life, face-to-face contact—to continue to exist as part of the way we now work. If that disappears, there's the risk that our industry and communities become purely transactional, lacking the joy and drive that carries work forward, much less great work and innovation. Developers are especially rooted in a sense of purpose, with [only 3% reporting that money and perks were the best part of their job.][4] + +Overall wellness and support to prevent burnout should already have been central considerations for modern organizations, but they are even more important now. Virtual connectivity may set us up to work fast, but that can backfire if we're not also set up to be well. + +### The virtual world needs kindness. + +I also predict that virtual-only communication will close the distance between our online avatars and ourselves as real people. The impact of "toxic" individuals, hidden behind a computer, with little to no consequence for being a "bad actor," will be reduced and less acceptable. A growing presence of new voices will set the tone, adhering to well thought out codes of conduct, making poor behavior explicitly unwelcome. As much of our connection moves online, the norms that guide our offline behavior will become increasingly important. We'll transition to a less individualistic paradigm, and open source's long history of considering what defines good citizenship will offer insight to those looking to integrate a sense of shared responsibility into organizations. + +I feel extremely grateful to be in technology, particularly in the open source world, given it's an industry built upon the promise of innovation. At least for the moment, we as an industry can serve as a lighthouse for connection in difficult times, and as a model for collaboration and intention for those not as familiar with how to be highly productive in a virtual world. For the open source community and beyond, there is a great opportunity to lean into creating as much beneficial virtual culture as we can. Through this experience, we'll all learn new ways of interacting, which will serve us well in the future. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/virtual-community-management + +作者:[Patricia Dugan][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/patricia-dugan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5) +[2]: https://info.containo.us/traefik-ambassador-program +[3]: https://goleansixsigma.com/the-most-dangerous-phrase/ +[4]: https://www.linuxfoundation.org/wp-content/uploads/2019/10/osjobsreport_2018.pdf From 131e6501cbf7815dae50982b3bc6bdccfc860785 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 24 Apr 2020 01:07:06 +0800 Subject: [PATCH 244/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200423=204=20op?= =?UTF-8?q?en=20source=20chat=20applications=20you=20should=20use=20right?= =?UTF-8?q?=20now?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200423 4 open source chat applications you should use right now.md --- ...t applications you should use right now.md | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 sources/tech/20200423 4 open source chat applications you should use right now.md diff --git a/sources/tech/20200423 4 open source chat applications you should use right now.md b/sources/tech/20200423 4 open source chat applications you should use right now.md new file mode 100644 index 0000000000..25aa100c53 --- /dev/null +++ b/sources/tech/20200423 4 open source chat applications you should use right now.md @@ -0,0 +1,139 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 open source chat applications you should use right now) +[#]: via: (https://opensource.com/article/20/4/open-source-chat) +[#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) + +4 open source chat applications you should use right now +====== +Collaborating remotely is an essential capability now, making open +source real-time chat an essential piece of your toolbox. +![Chat bubbles][1] + +The first thing we usually do after waking up in the morning is to check our cellphone to see if there are important messages from our colleagues and friends. Whether or not it's a good idea, this behavior has become part of our daily lifestyle. + +> _"Man is a rational animal. He can think up a reason for anything he wants to believe."_ +> _– Anatole France_ + +No matter the soundness of the reason, we all have a suite of communication tools—email, phone calls, web-conferencing tools, or social networking—we use on a daily basis. Even before COVID-19, working from home already made these communication tools an essential part of our world. And as the pandemic has made working from home the new normal, we're facing unprecedented changes to how we communicate, which makes these tools not merely essential but now required. + +### Why chat? + +When working remotely as a part of a globally distributed team, we must have a collaborative environment. Chat applications play a vital role in helping us stay connected. In contrast to email, chat applications provide fast, real-time communications with colleagues around the globe. + +There are a lot of factors involved in choosing a chat application. To help you pick the right one for you, in this article, I'll explore four open source chat applications and one open source video-communication tool (for when you need to be "face-to-face" with your colleagues), then outline some of the features you should look for in an effective communication application. + +### 4 open source chat apps + +#### Rocket.Chat + +![Rocket.Chat][2] + +[Rocket.Chat][3] is a comprehensive communication platform that classifies channels as public (open to anyone who joins) or private (invitation-only) rooms. You can also send direct messages to people who are logged in; share documents, links, photos, videos, and GIFs; make video calls; and send audio messages without leaving the platform. + +Rocket.Chat is free and open source, but what makes it unique is its self-hosted chat system. You can download it onto your server, whether it's an on-premises server or a virtual private server on a public cloud. + +Rocket.Chat is completely free, and its [source code][4] is available on GitHub. Many open source projects use Rocket.Chat as their official communication platform. It is constantly evolving with new features and improvements. + +The things I like the most about Rocket.Chat are its ability to be customized according to user requirements and that it uses machine learning to do automatic, real-time message translation between users. You can also download Rocket.Chat for your mobile device and use it on the go. + +#### IRC + +![IRC on WeeChat 0.3.5][5] + +[Internet Relay Chat (IRC)][6] is a real-time, text-based form of communication. Although it's one of the oldest forms of electronic communication, it remains popular among many well-known software projects. + +IRC channels are discrete chat rooms. It allows you to have conversations with multiple people in an open channel or chat with someone privately one-on-one. If a channel name starts with a #, you can assume it to be official, whereas chat rooms that begin with ## are unofficial and usually casual. + +[Getting started with IRC][7] is easy. Your IRC handle or nickname is what allows people to find you, so it must be unique. But your choice of IRC client is completely your decision. If you want a more feature-rich application than a standard IRC client, you can connect to IRC with [Riot.im][8]. + +Given its age, why should you still be on IRC? For one reason, it remains the home for many of the free and open source projects we depend on. If you want to participate in open source software and communities, IRC is the option to get started. + +#### Zulip + +![Zulip][9] + +[Zulip][10] is a popular group-chat application that follows the topic-based threading model. In Zulip, you subscribe to streams, just like in IRC channels or Rocket.Chat. But each Zulip stream opens a topic that is unique, which helps you track conversations later, thus making it more organized. + +Like other platforms, it supports emojis, inline images, video, and tweet previews. It also supports LaTeX for sharing math formulas or equations and Markdown and syntax highlighting for sharing code. + +Zulip is cross-platform and offers APIs for building your own integrations. Something I especially like about Zulip is its integration feature with GitHub: if I'm working on an issue, I can use Zulip's marker to link back to the pull request ID. + +Zulip is open source (you can access its [source code][11] on GitHub) and free to use, but it has paid offerings for on-premises support, [LDAP][12] integration, and more storage. + +#### Let's Chat + +![Let's Chat][13] + +[Let's Chat][14] is a self-hosted chat solution for small teams. It runs on Node.js and MongoDB and can be deployed to local servers or hosted services with a few clicks. It's free and open source, with the [source code][15] available on GitHub. + +What differentiates Let's Chat from other open source chat tools is its enterprise features: it supports LDAP and [Kerberos][16] authentication. It also has all the features a new user would want: you can search message history in the archives and tag people with mentions like @username. + +What I like about Let's Chat is that it has private and password-protected rooms, image embeds, GIPHY support, and code pasting. It is constantly evolving and adding more features to its bucket. + +### Bonus: Open source video chat with Jitsi + +![Jitsi][17] + +Sometimes text chat isn't enough, and you need to talk to someone face-to-face. In times like these, when in-person meetings aren't an option, video chat is the best alternative. [Jitsi][18] is a complete, open source, multi-platform, and WebRTC-compliant videoconferencing tool. + +Jitsi began with Jitsi Desktop and has evolved into multiple [projects][19], including Jitsi Meet, Jitsi Videobridge, jibri, and libjitsi, with [source code][20] published for each on GitHub. + +Jitsi is secure and scalable and supports advanced video-routing concepts such as simulcast and bandwidth estimation, as well as typical capabilities like audio, recording, screen-sharing, and dial-in features. You can set a password to secure your video-chat room and protect it against intruders, and it also supports live-streaming over YouTube. You can also build your own Jitsi server and host it on-premises or on a virtual private server, such as a Digital Ocean Droplet. + +What I like most about Jitsi is that it is free and frictionless; anyone can start a meeting in no time by visiting [meet.jit.si][21], and users are good to go with no need for registration or installation. (However, registration gives you calendar integrations.) This low-barrier-to-entry alternative to popular videoconferencing services is helping Jitsi's popularity spread rapidly. + +### Tips for choosing a chat application + +The variety of open source chat applications can make it hard to pick one. The following are some general guidelines for choosing a chat app. + + * Tools that have an interactive interface and simple navigation are ideal. + * It's better to look for a tool that has great features and allows people to use it in various ways. + * Integrations with tools you use can play an important role in your decision. Some tools have great and seamless integrations with GitHub, GitLab, and certain applications, which is a useful feature. + * It's convenient to use tools that have a pathway to hosting on cloud-based services. + * The security of the chat service should be taken into account. The ability to host services on a private server is necessary for many organizations and individuals. + * It's best to select communication tools that have rich privacy settings and allow for both private and public chat rooms. + + + +Since people are more dependent than ever on online services, it is smart to have a backup communication platform available. For example, if a project is using Rocket.Chat, it should also have the option to hop into IRC, if necessary. Since these services are continuously updating, you may find yourself connected to multiple channels, and this is where integration becomes so valuable. + +Of the different open source chat services available, which ones do you like and use? How do these tools help you work remotely? Please share your thoughts in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-chat + +作者:[Sudeshna Sur][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/sudeshna-sur +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles) +[2]: https://opensource.com/sites/default/files/uploads/rocketchat.png (Rocket.Chat) +[3]: https://rocket.chat/ +[4]: https://github.com/RocketChat/Rocket.Chat +[5]: https://opensource.com/sites/default/files/uploads/irc.png (IRC on WeeChat 0.3.5) +[6]: https://en.wikipedia.org/wiki/Internet_Relay_Chat +[7]: https://opensource.com/article/16/6/getting-started-irc +[8]: https://opensource.com/article/17/5/introducing-riot-IRC +[9]: https://opensource.com/sites/default/files/uploads/zulip.png (Zulip) +[10]: https://zulipchat.com/ +[11]: https://github.com/zulip/zulip +[12]: https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol +[13]: https://opensource.com/sites/default/files/uploads/lets-chat.png (Let's Chat) +[14]: https://sdelements.github.io/lets-chat/ +[15]: https://github.com/sdelements/lets-chat +[16]: https://en.wikipedia.org/wiki/Kerberos_(protocol) +[17]: https://opensource.com/sites/default/files/uploads/jitsi_0_0.jpg (Jitsi) +[18]: https://jitsi.org/ +[19]: https://jitsi.org/projects/ +[20]: https://github.com/jitsi +[21]: http://meet.jit.si From c4b74b4ff7f1815c5a41db442f79484455827f77 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 24 Apr 2020 08:43:10 +0800 Subject: [PATCH 245/394] translated --- ...e and Open Source Audio-Video Converter.md | 97 ------------------- ...e and Open Source Audio-Video Converter.md | 91 +++++++++++++++++ 2 files changed, 91 insertions(+), 97 deletions(-) delete mode 100644 sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md create mode 100644 translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md diff --git a/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md deleted file mode 100644 index 4b793e918a..0000000000 --- a/sources/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter) -[#]: via: (https://itsfoss.com/mystiq/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -MystiQ: A Free and Open Source Audio/Video Converter -====== - -_**Brief: MystiQ is a new open-source video converter tool available for Linux and Windows. It uses FFMPEG underneath and provides you a neat and clean graphical interface based on Qt.**_ - -### MystiQ, a QT-based GUI Frontend for FFmpeg - -![][1] - -An audio/video conversion tool always comes in handy for every computer user across multiple platforms. - -For that very same reason, I thought it would be a great idea to highlight the [MystiQ app][2] – which is a relatively new video/audio converter tool available for Linux and Windows users. As of now, there’s no support for macOS – but it could arrive in the near future. - -MystiQ is a graphical frontend for [FFmpeg][3] based on [Qt 5 user interface][4]. Now, you can always [install and use ffmpeg in Linux command line][5] but that’s not very comfortable, is it? This is why tools like [Handbrake][6] and MystiQ exist to make our life easier. - -Since MystiQ is based on FFmpeg, you can use it for some basic video editing like trimming a video, rotating it etc. - -Let’s have a look at its features. - -### Features of MystiQ video converter - -![][7] - -Even though the MystiQ app is fairly new to the scene – it packs a good set of essential features. Here’s an overview of what it offers: - - * Video conversion - * Audio conversion (extracting the audio from the video as well) - * Formats supported: MP4, WEBM, MKV, MP3, MOV, OGG, WAV, ASF, FLV, 3GP, M4A, and a few others. - * Cross-platform (Windows & Linux) - * Packages for both 32-bit and 64-bit systems available - * Ability to tweak the audio quality (sample rate, bit rate, etc,.) for conversion - * **Basic video editing capabilities** (clipping the video, inserting a subtitle, rotating the video, scaling the video, etc) - * Convert your color video to black and white - * Several presets available to easily convert a video for the best quality or for the best compression. - - - -**Recommended Read:** - -![][8] - -#### [Easily Convert Audio File Formats with SoundConverter in Linux][9] - -If you are looking for converting audio file formats to wav, mp3, ogg or any other format, SoundConverter is the tool you need in Linux. - -### Installing MystiQ - -You may not find it listed in your software center – but it is quite easy to get it installed on a Linux distro. - -It provides an **.AppImage file** and **.deb/.rpm** files (with 32-bit and 64-bit packages). If you’re curious, you can read [how to use the AppImage file][10] if you want to use that. - -You can also find their [GitHub page][11] and look at the source code or any recent pre-release packages if you want to help them test the software to improve it. - -You can download the installer files for both Linux and Windows from its official website. - -[Download MystiQ][2] - -**Wrapping Up** - -For this quick highlight article, I used [Pop!_OS][12] 20.04 to test the MytiQ converter app and I had no issues converting video and audio files. And, the conversion was fast enough for an average user like me. - -Feel free to try it out and let me know your thoughts on it! Also, if you’ve been using another tool to convert videos and audio on Linux, what is it? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/mystiq/ - -作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-converter-ft.jpg?ssl=1 -[2]: https://mystiqapp.com/ -[3]: https://www.ffmpeg.org/ -[4]: https://www.qt.io/ -[5]: https://itsfoss.com/ffmpeg/ -[6]: https://itsfoss.com/handbrake/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-options.jpg?ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2018/12/Convert-audio-file-format-linux.png?fit=800%2C450&ssl=1 -[9]: https://itsfoss.com/sound-converter-linux/ -[10]: https://itsfoss.com/use-appimage-linux/ -[11]: https://github.com/swl-x/MystiQ/ -[12]: https://system76.com/pop diff --git a/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md new file mode 100644 index 0000000000..1c8c5e6fe4 --- /dev/null +++ b/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md @@ -0,0 +1,91 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter) +[#]: via: (https://itsfoss.com/mystiq/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +MystiQ:一个免费开源音频/视频转换器 +====== + +_**简述:MystiQ 是可用于 Linux 和 Windows 的新开源视频转换器工具。它的底层使用 FFMPEG,并为你提供基于 Qt 的整洁干净的图形界面。**_ + +### MystiQ,一个基于 QT 的 FFmpeg GUI 前端 + +![][1] + +一个音频/视频转换工具可为跨多个平台的每位计算机用户提供方便。 + +出于同样的原因,我着重介绍 [MystiQ][2] 是个好主意,这是一个相对较新的视频/音频转换器工具,可用于 Linux 和 Windows。截至目前,它还不支持 macOS,但可能会在不久的将来出现。 + +MystiQ 是基于 [Qt 5 界面][4]的 [FFmpeg][3] 图形前端。 现在,你可以随时[在 Linux 命令行中安装并使用 ffmpeg][5],但这不是很舒服,是吗? 这就是为什么 [Handbrake][6] 和 MystiQ 之类的工具可以使我们的生活更轻松的原因。 + +由于 MystiQ 基于 FFmpeg,因此你可以将其用于一些基本的视频编辑,例如修剪、旋转等。 + +让我们来看看它的功能。 + +### MystiQ 视频转换器的功能 + +![][7] + +即使 MystiQ 目前还算是一个新事物,但它也包含了一组很好的基本功能。以下它提供的: + + * 视频转换 + * 音频转换(也可从视频中提取音频) + * 支持格式:MP4、WEBM、MKV、MP3、MOV、OGG、WAV、ASF、FLV、3GP、M4A 等。 + * 跨平台(Windows 和 Linux) + * 适用于 32 位和 64 位系统的安装包 + * 能够调整音频质量(采样率、比特率等)进行转换 + * **基本视频编辑功能**(剪辑视频、插入字幕、旋转视频、缩放视频等) + * 将彩色视频转换为黑白 + * 可轻松转换视频的多个预设以获得最佳质量或获得最佳压缩效果。 + + +#### [在 Linux 中使用 SoundConverter 轻松转换音频文件格式][9] + +如果你想将音频文件格式转换为 wav、mp3、ogg 或任何其他格式,SoundConverter 是你在 Linux 中所需的工具。 + +### 安装 MystiQ + +你可能没有在软件中心中找到它,但将它安装在 Linux 发行版上非常容易。 + +它提供了 **.AppImage** 文件和 **.deb/.rpm** 文件(32 位和 64 位软件包)。如果你好奇想使用的话,可以阅读[如何使用 AppImage 文件][10]。 + +如果你想帮助他们测试软件进行改进,你还可以找到他们的 [GitHub 页面][11],并查看源码或任何近期的预发布软件包。 + +你可以在其官方网站下载适用于 Linux 和 Windows 的安装程序文件。 + +[下载 MystiQ][2] + +**总结** + +在本文中,我使用 [Pop!\_OS][12] 20.04 测试了 MytiQ 转换器,并且在转换视频和音频时没遇到问题。而且,对于像我这样的普通用户来说,它的转换速度足够快。 + +请尝试一下,让我知道你对它的想法!另外,如果你在 Linux 上一直使用其他工具转换视频和音频,那它是什么? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/mystiq/ + +作者:[Ankush Das][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/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-converter-ft.jpg?ssl=1 +[2]: https://mystiqapp.com/ +[3]: https://www.ffmpeg.org/ +[4]: https://www.qt.io/ +[5]: https://itsfoss.com/ffmpeg/ +[6]: https://itsfoss.com/handbrake/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/mystiq-options.jpg?ssl=1 +[9]: https://itsfoss.com/sound-converter-linux/ +[10]: https://itsfoss.com/use-appimage-linux/ +[11]: https://github.com/swl-x/MystiQ/ +[12]: https://system76.com/pop From 4f12c1304bc3e5c2603df5ddc49940afec5d6cb6 Mon Sep 17 00:00:00 2001 From: geekpi Date: Fri, 24 Apr 2020 09:01:19 +0800 Subject: [PATCH 246/394] translating --- .../tech/20200422 Things You Should Know About Ubuntu 20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md b/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md index 48ac52bece..1c4a13810e 100644 --- a/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md +++ b/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From b83daa693a88eb733277c9e5b93f80a515680287 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 24 Apr 2020 09:06:25 +0800 Subject: [PATCH 247/394] Rename sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md to sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md --- .../20200424 Ubuntu 20.04 LTS Released. Download Now.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200424 Ubuntu 20.04 LTS Released. Download Now.md (100%) diff --git a/sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md similarity index 100% rename from sources/tech/20200424 Ubuntu 20.04 LTS Released. Download Now.md rename to sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md From 141e8cfda136c948e442d2dcccb07280e810c562 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Fri, 24 Apr 2020 09:13:16 +0800 Subject: [PATCH 248/394] Rename sources/tech/20200423 Getting to know our new, virtual world.md to sources/talk/20200423 Getting to know our new, virtual world.md --- .../20200423 Getting to know our new, virtual world.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200423 Getting to know our new, virtual world.md (100%) diff --git a/sources/tech/20200423 Getting to know our new, virtual world.md b/sources/talk/20200423 Getting to know our new, virtual world.md similarity index 100% rename from sources/tech/20200423 Getting to know our new, virtual world.md rename to sources/talk/20200423 Getting to know our new, virtual world.md From 486a5f22c463592d997bdfc113b14bf549a41cd3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 24 Apr 2020 09:18:34 +0800 Subject: [PATCH 249/394] APL --- .../news/20200424 Ubuntu 20.04 LTS Released. Download Now.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md index 9eb9a036c7..dff14c521e 100644 --- a/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md +++ b/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From d710d6f17edb6072435b48344ccae40b7889d4e9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 24 Apr 2020 10:50:31 +0800 Subject: [PATCH 250/394] TSL&PRF --- ...Ubuntu 20.04 LTS Released. Download Now.md | 127 ------------------ ...Ubuntu 20.04 LTS Released. Download Now.md | 121 +++++++++++++++++ 2 files changed, 121 insertions(+), 127 deletions(-) delete mode 100644 sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md create mode 100644 translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md diff --git a/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md deleted file mode 100644 index dff14c521e..0000000000 --- a/sources/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ubuntu 20.04 LTS Released. Download Now!) -[#]: via: (https://itsfoss.com/download-ubuntu-20-04/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Ubuntu 20.04 LTS Released. Download Now! -====== - -_**Brief: Ubuntu 20.04 LTS Focal Fossa has been finally released. Here is a quick recap of the new features and the download links for Ubuntu 20.04** **and the official flavours for it**._ - -The wait is finally over. Ubuntu 20.04 LTS has finally arrived and is available to download! - -![][1] - -If you were already using Ubuntu 19.10, you may not notice a lot of noticeable differences – but the list of improvements that I’m looking at is indeed impressive. - -If you’re curious about what’s new, I’ll mention a few key highlights for this release. - -### Ubuntu 20.04: What’s new? - -Considering the previous 18.04 LTS release, Ubuntu 20.04 LTS involves a lot of visual changes and under-the-hood improvements as well. - -Of course, with the addition of [GNOME 3.36][2], a major visual upgrade and the performance improvement is quite obvious. Here’s a video highlighting what’s new in Ubuntu 20.04: - -You can also dive into one of our articles highlighting [new features of Ubuntu 20.04][3], if you’re curious. - -In either case, let me just give you some highlights: - - * GNOME 3.36 is the default desktop - * The performance has improved a lot - * The new Yaru theme is gorgeous, comes in dark mode as well - * You won’t have to see the Amazon app anymore, it’s gone for good! - * Improved [ZFS][4] support - * You get the latest [Linux Kernel 5.4][5] (LTS) - * Adds exFAT support - * Improved hardware and graphics support - * Updated software Python 3.8.2 - * Wireguard is being backported to Linux Kernel 5.4 to be utilized on Ubuntu 20.04 - - - -If you want to see the features in detail and in action, please watch this video highlighting the best features of 20.04 LTS: - -[Subscribe to our YouTube channel for more Linux videos][6] - -In case you’re new to Ubuntu and have questions about Ubuntu 20.04, we also have a quick [Ubuntu 20.04 FAQ][7] article for you. - -### Upgrade to Ubuntu 20.04 from 18.04 and 19.10 - -If you are already using Ubuntu 18.04 or 19.10, you can easily upgrade to Ubuntu 20.04 from within your system. - -This way, your files and most of the applications settings remain as it is while you start using the new version without reinstalling it from the ISO. - -You can read this detailed tutorial to learn [how to upgrade Ubuntu to a newer version][8]. - -Please note that if you are using Lubuntu 18.04, you must not upgrade to Lubuntu 20.04. Lubuntu 18.04 used Lxde desktop while later versions use LXQt desktop. Upgrading this way result in conflicts and possible broken system. - -### Download Ubuntu 20.04 LTS - -You can grab the ISO or the torrent file, depending on what you prefer: - -[Ubuntu 20.04 LTS (ISO)][9] - -[Ubuntu 20.04 LTS (Torrent)][10] - -Please follow this tutorial to learn [how to install Ubuntu][11]. - -### Download Ubuntu 20.04 LTS Official Flavours - -If you want to grab an official flavour of Ubuntu with a different desktop environment, please follow the links below. - -[Ubuntu MATE 20.04 LTS][12] - -[Kubuntu 20.04 LTS][13] - -[Xubuntu 20.04 LTS][14] - -[Ubuntu Budgie 20.04 LTS][15] - -[Ubuntu Studio 20.04 LTS][16] - -[Lubuntu 20.04 LTS][17] - -If you don’t find the latest ISO/torrent file listed in their respective official sites, simply head to [cdimages.ubuntu.com][18] to find all the flavours listed. - -Next, navigate to the **name-of-the-distro** -> **releases** -> **20.04** -> **release** and then you should find the links to the ISO and the torrent files listed. - -If you have questions, please refer to this article that answers [frequently asked questions about Ubuntu 20.04][7]. If you are going to install it, do check our recommended [things to do after installing Ubuntu 20.04][19]. - -Enjoy Ubuntu 20.04 LTS Focal Fossa! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/download-ubuntu-20-04/ - -作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Ubuntu-20.04-LTS-released.png?ssl=1 -[2]: https://itsfoss.com/gnome-3-36-release/ -[3]: https://itsfoss.com/ubuntu-20-04-release-features/ -[4]: https://itsfoss.com/what-is-zfs/ -[5]: https://itsfoss.com/linux-kernel-5-4/ -[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[7]: https://itsfoss.com/ubuntu-20-04-faq/ -[8]: https://itsfoss.com/upgrade-ubuntu-version/ -[9]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso -[10]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso.torrent -[11]: https://itsfoss.com/install-ubuntu/ -[12]: https://ubuntu-mate.org/download/amd64/focal/ -[13]: https://kubuntu.org/getkubuntu/ -[14]: https://xubuntu.org/download/ -[15]: https://ubuntubudgie.org/downloads/ -[16]: https://ubuntustudio.org/ -[17]: https://lubuntu.me/downloads/ -[18]: http://cdimages.ubuntu.com/ -[19]: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/ diff --git a/translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md new file mode 100644 index 0000000000..9a416774cf --- /dev/null +++ b/translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Ubuntu 20.04 LTS Released. Download Now!) +[#]: via: (https://itsfoss.com/download-ubuntu-20-04/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Ubuntu 20.04 LTS 下载及新特性 +====== + +> Ubuntu 20.04 LTS Focal Fossa 终于发布了。以下是 Ubuntu 20.04 的新功能和下载链接,以及Ubuntu 20.04的官方风味版。 + +等待终于结束了。Ubuntu 20.04 LTS 终于来了,可以下载了! + +![][1] + +如果你已经在使用 Ubuntu 19.10,你可能发现没有太多明显的差异 —— 但我所看到的改进清单确实令人印象深刻。 + +如果你想知道有什么新的东西,我将会提到这个版本的几个主要亮点。 + +### Ubuntu 20.04 有什么新特性? + +与之前的 18.04 LTS 版本相比,Ubuntu 20.04 LTS 有很多视觉上的改变,同时也包括了一些底层的改进。 + +当然,随着 [GNOME 3.36][2] 的加入,视觉上的重大升级和性能上的提升是相当明显的。以下是一段视频,重点介绍了 Ubuntu 20.04 中的新功能。 + +- [What's New in Ubuntu 20.04 Take a Look at the Top Features](https://youtu.be/9u5B0njRgOw) + +如果你有兴趣的话,你也可以深入到我们的文章中去看看,重点介绍 [Ubuntu 20.04 的新功能][3]。 + +不管是哪种情况,让我来给你介绍一些亮点。 + + * GNOME 3.36 是默认的桌面系统 + * 性能提高了很多 + * 新的 Yaru 主题很华丽,也有黑暗模式。 + * 你不会再看到亚马逊应用程序,它已经永远消失了! + * 改进的 [ZFS][4] 支持 + * 你可以获得最新的 [Linux 内核 5.4][5](LTS) + * 增加了对 exFAT 的支持 + * 改进硬件和图形支持 + * 更新软件 Python 3.8.2 + * Wireguard 已被移植到 Linux 内核5.4,可以在 Ubuntu 20.04 上使用。 + +如果你想看详细的功能介绍,请观看这段视频,重点介绍 20.04 LTS 的最佳功能。 + +- [Top 7 Best Features You'll Love in Ubuntu 20.04](https://youtu.be/lpq8pm_xkSE) + +如果你是 Ubuntu 的新手,对 Ubuntu 20.04 有疑问,我们也为你提供了一篇快速的 [Ubuntu 20.04 FAQ][7] 文章。 + +### 从 18.04 和 19.10 升级到 Ubuntu 20.04 + +如果你已经在使用 Ubuntu 18.04 或 19.10,你可以从系统中轻松升级到 Ubuntu 20.04。 + +这样一来,当你开始使用新版本的时候,你的文件和大部分的应用程序设置都会保持原样,而无需从 ISO 中重新安装。 + +你可以阅读此详细教程来学习[如何将 Ubuntu 升级到新版本][8]。 + +请注意,如果你使用的是 Lubuntu 18.04,请不要升级到 Lubuntu 20.04。Lubuntu 18.04 使用的是 Lxde 桌面,而后面的版本使用的是 LXQt 桌面。这样升级可能会导致冲突和系统崩溃。 + +### 下载 Ubuntu 20.04 LTS + +你可以抓取 ISO 或 torrent 文件,这取决于你喜欢什么。 + +- [Ubuntu 20.04 LTS (ISO)][9] +- [Ubuntu 20.04 LTS (Torrent)][10] + +请按照本教程学习[如何安装 Ubuntu][11]。 + +### 下载Ubuntu 20.04 LTS官方版下载 + +如果你想在不同的桌面环境下得到 Ubuntu 的官方版本,请按照下面的链接进行操作。 + +- [Ubuntu MATE 20.04 LTS][12] +- [Kubuntu 20.04 LTS][13] +- [Xubuntu 20.04 LTS][14] +- [Ubuntu Budgie 20.04 LTS][15] +- [Ubuntu Studio 20.04 LTS][16] +- [Lubuntu 20.04 LTS][17] + +如果你没有在各自的官方网站上找到最新的 ISO/torrent 文件,只需前往 [cdimages.ubuntu.com][18] 找到所有的版本。 + +接下来,导航到“发行版名称” -> “releases” -> “20.04” -> “release”,然后你应该可以找到列出的 ISO 和 torrent 文件的链接。 + +如果你有问题,请参考这篇文章,它回答了[关于 Ubuntu 20.04 的常见问题][7]。如果你要安装,请查看我们推荐的[安装 Ubuntu 20.04 之后要做的事情][19]。 + +享受 Ubuntu 20.04 LTS Focal Fossa! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/download-ubuntu-20-04/ + +作者:[Ankush Das][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://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Ubuntu-20.04-LTS-released.png?ssl=1 +[2]: https://itsfoss.com/gnome-3-36-release/ +[3]: https://itsfoss.com/ubuntu-20-04-release-features/ +[4]: https://itsfoss.com/what-is-zfs/ +[5]: https://itsfoss.com/linux-kernel-5-4/ +[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[7]: https://itsfoss.com/ubuntu-20-04-faq/ +[8]: https://itsfoss.com/upgrade-ubuntu-version/ +[9]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso +[10]: http://releases.ubuntu.com/focal/ubuntu-20.04-desktop-amd64.iso.torrent +[11]: https://itsfoss.com/install-ubuntu/ +[12]: https://ubuntu-mate.org/download/amd64/focal/ +[13]: https://kubuntu.org/getkubuntu/ +[14]: https://xubuntu.org/download/ +[15]: https://ubuntubudgie.org/downloads/ +[16]: https://ubuntustudio.org/ +[17]: https://lubuntu.me/downloads/ +[18]: http://cdimages.ubuntu.com/ +[19]: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/ From 3916767e21518c7c830b70d9d06e501e0bf6587c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 24 Apr 2020 11:01:24 +0800 Subject: [PATCH 251/394] PUB @wxy https://linux.cn/article-12146-1.html --- .../20200424 Ubuntu 20.04 LTS Released. Download Now.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20200424 Ubuntu 20.04 LTS Released. Download Now.md (98%) diff --git a/translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/published/20200424 Ubuntu 20.04 LTS Released. Download Now.md similarity index 98% rename from translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md rename to published/20200424 Ubuntu 20.04 LTS Released. Download Now.md index 9a416774cf..fcd11c0e8d 100644 --- a/translated/news/20200424 Ubuntu 20.04 LTS Released. Download Now.md +++ b/published/20200424 Ubuntu 20.04 LTS Released. Download Now.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12146-1.html) [#]: subject: (Ubuntu 20.04 LTS Released. Download Now!) [#]: via: (https://itsfoss.com/download-ubuntu-20-04/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From e5b0c8fbf30d1a8aed27491a81d3a81a2c81ad5b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 00:00:01 +0800 Subject: [PATCH 252/394] APL --- sources/tech/20200420 4 Git scripts I can-t live without.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200420 4 Git scripts I can-t live without.md b/sources/tech/20200420 4 Git scripts I can-t live without.md index 93f084f11f..5393461706 100644 --- a/sources/tech/20200420 4 Git scripts I can-t live without.md +++ b/sources/tech/20200420 4 Git scripts I can-t live without.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 99e447649dd7b931b5c1613251d15ea614606075 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 00:51:32 +0800 Subject: [PATCH 253/394] TSL --- ...0420 4 Git scripts I can-t live without.md | 202 ------------------ ...0420 4 Git scripts I can-t live without.md | 192 +++++++++++++++++ 2 files changed, 192 insertions(+), 202 deletions(-) delete mode 100644 sources/tech/20200420 4 Git scripts I can-t live without.md create mode 100644 translated/tech/20200420 4 Git scripts I can-t live without.md diff --git a/sources/tech/20200420 4 Git scripts I can-t live without.md b/sources/tech/20200420 4 Git scripts I can-t live without.md deleted file mode 100644 index 5393461706..0000000000 --- a/sources/tech/20200420 4 Git scripts I can-t live without.md +++ /dev/null @@ -1,202 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 Git scripts I can't live without) -[#]: via: (https://opensource.com/article/20/4/git-extras) -[#]: author: (Vince Power https://opensource.com/users/vincepower) - -4 Git scripts I can't live without -====== -The Git Extras repo hosts more than 60 scripts that add to Git's basic -functionality. Here's how to install, use, and contribute to it. -![Person using a laptop][1] - -In 2005, [Linus Torvalds][2] created [Git][3] to replace the proprietary distributed source control management solution that he had previously used to maintain the Linux kernel. Since then, Git has become a dominant version-control solution for open source and cloud-native development teams. - -Even feature-rich applications like Git don't have every feature that people want or need, so they make the effort to create them. In the case of Git, that person would be [TJ Holowaychuk][4]. His [Git Extras][5] project hosts more than 60 "extras" with features that expand Git's basic functionality. - -### Using Git Extras - -Here's how to use four of the most popular Git Extras. - -#### git-ignore - -git-ignore is a convenient extra that allows you to manually add file types and comments to the **.git-ignore** file without having to open a text editor. It works with both the global ignore file for your user account and the individual ignore file for the repository you are working in. - -Executing git-ignore without a parameter will list the global ignore file first, then the local ignore files. - - -``` -$ git ignore -Global gitignore: /home/alice/.gitignore -# Numerous always-ignore extensions -*.diff -*.err -*.orig -*.rej -*.swo -*.swp -*.vi -*~ -*.sass-cache - -# OS or Editor folders -Thumbs.db -\--------------------------------- -Local gitignore: .gitignore -nbproject -``` - -#### git-info - -git-info retrieves all the information you need to get your head in the context of a repo you are working with. It includes any remote URLs, remote branches, local branches, configuration info, and the last commit. - - -``` -$ git info - -## Remote URLs: - -origin      [git@github.com][6]:sampleAuthor/git-extras.git (fetch) -origin      [git@github.com][6]:sampleAuthor/git-extras.git (push) - -## Remote Branches: - -origin/HEAD -> origin/master -origin/myBranch - -## Local Branches: - -myBranch -* master - -## Most Recent Commit: - -commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7 -Author: Sample Author <[sampleAuthor@gmail.com][7]> - -Added git-info command. - -Type ´git log´ for more commits, or ´git show <commit id>´ for full commit details. - -## Configuration (.git/config): - -color.diff=auto -color.status=auto -color.branch=auto -user.name=Sample Author -user.email=[sampleAuthor@gmail.com][7] -core.repositoryformatversion=0 -core.filemode=true -core.bare=false -core.logallrefupdates=true -core.ignorecase=true -remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* -remote.origin.url=[git@github.com][6]:mub/git-extras.git -branch.master.remote=origin -branch.master.merge=refs/heads/master -``` - -#### git-mr and git-pr - -These extras do similar things and work in basically the same way. - - * git-mr checks out a merge request from GitLab - * git-pr checks out a pull request on GitHub - - - -In either case, you just need the merge or pull request number or the full URL, and it will fetch the remote reference, check out the branch, and adjust the config, so Git knows which branch it will replace. - - -``` -$ git mr 51 -From gitlab.com:owner/repository - * [new ref]         refs/merge-requests/51/head -> mr/51 -Switched to branch 'mr/51' -``` - -#### git-release - -By combining **commit**, **tag**, and **push** into a single command, git-release saves a lot of keystrokes for executing three commands that often run in sequence. - -To commit with a specific **<tagname>** and a custom message: - - -``` -`$ git release 0.1.0 -m <+ powerful feature added>` -``` - -#### Other extras - -These are just four of the 60+ Git Extras in the repo. To access the full list of commands available in Git Extras, either review the [Commands.md][8] file in the source repository or run the following command after you install Git Extras. - - -``` -`$ git extras --help` -``` - -### Install Git Extras - -The main prerequisite for Git Extras is having the command-line version of Git installed. If you plan to build from source, you also need additional utilities (e.g., **make**) to be available. - -If you are using a recent version of macOS, Git Extras installation is best handled using [Homebrew][9] (as with most open source tools): - - -``` -`$ brew install git-extras` -``` - -On Linux, Git Extras is available on each platform's native package manager. Sometimes, you need to enable an extra repository, like [EPEL][10] on CentOS, then run a single command: - - -``` -`$ sudo yum install git-extras` -``` - -Full installation instructions for other Linux distributions, BSD, and other platforms are available in the [Installation.md][11] file in the repository. - -### Contributing - -Do you have a piece of functionality you think is missing from Git and have built or want to build a script to handle it? Why not share it with the world by making it part of the Git Extras distribution! - -To do so, contribute the functionality to the Git Extras repository. There are more specific details in the [CONTRIBUTING.md][12] file in the repository, but the basics are easy: - - 1. Create a Bash script that handles the functionality. - 2. Create a basic man file so people will know how to use it. - 3. Update the command list and completion scripts to let people know the functionality exists. - 4. Run the integrity check to make sure you didn't break anything. - 5. Create a pull request for your functionality. - - - -Contributing to Git Extras will go a long way towards making life a little easier for your fellow Git users. You can learn more about it in the project's [README][13]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/git-extras - -作者:[Vince Power][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/vincepower -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://en.wikipedia.org/wiki/Linus_Torvalds -[3]: https://git-scm.com/ -[4]: https://github.com/tj -[5]: https://github.com/tj/git-extras -[6]: mailto:git@github.com -[7]: mailto:sampleAuthor@gmail.com -[8]: https://github.com/tj/git-extras/blob/master/Commands.md -[9]: https://brew.sh/ -[10]: https://fedoraproject.org/wiki/EPEL -[11]: https://github.com/tj/git-extras/blob/master/Installation.md -[12]: https://github.com/tj/git-extras/blob/master/CONTRIBUTING.md -[13]: https://github.com/tj/git-extras/blob/master/Readme.md diff --git a/translated/tech/20200420 4 Git scripts I can-t live without.md b/translated/tech/20200420 4 Git scripts I can-t live without.md new file mode 100644 index 0000000000..089c81e20f --- /dev/null +++ b/translated/tech/20200420 4 Git scripts I can-t live without.md @@ -0,0 +1,192 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (4 Git scripts I can't live without) +[#]: via: (https://opensource.com/article/20/4/git-extras) +[#]: author: (Vince Power https://opensource.com/users/vincepower) + +4 个不可或缺的 Git 脚本 +====== + +> Git Extras 版本库包含了 60 多个脚本,它们是 Git 基本功能的补充。以下是如何安装、使用和贡献的方法。 + +![Person using a laptop][1] + +2005 年,[Linus Torvalds][2] 创建了 [Git][3],以取代他之前用于维护 Linux 内核的专有的分布式源码控制管理解决方案。从那时起,Git 已经成为开源和云原生开发团队的主流版本控制解决方案。 + +但即使是像 Git 这样功能丰富的应用程序,也没有人们想要或需要的每个功能,所以人们会花大力气去创建这些功能。就 Git 而言,这个人就是 [TJ Holowaychuk][4]。他的 [Git Extras][5] 项目承载了 60 多个“附加功能”,这些功能扩展了 Git 的基本功能。 + +### 使用 Git 附加功能 + +下面介绍一下如何使用四种最受欢迎的 Git 附加功能。 + +#### git-ignore + +`git ignore` 是一个方便的附加功能,它可以让你手动添加文件类型和注释到 `.git-ignore` 文件中,而不需要打开文本编辑器。它可以操作你的个人用户帐户的全局忽略文件和单独用于你正在工作的版本库的忽略文件。 + +在没有参数的情况下执行 `git ignore` 会先列出全局忽略文件,然后是本地的忽略文件。 + +``` +$ git ignore +Global gitignore: /home/alice/.gitignore +# Numerous always-ignore extensions +*.diff +*.err +*.orig +*.rej +*.swo +*.swp +*.vi +*~ +*.sass-cache + +# OS or Editor folders +Thumbs.db +--------------------------------- +Local gitignore: .gitignore +nbproject +``` + +#### git-info + +`git info` 可以检索你所需要的所有信息,以获取你正在使用的版本库的上下文信息。它包括远程 URL、远程分支、本地分支、配置信息和最后一次的提交信息。 + +``` +$ git info + +## Remote URLs: + +origin git@github.com:sampleAuthor/git-extras.git (fetch) +origin git@github.com:sampleAuthor/git-extras.git (push) + +## Remote Branches: + +origin/HEAD -> origin/master +origin/myBranch + +## Local Branches: + +myBranch +* master + +## Most Recent Commit: + +commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7 +Author: Sample Author + +Added git-info command. + +Type ´git log´ for more commits, or ´git show ´ for full commit details. + +## Configuration (.git/config): + +color.diff=auto +color.status=auto +color.branch=auto +user.name=Sample Author +user.email=sampleAuthor@gmail.com +core.repositoryformatversion=0 +core.filemode=true +core.bare=false +core.logallrefupdates=true +core.ignorecase=true +remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* +remote.origin.url=git@github.com:mub/git-extras.git +branch.master.remote=origin +branch.master.merge=refs/heads/master +``` + +#### git-mr 和 git-pr + +这些附加功能的作用类似,工作方式也基本相同。 + +* `git mr` 检出来自 GitLab 的合并请求。 +* `git pr` 检出来自 GitHub 的拉取请求。 + +无论是哪种情况,你只需要合并请求号、拉取请求号或完整的 URL,它就会抓取远程引用,检出分支,并调整配置,这样 Git 就知道要替换哪个分支了。 + +``` +$ git mr 51 +From gitlab.com:owner/repository + * [new ref] refs/merge-requests/51/head -> mr/51 +Switched to branch 'mr/51' +``` + +#### git-release + +通过将 `commit`、`tag` 和 `push` 合并到一个命令中,`git release` 可以节省大量的按键来执行这三个命令,而这三个命令往往是依次运行的。 + +要用特定的 `` 和自定义消息提交: + +``` +$ git release 0.1.0 -m <+ powerful feature added> +``` + +#### 其他附加功能 + +这只是该版本库中 60 多个 Git 附加功能中的四个命令。要访问 Git Extras 中的全部命令,请查看该源代码库中的 [Commands.md][8] 文件,或者在安装 Git Extras 后运行以下命令。 + +``` +$ git extras --help +``` + +### 安装 Git 附加功能 + +使用 Git 附加功能的主要前提是安装了 Git 的命令行版本。如果你打算从源码中构建,还需要有额外的工具(例如:`make`)。 + +如果你使用的是最新版本的 macOS,那么 Git 附加功能的安装最好使用 [Homebrew][9](和大多数开源工具一样)。 + +``` +$ brew install git-extras +``` + +在 Linux 上,每个平台的原生包管理器中都有 Git Extras。有时,你需要启用一个额外的仓库,比如在 CentOS 上的 [EPEL][10],然后运行一条命令。 + +``` +$ sudo yum install git-extras +``` + +其他 Linux 发行版、BSD 和其他平台的完整安装说明可以在该版本库的 [Installation.md][11] 文件中找到。 + +### 贡献 + +你是否你认为 Git 中有缺少的功能,并且已经构建了一个脚本来处理它?为什么不把它作为 Git Extras 发布版的一部分,与全世界分享呢? + +要做到这一点,请将该功能贡献到 Git Extras 仓库中。更多具体细节请参见仓库中的 [CONTRIBUTING.md][12] 文件,但基本的操作方法很简单。 + +1. 创建一个处理该功能的 Bash 脚本。 +2. 创建一个基本的 man 文件,让大家知道如何使用它。 +3. 更新命令列表和补完脚本,让人们知道这个功能的存在。 +4. 运行完整性检查,确保你没有破坏任何东西。 +5. 为你的功能创建一个拉取请求。 + +向 Git Extras 贡献贡献,会让你的 Git 用户的生活更轻松一些。你可以在项目的 [README][13] 中了解更多。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/git-extras + +作者:[Vince Power][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/vincepower +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://en.wikipedia.org/wiki/Linus_Torvalds +[3]: https://git-scm.com/ +[4]: https://github.com/tj +[5]: https://github.com/tj/git-extras +[6]: mailto:git@github.com +[7]: mailto:sampleAuthor@gmail.com +[8]: https://github.com/tj/git-extras/blob/master/Commands.md +[9]: https://brew.sh/ +[10]: https://fedoraproject.org/wiki/EPEL +[11]: https://github.com/tj/git-extras/blob/master/Installation.md +[12]: https://github.com/tj/git-extras/blob/master/CONTRIBUTING.md +[13]: https://github.com/tj/git-extras/blob/master/Readme.md From b3836c036ab1bcdd2193b1c78b4c51e858a1261f Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 25 Apr 2020 01:00:52 +0800 Subject: [PATCH 254/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200425=20What?= =?UTF-8?q?=20Happened=20to=20IPv5=3F=20Why=20there=20is=20IPv4,=20IPv6=20?= =?UTF-8?q?but=20no=20IPv5=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md --- ...v5- Why there is IPv4, IPv6 but no IPv5.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md diff --git a/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md new file mode 100644 index 0000000000..ac820a3369 --- /dev/null +++ b/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md @@ -0,0 +1,76 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?) +[#]: via: (https://itsfoss.com/what-happened-to-ipv5/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5? +====== + +If you have spent any amount of time in the world of the internet, you should have heard about the IPv4 and IPv6 protocols that our computers use every day. + +One question that you might be asking is: Why there is no IPv5? Why IPv6 came after IPv4 and not IPv5? Was there ever a IPv5 and if yes, whatever happened to IPv5? + +The answer is yes, there was an IPv5…sort of. Let me quickly explain a few things around it. + +### The early history of the internet + +![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1] + +In the late 1960s, the US Department of Defense’s [Advanced Research Projects Agency][2] (ARPA) started a [project][3] to link computers across the country. The initial goal was to create a networked system of all of the ARPA-funded computers across the country. + +Since this was the first time a network of this scale was put together, they were also creating the technology and hardware as they went. One of the first things they worked was an internet protocol (IP) named [Transmission Control Protocol][4] (TCP). This protocol “reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network”. Basically, it made sure data got where it needed to go safely. + +Originally, TCP was designed to be [“a host-level, end-to-end protocol and a packaging and routing protocol”][5]. However, they realized that they needed to split the protocol to make it more manageable. It was decided that IP would handle packaging and routing. + +By this time TCP had gone through three versions, so the new protocol became known as IPv4. + +### The birth of IPv5 + +IPv5 started life under a different name: Internet Stream Protocol (or ST). It was created to experiment with streaming voice and video [“by Apple, NeXT, and Sun Microsystems”][6]. + +This new protocol was capable of “transferring data packets on specific frequencies while maintaining communication”. + +### So what happened to IPv5? + +![][7] + +IPv5 was never accepted as an official internet protocol. This was mainly due to the 32-bit limitation. + +IPV5 used the same addressing system as IPv4. Each address was made up of four sets of numbers between 0 and 255. This limited the number of possible addresses to [4.3 billion][6]. + +In the early 1970s, that might have seemed like more than the world would ever need. However, the explosive growth of the Internet proved that idea wrong. In 2011, the world officially ran out of the IPv4 addresses. + +In the 1990s, a new project was started to work on the next generation of internet protocol (IPng). This led to the 128-bit IPv6. An IPv6 address contains a [“series of eight 4-character hexadecimal numbers”][6] that can contain numbers from 0 to 9 and letters from A to F. Unlike IPv4, IPv6 had trillions of possible addresses, so we should be safe for a while. + +Meanwhile, IPv5 laid the groundwork for the voice-over-IP technology that we use to communicate all over the world today. **So, I guess in some small way, you could say that IPv5 still survives to this day**. + +I hope you liked this anecdote about internet history. You may read some other [trivia article about Linux and tech in general][8]. + +If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][9]. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-happened-to-ipv5/ + +作者:[John Paul][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/john/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Arpa_internet.png?fit=800%2C573&ssl=1 +[2]: https://en.wikipedia.org/wiki/DARPA +[3]: https://en.wikipedia.org/wiki/ARPANET +[4]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol +[5]: https://fcw.com/articles/2006/07/31/what-ever-happened-to-ipv5.aspx +[6]: https://www.lifewire.com/what-happened-to-ipv5-3971327 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-happened-to-ipv5.png?ssl=1 +[8]: https://itsfoss.com/category/story/ +[9]: https://reddit.com/r/linuxusersgroup From 6f450a57bb5bccb3b2e1cba5f2326b054ecd823a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 25 Apr 2020 01:02:23 +0800 Subject: [PATCH 255/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200424=20What?= =?UTF-8?q?=20you=20need=20to=20know=20about=20open=20source=20ad=20blocke?= =?UTF-8?q?rs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200424 What you need to know about open source ad blockers.md --- ...d to know about open source ad blockers.md | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 sources/tech/20200424 What you need to know about open source ad blockers.md diff --git a/sources/tech/20200424 What you need to know about open source ad blockers.md b/sources/tech/20200424 What you need to know about open source ad blockers.md new file mode 100644 index 0000000000..c3fb98def0 --- /dev/null +++ b/sources/tech/20200424 What you need to know about open source ad blockers.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What you need to know about open source ad blockers) +[#]: via: (https://opensource.com/article/20/4/ad-blockers) +[#]: author: (Joshua Pearce https://opensource.com/users/jmpearce) + +What you need to know about open source ad blockers +====== +Three open source ad blockers were tested against a "no ad blocker" +control. +![Browser of things][1] + +A new [study][2] meant to investigate energy conservation of free and open source ad blockers has unexpectedly shown that Internet ads are wasting shocking amounts of your time. + +More importantly, the results show how you can get that time back. The study estimates that the average Internet user would save over 100 hours a year by using [uBlock Origi][3][n][3][,][3] a free and open source ad blocker. uBlock Origin was the most effective ad blocker tested, but all ad blockers save time, energy and money according to the study. + +![Ad blocker screen comparison][4] + +The results show that page load time dropped 11% with [AdBlock+][5], 22% with [Privacy Badger][6], and 28% with [uBlock Origi][3][n][3]. These are not significant on a single page, but Internet users spend more than half of their time online rapidly clicking through websites, spending less than 15 seconds on a given page. With all these clicks, the additional time to load ads really starts to add up. + +The article _[Energy Conservation with Open Source Ad Blockers][7]_, published in the journal _Technologies,_ was originally conceived to address rising energy consumption. Internet-related electricity consumption is rising rapidly as global Internet users spend more than 6.5 hours per day online. Americans, for example, have more than doubled the time they spend online since 2000 to almost 24 hours a week. Open source ad blockers have the potential to reduce the time, and thus the electricity, spent by eliminating ads during Internet browsing and video streaming. + +In the study, three open source ad blockers were tested against a "no ad blocker" control. Page load times were recorded for browsing a representative selection of the most-accessed websites worldwide, including web searching (Google, Yahoo, Bing), information (Weather.com, Wikipedia), and news sites (CNN, Fox, New York Times). In addition, the study analyzed the time spent watching ads on videos for both trending and non-trending content. This part of the study was more challenging due to the lack of data on the ratio of YouTube watching time spent on trending vs. non-trending content. The time wasted viewing ads per video ranged from 0.06% up to a staggering 21%. Thus, the total hours lost to loading ads was only recorded for browsing. + +Overall, the results showed that the energy wasted loading ads is not trivial. As a lot of the electricity used for running computers continues to come from coal, which causes air pollution and premature death, the study analyzed the potential for ad blockers to save American lives. The results were shocking: the energy conserved if everyone in the United States used the open source ad blocker would save over 36 American lives per year. + +Electricity costs money, so cutting ads could also save consumers money. In the United States, if all Internet users enabled Privacy Badger on their computers, Americans would save more than $91 million annually. Globally, the results of the investigation were even more striking. uBlock Origin could save global consumers more than $1.8 billion a year. + +This study was done before everyone was forced to stay home because of the COVID-19 pandemic, so all the values can be viewed as conservative underestimates. Overall, the study found open source ad blockers are a potentially effective technology for energy conservation. + +Although free and open source ad blockers save energy and are good for the environment, you are probably going to use them primarily to block annoying ads and save yourself time. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/ad-blockers + +作者:[Joshua Pearce][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/jmpearce +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things) +[2]: https://www.mdpi.com/2227-7080/8/2/18 +[3]: https://github.com/gorhill/uBlock +[4]: https://opensource.com/sites/default/files/uploads/os_ad_blocker_story_.png (Ad blocker screen comparison) +[5]: https://adblockplus.org/ +[6]: https://privacybadger.org/ +[7]: https://www.academia.edu/42434401/Energy_Conservation_with_Open_Source_Ad_Blockers From a16c17b4cde14288c09bfae1cd5791a3dcf7c752 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 25 Apr 2020 01:09:41 +0800 Subject: [PATCH 256/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200424=20Red=20?= =?UTF-8?q?Hat=20Enterprise=20Linux=208.2=20Hits=20the=20stage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md --- ...Hat Enterprise Linux 8.2 Hits the stage.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md diff --git a/sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md b/sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md new file mode 100644 index 0000000000..e00e88716c --- /dev/null +++ b/sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md @@ -0,0 +1,89 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Red Hat Enterprise Linux 8.2 Hits the stage) +[#]: via: (https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Red Hat Enterprise Linux 8.2 Hits the stage +====== +RHEL 8.2 has new capabilities for management of hybrid-cloud environments and container tools to help fuel cloud-native development. +Stephen Lawson/IDG + +Red Hat Enterprise Linux (RHEL) 8.2 brings new features that include expanded monitoring capabilities in Red Hat Insights for and new container tools, including containerized versions of Skopeo and Buildah. + +Red Hat says RHEL 8.2 is arriving at a time when, because of the Covid-19 pandemic, a growing percentage of IT staffers are working remotely. Their ability to support the management and monitoring of operations and their ability to detect and address problems has never been more critical, and upgrades to Red Hat Insights are designed to help. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] + +### Red Hat Insights + +[Red Hat Insights][2], is Red Hat’s operations and security-risk-management offering and helps detect, diagnose and remediate potential problems before they affect production systems or end users. It was included in RHEL in May 2019. + +The latest updates include: + + * Improved visibility and  security for managing large, complex environments + * Policy and patch services to help determine which product advisories apply and guidance for problem remediation + * A "drift service" to make it easier to compare baselines, shape strategies that reduce complexity, and make troubleshooting easier + + + +### Monitoring and performance updates + +RHEL 8.2 brings some performance upgrades includeing: + + * Improved resource management with Control Groups (cgroup) v2, which is designed to reserve and set limits on memory usage to help prevent processes from overconsuming memory and causing system failures or slowdowns. + * Optimizing performance-sensitive workloads via NUMA and sub-NUMA service policies. + * Performance Co-Pilot (PCP) 5.0.2 which adds collection agents for Microsoft SQL Server 2019 to gather and analyze SQL Server metrics to draw a clearer picture of database and operating-system performance. + * Red Hat subscription watch,a service for viewing and managing RHEL and Red Hat OpenShift Container Platform subscriptions. + + + +### Evolving container tools + +RHEL 8.2 includes new container tools that are supported for 24 months as part of Red Hat's Tech Preview, which provides early access to new products. The tools include Buildah for building and Skopeo for transferring container images. + +The new relase also introduces Udica, a policy tool for containerized SELinux that can make it less likely that processes will break out of containers and cause problems to other containers or the host. + +[][3] + +Red Hat Enterprise Linux 8.2 also introduces enhancements to the Red Hat Universal Base Image, including: + + * OpenJDK and .NET 3.0 for developing  certification-ready cloud-native Red Hat applications + * **Improved access to source code associated with a given image through a single command**, making it easier for Red Hat partners to meet source code requirements for open source licensing needs. + + + +### Ease of use + +Other new features are meant to make it easier to manage RHEL: + + * RHEL subscription registration as part of the installation process, making it easier to on-board new installations. + * Enabling Red Hat Insights during installation to simplify the launch of Insights for Red Hat Enterprise Linux deployments. + * Refinement and control of the Red Hat Enterprise Linux life cycle with testing for in-place upgrades, Red Hat Insights rules to help with upgrades, and the [Convert2 RHEL][4] tool that can help shift workloads from unsupported clones like CentOS to RHEL. + + + +Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html + +作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/newsletters/signup.html +[2]: https://www.redhat.com/en/blog/expanding-management-operational-and-security-risks-new-red-hat-insights +[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[4]: https://www.redhat.com/en/blog/convert2rhel-how-update-rhel-systems-place-subscribe-rhel +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From a57065c236a4d683a37394576aacd28e39f96175 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 25 Apr 2020 01:11:05 +0800 Subject: [PATCH 257/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200424=20FCC=20?= =?UTF-8?q?boosts=20Wi-Fi=206=20spectrum=20five-fold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md --- ...4 FCC boosts Wi-Fi 6 spectrum five-fold.md | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md diff --git a/sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md b/sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md new file mode 100644 index 0000000000..4d3545f522 --- /dev/null +++ b/sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md @@ -0,0 +1,72 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (FCC boosts Wi-Fi 6 spectrum five-fold) +[#]: via: (https://www.networkworld.com/article/3540288/fcc-boosts-wi-fi-6-spectrum-five-fold.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +FCC boosts Wi-Fi 6 spectrum five-fold +====== +The Federal Communications Commission has approved a chunk of wireless spectrum called the 6GHz band for unlicensed use by Wi-Fi 6, and gear that supports it could be available by the end of the year. +[tejasp][1] [(CC0)][2] + +The Federal Communications commission has opened up a wide swath of wireless spectrum for unlicensed use by Wi-Fi devices, which will lead to Wi-Fi access points that have greatly expanded capacity. + +It’s a huge victory for the Wi-Fi industry, as the ruling means that the amount of spectrum available for Wi-Fi just about quintupled in an instant. That means big, spacious channels – and a lot more channels overall – that can handle a lot more data and a lot more connections at the same time, according to Aruba vice president of wireless strategy and standards Chuck Lukaszewski. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] + +“Overnight, you’re going to see an additional gigabit per second or more of potential throughput,” he said. + +That’s a major upside, certainly, even if “overnight” might be a slightly optimistic view of when [Wi-Fi 6E][4] – the trade name for the new version of Wi-Fi that will take advantage of the new spectrum – hits the market. While some of the necessary standards haven’t yet been finalized by the IEEE, the basic ability to use 6GHz frequencies is already written into the existing Wi-Fi 6 specification. + +Broadcom director of product marketing and government affairs Chris Szymanski said that the main technical hurdle to implementing Wi-Fi 6E will be new radios, but that his company is among those that has already been designing and building compatible silicon. + +“I expect that the FCC will provide guidance on how to certify devices in the next few months,” he said. “I expect product available in the US in the late fall before the holidays.” + +Enterprise uptake will likely have to wait until compatible smartphones, laptops and the like are on shelves because existing Wi-Fi 6 cliets won’t be able to take advantage of the new 6Ghz spectrum. + +**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][5] ]** + +New access points are likely to have three radios in them, as opposed to the usual two, noted senior vice president of Ruckus Wireless and cloud at Commscope Bart Giordano. One each for the existing 2.4GHz and 5GHz bands, and a third for 6Ghz. + +“Antennas will be very similar because these spectrums sit next to one another,” he said, “but there’s specific tunings you have to do.” + +The driving force behind the spectrum expansion is the bottomless demand for capacity caused by the increasing use of wireless just about everywhere. The FCC’s announcement cites projections from Cisco that say about 60% of worldwide data traffic will move across Wi-Fi links within the next two years. + +Incumbent licensed users of parts of the 6GHz spectrum – which are mostly businesses using microwave links for wireless backhaul and public safety services – are far less pleased by the FCC’s decision. The Utilities Technology Council is one of several groups critical of earlier proposals to open the 6GHz band to broad-based unlicensed use, saying earlier that assurances that existing users would be protected from interference are unconvincing. + +“We have and will continue to provide the FCC with technical detail demonstrating the very real interference potential from unlicensed use across all parts of the band and the need for thoroughly tested automated frequency coordination (AFC) to protect incumbent users,” the group said in a statement. “While we appreciate the FCC proposing to require AFC for the standard-power access points, these measures must also be applied to all unlicensed devices in the band to prevent interference to mission-critical utility communications systems.” + +Farpoint Group principal and Network World contributor Craig Mathias said that it’s not going to be a smooth process, but argues that the opening of 6GHz spectrum was too great an opportunity to ignore. + +“Yes, it’s a mess – spectral re-allocations always are,” he said. “[But] I don't see any issues here that can't be addressed, and more unlicensed spectrum is of course always desirable.” + +Incumbent users of the 6GHz spectrum are unlikely to see the type of interference they’re particularly worried about, he added, given the nature of the connections currently in use and the safeguards in the new rule that are designed to protect existing networks. + +“Point-to-point microwave links operate at fairly high power and use both directional antennas and error-checking protocols to ensure reliability and otherwise deal with typical radio issues beyond interference, like the various forms of fading,” said Mathias. “A nearby Wi-Fi transmitter will be operating at much lower power and use its own signal-integrity-management techniques as well. So likely no issues in the vast majority of cases, especially if history is any guide.” + +Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3540288/fcc-boosts-wi-fi-6-spectrum-five-fold.html + +作者:[Jon Gold][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.networkworld.com/author/Jon-Gold/ +[b]: https://github.com/lujun9972 +[1]: https://pixabay.com/en/wifi-wireless-device-wi-fi-1371030/ +[2]: https://creativecommons.org/publicdomain/zero/1.0/ +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.networkworld.com/article/3238664/80211-wi-fi-standards-and-speeds-explained.html +[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world From 06074f5be4d8e9be6f0fa96035d11ccff1ee5759 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 17:33:51 +0800 Subject: [PATCH 258/394] PRF @Zioyi --- ...mmands to Have Some Fun in the Terminal.md | 136 ++++++++---------- 1 file changed, 61 insertions(+), 75 deletions(-) diff --git a/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md index 13538cc7cf..581e683a5c 100644 --- a/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md +++ b/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -1,40 +1,40 @@ [#]: collector: (lujun9972) [#]: translator: (Zioyi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (12 Linux Commands to Have Some Fun in the Terminal) [#]: via: (https://itsfoss.com/funny-linux-commands/) [#]: author: (Community https://itsfoss.com/author/itsfoss/) -12个有趣的Linux终端命令 +12 个有趣的 Linux 终端命令 ====== -_**你觉得Linux终端里只有无趣的工作吗?那你一定不知道下面这些有趣的Linux命令吧。**_ +> 你觉得 Linux 终端里只有无趣的工作吗?那你一定不知道下面这些有趣的 Linux 命令吧。 -Linux终端是用来完成复杂的工作的,我们有很多有用的[linux命令奇技淫巧][1]来帮助你。 +Linux 终端是用来完成复杂的工作的,我们有很多有用的 [linux 命令奇技淫巧][1]来帮助你。 -但是,你知道你还可以用终端来做很多有趣的是吗?如果你不知道,没关系,大多数Linux用户也都只把终端视为一个用来管理系统和执行任务的交互接口。 +但是,你知道你还可以用终端来做很多有趣的事吗?如果你不知道,没关系,大多数 Linux 用户也都只把终端视为一个用来管理系统和开发工作的交互界面。 -然而,如果你知道这里有些你可以在终端玩的[基于终端的游戏][2]和[ASCII码游戏][3],你一定会大吃一惊。 +然而,如果你知道这里有些你可以在终端玩的[基于终端的游戏][2]和 [ASCII 码游戏][3],你一定会大吃一惊。 在这篇文章中,我将会探索一些有趣的、可笑的、荒谬的命令来让你可以在终端中找点乐子! -### 用这些命令在Linux终端中找点乐子 +### 用这些命令在 Linux 终端中找点乐子 ![][4] 你可能会觉得这些命令荒谬或没用,但是有一些还是可以被好好利用的。 -我已经添加了Ubuntu/Debian的安装组件,如果你使用基于Ubuntu的发行版,请确保[启用通用仓库][5]因为大多数命令不在主仓库中。 +我已经放上了 Ubuntu/Debian 的安装指令,如果你使用基于 Ubuntu 的发行版,请确保[启用 universe 仓库][5],因为大多数命令不在主仓库中。 -如果你使用Arch、Fedora、SUSE、Solus或者其他非Ubuntu的发行版,请使用你的发行版包管理工具去安装这些有趣的Linux命令。 +如果你使用 Arch、Fedora、SUSE、Solus 或者其他非 Ubuntu 的发行版,请使用你的发行版包管理工具去安装这些有趣的 Linux 命令。 -#### 1\. 在终端开一辆火车 +#### 1、在终端开一辆火车 让我们坐上火车,来一场说走就走的旅行的,没错,就是字面意思! -sl命令可以让你在终端运行一辆火车。 +`sl` 命令可以让你在终端运行一辆火车。 ![][6] @@ -44,53 +44,45 @@ sl命令可以让你在终端运行一辆火车。 sudo apt install sl ``` -完成后,你只要在终端输入下面的命令就可以开始 +完成后,你只要在终端输入下面的命令就可以开始: ``` sl ``` -很精彩,对吧?但等等,我们还没结束!你还可以让你的火车飞起来,只要加上参数-F,Magic: +很精彩,对吧?但等等,我们还没结束!你还可以让你的火车飞起来,只要加上参数 `-F`,波特先生,请飞吧: ``` sl -F ``` -**这样会让火车长出翅膀飞出终端窗口!** +这样会让火车长出翅膀飞出终端窗口! -#### 2\. 给你的Linux终端加上矩阵效果 +#### 2、给你的 Linux 终端加上黑客帝国效果 -还记得科幻电影[黑客帝国][7]吗?掉落在终端的绿字变成一个矩阵符号。 +还记得科幻电影[黑客帝国][7]吗?终端里掉落的绿色字符成为了黑客帝国的标志形象。 -你也可以在你的Linux电脑里有这样的矩阵数字雨!你只需要安装**cmatric**然后在终端输入它就行。 +你也可以在你的 Linux 电脑里有这样的黑客帝国数字雨!你只需要安装 `cmatric` 然后在终端输入它就行。 ![][8] -在Debian/Ubuntu Linux上安装cmatrix: +在 Debian/Ubuntu Linux 上安装 cmatrix: ``` sudo apt install cmatrix ``` -现在,你要做的就是输入下面的命令,在终端就会有矩阵屏幕了: +现在,你要做的就是输入下面的命令,在终端就会有黑客帝国屏幕了: ``` cmatrix ``` -按住Ctrl+C来停止它,黑客先生。 +按下 `Ctrl+C` 来停止它,黑客先生。 -**推荐阅读:** +#### 3、燃起来 -![][9] - -#### [通过Telnet在Linux终端看星际大战][10] - -在Linux终端看星际大战。 - -#### 3\. 让这里着火 - -拿好灭火器因为接下来你要在你的终端里点火了! +拿好灭火器,因为接下来你要在你的终端里点火了! ![][11] @@ -106,13 +98,13 @@ sudo apt install libaa-bin aafire ``` -按住Ctril+C来停止它。 +按下 `Ctril+C` 来停止它。 -#### 4\. 幸运饼干命令 +#### 4、幸运饼干命令 想知道你的运气怎样但身边没有幸运饼干? -别担心,你只需在终端打出“fortune”然后按下回车。终端将会显示出一个你的幸运语就像你从幸运饼干里得到的一样。 +别担心,你只需在终端打出 `fortune` 然后按下回车。终端将会随机显示出一个幸运语,就像你从幸运饼干里得到的一样。 ![][12] @@ -128,19 +120,19 @@ sudo apt install fortune fortune ``` -这是一个你可以实际去使用的命令。你可以用它作为每日消息,这样在多用户环境下,每个用户登录后都会得到一个“幸运饼干”。 +这是一个你可以实际使用的命令。你可以用它作为每日消息,这样在多用户环境下,每个用户登录后都会得到一个“幸运饼干”。 -你也可以把它添加到bashrc文件,这样当你登进终端你就会看到了。 +你也可以把它添加到 `bashrc` 文件,这样当你登进终端你就会看到了。 -#### 5\. 宠物爱好者?这是给你准备的 +#### 5、宠物爱好者?这是给你准备的 -Oneko是一个有趣的命令,可以把你的光标变成一只老鼠,然后创造一只猫,一旦你移动光标,就会来追你。这不仅局限于终端。当猫追逐光标时,你可以继续工作。 +`oneko` 是一个有趣的命令,可以把你的光标变成一只老鼠,然后创造一只好奇的猫,一旦你移动光标,就会来追你。这不仅局限于终端。当猫追逐光标时,你可以继续工作。 如果你家里有孩子这一定很有趣。 ![][13] -用下面的命令安装Oneko +用下面的命令安装 `oneko`: ``` sudo apt install oneko @@ -158,11 +150,11 @@ oneko oneko -dog ``` -这里有很多种小宠物,你可以用oneko -help获取信息。用Ctrl+C终止它。 +它有很多种小宠物,你可以用 `oneko -help` 获取信息。按下 `Ctrl+C` 终止它。 -#### 6\. 有个小兄弟在看着你 +#### 6、有个小兄弟在看着你 -Xeyes是一个很小的GUI程序,它可以绘制出一双眼睛一直盯着你!它会不断跟随您的鼠标光标,运行命令自己看看! +`xeyes` 是一个很小的 GUI 程序,它可以绘制出一双眼睛一直盯着你!它会不断跟随你的鼠标光标,运行命令自己看看! ![][14] @@ -178,12 +170,11 @@ sudo apt install xeyes xeyes ``` -按住Ctrl+C终止它。 +按下 `Ctrl+C` 终止它。 -#### 7\. Let the terminal speak for you -#### 7\. 让终端帮你讲话 +#### 7、让终端帮你讲话 -打开你的扬声器,你来试试这个命令,[eSpeak][15]是一个有趣的命令,它可以让你的终端说话。是的,你没听错。 +打开你的扬声器,你来试试这个命令,[eSpeak][15] 是一个有趣的命令,它可以让你的终端说话。是的,你没听错。 先安装这个包: @@ -197,15 +188,15 @@ sudo apt install espeak espeak "Type what your computer says" ``` -无论你在双引号里面填什么,你的电脑都会复述出来!它就像[在Linux中的echo命令][16],但不是打印出来,而是说出来。 +无论你在双引号里面填什么,你的电脑都会复述出来!它就像[在 Linux 中的 echo 命令][16],但不是打印出来,而是说出来。 -#### 8\. 卫生间(但它不能洗衣服) +#### 8、Toilet(但与洗手间无关) -这听起来有点奇怪,是的。但是,这只是一个命令,用来将文本转换成大的ASCII字符。 +这听起来有点奇怪,是的。但是,这只是一个命令,用来将文本转换成大的 ASCII 字符。 ![][17] -用这个命令安装toilet: +用这个命令安装 `toilet`: ``` sudo apt install toilet @@ -217,17 +208,17 @@ sudo apt install toilet toilet sample text you want ``` -我也不知道为啥这个小程序叫卫生间。 +我也不知道为啥这个小程序叫 Toilet。 -#### 9\. 那个牛说什么? +#### 9、那个牛说什么? -Cowsay是一个在终端中用ASCII字符展示出一头牛的命令。通过这个命令,你可以控制牛说出你想说的话。 +`cowsay` 是一个在终端中用 ASCII 字符展示出一头牛的命令。通过这个命令,你可以控制牛说出你想说的话。 别纠结声音,它只展示文本(就是你看漫画书一样)。 ![Cowsay Cowthink][18] -安装**cowsay**: +安装 `cowsay`: ``` sudo apt install cowsay @@ -239,15 +230,15 @@ sudo apt install cowsay cowsay "your text" ``` -无论你在双引号里填什么,你的牛都会说!我看到一些系统管理员用它来展示每天的消息。你也可以这样,你甚至可以把它和fortune命令结合。 +无论你在双引号里填什么,你的牛都会说!我看到一些系统管理员用它来展示每天的消息。你也可以这样,你甚至可以把它和 `fortune` 命令结合。 -#### 10\. Banner命令 +#### 10、旗帜 -banner命令与toilet命令相似,但它限制最多只能打印10个字符。 +`banner` 命令与 `toilet` 命令相似,但它限制最多只能打印 10 个字符。 ![][19] -你可以这样安装banner命令: +你可以这样安装 `banner` 命令: ``` sudo apt install sysvbanner @@ -261,29 +252,29 @@ banner "Welcome" 替换双引号里的内容,你将会得到你想要的展示内容。 -#### 11\. Yes命令 +#### 11、Yes ![][20] -yes命令帮助你在循环中自动响应直到终止命令。这个命令将会一直打印相同的内容。如果你想快速生成大量垃圾文本,那么此命令将像超级按钮一样工作。 +`yes` 命令帮助你在循环中自动响应直到终止命令。这个命令将会一直打印相同的内容。如果你想快速生成大量垃圾文本,那么此命令将像超级按钮一样工作。 -你也可以使用它为命令提供“yes”(如果提示)。例如,apt upgrade命令会要求你确认,你可以像这样使用它: +你也可以使用它为命令提供 `yes` 应答(如果提示应答时)。例如,`apt upgrade` 命令会要求你确认,你可以像这样使用它: ``` yes | sudo apt upgrade ``` -你不需要安装任何包,Yes命令已经存在了。 +你不需要安装任何包,`yes` 命令已经存在了。 -想要终止yes命令循环,只需按住**CTRL+C**。 +想要终止 `yes` 命令循环,只需按下 `CTRL+C`。 -#### 12\. 得到一个新的身份 +#### 12、得到一个新的身份 -要生成一个随机的假身份吗?我推荐你用rig命令。你在终端运行它,就会生成一个假的身份。 +要生成一个随机的假身份吗?我推荐你用 `rig` 命令。你在终端运行它,就会生成一个假的身份。 ![][21] -用这个命令安装rig: +用这个命令安装 `rig`: ``` sudo apt install rig @@ -295,25 +286,20 @@ sudo apt install rig rig ``` -它可能被用在脚本或者web应用中展示随机信息,但我自己还没做过什么。 +它可能被用在脚本或者 web 应用中展示随机信息,但我自己还没做过什么。 -**结尾** +### 结尾 -我希望你会喜欢这个有趣的Linux命令列表。你最喜欢哪个命令呢?你还知道其他有趣的命令吗?请在评论部分与我们分享。 +我希望你会喜欢这个有趣的 Linux 命令列表。你最喜欢哪个命令呢?你还知道其他有趣的命令吗?请在评论部分与我们分享。 -![][22] - -### Srimanta Koley - -Srimanta是一位热情的作家、发行者、开源爱好者,非常喜欢与技术相关的所有内容。他喜欢读书,特别是90年的书! -------------------------------------------------------------------------------- via: https://itsfoss.com/funny-linux-commands/ -作者:[Community][a] +作者:[Srimanta Koley][a] 选题:[lujun9972][b] 译者:[Zioyi](https://github.com/Zioyi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4495baa1ba4a34f217590930266cd9e6d6f6e0bb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 17:38:22 +0800 Subject: [PATCH 259/394] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @Zioyi 恭喜你完成了第一篇翻译贡献! 本文首发地址: https://linux.cn/article-12149-1.html 你的 LCTT 专页地址: https://linux.cn/lctt/Zioyi 请注册以领取 LCCN: https://lctt.linux.cn/ --- ...0417 12 Linux Commands to Have Some Fun in the Terminal.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200417 12 Linux Commands to Have Some Fun in the Terminal.md (99%) diff --git a/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md similarity index 99% rename from translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md rename to published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md index 581e683a5c..b7f48944f3 100644 --- a/translated/tech/20200417 12 Linux Commands to Have Some Fun in the Terminal.md +++ b/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (Zioyi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12149-1.html) [#]: subject: (12 Linux Commands to Have Some Fun in the Terminal) [#]: via: (https://itsfoss.com/funny-linux-commands/) [#]: author: (Community https://itsfoss.com/author/itsfoss/) From 180cc020abe97d2f04b0e58b3cc1312218d38193 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 17:41:13 +0800 Subject: [PATCH 260/394] PRF --- ...200417 12 Linux Commands to Have Some Fun in the Terminal.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md index b7f48944f3..d13219c30a 100644 --- a/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md +++ b/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md @@ -98,7 +98,7 @@ sudo apt install libaa-bin aafire ``` -按下 `Ctril+C` 来停止它。 +按下 `Ctrl+C` 来停止它。 #### 4、幸运饼干命令 From 0108d46e5a1d9fd622e6f79c6061fc3334e53ab3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 19:10:00 +0800 Subject: [PATCH 261/394] PRF @cycoe --- ...u need to know about variables in Emacs.md | 70 ++++++++----------- 1 file changed, 29 insertions(+), 41 deletions(-) diff --git a/translated/tech/20200311 What you need to know about variables in Emacs.md b/translated/tech/20200311 What you need to know about variables in Emacs.md index 635f7d6249..52b341789a 100644 --- a/translated/tech/20200311 What you need to know about variables in Emacs.md +++ b/translated/tech/20200311 What you need to know about variables in Emacs.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (cycoe) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What you need to know about variables in Emacs) @@ -9,51 +9,49 @@ 关于 Emacs 中的变量你需要知道的事情 ====== -学习 Elisp 是如何处理变量的,以及如何在你的脚本与配置中使用它们。 -![编程键盘][1] + +> 学习 Elisp 是如何处理变量的,以及如何在你的脚本与配置中使用它们。 + +![](https://img.linux.net.cn/data/attachment/album/202004/25/190905pq1qfk1f8f9qs9v8.jpg) GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言)写成,它是一个编辑器的同时,又碰巧是 Elisp 的沙盒。因此,理解 Elisp 中的一些基本编程概念会对你有一些帮助。 -如果你是 [Emacs][2] 新手,请先访问 Sacha Chua 的[《给 Emacs 新手的资源》][3]精品帖。本篇文章假定你熟悉常见的 Emacs 术语,并且能够阅读 Elisp 代码的简单片段并对其进行求值。最好你也听说过变量作用域的概念,知道它在其它编程语言中的作用。本篇文章中的示例假定你使用的是相对较新的 Emacs 版本([v.25 之后的版本][4])。 +如果你是 [Emacs][2] 新手,请先阅读 Sacha Chua 的《[给 Emacs 新手的资源][3]》精品帖。本篇文章假定你熟悉常见的 Emacs 术语,并且能够阅读并求值 Elisp 代码的简单片段。最好你也听说过变量作用域的概念,知道它在其它编程语言中的作用。本篇文章中的示例假定你使用的是相对较新的 Emacs 版本([v.25 之后的版本][4])。 -[Elisp 手册][5] 包含了 Elisp 的方方面面,但它是写给那些有明确查找目标的人们的,并且它在这方面也做得相当棒。但是很多人希望这些资源能够在更高的层次上解释 Elisp 的概念,同时将信息压缩成最精华的部分。本篇文章也正是我回应这种呼声的一次尝试,为读者描绘基础的大体轮廓。使他们能在配置中用上这些技巧,也让他们在手册中查询细节变得更容易。 +[Elisp 手册][5] 包含了 Elisp 的方方面面,但它是写给那些有明确查找目标的人们的(它在这方面也做得相当棒)。但是很多人想要能够在更高的层次上解释 Elisp 概念的材料,同时将信息压缩成最精华的部分。本篇文章也正是我回应这种呼声的一次尝试,为读者描绘基础的大体轮廓。使他们能在配置中用上这些技巧,也让他们在手册中查询细节变得更容易。 ### 全局变量 用 `defcustom` 定义的用户设置和用 `defvar` 或 `defconst` 定义的变量是全局的。使用 `defcustom` 或 `defvar` 声明变量的一个非常重要的原因是,当一个变量已经被绑定bind,对它们进行重新求值不会覆盖掉已有的值。举个栗子,如果你在初始化文件中对 `my-var` 进行如下绑定: - ``` -`(setq my-var nil)` +(setq my-var nil) ``` 对如下表达式求值不会将变量覆盖为 `t`: - ``` `(defvar my-var t)` ``` -注意此处有_一个例外_:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式,你可以按需将变量强制覆盖。这种行为是刻意而为之的:你可能知道,Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。 +注意此处有*一个例外*:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式,你可以按需将变量强制覆盖。这种行为是刻意而为之的:你可能知道,Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。 ### 用户选项 -用户选项就是使用 `defcustom` 声明的全局变量。与使用 `defvar` 声明的变量不同,这些变量可以用 `M-x customize` 界面来配置。据我所知,大部分人因为觉得它开销较大而不经常使用。一旦你知道如何在你的初始化文件中设置变量,也就没有理由一定要去使用它了。许多用户没有意识到的一个细节是,通过 **customize** 的方式设置用户选项能够执行代码,有的时间可用来运行一些附加的配置说明: - +用户选项就是使用 `defcustom` 声明的全局变量。与使用 `defvar` 声明的变量不同,这些变量可以用 `M-x customize` 界面来配置。据我所知,大部分人因为觉得它开销较大而不经常使用。一旦你知道如何在你的初始化文件中设置变量,也就没有理由一定要去使用它了。许多用户没有意识到的一个细节是,通过 `customize` 的方式设置用户选项能够执行代码,有的时间可用来运行一些附加的配置说明: ``` (defcustom my-option t -  "我的用户选项" +  "My user option."   :set (lambda (sym val)          (set-default sym val)          (message "Set %s to %s" sym val))) ``` -若你对这段代码求值,并键入 `M-x customize-option RET my-option RET` 运行 **customize** 界面,lambda 匿名函数就会被调用,回显区域就会显示出该选项的符号名与值。 +若你对这段代码求值,并键入 `M-x customize-option RET my-option RET` 运行 `customize` 界面,lambda 匿名函数就会被调用,回显区域就会显示出该选项的符号名与值。 如果你在初始化文件中使用 `setq` 改变该选项的值,那么匿名函数不会运行。要想在 Elisp 中正确设置一个选项,你需要使用函数 `customize-set-variable`。或者,人们在他们的配置文件中使用了各种版本的 `csetq` 宏来自动处理(如你所愿,你可以通过 GitHub 的代码搜索发现更复杂的变体)。 - ``` (defmacro csetq (sym val)   `(funcall (or (get ',sym 'custom-set) 'set-default) ',sym ,val)) @@ -63,20 +61,18 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) 在你将以上代码放入到你的初始化文件中之后,你便可以使用 `csetq` 宏在设置变量的同时运行任何现存的 `setter` 函数。要证明这点,你可以使用此宏来改变上面定义的选项,并观察回显区域的消息输出。 - ``` -`(csetq my-option nil)` +(csetq my-option nil) ``` ### 动态绑定与词法绑定 当你在使用其它编程语言时,你可能不会意识到动态绑定与词法绑定的区别。当今的大部分编程语言使用词法绑定,并且在学习变量作用域与变量查找时也没有必要去了解它们之间的区别。 -如此看来,Emacs Lisp 比较特殊因为动态绑定是默认选项,词法绑定需要显式启用。这里有一些历史遗留原因,但在实际使用中,你应该_时刻_启用词法绑定,因为它更快并且不容易出错。要启用词法绑定,只需将如下的注释行作为你的 Emacs Lisp 文件的第一行: - +如此看来,Emacs Lisp 比较特殊因为动态绑定是默认选项,词法绑定需要显式启用。这里有一些历史遗留原因,但在实际使用中,你应该*时刻*启用词法绑定,因为它更快并且不容易出错。要启用词法绑定,只需将如下的注释行作为你的 Emacs Lisp 文件的第一行: ``` -`;;; -*- lexical-binding: t; -*-` +;;; -*- lexical-binding: t; -*- ``` 另一种方式,你可以调用 `add-file-local-variable-prop-line`,在你选择将变量 `lexical-binding` 置为 `t` 后,会自动插入如上的注释行。 @@ -105,15 +101,13 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) 如你所知,`let` 用于临时建立局部绑定: - ``` (let ((a "I'm a")       (b "I'm b"))   (message "Hello, %s. Hello %s" a b)) ``` -接下来有趣的是——使用 `defcustom`、`defvar` 以及 `defconst` 定义的变量被称为_特殊变量_,不论词法绑定是否启用,它们都将使用动态绑定: - +接下来有趣的是——使用 `defcustom`、`defvar` 以及 `defconst` 定义的变量被称为*特殊变量*,不论词法绑定是否启用,它们都将使用动态绑定: ``` ;;; -*- lexical-binding: t; -*- @@ -142,7 +136,6 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) 这是另一个常见的示例,如何进行大小写敏感的搜索: - ``` (let ((case-fold-search nil))   (some-function-which-uses-search ...)) @@ -154,26 +147,25 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) ``` (let ((vars ())) -  (mapatoms -   (lambda (cand) -     (when (and (boundp cand) -                (not (keywordp cand)) -                (special-variable-p cand) -                (not (string-match "-" -                                   (symbol-name cand)))) -       (push cand vars)))) -  vars) ;; => (t obarray noninteractive debugger nil) + (mapatoms + (lambda (cand) + (when (and (boundp cand) + (not (keywordp cand)) + (special-variable-p cand) + (not (string-match "-" + (symbol-name cand)))) + (push cand vars)))) + vars) ;; => (t obarray noninteractive debugger nil) ``` ### 缓冲区局部变量 每个缓冲区都能够拥有变量的一个局部绑定。这就意味着对于任何变量,都会首先在当前缓冲区中查找缓冲区局部变量取代默认值。局部变量是 Emacs 中一个非常重要的特性,比如它们被主模式用来建立缓冲区范围内的行为与设置。 -事实上你已经在本文中见过_缓冲区局部变量_——也就是将 `lexical-binding` 在缓冲区范围内设置为 `t` 的特殊注释行。在 Emacs 中,在特殊注释行中定义的缓冲区局部变量也被称为`文件局部变量`。 +事实上你已经在本文中见过*缓冲区局部变量*——也就是将 `lexical-binding` 在缓冲区范围内设置为 `t` 的特殊注释行。在 Emacs 中,在特殊注释行中定义的缓冲区局部变量也被称为*文件局部变量*。 任何的全局变量都可以用缓冲区局部变量来遮掩,比如上面定义的变量 `my-var`,你可用如下方式设置局部变量: - ``` (setq-local my-var t) ;; or (set (make-local-variable 'my-var) t) @@ -185,7 +177,6 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) 因为局部变量意味着对缓冲区的定制,它们也就经常被用于模式钩子中。一个典型的例子如下所示: - ``` (add-hook 'go-mode-hook           (defun go-setup+ () @@ -199,8 +190,7 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) 这将设置 `go-mode` 缓冲区中 `M-x compile` 使用的编译命令。 -另一个重要的方面就是一些变量会_自动_成为缓冲区局部变量。这也就意味着当你使用 `setq` 设置这样一个变量时,它会针对当前缓冲区设置局部绑定。这个特性不应该被经常使用,因为这种隐式的行为并不好。不过如果你想的话,你可以使用如下方法创建自动局部变量: - +另一个重要的方面就是一些变量会*自动*成为缓冲区局部变量。这也就意味着当你使用 `setq` 设置这样一个变量时,它会针对当前缓冲区设置局部绑定。这个特性不应该被经常使用,因为这种隐式的行为并不好。不过如果你想的话,你可以使用如下方法创建自动局部变量: ``` (defvar-local my-automatical-local-var t) @@ -213,9 +203,7 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) Emacs 是一个强大的编辑器,并且随着你的定制它将变得更加强大。现在,你知道了 Elisp 是如何处理变量的,以及你应如何在你自己的脚本与配置中使用它们。 -* * * - -_本篇文章此前采用 CC BY-NC-SA 4.0 许可证发布在 [With-Emacs][7] 上,经过修改(带有合并请求)并在作者允许的情况下重新发布。_ +*本篇文章此前采用 CC BY-NC-SA 4.0 许可证发布在 [With-Emacs][7] 上,经过修改(带有合并请求)并在作者允许的情况下重新发布。* -------------------------------------------------------------------------------- @@ -224,7 +212,7 @@ via: https://opensource.com/article/20/3/variables-emacs 作者:[Clemens Radermacher][a] 选题:[lujun9972][b] 译者:[cycoe](https://github.com/cycoe) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 99b0533680653c76c3ce0557ffeadda0729acd99 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 19:10:26 +0800 Subject: [PATCH 262/394] PUB @cycoe https://linux.cn/article-12150-1.html --- ...20200311 What you need to know about variables in Emacs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200311 What you need to know about variables in Emacs.md (99%) diff --git a/translated/tech/20200311 What you need to know about variables in Emacs.md b/published/20200311 What you need to know about variables in Emacs.md similarity index 99% rename from translated/tech/20200311 What you need to know about variables in Emacs.md rename to published/20200311 What you need to know about variables in Emacs.md index 52b341789a..6a2a0aaa63 100644 --- a/translated/tech/20200311 What you need to know about variables in Emacs.md +++ b/published/20200311 What you need to know about variables in Emacs.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (cycoe) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12150-1.html) [#]: subject: (What you need to know about variables in Emacs) [#]: via: (https://opensource.com/article/20/3/variables-emacs) [#]: author: (Clemens Radermacher https://opensource.com/users/clemera) From 9b31e6bbf50b1fd770be30041a584fb5d365c017 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 25 Apr 2020 19:11:14 +0800 Subject: [PATCH 263/394] PRF --- .../20200311 What you need to know about variables in Emacs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20200311 What you need to know about variables in Emacs.md b/published/20200311 What you need to know about variables in Emacs.md index 6a2a0aaa63..a53c1200ed 100644 --- a/published/20200311 What you need to know about variables in Emacs.md +++ b/published/20200311 What you need to know about variables in Emacs.md @@ -31,7 +31,7 @@ GNU Emacs 是由 C 和 Emacs Lisp(Elisp,Lisp 编程语言的一种方言) 对如下表达式求值不会将变量覆盖为 `t`: ``` -`(defvar my-var t)` +(defvar my-var t) ``` 注意此处有*一个例外*:如果你用 `C-M-x` 快捷键对上述声明求值,它将调用 `eval-defun` 函数,并将变量覆盖为 `t`。通过此方式,你可以按需将变量强制覆盖。这种行为是刻意而为之的:你可能知道,Emacs 中的许多特性是按需加载的,也可以称为自动加载。如果那些文件中的声明将变量覆盖为它们的默认值,那它也就覆盖了你初始化文件中的设置。 From cf7431e4834cb961092b934ac1e05f1c135f77ed Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Sat, 25 Apr 2020 22:32:59 +0800 Subject: [PATCH 264/394] Update 20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md --- ...w- Slightly Different Lightweight Linux.md | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md index 6b8be0c8bd..b672d3b828 100644 --- a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md +++ b/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md @@ -7,87 +7,87 @@ [#]: via: (https://itsfoss.com/bodhi-linux-review/) [#]: author: (John Paul https://itsfoss.com/author/john/) -Bodhi Linux 5.1 Review: Slightly Different Lightweight Linux +Bodhi Linux 5.1 一览: 略有不同的轻量化 Linux ====== -Bodhi Linux is a [lightweight Linux distribution][1] based on Ubuntu. Unlike most other distributions, Bodhi uses its own Moksha desktop and focuses on providing you a minimal setup to run on older computers. +Bodhi Linux 是一个基于 Ubuntu 的[轻量级Linux发行版][1]。与其他大多数发行版不同,Bodhi 使用自己的 Moksha 桌面,并专注于为你提供在旧计算机上运行的最简设置。 -### What is Bodhi Linux? +### 什么是菩提 Linux? ![Bodhi Start Page][2] -[Bodhi Linux][3] was first introduced in 2011. It is designed with “[minimalism, resource efficiency, and user choice][4]” in mind. The devs strove to provide a “[system that is functional but not bloated][5]“. As such, it uses the lightweight Moksha Desktop and has only the basic applications preinstalled. The idea is to give the user a stable platform to build the system that they want. It is based on the latest Ubuntu LTS. +[Bodhi Linux][3] 最早于2011年推出。它以“[简约、高效和用户自定义][4]”为设计理念。开发人员旨在提供一个“[功能正常但不臃肿的系统][5]”。因此,它使用轻量级的Moksha 桌面,只预装了基本的应用程序。这一做法是为了给用户一个稳定的平台来构建他们想要的系统。它基于最新版的 Ubuntu 长期支持版本。 -### Moksha Desktop +### Moksha 桌面 ![Bodhi Desktop][6] -Originally Bodhi shipped with the [Enlightenment desktop environment][7]. Bodhi Linux has long been known as the “Enlightened” Linux distro. In fact, the word ‘bodhi’ is based on the Sanskrit word for “enlightenment”. +起初菩提是随着[ Enlightenment 桌面环境][7]一起发布的。Bodhi Linux 一直被认为是“开明的”Linux发行版。事实上,“Bodhi”这个词是基于梵文的“开悟”。 -However, that changed when Enlightenment 18 was released. The release was in such bad shape that it was not included in Bodhi. Enlightenment 19 was released and fixed some of the problems, but still had issues. +然而,当 Enlightenment 18版本发布以后,这一切都改变了。该版本是如此的糟糕,它并没有集成 Bodhi 。Enlightenment 19 被发布并修复了一些问题,但仍然存在一些问题。 -After trying to work with the Enlightenment dev team and getting nowhere, the Bodhi devs [forked][8] Enlightenment 17 in 2015. The new desktop environment would be named [Moksha][9], which is based on the Sanskrit word for “emancipation, liberation, or release”. You can find the code for it on [GitHub][10]. +在尝试与 Enlightenment 开发团队合作却毫无进展之后,Bodhi 开发者在2015年复刻了[8]Enlightenment 17。新的桌面环境被命名为[Moksha][9],它是基于梵文单词“解脱、解放或释放”。你可以在[GitHub][10]上找到它的代码。 -### What is new in 5.1.0? +### 5.1.0有什么新特性? -[Subscribe to our YouTube channel for more Linux videos][11] +[订阅我们的YouTube频道来观看更多的Linux视频][11] -[Bodhi 5.1.0][12] is the first release in two years and the second release to be based on Ubuntu 18.04. Besides updating packages, it also has new default icons and theme. This release makes several changes to the default applications. Leafpad comes preinstalled instead of epad and [GNOME Web][13] (also known as Epiphany) replaces [Midori][14]). The eepDater system updater was removed. +[Bodhi 5.1.0][12] 是两年内的第一个版本,也是基于 Ubuntu 18.04 的第二个版本。除了更新包,它还有新的默认图标和主题。该版本对默认应用程序做了几处更改。预装版 Leafpad 取代了 epad 并且 [GNOME Web][13] (也被称为Epiphany)代替了[Midori][14])。删除了eepDater系统更新器。 -There are currently [four different versions][15] of Bodhi 5.1.0 available to [download][16]: Standard, Hwe, Legacy, and AppPack. +目前有[四个不同的版本][15]的菩提5.1.0提供[下载][16]: 标准版(Standard),硬件支持版(Hwe), 兼容版(Legacy), 和软件包版(AppPack). - * Standard will work for systems made in the last decade. It does not push kernel updates. - * Hwe (Hardware Enablement) edition is new to the Bodhi family and is designed to include support for newer hardware and will received kernel updates. The 5.1 release features the 5.3.0-42 kernel. - * Legacy is the only edition that is 32-bit. It uses the “older 4.9.0-6-686 Linux kernel that is optimized for old (15+ years old) hardware. This kernel also does not include the PAE extension which is not supported on many older systems.” - * The AppPack edition is for those who want a fully-loaded system out of the box and comes with many applications preinstalled. + * 标准适用于过去十年内电脑配置。它不推送内核更新。 + * 硬件支持版Hwe (Hardware Enablement)是 Bodhi 新的家族设计包括支持更新的硬件和将收到内核更新。5.1版本的使用的是5.3.0-42内核。 + * 兼容版是唯一的32位版本。它使用“较旧的4.9.0-6-686 Linux内核,该内核针对旧的(15年以上)硬件进行了优化”。这个内核也不包括PAE扩展,这是许多老系统不支持的。” + * 软件包版是为那些想要一个开箱即用并预装了许多应用程序的全负载系统的人准备的。 -### System Requirements for Bodhi Linux +### Bodhi Linux 的系统要求 -Minimum system requirement +最低系统要求 - * 500 MHz processor - * 256 MB of RAM - * 5 GB of drive space + * 500 MHz 处理器 + * 256 MB 内存 + * 5 GB 的硬盘存储空间 -Recommended system requirement +推荐系统要求 - * 1.0 GHz processor - * 512 MB of RAM - * 10 GB of drive space + * 1.0 GHz 处理器 + * 512 MB 内存 + * 10 GB 的硬盘存储空间 -### Experiencing Bodhi Linux +### Bodhi Linux 的体验 ![Old Bodhi Linux][17] -Since it is based on Ubuntu, installing Bodhi was very simple. After I signed into Bodhi, I was surprised by the new theme and icon set. The last time I installed Bodhi (including 5.0 a couple of months ago) I thought that it needed a new look. There was nothing really wrong with the previous theme, but it looked like something from the early 2000. The new theme gives it a more modern look. +由于它是基于 Ubuntu 的,安装 Bodhi 非常简单。当我登录到 Bodhi 后,我对新的主题和图标设置感到惊讶。上次我安装 Bodhi (包括几个月前的5.0)时,我认为它需要一个新的外观。之前的主题并没有什么问题,但看起来像是2000年初的东西。新的主题使它看起来更具现代感。 ![Bodhi Linux 5.1][18] -I was also glad to see that Midori had been replaced by GNOME Web. I’m not a fan of [Midori browser][19]. It always seemed too minimal for me. (However, that might change in the future with [Midori Next][20].) Web felt more like the web browser I need. Most importantly it comes with Firefox Sync, so I can keep all of my bookmarks and passwords synced. +我也很高兴看到 Midori 浏览器被 GNOME Web 所取代。我不是[Midori 浏览器][19]的粉丝。对我来说,它总是显得功能太少了。(不过,随着[Midori Next][20]的推出,这种情况可能会改变。)Web更像是我需要的Web浏览器。最重要的是它带有Firefox同步功能,这样我就可以同步我所有的书签和密码了。 -Unlike many Linux distros, Bodhi doesn’t really come with a stand-alone software center. Instead, if you click the AppCenter icon it opens the browser and navigates to the [AppCenter p][21][a][21][ge][21] of the Bodhi website. Here apps are sorted by category. Most of them are [lightweight applications][22]. +与许多 Linux 发行版不同,Bodhi 并没有一个独立的软件中心。相反,如果你点击 AppCenter 图标,它会打开浏览器,并导航到 Bodhi 网站的软件中心页面[AppCenter page][21]。这里的应用程序是按类别排序的。它们中的大多数是[轻量级应用程序][22]。 ![Bodhi Linux Appcenter][23] -If you click on one of the pages and click “Install”, Bodhi will install it (after to type in your passwords). This is achieved using a neat little program named [apturl][24] that “is a very simple way to install a software package from a web browser”. It’s pretty slick and I wish more Ubuntu-based distros would use it. +如果你点击其中一个页面并点击“安装”,Bodhi 会开始它的安装(在你输入密码之后)。这是通过一个名为[apturl][24]的小程序实现的,它是“源自web浏览器安装软件包的一种非常简单的方法”。它非常灵巧,我希望更多基于ubuntu的发行版使用它。 -Overall, I like the Moksha desktop. It adheres to the desktop metaphor we have seen for decades (and which I am most comfortable with). It stays out of your way but is very easy to change and modify. The only thing I miss is that the application menu doesn’t open when I hit the super key. But I guess you can’t have everything in life. +总的来说,我喜欢 Moksha 桌面。它坚持我们几十年来看到的桌面风格(这是我最喜欢的)。它不干涉你,却很容易改变和定制。我唯一怀念的是,当我点击超级键时,应用程序菜单不打开。但我猜你不可能拥有生活中的一切。 -### Final Thoughts +### 结语 -I was pleasantly surprised by this recent release of Bodhi Linux. In the past, I’ve played with it from time to time. I always liked it, but this last release has been the best so far. In a way, they have broken free of the idea that Bodhi is only for older system by adding support for newer kernels. +我对最近发布的 Bodhi Linux 感到十分惊喜。过去,我经常折腾它。并且我一直很喜欢它,但最近的这个版本是迄今为止最好的。在某种程度上,他们通过增加对新内核的支持,打破了Bodhi只适用于旧系统的想法。 -If you are looking for a change of scenery while staying close to the world of Ubuntu give [Bodhi Linux][3] a try. +如果你想在拥有 Ubuntu 体验的同时改善一下视觉体验,那就试试[Bodhi Linux][3]吧。 -Have you ever used Bodhi Linux? What is your favorite Ubuntu-based distro? Please let us know in the comments below. +你用过 Bodhi Linux 吗?你最喜欢的基于ubuntu的发行版是什么?请在下面的评论中告诉我们。 -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][25]. +如果你觉得这篇文章很有趣,请花点时间在社交媒体、Hacker News或其他网站上分享 [Reddit][25]. -------------------------------------------------------------------------------- From f868f67d9f6bf98fb8e3eb9e3f94ed4fa40a1d04 Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Sat, 25 Apr 2020 22:38:30 +0800 Subject: [PATCH 265/394] Update 20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md --- ...hi Linux 5.1 Review- Slightly Different Lightweight Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md index b672d3b828..95476933d3 100644 --- a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md +++ b/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md @@ -12,7 +12,7 @@ Bodhi Linux 5.1 一览: 略有不同的轻量化 Linux Bodhi Linux 是一个基于 Ubuntu 的[轻量级Linux发行版][1]。与其他大多数发行版不同,Bodhi 使用自己的 Moksha 桌面,并专注于为你提供在旧计算机上运行的最简设置。 -### 什么是菩提 Linux? +### 什么是 Bodhi Linux? ![Bodhi Start Page][2] From 6dba8793eca8e26ae2bf2d3e5ee893367c13bcbf Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Sat, 25 Apr 2020 22:39:13 +0800 Subject: [PATCH 266/394] Rename sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md to translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md --- ...odhi Linux 5.1 Review- Slightly Different Lightweight Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sources => translated}/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md (100%) diff --git a/sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md similarity index 100% rename from sources/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md rename to translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md From afec8c0d69883d1c4e836eb4e7df909e31c8c5c6 Mon Sep 17 00:00:00 2001 From: Zioyi Date: Sat, 25 Apr 2020 23:13:11 +0800 Subject: [PATCH 267/394] translating --- sources/tech/20180710 Building a Messenger App- Messages.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20180710 Building a Messenger App- Messages.md b/sources/tech/20180710 Building a Messenger App- Messages.md index 55e596df64..577d7324a3 100644 --- a/sources/tech/20180710 Building a Messenger App- Messages.md +++ b/sources/tech/20180710 Building a Messenger App- Messages.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (Zioyi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 1b7b114cfe1977ef6bb318e9e78f952bfa929cc9 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 26 Apr 2020 01:04:10 +0800 Subject: [PATCH 268/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200425=20Inlini?= =?UTF-8?q?ng=20optimisations=20in=20Go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200425 Inlining optimisations in Go.md --- .../20200425 Inlining optimisations in Go.md | 215 ++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 sources/tech/20200425 Inlining optimisations in Go.md diff --git a/sources/tech/20200425 Inlining optimisations in Go.md b/sources/tech/20200425 Inlining optimisations in Go.md new file mode 100644 index 0000000000..3784d6868b --- /dev/null +++ b/sources/tech/20200425 Inlining optimisations in Go.md @@ -0,0 +1,215 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Inlining optimisations in Go) +[#]: via: (https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go) +[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) + +Inlining optimisations in Go +====== + +This is a post about how the Go compiler implements inlining and how this optimisation affects your Go code. + +_n.b._ This article focuses on _gc_, the de facto Go compiler from [golang.org][1]. The concepts discussed apply broadly to other Go compilers like gccgo and llgo but may differ in implementation and efficacy. + +### What is inlining? + +Inlining is the act of combining smaller functions into their respective callers. In the early days of computing this optimisation was typically performed by hand. Nowadays inlining is one of a class of fundamental optimisations performed automatically during the compilation process. + +### Why is inlining important? + +Inlining is important for two reasons. The first is it removes the overhead of the function call itself. The second is it permits the compiler to more effectively apply other optimisation strategies. + +#### Function call overhead + +Calling a function[1][2] in any language carries a cost. There are the overheads of marshalling parameters into registers or onto the stack (depending on the ABI) and reversing the process on return. Invoking a function call involves jumping the program counter from one point in the instruction stream to another which can cause a pipeline stall. Once inside the function there is usually some preamble required to prepare a new stack frame for the function to execute and a similar epilogue needed to retire the frame before returning to the caller. + +In Go a function call carries additional costs to support dynamic stack growth. On entry the amount of stack space available to the goroutine is compared to the amount required for the function. If insufficient stack space is available, the preamble jumps into the runtime logic that grows the stack by copying it to a new, larger, location. Once this is done the runtime jumps back to the start of the original function, the stack check is performed again, which now passes, and the call continues. In this way goroutines can start with a small stack allocation which grows only when needed.[2][3] + +This check is cheap–only a few instructions–and because goroutine stacks grows geometrically the check rarely fails. Thus, the branch prediction unit inside a modern processor can hide the cost of the stack check by assuming it will always be successful. In the case where the processor mis-predicts the stack check and has to discard the work done while it was executing speculatively, the cost of the pipeline stall is relatively small compared to the cost of the work needed for the runtime to grow a goroutines stack. + +While the overhead of the generic and Go specific components of each function call are well optimised by modern processors using speculative execution techniques, those overheads cannot be entirely eliminated, thus each function call carries with it a performance cost over and above the time it takes to perform useful work. As a function call’s overhead is fixed, smaller functions pay a larger cost relative to larger ones because they tend to do less useful work per invocation. + +The solution to eliminating these overheads must therefore be to eliminate the function call itself, which the Go compiler does, under certain conditions, by replacing the call to a function with the contents of the function. This is known as _inlining_ because it brings the body of the function in line with its caller. + +#### Improved optimisation opportunities + +Dr. Cliff Click describes inlining as _the_ optimisation performed by modern compilers as it forms the basis for optimisations like constant proportion and dead code elimination. In effect, inlining allows the compiler to _see_ _furthe_r, allowing it to observe, in the context that a particular function is being called, logic that can be further simplified or eliminated entirely. As inlining can be applied recursively optimisation decisions can be made not only in the context of each individual function, but also applied to the chain of functions in a call path. + +### Inlining in action + +The effects of inlining can be demonstrated with this small example + +``` +package main + +import "testing" + +//go:noinline +func max(a, b int) int { + if a > b { + return a + } + return b +} + +var Result int + +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = max(-1, i) + } + Result = r +} +``` + +Running this benchmark gives the following result:[3][4] + +``` +% go test -bench=.  +BenchmarkMax-4   530687617         2.24 ns/op +``` + +The cost of `max(-1, i)` is around 2.24 nanoseconds on my 2015 MacBook Air. Now let’s remove the `//go:noinline` pragma and see the result: + +``` +% go test -bench=.  +BenchmarkMax-4   1000000000         0.514 ns/op +``` + +From 2.24 ns to 0.51 ns, or according to `benchstat`, a 78% improvement. + +``` +% benchstat {old,new}.txt +name   old time/op  new time/op  delta +Max-4  2.21ns ± 1%  0.49ns ± 6%  -77.96%  (p=0.000 n=18+19) +``` + +Where did these improvements come from? + +First, the removal of the function call and associated preamble[4][5] was a major contributor. Pulling the contents of `max` into its caller reduced the number of instructions executed by the processor and eliminated several branches. + +Now the contents of `max` are visible to the compiler as it optimises `BenchmarkMax` it can make some additional improvements. Consider that once `max` is inlined, this is what the body of `BenchmarkMax` looks like to the compiler: + +``` +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + if -1 > i { + r = -1 + } else { + r = i + } + } + Result = r +} +``` + +Running the benchmark again we see our manually inlined version performs as well as the version inlined by the compiler + +``` +% benchstat {old,new}.txt +name   old time/op  new time/op  delta +Max-4  2.21ns ± 1%  0.48ns ± 3%  -78.14%  (p=0.000 n=18+18) +``` + +Now the compiler has access to the result of inlining `max` into `BenchmarkMax` it can apply optimisation passes which were not possible before. For example, the compiler has noted that `i` is initialised to `0` and only incremented so any comparison with `i` can assume `i` will never be negative. Thus, the condition `-1 > i` will never be true.[5][6] + +Having proved that `-1 > i` will never be true, the compiler can simplify the code to + +``` +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + if false { + r = -1 + } else { + r = i + } + } + Result = r +} +``` + +and because the branch is now a constant, the compiler can eliminate the unreachable path leaving it with + +``` +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = i + } + Result = r +} +``` + +Thus, through inlining and the optimisations it unlocks, the compiler has reduced the expression `r = max(-1, i)` to simply `r = i`. + +### The limits of inlining + +In this article I’ve discussed, so called, _leaf_ inlining; the act of inlining a function at the bottom of a call stack into its direct caller. Inlining is a recursive process, once a function has been inlined into its caller, the compiler may inline the resulting code into _its_ caller, as so on. For example, this code + +``` +func BenchmarkMaxMaxMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = max(max(-1, i), max(0, i)) + } + Result = r +} +``` + +runs as fast as the previous example as the compiler is able to repeatedly apply the optimisations outlined above to reduce the code to the same `r = i` expression. + +In the next article I’ll discuss an alternative inlining strategy when the Go compiler wishes to inline a function in the middle of a call stack. Finally I’ll discuss the limits that the compiler is prepared to go to to inline code, and which Go constructs are currently beyond its capability. + + 1. In Go, a method is just a function with a predefined formal parameter, the receiver. The relative costs of calling a free function vs a invoking a method, assuming that method is not called through an interface, are the same.[][7] + 2. Up until Go 1.14 the stack check preamble was also used by the garbage collector to stop the world by setting all active goroutine’s stacks to zero, forcing them to trap into the runtime the next time they made a function call. This system was [recently replaced][8] with a mechanism which allowed the runtime to pause an goroutine without waiting for it to make a function call.[][9] + 3. I’m using the `//go:noinline` pragma to prevent the compiler from inlining `max`. This is because I want to isolate the effects of inlining on `max` rather than disabling optimisations globally with `-gcflags='-l -N'`. I go into detail about the `//go:` comments in [this presentation][10].[][11] + 4. You can check this for yourself by comparing the output of `go test -bench=. -gcflags=-S` with and without the `//go:noinline` annotation.[][12] + 5. You can check this yourself with the `-gcflags=-d=ssa/prove/debug=on` flag.[][13] + + + +#### Related posts: + + 1. [Five things that make Go fast][14] + 2. [Why is a Goroutine’s stack infinite ?][15] + 3. [How to write benchmarks in Go][16] + 4. [Go’s hidden #pragmas][17] + + + +-------------------------------------------------------------------------------- + +via: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go + +作者:[Dave Cheney][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://dave.cheney.net/author/davecheney +[b]: https://github.com/lujun9972 +[1]: https://github.com/golang/go +[2]: tmp.gBQ2tEtMHc#easy-footnote-bottom-1-4053 (In Go, a method is just a function with a predefined formal parameter, the receiver. The relative costs of calling a free function vs a invoking a method, assuming that method is not called through an interface, are the same.) +[3]: tmp.gBQ2tEtMHc#easy-footnote-bottom-2-4053 (Up until Go 1.14 the stack check preamble was also used by the garbage collector to stop the world by setting all active goroutine’s stacks to zero, forcing them to trap into the runtime the next time they made a function call. This system was recently replaced with a mechanism which allowed the runtime to pause an goroutine without waiting for it to make a function call.) +[4]: tmp.gBQ2tEtMHc#easy-footnote-bottom-3-4053 (I’m using the //go:noinline pragma to prevent the compiler from inlining max. This is because I want to isolate the effects of inlining on max rather than disabling optimisations globally with -gcflags='-l -N'. I go into detail about the //go: comments in this presentation.) +[5]: tmp.gBQ2tEtMHc#easy-footnote-bottom-4-4053 (You can check this for yourself by comparing the output of go test -bench=. -gcflags=-S with and without the //go:noinline annotation.) +[6]: tmp.gBQ2tEtMHc#easy-footnote-bottom-5-4053 (You can check this yourself with the -gcflags=-d=ssa/prove/debug=on flag.) +[7]: tmp.gBQ2tEtMHc#easy-footnote-1-4053 +[8]: https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md +[9]: tmp.gBQ2tEtMHc#easy-footnote-2-4053 +[10]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas +[11]: tmp.gBQ2tEtMHc#easy-footnote-3-4053 +[12]: tmp.gBQ2tEtMHc#easy-footnote-4-4053 +[13]: tmp.gBQ2tEtMHc#easy-footnote-5-4053 +[14]: https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast (Five things that make Go fast) +[15]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?) +[16]: https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go (How to write benchmarks in Go) +[17]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas (Go’s hidden #pragmas) From e2b6de7b673449fb6a87f369d64ae965e554a00b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 26 Apr 2020 01:04:46 +0800 Subject: [PATCH 269/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200425=20The=20?= =?UTF-8?q?rebirth=20of=20Mapzen,=20new=20projects=20bolster=20PyTorch,=20?= =?UTF-8?q?faster=20AI=20object=20detection,=20and=20other=20open=20source?= =?UTF-8?q?=20news?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md --- ...t detection, and other open source news.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md diff --git a/sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md b/sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md new file mode 100644 index 0000000000..6e74c028bf --- /dev/null +++ b/sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md @@ -0,0 +1,78 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news) +[#]: via: (https://opensource.com/article/20/4/news-march-25) +[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) + +The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news +====== +Catch up on the biggest open source headlines from the past two weeks. +![][1] + +In this edition of our open source news roundup, we take a look at the rebirth of Mapzen, two new projects to bolster PyTorch, new open source object detection software, and more! + +### Mapzen makes a comeback + +While its technology is used by open source projects like OpenStreetMap and by firms like Foursquare, open source mapping company Mapzen couldn't sustain itself as a business.  Mapzen initially closed its doors in 2018, but it has [a new lease on life][2] with the support of the Linux Foundation. + +As a project under the Urban Computing Foundation (UCF), Mapzen "encompasses six independent projects and communities involved in developing a truly open platform for mapping, search, navigation and transit data." Being under the UCF's umbrella enables Mapzen's developers to "collaborate on and build a common set of open-source tools connecting cities, autonomous vehicles, and smart infrastructure." They can also tap such UCF members as Google, IBM, and the University of California San Diego for support. Mapzen projects are available under their [GitHub organization][3]. + +### New open source projects to bolster PyTorch + +PyTorch, the open source machine learning framework originating out of Facebook, has been getting a lot of love lately from both its creator and from AWS. The two firms have [released open source projects to bolster PyTorch][4]. + +Facebook is sharing TorchServe, "a model-serving framework for PyTorch that will make it easier for developers to put their models into production." AWS's contribution is TorchElastic, "a library that makes it easier for developers to build fault-tolerant training jobs on Kubernetes clusters." PyTorch's product manager Joe Spisak [told VentureBeat][5] that by using the two projects developers can run "training over a number of nodes without the training job actually failing; it will just continue gracefully, and once those nodes come back online, it can basically restart the training." + +You can find the code for [TorchServe][6] and [TorchElastic][7] on GitHub. + +### Microsoft and Huazhong University release object detection AI + +One of the more difficult tasks facing artificial intelligence systems is to accurately detect and identify objects in photos and videos. Researchers from Microsoft and China's Huazhong University have [released an open source tool][8] that does the job quickly and efficiently. + +Called Fair Multi-Object Tracking (FairMOT for short), the tool "outperforms state-of-the-art models on public data sets at 30 frames per second" (almost normal video speed). It took researches about 30 hours to train the software using data from the MOT Challenge, which is "a framework for validating people-tracking algorithms." The team behind FairMOT believe that the tool can be used in "industries ranging from elder care to security, and perhaps be used to track the spread of illnesses like COVID-19." + +You can view the source code and training models for FairMOT in [this GitHub repository][9]. + +#### In other news + + * [Will a small open-source effort from Japan disrupt the autonomous space?][10] + * [Google open-sources data set to train and benchmark AI sound separation models][11] + * [Docker builds open source community around Compose Specification][12] + * [Sophos Sandboxie is now available as an open-source tool][13] + * [PyCon has moved to an online-only event and is available now][14] + + + +Thanks, as always, to Opensource.com staff members and [Correspondents][15] for their help this week. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/news-march-25 + +作者:[Scott Nesbitt][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/scottnesbitt +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd +[2]: https://www.zdnet.com/article/mapzen-open-source-mapping-project-revived-under-the-urban-computing-foundation/ +[3]: https://github.com/mapzen/ +[4]: https://techcrunch.com/2020/04/21/aws-and-facebook-launch-an-open-source-model-server-for-pytorch/ +[5]: https://venturebeat.com/2020/04/21/facebook-partners-with-aws-on-pytorch-1-5-upgrades-like-torchserve-for-model-serving/ +[6]: https://github.com/pytorch/serve +[7]: https://github.com/pytorch/elastic +[8]: https://venturebeat.com/2020/04/08/researchers-open-source-state-of-the-art-object-tracking-ai/ +[9]: https://github.com/ifzhang/FairMOT +[10]: https://www.forbes.com/sites/rahulrazdan/2020/04/04/will-a-small-open-source-effort-from-japan-disrupt-the--autonomous-space-/#6e6819f01cc5 +[11]: https://venturebeat.com/2020/04/09/google-open-sources-data-set-to-train-and-benchmark-ai-sound-separation-models/ +[12]: https://sdtimes.com/softwaredev/docker-builds-open-source-community-around-compose-specification/ +[13]: https://securityaffairs.co/wordpress/101397/malware/sandboxie-sandbox-open-source.html +[14]: https://us.pycon.org/2020/online/ +[15]: https://opensource.com/correspondent-program From 8b99de80e2e8b939bec0a51c2b287dff9c070a42 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 26 Apr 2020 08:43:44 +0800 Subject: [PATCH 270/394] translated --- ...Addresses, and Interface Speed on Linux.md | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) rename {sources => translated}/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md (51%) diff --git a/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md b/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md similarity index 51% rename from sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md rename to translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md index a16a007124..e586660e0c 100644 --- a/sources/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md +++ b/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md @@ -7,28 +7,28 @@ [#]: via: (https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux +如何在 Linux 上检查可用的网络接口、关联的 IP 地址、MAC 地址和接口速度 ====== -By default when you set up the server you will configure the primary network interface. +默认在设置服务器时,你将配置主网络接口。 -This is part of the build work that everyone does. +这是每个人所做的构建工作的一部分。 -Sometimes you may need to configure an additional network interface for several reasons. +有时出于各种原因,你可能需要配置额外的网络接口。 -This could be a network bonding/teaming or high availability or a separate interface for application requirements or backups. +这可以是网络绑定/团队合作或高可用性,也可以是用于应用需求或备份的单独接口。 -To do so, you need to know how many interfaces your computer has and their speed to configure it. +为此,你需要知道计算机有多少接口以及它们的配置速度。 -There are many commands to check for available network interfaces, but we only use the IP command. +有许多命令可检查可用的网络接口,但是我们仅使用 IP 命令。 -Later we will write a separate article with all these tools. +稍后,我们将使用所有这些工具编写单独的文章。 -In this tutorial, we will show you the Available Network Interface Card (NIC) information, such as the interface name, associated IP address, MAC address, and interface speed. +在本教程中,我们将向你显示可用网络网卡(NIC)信息,例如接口名称、关联的 IP 地址、MAC 地址和接口速度。 -### What’s IP Command +### 什么是 IP 命令 -**[IP command][1]** is similar to ifconfig, which is used to for assigning Static IP Address, Route & Default Gateway, etc., +**[IP 命令][1]**类似于 ifconfig, 用于分配静态 IP 地址、路由和默认网关等。 ``` # ip a @@ -45,17 +45,17 @@ In this tutorial, we will show you the Available Network Interface Card (NIC) in valid_lft forever preferred_lft forever ``` -### What’s ethtool Command +### 什么是 ethtool 命令 -The ethtool is used to query or control network driver and hardware settings. +ethtool 用于查询或控制网络驱动或硬件设置。 ``` # ethtool eth0 ``` -### 1) How to Check the Available Network Interfaces on Linux Using the IP Command +### 1)如何在 Linux 上使用 IP 命令检查可用的网络接口 -When you run the IP command without any arguments, it gives you plenty of information, but if you only need the available network interfaces, use the following customized IP command. +在不带任何参数的情况下运行 IP 命令时,它会提供大量信息,但是,如果仅需要可用的网络接口,请使用以下定制的 IP 命令。 ``` # ip a |awk '/state UP/{print $2}' @@ -64,9 +64,9 @@ eth0: eth1: ``` -### 2) How to Check the IP Address of a Network Interface on Linux Using the IP Command +### 2)如何在 Linux 上使用 IP 命令检查网络接口的 IP 地址 -If you only want to see which IP address is assigned to which interface, use the following customized IP command. +如果只想查看 IP 地址分配给了哪个接口,请使用以下定制的 IP 命令。 ``` # ip -o a show | cut -d ' ' -f 2,7 @@ -78,18 +78,18 @@ lo 127.0.0.1/8 192.168.1.102/24 ``` -### 3) How to Check the Network Interface Card MAC Address on Linux Using the IP Command +### 3)如何在 Linux 上使用 IP 命令检查网卡的 MAC 地址 -If you only want to see the network interface name and the corresponding MAC address, use the following format. +如果只想查看网络接口名称和相应的 MAC 地址,请使用以下格式。 -To check a specific network interface MAC address. +检查特定的网络接口的 MAC 地址。 ``` # ip link show dev eth0 |awk '/link/{print $2}' 00:00:00:55:43:5c ``` -To check MAC address for all network interface. +检查所有网络接口的 MAC 地址。 ``` # vi /opt/scripts/mac-addresses.sh @@ -102,7 +102,7 @@ ethtool -P $output done ``` -Run the below shell script to get the MAC address for multiple network interfaces. +运行下面的 shell 脚本获取多个网络接口的 MAC 地址。 ``` # sh /opt/scripts/mac-addresses.sh @@ -113,11 +113,11 @@ eth1: Permanent address: 00:00:00:55:43:5d ``` -### 4) How to Check the Network Interface Port Speed on Linux Using the ethtool Command +### 4)如何在 Linux 上使用 ethtool 命令检查网络接口速度 -If you want to check the network interface port speed on Linux, use the ethtool command. +如果要在 Linux 上检查网络接口速度,请使用 ethtool 命令。 -To check the speed of a particular network interface port. +检查特定网络接口的速度。 ``` # ethtool eth0 |grep "Speed:" @@ -125,7 +125,7 @@ To check the speed of a particular network interface port. Speed: 10000Mb/s ``` -To check the port speed for all network interfaces. +检查所有网络接口速度。 ``` # vi /opt/scripts/port-speed.sh @@ -138,7 +138,7 @@ ethtool $output |grep "Speed:" done ``` -Run the below shell script to get the port speed for multiple network interfaces. +运行以下 shell 脚本获取多个网络接口速度。 ``` # sh /opt/scripts/port-speed.sh @@ -149,9 +149,9 @@ eth1: Speed: 10000Mb/s ``` -### 5) Shell Script to Verify Network Interface Card Information +### 5)验证网卡信息的 Shell 脚本 -This **[shell script][2]** allows you to gather all of the above information, such as network interface names, IP addresses of network interfaces, MAC addresses of network interfaces, and the speed of a network interface port. +通过此 **[shell 脚本][2]**,你可以收集上述所有信息,例如网络接口名称、网络接口的 IP 地址,网络接口的 MAC 地址以及网络接口的速度。 ``` # vi /opt/scripts/nic-info.sh @@ -168,7 +168,7 @@ ethtool $iname |grep "Speed:" done ``` -Run the below shell script to check network card information. +运行以下 shell 脚本检查网卡信息。 ``` # sh /opt/scripts/nic-info.sh @@ -191,7 +191,7 @@ via: https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-spee 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[geekpi](https://github.com/geekpi) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From af33cebcfad63da5e6dc5d51d25b89e66d6d0b78 Mon Sep 17 00:00:00 2001 From: geekpi Date: Sun, 26 Apr 2020 08:49:11 +0800 Subject: [PATCH 271/394] translating --- ...hat Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md index ac820a3369..4934186f76 100644 --- a/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md +++ b/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e4376766541a2a7f543275f9191df7040be10dc6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 26 Apr 2020 09:51:05 +0800 Subject: [PATCH 272/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020191007=2020=20L?= =?UTF-8?q?inux=20Command=20Tips=20and=20Tricks=20That=20Will=20Save=20You?= =?UTF-8?q?=20A=20Lot=20of=20Time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20191007 20 Linux Command Tips and Tricks That Will Save You A Lot of Time.md --- ...Tricks That Will Save You A Lot of Time.md | 307 ++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 sources/tech/20191007 20 Linux Command Tips and Tricks That Will Save You A Lot of Time.md diff --git a/sources/tech/20191007 20 Linux Command Tips and Tricks That Will Save You A Lot of Time.md b/sources/tech/20191007 20 Linux Command Tips and Tricks That Will Save You A Lot of Time.md new file mode 100644 index 0000000000..da080e65ea --- /dev/null +++ b/sources/tech/20191007 20 Linux Command Tips and Tricks That Will Save You A Lot of Time.md @@ -0,0 +1,307 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (20 Linux Command Tips and Tricks That Will Save You A Lot of Time) +[#]: via: (https://itsfoss.com/linux-command-tricks/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +20 Linux Command Tips and Tricks That Will Save You A Lot of Time +====== + +_**Brief**: Here are some tiny but useful Linux commands, terminal tricks and shortcuts that will save you a lot of time while working with Linux command line._ + +Have you ever encountered a moment when you see your colleague using some simple Linux commands for tasks that took you several keystrokes? And when you saw that you were like, “Wow! I didn’t know it could have been done that easily”. + +In this article, I’ll show you some pro Linux command tricks that will save you a lot of time and in some cases, from plenty of frustration. Not only your friends or colleagues will ‘wow’ at you, it will also help you increase your productivity as you will need fewer keystrokes and even fewer mouse clicks. + +It’s not that these are Linux tips for beginners only. Chances are that even experienced Linux users will find some hidden gems that they were not aware despite using Linux for all these years. + +In any case, you [learn Linux][1] by experience, be it your own or someone else’s :) + +### Cool Linux terminal tricks to save time and increase productivity + +![][2] + +You might already know a few of these Linux command tips or perhaps all of it. In either case, you are welcome to share your favorite tricks in the comment section. + +Some of these tips also depend on how the shell is configured. Let’s begin! + +#### 0\. Using tab for autocompletion + +I’ll start with something really obvious and yet really important: tab completion. + +When you are starting to type something in Linux terminal, you can hit the tab key and it will suggest all the possible options that start with string you have typed so far. + +For example, if you are trying to copy a file named my_best_file_1.txt, you can just type ‘cp m’ and hit tab to see the possible options. + +![Use tab for auto-completion][3] + +You can use tab in completing commands as well. + +[irp posts=”16244″ name=”Difference Between apt and apt-get Explained”] + +#### 1\. Switch back to the last working directory + +Suppose you end up in a long directory path and then you move to another directory in a totally different path. And then you realize that you have to go back to the previous directory you were in. In this case, all you need to do is to type this command: + +``` +cd - +``` + +This will put you back in the last working directory. You don’t need to type the long directory path or copy paste it anymore. + +![Easily switch between directories][4] + +#### 2\. Go back to home directory + +This is way too obvious. You can use the command below to move to your home directory from anywhere in Linux command-line: + +``` +cd ~ +``` + +However, you can also use just cd to go back to home directory: + +``` +cd +``` + +Most modern Linux distributions have the shell pre-configured for this command. Saves you at least two keystrokes here. + +![Move to Home as quickly as possible][5] + +#### 3\. List the contents of a directory + +You must be guessing what’s the trick in the command for listing the contents of a directory. Everyone knows to use the ls -l for this purpose. + +And that’s the thing. Most people use ls -l to list the contents of the directory, whereas the same can be done with the following command: + +``` +ll +``` + +Again, this depends on the Linux distributions and shell configuration, but chances are that you’ll be able to use it in most Linux distributions. + +![Using ll instead of ls -l][6] + +#### 4\. Running multiple commands in one single command + +Suppose, you have to run several commands one after another. Do you wait for the first command to finish running and then execute the next one? + +You can use the ‘;’ separator for this purpose. This way, you can run a number of commands in one line. No need to wait for the previous commands to finish their business. + +``` +command_1; command_2; command_3 +``` + +#### 5\. Running multiple commands in one single command only if the previous command was successful + +In the previous command, you saw how to run several commands in one single command to save time. But what if you have to make sure that commands don’t fail? + +Imagine a situation where you want to build a code and then if the build was successful, run the make? + +You can use && separator for this case. && makes sure that the next command will only run when the previous command was successful. + +``` +command_1 && command_2 +``` + +A good example of this command is when you use sudo apt update && sudo apt upgrade to upgrade your system. + +#### 6\. Easily search and use the commands that you had used in the past + +Imagine a situation where you used a long command couple of minutes/hours ago and you have to use it again. Problem is that you cannot remember the exact command anymore. + +Reverse search is your savior here. You can search for the command in the history using a search term. + +Just use the keys ctrl+r to initiate reverse search and type some part of the command. It will look up into the history and will show you the commands that matches the search term. + +``` +ctrl+r search_term +``` + +By default, it will show just one result. To see more results matching your search term, you will have to use ctrl+r again and again. To quit reverse search, just use Ctrl+C. + +![Reverse search in command history][7] + +Note that in some Bash shells, you can also use Page Up and Down key with your search term and it will autocomplete the command. + +#### 7\. Unfreeze your Linux terminal from accidental Ctrl+S + +You probably are habitual of using Ctrl+S for saving. But if you use that in Linux terminal, you’ll have a frozen terminal. + +Don’t worry, you don’t have to close the terminal, not anymore. Just use Ctrl+Q and you can use the terminal again. + +``` +ctrl+Q +``` + +#### 8\. Move to beginning or end of line + +Suppose you are typing a long command and midway you realize that you had to change something at the beginning. You would use several left arrow keystrokes to move to the start of the line. And similarly for going to the end of the line. + +You can use Home and End keys here of course but alternatively, you can use Ctrl+A to go to the beginning of the line and Ctrl+E to go to the end. + +![Move to the beginning or end of the line][8] + +I find it more convenient than using the home and end keys, especially on my laptop. + +#### 9\. Reading a log file in real time + +In situations where you need to analyze the logs while the application is running, you can use the tail command with -f option. + +``` +tail -f path_to_Log +``` + +You can also use the regular grep options to display only those lines that are meaningful to you: + +``` +tail -f path_to_log | grep search_term +``` + +You can also use the option F here. This will keep the tail running even if the log file is deleted. So if the log file is created again, tail will continue logging. + +#### 10\. Reading compressed logs without extracting + +Server logs are usually gzip compressed to save disk space. It creates an issue for the developer or sysadmin analyzing the logs. You might have to [scp][9] it to your local and then extract it to access the files because, at times, you don’t have write permission to extract the logs. + +Thankfully, z commands save you in such situations. z commands provide alternatives of the regular commands that you use to deal with log files such as less, cat, grep etc. + +So you get zless, zcat, zgrep etc and you don’t even have to explicitly extract the compressed files. Please refer to my earlier article about [using z commands to real compressed logs][10] in detail. + +This was one of the secret finds that won me a coffee from my colleague. + +#### 11\. Use less to read files + +To see the contents of a file, cat is not the best option especially if it is a big file. cat command will display the entire file on your screen. + +You can use Vi, Vim or other terminal based text editors but if you just want to read a file, less command is a far better choice. + +``` +less path_to_file +``` + +You can search for terms inside less, move by page, display with line numbers etc. + +#### 12\. Reuse the last item from the previous command with !$ + +Using the argument of the previous command comes handy in many situations. + +Say you have to create a directory and then go into the newly created directory. There you can use the !$ options. + +![Use !$ to use the argument of last command][11] + +A better way to do the same is to use alt+. . You can use . a number times to shuffle between the options of the last commands. + +#### 13\. Reuse the previous command in present command with !! + +You can call the entire previous command with !!. This comes particularly useful when you have to run a command and realize that it needs root privileges. + +A quick sudo !! saves plenty of keystrokes here. + +![Use !! to use last command as an argument][12] + +#### 14\. Using alias to fix typos + +You probably already know what is an alias command in Linux. What you can do is, to use them to fix typos. + +For example, you might often mistype grep as gerp. If you put an alias in your bashrc in this fashion: + +``` +alias gerp=grep +``` + +This way you won’t have to retype the command again. + +#### 15\. Copy Paste in Linux terminal + +This one is slightly ambiguous because it depends on Linux distributions and terminal applications. But in general, you should be able to copy paste commands with these shortcuts: + + * Select the text for copying and right click for paste (works in Putty and other Windows SSH clients) + * Select the text for copying and middle click (scroll button on the mouse) for paste + * Ctrl+Shift+C for copy and Ctrl+Shift+V for paste + + + +#### 16\. Kill a running command/process + +This one is perhaps way too obvious. If there is a command running in the foreground and you want to exit it, you can press Ctrl+C to stop that running command. + +#### 17\. Using yes command for commands or scripts that need interactive response + +If there are some commands or scripts that need user interaction and you know that you have to enter Y each time it requires an input, you can use Yes command. + +Just use it in the below fashion: + +``` +yes | command_or_script +``` + +#### 18\. Empty a file without deleting it + +If you just want to empty the contents of a text file without deleting the file itself, you can use a command similar to this: + +``` +> filename +``` + +#### 19\. Find if there are files containing a particular text + +There are multiple ways to search and find in Linux command line. But in the case when you just want to see if there are files that contain a particular text, you can use this command: + +``` +grep -Pri Search_Term path_to_directory +``` + +I highly advise mastering find command though. + +#### 20\. Using help with any command + +I’ll conclude this article with one more obvious and yet very important ‘trick’, using help with a command or a command line tool. + +Almost all command and command line tool come with a help page that shows how to use the command. Often using help will tell you the basic usage of the tool/command. + +Just use it in this fashion: + +``` +command_tool --help +``` + +#### Your favorite Linux command line tricks? + +I have deliberately not included commands like [fuck][13] because those are not standard commands that you’ll find everywhere. The tricks discussed here should be usable almost in all Linux distributions and shell without the need of installing a new tool. + +I would also suggest [using alias command in Linux][14] to replace complicated commands with a simple. Saves a lot of time. + +I know that there are more Linux command tricks to save time in the terminal. Why not share some of your experiences with Linux and do share your best trick with rest of the community here? The comment section below is at your disposal. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linux-command-tricks/ + +作者:[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/learn-linux-for-free/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-Tricks-Save-Time.jpeg?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-8.png?ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-1.png?ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-2.png?ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-3.png?ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-4.png?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-5.png?ssl=1 +[9]: http://www.hypexr.org/linux_scp_help.php +[10]: https://itsfoss.com/read-compressed-log-files-linux/ +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-6.png?ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/08/Linux-Command-tricks-to-save-time-7.png?ssl=1 +[13]: https://github.com/nvbn/thefuck +[14]: https://linuxhandbook.com/linux-alias-command/ From a974d3355175a0628e038d63c5fa3d30169f1fb3 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 26 Apr 2020 12:06:55 +0800 Subject: [PATCH 273/394] Rename sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md to sources/news/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md --- ...rch, faster AI object detection, and other open source news.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md (100%) diff --git a/sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md b/sources/news/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md similarity index 100% rename from sources/tech/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md rename to sources/news/20200425 The rebirth of Mapzen, new projects bolster PyTorch, faster AI object detection, and other open source news.md From 1bfff635fcd32d22ffdc1a8bfffd61756d75b352 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 26 Apr 2020 15:54:18 +0800 Subject: [PATCH 274/394] PRF @robsean --- ... make a Halloween lantern with Inkscape.md | 153 +++++++----------- 1 file changed, 60 insertions(+), 93 deletions(-) diff --git a/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md b/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md index 5e1424ed02..04307ec7bc 100644 --- a/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md +++ b/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to make a Halloween lantern with Inkscape) @@ -9,152 +9,119 @@ 如何使用 Inkscape 制作万圣节灯笼 ====== -使用开源软件为你最喜欢的万圣节灯笼制作一个有趣和怪异的装饰品。 + +> 使用开源软件为你最喜欢的万圣节鬼屋制作一个有趣和怪异的装饰品。 + ![万圣节 - 背光飞行的蝙蝠][1] -闹鬼的季节快到了!今年,使用开源软件装饰一个独一无二的万圣节灯笼! +使用开源软件装饰一个独一无二的万圣节灯笼! -灯笼的一部分结构体是不透明的,以阻挡内部的光线。灯笼之所以成为灯笼,是因为其去掉了一些东西 :从结构体上切下的窗户,这样光线就可以射出。虽然照明不实用,但是一个有着怪异形状窗户和隐藏暗色轮廓的灯笼却可以令人兴奋,并创造出很多乐趣。 +通常,灯笼的一部分结构体是不透明的,以阻挡内部的光线。灯笼之所以成为灯笼,是因为其去掉了一些东西 :从结构体上切开的窗口,这样光线就可以射出。虽然对于照明来说不实用,但是一个有着怪异形状窗口和隐藏暗色轮廓的灯笼却可以令人兴奋,并创造出很多乐趣。 -这篇演示如何使用 [Inkscape][2] 创建你自己的灯笼。如果还没有 Inkscape ,在 Linux 上,你可以从软件包存储库中安装它,在 MacOS 和 Windows 上,你可以从[Inkscape 网站][3] 上下载它. +这篇演示如何使用 [Inkscape][2] 创建你自己的灯笼。如果还没有 Inkscape ,在 Linux 上,你可以从软件库中安装它,在 MacOS 和 Windows 上,你可以从[Inkscape 网站][3] 上下载它. ### 使用材料 - * 模板 ([A4][4] 或 [Letter][5] 大小) - * 卡片纸 (黑色是传统色) - * 描图纸 (可选) - * 裁纸刀,尺子, 切割垫板 (可使用工艺切割机/激光切割机代替) + * 模板([A4][4] 或[信纸][5]大小) + * 卡片纸(黑色是传统色) + * 描图纸(可选) + * 裁纸刀、尺子、切割垫板(可使用工艺切割机/激光切割机代替) * 工艺胶 * LED 茶灯"蜡烛" -_安全注意事项:_ 这个项目只使用电池操作的蜡烛。 - - +安全注意事项:这个项目只使用电池操作的蜡烛。 ### 理解模板 -首先,从什么的链接下载你所在区域 (A4 或 Letter) 的合适的模板,然后在 Inkscape 中打开它。 +首先,从上面的链接下载你所在区域(A4 或信纸)的合适的模板,然后在 Inkscape 中打开它。 -* * * +![灯笼模板荧光屏][6] -* * * +灰白色的棋盘格背景是透明的(从技术角度来说,它是 alpha 通道。) -* * * +黑色基板构成了灯笼。现在,没有窗口可以让光线穿过;灯笼有一个非镂空的黑色基板。你将在 Inkscape 中使用**并集**和**差集**选项来数字化的设计窗口。 -**![灯笼模板荧光屏][6]** - -灰白色的棋盘格背景是透明的(从技术角度来说,它是 _alpha 通道_。) - -黑色基板构成了灯笼。现在,没有窗口可以让光线穿过;灯笼有一个非镂空的黑色基板。你将在 Inkscape 中使用 **并集** 和 **差集** 选项来数字化的设计窗户。 - -蓝色虚线表示折线。橙色实线表示参考线。采光窗户不应该放在橙色盒子的外面。 +蓝色虚线表示折线。橙色实线表示参考线。采光窗口不应该放在橙色盒子的外面。 模板的左侧是你可以在你设计中使用的一些预先制作好的对象。 -### 来创建一个窗户或形状 +### 创建一个窗口或形状 - 1. 创建一个看起来像你想要的窗口样式的对象。可以使用 Inkscape 左侧工具栏中的一些形状工具来创建对象。此外,你可以下载 Creative Commons- 或 Public Domain-licensed 剪贴画,并导入 PNG 文件到你的项目中。 - 2. 当你对对象满意时,在顶部菜单中选择 **路径 > 对象转化成路径** 将其转换为一个 **路径** (而不是一个 **形状** ,Inkscape 视其为两个不同的目标)。 +1. 创建一个看起来像你想要的窗口样式的对象。可以使用 Inkscape 左侧工具栏中的一些形状工具来创建对象。此外,你可以下载共创或公共领域的剪贴画,并导入 PNG 文件到你的项目中。 +2. 当你对对象的形状满意时,在顶部菜单中选择“路径” -> “对象转化成路径” 将其转换为一个路径(而不是一个形状,Inkscape 视其为两种不同的对象)。 + ![对象到路径 菜单][7] +3. 在基板形状的上面放置对象。 +4. 选择对象和黑色基板。通过先单击一个,并按住 `Shift` 按键,再选择另一个来完成。 +5. 从顶部菜单选择“路径” -> “差集” 来从基板的对象中移除形状。这将创建灯笼中的一个窗口。 -![对象到路径菜单][7] + ![路径 > 差集 菜单][8] - 3. 在基板形状的上面放置目标。 - 4. 选择目标和黑色基板。通过先单击一个,并按住 Shift 按键,再选择另一个来完成。 - 5. 从顶部菜单选择 **路径 > 差集** 来从基板的对象中移除形状。这将创建灯笼中的一个窗户。 +### 添加对象到窗口中 +在制作了一个窗口后,你可以添加对象到其中来创建一个场景。 +提示: -![路径 > 差集 菜单][8] +* 所有的对象,包括文本,必须连接到灯笼的基板,否则,在切割后会掉落下来,并留下一片空白。 +* 避免小而复杂的细微之处。即使使用激光切割机或工艺切割机等机器,也很难切割这些细微之处。 -### 添加一个对象到一个窗户中 - -在制作一个窗户后,你可以添加对象到其中来创建一个景色绘画。 - -**提示:** - - * 所有的对象,包括文本,必须连接到灯笼的基板,否则,在切割后会掉落下来,并留下一片空白区。 - * 避免小而复杂的细微之处。即使使用激光切割机或工艺切割机等机器,也很难切割这些细微之处。 - - - 1. 创建或导入一个对象。 - 2. 放置对象到窗口内,以便它至少接触基板的两侧。 - 3. 选择对象后,从顶部菜单选择 **连接 > 对象转化成路径** 。 - - - -![对象到路径 菜单][9] - - 4. 选择对象和黑色基板,通过在按住 Shift 按键的同时单击每一个来完成。 - 5. 选择 **路径 > 并集** 来使对象和基板合二为一。 +1. 创建或导入一个对象。 +2. 放置对象到窗口内,以便它至少接触基板的两侧。 +3. 选择对象后,从顶部菜单选择“连接” -> “对象转化成路径”。 + ![对象到路径 菜单][9] +4. 选择对象和黑色基板,通过在按住 `Shift` 按键的同时单击每一个来完成。 +5. 选择“路径” -> “并集”来使对象和基板合二为一。 ### 添加文本 -文本可以从创建一个窗户的基板上剪下来(就像我对星星所做的那样),或者也可以添加到一个窗户上(它在独挡来自灯笼内部的光线)。如果你正在创建一个窗户,只需要执行下面的步骤1和步骤2,然后使用 **差集** 来从基板层移除文本。 +文本既可以从基板剪出文字来创建一个窗口(就像我对星星所做的那样),或者也可以添加到一个窗口上(它可以阻挡来自灯笼内部的光线)。如果你要创建一个窗口,只需要执行下面的步骤 1 和步骤 2,然后使用“差集”来从基板移除文本。 - 1. 从左侧边栏中选择文本工具来创建文本。粗体字体效果最好。 +1. 从左侧边栏中选择文本工具来创建文本。粗体字体效果最好。 -![文本工具][10] + ![文本工具][10] - 2. 选择你的文本,然后从顶部菜单选择 **路径 > 对象转化成路径** 。这将转换文本对象为一个路径。注意,这个步骤意味着你将不能再编辑该文本,所以,_只有当_ 你确定你拥有想要的单词后,执行这个步骤。 +2. 选择你的文本,然后从顶部菜单选择“路径” -> “对象转化成路径”。这将转换文本对象为一个路径。注意,这个步骤意味着你将不能再编辑该文本,所以,*只有当*你确定你拥有想要的单词后,执行这个步骤。 +3. 在你转换文本后,你可以按键盘上的 `F2` 来激活节点编辑器工具,当选择使用这个工具时,可以清楚地显示文本的节点。 - 3. 在你转换文本后,你可以按键盘上的 **F2** 来激活 **节点编辑器** 工具,当选择使用这个工具时,可以清楚地显示文本的节点。 + ![选中的文本使用节点编辑器][11] +4. 取消文本分组。 +5. 调整每个字母,以便使其与相邻字母或基板稍微重叠。 + ![重叠文本][12] +6. 为将所有的字母彼此连接,并连接到基板,重新选择所有文本和基板,然后选择“路径” -> “并集”。 -![选中的文本使用节点编辑器][11] - - 4. 取消文本分组。 - 5. 调整每个字母,以便使其与相邻字母或基板稍微重叠。 - - - -![重叠文本][12] - - 6. 为将所有的字母彼此连接并连接到基板,重新选择所有文本和基板,然后选择 **路径 > 并集**。 - -![使用 路径 > 并集 连接字母和基板][13] - - - + ![使用 路径 > 并集 连接字母和基板][13] ### 准备打印 下面是手工切割灯笼的说明。如果使用激光切割机或工艺切割机,遵循硬件所需要的技巧来准备好你的文件。 - 1. 在 **图层** 面板中,单击 **安全** 图层旁边的**眼睛** 图标来隐藏安全线。如果你看不到图层面板,通过顶部菜单选择 **图层 > 图层** 来显示它。 - 2. 选择黑色基板。在 **填充和笔划** 面板中,设置填充为 **X** (意味着 _不填充_),设置 **笔划** 为纯黑色(对于巫法的粉丝来说是 #000000ff )。 +1. 在“图层”面板中,单击“安全”图层旁边的“眼睛”图标来隐藏安全线。如果你看不到图层面板,通过顶部菜单选择“图层” -> “图层”来显示它。 +2. 选择黑色基板。在“填充和笔划”面板中,设置填充为“X”(意味着*不填充*),设置“笔划”为纯黑色(对于喜欢十六进制的粉丝来说是 `#000000ff` )。 + ![设置填充和笔划][14] +3. 使用“文件” -> “打印”来打印你的图案。 +4. 使用一把工艺刀和直尺,小心地绕着每一条黑线切割。在蓝色虚线上轻划,然后折叠。 -![设置填充和笔划][14] + ![裁剪灯笼][15] - 3. 使用 **文件 > 打印** 来打印你的图案样本。 +5. 要完成窗口的制作,剪切描图纸为每个窗口的大小,然后粘贴它到灯笼的内侧。 - 4. 使用一把工艺刀和直尺,小心地绕着每一条黑线切割。在蓝色虚线上轻划,然后折叠。 + ![添加描图纸][16] -![裁剪灯笼][15] +6. 在折条处把灯笼的边粘在一起。 +7. 接通电池供电的 LED 蜡烛,并放置它到你灯笼中。 - 5. 为完成窗户的制作,剪切摹图纸到每个窗户的大小,然后粘贴它到灯笼的内侧。 + ![完成灯笼][17] -![添加摹图纸][16] - - 6. 在折条处把灯笼的粘在一起。 - - 7. 接通电池供电的 LED 蜡烛,并放置它到你灯笼中。 - - - - -![完成灯笼][17] - -现在你的灯笼已经完成并准备好照亮你的诡异的装饰品。万圣节快乐! - -如何使用 Inkscape,GIMP 制作万圣节瓶子标签和家用物品。 +现在你的灯笼已经完成了,准备好点亮你的鬼屋了。 -------------------------------------------------------------------------------- @@ -163,7 +130,7 @@ via: https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape 作者:[Jess Weichler][a] 选题:[lujun9972][b] 译者:[robsean](https://github.com/robsean) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1b5d2b8327d8a4d52b0af612b038bfb4b785aa14 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 26 Apr 2020 15:57:50 +0800 Subject: [PATCH 275/394] PUB @robsean https://linux.cn/article-12152-1.html --- .../20191014 How to make a Halloween lantern with Inkscape.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20191014 How to make a Halloween lantern with Inkscape.md (99%) diff --git a/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md b/published/20191014 How to make a Halloween lantern with Inkscape.md similarity index 99% rename from translated/tech/20191014 How to make a Halloween lantern with Inkscape.md rename to published/20191014 How to make a Halloween lantern with Inkscape.md index 04307ec7bc..1cd31042d1 100644 --- a/translated/tech/20191014 How to make a Halloween lantern with Inkscape.md +++ b/published/20191014 How to make a Halloween lantern with Inkscape.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (robsean) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12152-1.html) [#]: subject: (How to make a Halloween lantern with Inkscape) [#]: via: (https://opensource.com/article/19/10/how-make-halloween-lantern-inkscape) [#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) From 153dc460dcfd8652dd04b55e32bbac1c87d4cac9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 26 Apr 2020 21:51:19 +0800 Subject: [PATCH 276/394] PRF @wxy --- .../tech/20190712 What is Silverblue.md | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translated/tech/20190712 What is Silverblue.md b/translated/tech/20190712 What is Silverblue.md index afc855d820..23a8d72753 100644 --- a/translated/tech/20190712 What is Silverblue.md +++ b/translated/tech/20190712 What is Silverblue.md @@ -1,54 +1,54 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What is Silverblue?) [#]: via: (https://fedoramagazine.org/what-is-silverblue/) [#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/) -何谓 Silverblue? +Silverblue 是什么? ====== ![][1] Fedora Silverblue 在 Fedora 世界内外越来越受欢迎。因此,根据社区的反馈,以下是关于这个项目的一些有趣问题的答案。如果你有任何其他与 Silverblue 相关的问题,请在评论区留言,我们会在未来的文章中回答。 -### 何谓 Silverblue? +### Silverblue 是什么? Silverblue 是新一代桌面操作系统的代号,之前被称为 Atomic Workstation。该操作系统是通过利用 [rpm-ostree 项目][2]创建的映像来交付的。这种系统的主要优点是速度、安全性、原子更新和不变性。 -### “Silverblue”到底是什么意思? +### “Silverblue” 到底是什么意思? “Team Silverblue” 或简称 “Silverblue”,没有任何隐藏的含义。该项目以前被称为 Atomic Workstation,大约两个月后更名时选中了这个名字。在这个过程中,审查过 150 多个单词或单词组合。最终选择了 “Silverblue”,因为它有一个可用的域名以及社交网络账号。人们可以把它看成是 Fedora 的蓝色品牌的一个新的品牌形象,可以用在诸如“加油,Silverblue 团队!”或“想加入该团队,改进 Silverblue 吗?”这样的短语中。 ### 何谓 ostree? -[OSTree 或 libostree 是一个项目][3],它结合了一个类似 Git 的提交和下载可引导文件系统树的模型,以及用于部署它们和管理引导加载程序配置的层。OSTree 被 rpm-ostree 所使用,这是 Silverblue 使用的一个基于包/镜像的混合系统。它原子化地复制了一个基础操作系统,并允许用户在需要时在基础操作系统之上 "分层 "传统的 RPM。 +[OSTree(或 libostree)是一个项目][3],它结合了一个类似 Git 的提交和下载可引导文件系统树的模型,以及用于部署它们和管理引导加载程序配置的层。OSTree 由 rpm-ostree 使用,这是 Silverblue 使用的一个基于包/镜像的混合系统。它原子化地复制了一个基础操作系统,并允许用户在需要时在基础操作系统之上“层叠”传统的 RPM。 ### 为何使用 Silverblue? 因为它可以让你专注于你的工作,而不是你正在运行的操作系统。因为系统的更新是原子式的,所以它更稳健。你唯一需要做的事情就是重新启动到新的镜像中。此外,如果当前启动的镜像有什么问题,你可以很容易地重启/回滚到之前可以工作的镜像,如果有的话。如果没有,你可以使用 `ostree` 命令下载并启动过去生成的任何其他镜像。 -另一个好处是可以在不同的分支(或者用旧的语境说就是 Fedora 版本)之间轻松切换。你可以轻松地尝试 [Rawhide][4] 或 [updates-testing][5] 分支,然后返回到包含当前稳定版本的分支。另外,如果你想尝试一些新奇的东西,也可以考虑试试 Silverblue。 +另一个好处是可以在不同的分支(或者用旧的语境说就是不同的 Fedora 风味版本)之间轻松切换。你可以轻松地尝试 [Rawhide][4] 或 [updates-testing][5] 分支,然后返回到包含当前稳定版本的分支。另外,如果你想尝试一些新奇的东西,也可以考虑试试 Silverblue。 ### 不可变的操作系统有什么好处? 其中一个主要的好处是安全。基础操作系统是以只读的形式挂载的,因此不能被恶意软件修改。唯一可以改变系统的方法是通过 `rpm-ostree` 实用程序。 -另一个好处是健壮性。普通用户几乎不可能在不小心或无意中删除了一些系统库后,让操作系统恢复到不启动或无法正常工作的状态。试着想想你过去的这些经历,就可以明白 Silverblue 如何帮助你。 +另一个好处是健壮性。普通用户几乎不可能在不小心或无意中删除了一些系统库后,导致操作系统回到不启动或无法正常工作的状态。试着想想你过去的这些经历,就可以明白 Silverblue 可以如何帮助你。 ### 如何在 Silverblue 中管理应用程序和包? -对于图形化用户界面的应用程序,建议使用 [Flatpak][6],如果应用程序是以 Flatpak 的形式提供的话。用户可以选择来自 Fedora 的 Flatpak,和从 Fedora 包及 Fedora 自己的基础架构中构建的 Flatpak,或者目前有更广泛的交付的 Flathub。用户可以通过已经支持 Fedora Silverblue 的 GNOME “软件”轻松安装它们。 +对于图形化用户界面的应用程序,建议使用 [Flatpak][6] —— 如果应用程序是以 Flatpak 的形式提供的话。用户可以选择来自 Fedora 的 Flatpak,和从 Fedora 包及 Fedora 自己的基础架构中构建的 Flatpak,或者是目前有更广泛的交付品的 Flathub。用户可以通过已经支持 Fedora Silverblue 的 GNOME “软件”轻松安装它们。 -用户首先发现的一件事就是操作系统中没有预装 `dnf`。主要原因是它不能在 Silverblue 上工作 —— 它的部分功能被 `rpm-ostree` 命令所取代。用户可以通过使用 `rpm-ostree install PACKAGE` 来层叠传统的软件包。但只有在没有其他方法的情况下,才应该使用这种方式。这是因为从存储库中提取新的系统镜像时,每次更改系统镜像时都必须重新构建系统镜像,以容纳分层的包或从基础操作系统中删除或替换为其他版本的包。 +用户首先发现的一件事就是操作系统中没有预装 `dnf`。主要原因是它不能在 Silverblue 上工作 —— 它的部分功能被 `rpm-ostree` 命令所取代。用户可以通过使用 `rpm-ostree install PACKAGE` 来层叠传统的软件包。但只有在没有其他方法的情况下,才应该使用这种方式。这是因为从存储库中提取新的系统镜像时,每次更改系统镜像时都必须重新构建系统镜像,以容纳层叠的包或从基础操作系统中删除及替换为其他版本的包。 -Fedora Silverblue 自带的默认 GUI 应用程序集是基础操作系统的一部分。团队正在努力将它们移植到 Flatpak 上,这样它们就可以通过这种方式分发。其中一个好处是,基础操作系统将变得更小,更容易维护和测试,用户可以更容易修改他们的默认安装环境。如果你想看一下它是怎么做的,或者有什么帮助,可以看看官方的 [文档][7]。 +Fedora Silverblue 自带的默认 GUI 应用程序集是基础操作系统的一部分。团队正在努力将它们移植到 Flatpak 上,这样它们就可以通过这种方式分发。其中一个好处是,基础操作系统将变得更小,更容易维护和测试,用户可以更容易修改他们的默认安装环境。如果你想看一下它是怎么做的,或者有什么帮助,可以看看官方的[文档][7]。 ### 什么是 Toolbox? -[Toolbox][8] 是一个让普通用户可以轻松使用容器的项目。它通过使用 podman 的无 root 容器来实现。Toolbox 可以让你在常规的 Fedora 安装中轻松、快速地创建一个容器,你可以在这个容器上折腾或开发,而与你的操作系统分离。 +[Toolbox][8] 是一个让普通用户可以轻松使用容器的项目。它通过使用 podman 的无 root 容器环境来实现。Toolbox 可以让你在常规的 Fedora 环境中轻松、快速地创建一个容器,你可以在这个容器上折腾或开发,而与你的操作系统分离。 ### Silverblue 有路线图吗? @@ -60,15 +60,15 @@ Fedora Silverblue 自带的默认 GUI 应用程序集是基础操作系统的一 ### 不可变操作系统的未来前景如何? -从我们的角度来看,桌面的未来涉及到了不可变的操作系统。这对用户来说是最安全的,Android、ChromeOS、ChromeOS、最近的 macOS Catalina 全都在底层采用了这种方式。而对于 Linux 桌面来说,一些第三方软件期望写到操作系统的问题还是存在的。HP 打印机驱动程序就是一个很好的例子。 +从我们的角度来看,桌面的未来会走向到不可变的操作系统。这对用户来说是最安全的,Android、ChromeOS、ChromeOS、最近的 macOS Catalina 全都在底层采用了这种方式。而对于 Linux 桌面来说,一些第三方软件期望写到操作系统的问题还是存在的。HP 打印机驱动程序就是一个很好的例子。 另一个问题是系统中的部分软件如何分发和安装。字体就是一个很好的例子。目前在 Fedora 中,它们是以 RPM 包的形式分发的。如果你想使用它们,你必须层叠它们,然后重新启动到新创建的包含它们的镜像中。 ### 标准版 Workstation 的前景如何? -Silverblue 有可能会取代普通的Workstation版本。但 Silverblue 要提供与Workstation版本相同的功能和用户体验,还有很长的路要走。在此期间,这两款桌面产品将同时推出。 +Silverblue 有可能会取代普通的 Workstation 版本。但 Silverblue 要提供与 Workstation 版本相同的功能和用户体验还有很长的路要走。在此期间,这两款桌面产品将同时推出。 -### Atomic Workstation或 Fedora CoreOS 与这些有什么关系? +### Atomic Workstation 或 Fedora CoreOS 与这些有什么关系? Atomic Workstation 是在更名为 Fedora Silverblue 之前的项目名称。 @@ -81,7 +81,7 @@ via: https://fedoramagazine.org/what-is-silverblue/ 作者:[Tomáš Popela][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 31249e073987fa7e7b490fbbd5d311b40dc0a82a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 26 Apr 2020 21:51:54 +0800 Subject: [PATCH 277/394] PUB @wxy https://linux.cn/article-12153-1.html --- {translated/tech => published}/20190712 What is Silverblue.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20190712 What is Silverblue.md (99%) diff --git a/translated/tech/20190712 What is Silverblue.md b/published/20190712 What is Silverblue.md similarity index 99% rename from translated/tech/20190712 What is Silverblue.md rename to published/20190712 What is Silverblue.md index 23a8d72753..7437135b98 100644 --- a/translated/tech/20190712 What is Silverblue.md +++ b/published/20190712 What is Silverblue.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12153-1.html) [#]: subject: (What is Silverblue?) [#]: via: (https://fedoramagazine.org/what-is-silverblue/) [#]: author: (Tomáš Popela https://fedoramagazine.org/author/tpopela/) From 01fe66eb425378770252dd01ef695ab78f963f3c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 26 Apr 2020 22:17:46 +0800 Subject: [PATCH 278/394] APL --- ...ifference Between DNF and YUM, Why is Yum Replaced by DNF.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md index 01d6522274..63e2443760 100644 --- a/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md +++ b/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 36d5a4074652b64a4dc35728a1814c99088c5ebb Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 26 Apr 2020 23:02:41 +0800 Subject: [PATCH 279/394] TSL --- ...DNF and YUM, Why is Yum Replaced by DNF.md | 77 ------------------- ...DNF and YUM, Why is Yum Replaced by DNF.md | 66 ++++++++++++++++ 2 files changed, 66 insertions(+), 77 deletions(-) delete mode 100644 sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md create mode 100644 translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md diff --git a/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md deleted file mode 100644 index 63e2443760..0000000000 --- a/sources/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Difference Between DNF and YUM, Why is Yum Replaced by DNF?) -[#]: via: (https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -The Difference Between DNF and YUM, Why is Yum Replaced by DNF? -====== - -**[Yum Package Manager][1]** has been replaced by **[DNF Package Manager][2]** since many long-standing issues in Yum remain unresolved. - -These problems include poor performance, excessive memory usage, slowdown for dependency resolution. - -DNF uses “libsolv” for dependency resolution, developed and maintained by SUSE to improve performance. - -It was written mostly in python, and it has its own way of coping with dependency resolution. - -Its API is not fully documented, and its extension system only allows Python plugins. - -Yum is a front-end tool for rpm that manages dependencies and repositories, and then uses RPM to install, download, and remove packages. - -Why would they want to build a new tool instead of fixing existing problems? - -Ales Kozamblak explained that the fixing was not technically feasible and that the yum team was not ready to accept the changes immediately. - -Also, the big challenge is that there are 56K lines for yum, but only 29K lines for DNF. - -So there is no way to fix it, except the fork. - -However yum was working fine. - -S.No | DNF (Dandified YUM) | YUM (Yellowdog Updater, Modified) ----|---|--- -1 | DNF uses libsolv for dependency resolution, developed and maintained by SUSE. | YUM uses the public API for dependency resolution -2 | API is fully documented | API is not fully documented -3 | It is written in C, C++, Python | It is written only in Python -4 | DNF is currently used in Fedora, Red Hat Enterprise Linux 8 (RHEL), CentOS 8, OEL 8 and Mageia 6/7. | YUM is currently used in Red Hat Enterprise Linux 6/7 (RHEL), CentOS 6/7, OEL 6/7. -5 | DNf supports various extensions | Yum supports only Python based extension -6 | The API is well documented so it's easy to create new features | It is very difficult to create new features because the API is not properly documented. -7 | The DNF uses less memory when synchronizing the metadata of the repositories. | The YUM uses excessive memory when synchronizing the metadata of the repositories. -8 | DNF uses a satisfiability algorithm to solve dependency resolution (It's using a dictionary approach to store and retrieve package and dependency information). | Yum dependency resolution gets sluggish due to public API. -9 | All performance is good in terms of memory usage and dependency resolution of repository metadata. | Over all performance is poor in terms of many factors. -10 | DNF Update: If a package contains irrelevant dependencies during a DNF update process, the package will not be updated. | YUM will update a package without verifying this. -11 | If the enabled repository does not respond, dnf will skip it and continue the transaction with the available repositories. | If a repository is not available, YUM will stop immediately. -12 | dnf update and dnf upgrade equals. | It's different in yum -13 | The dependencies on package installation are not updated | Yum offered an option for this behavior -14 | Clean Up Package Removal: When removing a package, dnf automatically removes any dependency packages not explicitly installed by the user. | Yum didn’t do this -15 | Repo Cache Update Schedule: By default, ten minutes after the system boots, updates to configured repositories are checked by dnf hourly. This action is controlled by the system timer unit named "/usr/lib/systemd/system/dnf-makecache.timer". | Yum do this too. -16 | Kernel packages are not protected by dnf. Unlike Yum, you can delete all kernel packages, including one that runs. | Yum will not allow you to remove the running kernel -17 | libsolv: for solving packages and reading repositories. - -hawkey: hawkey, library providing simplified C and Python API to libsolv. - -librepo: library providing C and Python (libcURL like) API for downloading linux repository metadata and packages. - -libcomps: Libcomps is alternative for yum.comps library. It’s written in pure C as library and there’s bindings for python2 and python3 | Yum does not use separate libraries to perform this function. -18 | DNF contains 29k lines of code | Yum contains 56k lines of code -19 | DNF was developed by Ales Kozumplik | YUM was developed by Zdenek Pavlas, Jan Silhan and team members - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ - -作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/ -[2]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ diff --git a/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md new file mode 100644 index 0000000000..f73a3e180b --- /dev/null +++ b/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md @@ -0,0 +1,66 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The Difference Between DNF and YUM, Why is Yum Replaced by DNF?) +[#]: via: (https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +DNF 和 YUM 的区别,为什么 YUM 会被 DNF 取代? +====== + +由于 Yum 中许多长期存在的问题仍未得到解决,因此 [Yum 包管理器][1]已被 [DNF 包管理器][2]取代。这些问题包括性能差、内存占用过多、依赖解析速度变慢等。 + +DNF 使用 `libsolv` 进行依赖解析,由 SUSE 开发和维护,旨在提高性能。DNF 主要是用 Python 编写的,它有自己的应对依赖解析的方法。 + +Yum 是 RPM 的前端工具,它管理依赖关系和资源库,然后使用 RPM 来安装、下载和删除包。它的 API 没有完整的文档,它的扩展系统只允许 Python 插件。 + +为什么他们要建立一个新的工具,而不是修复现有的问题呢? + +Ales Kozamblak 解释说,这个修复在技术上是不可行的,而且 Yum 团队还没有准备好立即接受修改。 + +另外,最大的挑战是,Yum 有 56000 行代码,但 DNF 只有 29000 行代码。 + +所以除了分叉,没有办法解决。 + +不过 Yum 的运行情况还算可以。 + + +编号 | DNF(Dandified YUM) | YUM(Yellowdog Updater, Modified) +---|---|--- +1 | DNF 使用 libsolv 来解析依赖关系,由 SUSE 开发和维护 | YUM 使用公开的 API 来解析依赖关系 +2 | API 有完整的文档 | API 没有完整的文档 +3 | 由 C、C++、Python 编写的 | 只用 Python 编写 +4 | DNF 目前在 Fedora、RHEL 8、CentOS 8、OEL 8 和 Mageia 6/7 中使用 | YUM 目前在 RHEL 6/7、CentOS 6/7、OEL 6/7 中使用 +5 | DNf 支持各种扩展 | Yum 只支持基于 Python 的扩展 +6 | API 有良好的文档,因此很容易创建新的功能 | 因为 API 没有正确的文档化,所以创建新功能非常困难 +7 | DNF 在同步存储库的元数据时,使用的内存较少 | 在同步存储库的元数据时,YUM 使用了过多的内存 +8 | DNF 使用满足性算法来解决依赖关系解析(它是用字典的方法来存储和检索包和依赖信息)| 由于使用公开 API 的原因,Yum 依赖性解析变得迟钝 +9 | 从内存使用量和版本库元数据的依赖性解析来看,性能都不错 | 总的来说,在很多因素的影响下,表现不佳 +10 | DNF 更新:在 DNF 更新过程中,如果包中包含不相关的依赖,则不会更新 | YUM 将在没有验证的情况下更新软件包 +11 | 如果启用的存储库没有响应,DNF 将跳过它,并继续使用可用的存储库出来事务 | 如果有存储库不可用,YUM 会立即停止 +12 | `dnf update` 和 `dnf upgrade` 是等价的 | 在 Yum 中则不同 +13 | 安装包的依赖关系不更新 | Yum 为这种行为提供了一个选项 +14 | 清理删除的包:当删除一个包时,DNF 会自动删除任何没有被用户明确安装的依赖包 | Yum 不会这样做 +15 | 存储库缓存更新计划:默认情况下,系统启动后 10 分钟后,DNF 每小时检查一次对配置的存储库的更新。这个动作由系统定时器单元 `/usr/lib/systemd/system/system/dnf-makecache.timer` 控制 | Yum 也会这样做 +16 | 内核包不受 DNF 保护。不像 Yum,你可以删除所有的内核包,包括运行中的内核包 | Yum 不允许你删除运行中的内核 +17 | libsolv:用于解包和读取资源库。hawkey: 为 libsolv 提供简化的 C 和 Python API 库。librepo: 提供 C 和 Python(类似 libcURL)API 的库,用于下载 Linux 存储库元数据和软件包。libcomps: 是 yum.comps 库的替代品。它是用纯 C 语言编写的库,有 Python 2 和 Python 3 的绑定。| Yum 不使用单独的库来执行这些功能 +18 | DNF 包含 29000 行代码 | Yum 包含 56000 行代码 +19 | DNF 由 Ales Kozumplik 开发 | YUM 由 Zdenek Pavlas、Jan Silhan 和团队成员开发 + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/ +[2]: https://www.2daygeek.com/linux-dnf-command-examples-manage-packages-fedora-centos-rhel-systems/ From f2e3bc1a1061982d7db387b910e2abf48c1a7176 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 27 Apr 2020 08:40:01 +0800 Subject: [PATCH 280/394] translated --- ...ings You Should Know About Ubuntu 20.04.md | 129 ------------------ ...ings You Should Know About Ubuntu 20.04.md | 129 ++++++++++++++++++ 2 files changed, 129 insertions(+), 129 deletions(-) delete mode 100644 sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md create mode 100644 translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md diff --git a/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md b/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md deleted file mode 100644 index 1c4a13810e..0000000000 --- a/sources/tech/20200422 Things You Should Know About Ubuntu 20.04.md +++ /dev/null @@ -1,129 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Things You Should Know About Ubuntu 20.04) -[#]: via: (https://itsfoss.com/ubuntu-20-04-faq/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Things You Should Know About Ubuntu 20.04 -====== - -[Ubuntu 20.04 release][1] is just around the corner and you may have a few questions and doubts regarding upgrades, installation etc. - -I hosted some Q&A sessions on various social media channels to answer doubts of readers like you. - -I am going to list these common questions about Ubuntu 20.04 with their answers. I hope it helps you clear the doubts you have. And if you still have questions, feel free to ask in the comment section below. - -### Ubuntu 20.04: Your Questions Answered - -![][2] - -Just to clarify, some of the answers here maybe influenced by my personal opinion. If you are an experienced Ubuntu user, some of the questions may sound _silly_ to you but it not to the new Ubuntu users. - -#### When will Ubuntu 20.04 be released? - -Ubuntu 20.04 LTS is releasing on 23rd April 2020. All the participating flavors like Kubuntu, Lubuntu, Xubuntu, Budgie, MATE etc will have their 20.04 release available on the same day. - -#### What are the system requirements for Ubuntu 20.04? - -For the default GNOME version, you should have a minimum 4 GB of RAM, 2 GHz dual core processor and at least 25 GB of disk space. - -Other [Ubuntu flavors][3] may have different system requirements. - -#### Can I use Ubuntu 20.04 on 32-bit systems? - -No, not at all. You cannot use Ubuntu 20.04 on 32-bit systems. Even if you are using 32-bit Ubuntu 18.04, you cannot upgrade to Ubuntu 20.04. There is ISO for 32-bit systems for past several years. - -![Error while upgrading 32-bit Ubuntu 18.04 to Ubuntu 20.04][4] - -#### Can I use Wine on Ubuntu 20.04? - -Yes, you can still use Wine on Ubuntu 20.04 as the 32-bit lib support is still there for packages needed by Wine and [Steam Play][5]. - -#### Do I have to pay for Ubuntu 20.04 or purchase a license? - -No, Ubuntu is completely free to use. You don’t have to buy a license key or activate Ubuntu like you do in Windows. - -The download section of Ubuntu requests you to donate some money but it’s up to you if you want to give some money for developing this awesome operating system. - -#### What GNOME version does it have? - -Ubuntu 20.04 has GNOME 3.36. - -#### Does Ubuntu 20.04 have better performance than Ubuntu 18.04? - -Yes, in several aspects. Ubuntu 20.04 installs faster and it even boost faster. I have shown the performance comparison in the video below at 4:40 minutes. - -The scroll, Windows animation and other UI elements are more fluid and give a smoother experience in GNOME 3.36. - -#### How long will Ubuntu 20.04 be supported? - -It is a long-term support (LTS) release and like any LTS release, it will be supported for five years. Which means that Ubuntu 20.04 will get security and maintenance updates until April 2025. - -#### Will I lose data while upgrading to Ubuntu 20.04? - -You can upgrade to Ubuntu 20.04 from Ubuntu 19.10 or Ubuntu 18.04. You don’t need to create a live USB and install from it. All you need is a good internet connection that can download around 1.5 GB of data. - -Upgrading from an existing system doesn’t harm your files. You should have all your files as it is and most of your existing software should be either have the same version or upgraded versions. - -If you have used some third-party tools or [additional PPA][6], the upgrade procedure will disable them. You can enable these additional repositories again if they are available for Ubuntu 20.04. - -Upgrading takes like an hour and after a restart, you will be logged in to the newer version. - -Though your data will not be touched and you won’t lose system files and configurations, it is always a good idea to make backup of important data externally. - -#### When will I get to upgrade to Ubuntu 20.04? - -![][7] - -If you are using Ubuntu 19.10 and have correct update settings in place (as mentioned in the earlier sections), you should be notified for upgrading to Ubuntu 20.04 within a few days of Ubuntu 18.04 release. - -For Ubuntu 18.04 users, it may take some weeks before they are officially notified of the availability of Ubuntu 18.04. Probably, you may get the prompt after the first point release of Ubuntu 20.04.1. - -#### If I upgrade to Ubuntu 20.04, can I downgrade to 19.10 or 18.04? - -No, you cannot. While upgrading to a newer version is easy, there is no option to downgrade.  If you want to go back to Ubuntu 18.04, you’ll have [install Ubuntu 18.04][8] again. - -#### I am using Ubuntu 18.04 LTS. Should I Upgrade to Ubuntu 20.04 LTS? - -That depends upon you. If you are impressed by the new features in Ubuntu 20.04 and want to get your hands on it, you should upgrade. - -If you want a more stable system, I advise waiting for the first point release Ubuntu 20.04.1 release that will have bug fixes in the new release. 20.04.1 should typically be coming approximately two months after the release of Ubuntu 20.04. - -In either case, I recommend upgrading to Ubuntu 20.04 sooner or later. Ubuntu 20.04 has newer kernel, performance improvement and above all newer versions of software available in the repository. - -Make a backup on external disk and with a good internet connectivity, the upgrade should not be an issue. - -#### Should I do a fresh install of Ubuntu 20.04 or upgrade to it from 18.04/19.10? - -If you have a choice, make a backup of your data and do a fresh install of Ubuntu 20.04. - -Upgrading to 20.04 from an existing version is a convenient option. However, in my opinion, it still keeps some traces/packages of the older version. A fresh install is always cleaner. - -#### Any other questions about Ubuntu 20.04? - -If you have any other doubts regarding Ubuntu 20.04, please feel free to leave a comment below. If you think some other information should be added to the list, please let me know. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntu-20-04-faq/ - -作者:[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/ubuntu-20-04-release-features/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu_20_04_faq.jpg?ssl=1 -[3]: https://itsfoss.com/which-ubuntu-install/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-32-bit.jpg?ssl=1 -[5]: https://itsfoss.com/steam-play/ -[6]: https://itsfoss.com/ppa-guide/ -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/upgrade-ubuntu-20-04.jpg?ssl=1 -[8]: https://itsfoss.com/install-ubuntu/ diff --git a/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md b/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md new file mode 100644 index 0000000000..30a3049bfe --- /dev/null +++ b/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md @@ -0,0 +1,129 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Things You Should Know About Ubuntu 20.04) +[#]: via: (https://itsfoss.com/ubuntu-20-04-faq/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +关于 Ubuntu 20.04 你应该了解的事情 +====== + +[Ubuntu 20.04][1] 即将发布,你可能对升级、安装等有一些问题和疑问。 + +我在各种社交媒体渠道上主持了一些问答环节,回答像你这样的读者的疑虑。 + +我将列出这些关于Ubuntu 20.04的常见问题,并给出答案。我希望它能帮助你消除你的疑虑。如果你仍有问题,请随时在下面的评论栏提问。 + +### Ubuntu 20.04: 已回复的问题 + +![][2] + +为了澄清一下,这里的一些答案也许受我个人意见的影响。如果你是一个有经验的 Ubuntu 用户,有些问题听起来可能有点愚蠢,但它对 Ubuntu 新用户不是这样。 + +#### Ubuntu 20.04 何时发布? + +Ubuntu 20.04 LTS 于 2020 年 4 月 23 日发布。所有变种,如 Kubuntu、Lubuntu,、Xubuntu、Budgie、MATE 都将和 20.04 同一天发布。 + +#### Ubuntu 20.04 的系统要求是什么? + +对于默认的 GNOME 版本,应至少具有 4GB 的内存、2 GHz 双核处理器和至少 25GB 的磁盘空间。 + +其他 [Ubuntu 变种][3]可能有不同的系统要求。 + +#### 我可以在 32 位系统上使用 Ubuntu 20.04 吗? + +完全不行。你不能在 32 位系统上使用 Ubuntu 20.04。即使你使用的是 32 位 Ubuntu 18.04,也不能升级到 Ubuntu 20.04。过去几年有 32 位的系统 ISO。 + +![Error while upgrading 32-bit Ubuntu 18.04 to Ubuntu 20.04][4] + +#### 我可以在Ubuntu 20.04上使用 Wine 吗? + +是的,你仍然可以在 Ubuntu 20.04 上使用 Wine,因为仍然有 32 位库,来用于 Wine 和 [Steam Play][5] 所需的软件包。 + +#### 我需要购买 Ubuntu 20.04 或许可证? + +不,Ubuntu 是完全免费使用的。你不必像在 Windows 中那样购买许可证密钥或激活 Ubuntu。 + +Ubuntu 的下载页会请求你捐赠一些资金,如果你想捐赠一些钱来帮助开发这个系统,这完全取决于你。 + +#### GNOME 版本是什么? + +Ubuntu 20.04 有 GNOME 3.36。 + +#### Ubuntu 20.04 的性能是否优于 Ubuntu 18.04? + +是的,在几个方面。Ubuntu 20.04 安装速度更快,甚至加速更快。我在 4:40 的视频中展示了性能比较。 + +在 GNOME 3.36 中,滚动、窗口动画和其他 UI 元素更加流畅,并提供了更流畅的体验。 + +#### Ubuntu 20.04 将支持多长时间? + +它是一个长期支持 (LTS) 版本,与任何 LTS 版本一样,它将在五年内得到支持。这意味着 Ubuntu 20.04 将在 2025 年 4 月之前获得安全和维护更新。 + +#### 升级到 Ubuntu 20.04 时,是否会丢失数据? + +你可以从 Ubuntu 19.10 或 Ubuntu 18.04 升级到 Ubuntu 20.04。你无需创建 live USB 并从中安装。你所需要的是一个良好的互联网连接,来下载约1.5GB 的数据。 + +从现有系统升级不会破坏你的文件。你应该会有所有文件,并且大多数现有软件应具有相同的版本或升级后的版本。 + +如果你使用了某些第三方工具或[其他 PPA][6],升级过程将禁用它们。如果 Ubuntu 20.04 适合这些其他存储库,那么可以再次启用它们。 + +升级大约需要一个小时,重启后,你将登录到新版本。 + +虽然你的数据不会被触碰,并且不会丢失系统文件和配置,但最好在外部设备备份重要数据。 + +#### 何时可以升级到 Ubuntu 20.04? + +![][7] + +如果你正在使用 Ubuntu 19.10 并有正确的更新设置(如前面部分所述),那么应在 Ubuntu 18.04 后的几天内通知你升级到 Ubuntu 20.04。 + +对于 Ubuntu 18.04 用户,可能需要几周时间才能正式通知他们 Ubuntu 18.04 可用。可能,你可能会在第一个点版本 Ubuntu 20.04.1 后获得提示。 + +#### 如果我升级到 Ubuntu 20.04,我可以降级到 19.10 或 18.04 吗? + +不行。虽然升级到新版本很容易,但无法选择降级。 如果你想回到 Ubuntu 18.04,你将重新[安装 Ubuntu18.04][8]。 + +#### 我使用的是 Ubuntu 18.04 LTS。我应该升级到 Ubuntu 20.04 LTS 吗? + +这取决于你。如果你对 Ubuntu 20.04 中的新功能印象深刻,并希望上手尝试,那么你应该升级。 + +如果你想要一个更稳定的系统,我建议等待第一个点版本 Ubuntu 20.04.1,新版本将有 bug 修复。20.04.1 通常在 Ubuntu 20.04 发布后大约两个月到来。 + +其他情况下,我建议尽早升级到 Ubuntu 20.04。Ubuntu 20.04 具有更新的内核、性能改进,尤其是仓库中有更新版本的软件。 + +在外部磁盘上进行备份,并且有良好的互联网连接,升级不应成为问题。 + +#### 我应该重新安装 Ubuntu 20.04 还是从 18.04/19.10 升级到 Ubuntu? + +如果你可以选择,请备份数据,并重新安装 Ubuntu 20.04。 + +从现有版本升级到 20.04 是一个方便的选择。然而,在我看来,它仍然保留有一些旧版本的痕迹/包。全新安装更加干净。 + +#### 关于 Ubuntu 20.04 的任何其他问题? + +如果你对 Ubuntu 20.04 有任何疑问,请随时在下面发表评论。如果你认为应该将其他信息添加到列表中,请让我知道。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-20-04-faq/ + +作者:[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/ubuntu-20-04-release-features/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu_20_04_faq.jpg?ssl=1 +[3]: https://itsfoss.com/which-ubuntu-install/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-32-bit.jpg?ssl=1 +[5]: https://itsfoss.com/steam-play/ +[6]: https://itsfoss.com/ppa-guide/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/upgrade-ubuntu-20-04.jpg?ssl=1 +[8]: https://itsfoss.com/install-ubuntu/ From 962ca7ffef7c40db69d377e7051450caa77a3eb4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Mon, 27 Apr 2020 08:45:39 +0800 Subject: [PATCH 281/394] translating --- .../20200331 Rambox is an All-in-one Messenger for Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md b/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md index f70829e98f..5e6a8a2d5c 100644 --- a/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md +++ b/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f82310f7a45c8ca987ebb5709c8860282697fd57 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 27 Apr 2020 09:35:54 +0800 Subject: [PATCH 282/394] PRF @qfzy1233 --- ...w- Slightly Different Lightweight Linux.md | 64 ++++++++----------- 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md index 95476933d3..579013dd09 100644 --- a/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md +++ b/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (qfzy1233) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Bodhi Linux 5.1 Review: Slightly Different Lightweight Linux) @@ -10,84 +10,76 @@ Bodhi Linux 5.1 一览: 略有不同的轻量化 Linux ====== -Bodhi Linux 是一个基于 Ubuntu 的[轻量级Linux发行版][1]。与其他大多数发行版不同,Bodhi 使用自己的 Moksha 桌面,并专注于为你提供在旧计算机上运行的最简设置。 +Bodhi Linux 是一个基于 Ubuntu 的[轻量级 Linux 发行版][1]。与其他大多数发行版不同,Bodhi 使用自己的 Moksha 桌面,并专注于为你提供一个可以在旧计算机上运行的最简设置。 ### 什么是 Bodhi Linux? -![Bodhi Start Page][2] +![](https://img.linux.net.cn/data/attachment/album/202004/27/093318yawppv07zqpva4j6.png) -[Bodhi Linux][3] 最早于2011年推出。它以“[简约、高效和用户自定义][4]”为设计理念。开发人员旨在提供一个“[功能正常但不臃肿的系统][5]”。因此,它使用轻量级的Moksha 桌面,只预装了基本的应用程序。这一做法是为了给用户一个稳定的平台来构建他们想要的系统。它基于最新版的 Ubuntu 长期支持版本。 +[Bodhi Linux][3] 最早于 2011 年推出。它以“[简约、高效和用户自定义][4]”为设计理念。开发人员旨在提供一个“[实用但不臃肿的系统][5]”。因此,它使用轻量级的 Moksha 桌面,只预装了基本的应用程序。这一做法是为了给用户一个稳定的平台来构建他们想要的系统。它基于最新版的 Ubuntu 长期支持版本。 ### Moksha 桌面 ![Bodhi Desktop][6] -起初菩提是随着[ Enlightenment 桌面环境][7]一起发布的。Bodhi Linux 一直被认为是“开明的”Linux发行版。事实上,“Bodhi”这个词是基于梵文的“开悟”。 +起初 Bodhi 是装载着 [Enlightenment 桌面环境][7]的。Bodhi Linux 一直被认为是“Enlightenment 系的” Linux 发行版。事实上,“Bodhi”(菩提)这个词是基于梵文的“开悟 enlightenment”。 -然而,当 Enlightenment 18版本发布以后,这一切都改变了。该版本是如此的糟糕,它并没有集成 Bodhi 。Enlightenment 19 被发布并修复了一些问题,但仍然存在一些问题。 +然而,当 Enlightenment 18 版本发布以后,这一切都改变了。该版本是如此的糟糕,以至于它并没有集成到 Bodhi 中。Enlightenment 19 发布后修复了一些问题,但仍然存在一些不足。 -在尝试与 Enlightenment 开发团队合作却毫无进展之后,Bodhi 开发者在2015年复刻了[8]Enlightenment 17。新的桌面环境被命名为[Moksha][9],它是基于梵文单词“解脱、解放或释放”。你可以在[GitHub][10]上找到它的代码。 +在尝试与 Enlightenment 开发团队合作却毫无进展之后,Bodhi 开发者在 2015 年[复刻][8]了 Enlightenment 17。新的桌面环境被命名为 [Moksha][9],它是基于梵文单词“解脱、解放或释放”。你可以在 [GitHub][10] 上找到它的代码。 -### 5.1.0有什么新特性? +### 5.1.0 有什么新特性? -[订阅我们的YouTube频道来观看更多的Linux视频][11] +- [Bodhi Linux 5.1 Trailer](https://youtu.be/e8wcRL9F3p8) -[Bodhi 5.1.0][12] 是两年内的第一个版本,也是基于 Ubuntu 18.04 的第二个版本。除了更新包,它还有新的默认图标和主题。该版本对默认应用程序做了几处更改。预装版 Leafpad 取代了 epad 并且 [GNOME Web][13] (也被称为Epiphany)代替了[Midori][14])。删除了eepDater系统更新器。 - -目前有[四个不同的版本][15]的菩提5.1.0提供[下载][16]: 标准版(Standard),硬件支持版(Hwe), 兼容版(Legacy), 和软件包版(AppPack). - - * 标准适用于过去十年内电脑配置。它不推送内核更新。 - * 硬件支持版Hwe (Hardware Enablement)是 Bodhi 新的家族设计包括支持更新的硬件和将收到内核更新。5.1版本的使用的是5.3.0-42内核。 - * 兼容版是唯一的32位版本。它使用“较旧的4.9.0-6-686 Linux内核,该内核针对旧的(15年以上)硬件进行了优化”。这个内核也不包括PAE扩展,这是许多老系统不支持的。” - * 软件包版是为那些想要一个开箱即用并预装了许多应用程序的全负载系统的人准备的。 +[Bodhi 5.1.0][12] 是这两年内发布的第一个版本,也是基于 Ubuntu 18.04 的第二个版本。除了更新包,它还有新的默认图标和主题。该版本对默认应用程序做了几处更改。预装版 Leafpad 取代了 epad 并且 [GNOME Web][13](也被称为 Epiphany)代替了 [Midori][14]。删除了 eepDater 系统更新器。 +目前有[四个不同的版本][15]的 Bodhi5.1.0 可以[下载][16]: 标准版Standard硬件支持版Hwe兼容版Legacy软件包版AppPack。 +* 标准适用于过去十年内电脑配置。它不推送内核更新。 +* 硬件支持版是 Bodhi 家族的新成员,其设计用来包括对更新的硬件的支持,并会接收到内核更新。5.1 版本的使用的是 5.3.0-42 内核。 +* 兼容版是仅有的 32 位版本。它使用“较旧的 4.9.0-6-686 Linux 内核,该内核针对旧的(15 年以上)硬件进行了优化。这个内核也不包括许多老系统不支持的 PAE 扩展。” +* 软件包版是为那些想要一个开箱即用的全载系统的人准备的,并预装了许多应用程序。 ### Bodhi Linux 的系统要求 -最低系统要求 +最低系统要求: * 500 MHz 处理器 * 256 MB 内存 * 5 GB 的硬盘存储空间 - - -推荐系统要求 +推荐系统要求: * 1.0 GHz 处理器 * 512 MB 内存 * 10 GB 的硬盘存储空间 - - -### Bodhi Linux 的体验 +### 体验 Bodhi Linux ![Old Bodhi Linux][17] -由于它是基于 Ubuntu 的,安装 Bodhi 非常简单。当我登录到 Bodhi 后,我对新的主题和图标设置感到惊讶。上次我安装 Bodhi (包括几个月前的5.0)时,我认为它需要一个新的外观。之前的主题并没有什么问题,但看起来像是2000年初的东西。新的主题使它看起来更具现代感。 +由于它是基于 Ubuntu 的,所以安装 Bodhi 非常简单。当我登录到 Bodhi 后,新的主题和图标集让我大吃一惊。上次我安装 Bodhi(包括几个月前的 5.0)时,我认为它需要换一个新的外观。之前的主题并没有什么问题,但看起来像是二十一世纪初的东西。新的主题使它看起来更具现代感。 ![Bodhi Linux 5.1][18] -我也很高兴看到 Midori 浏览器被 GNOME Web 所取代。我不是[Midori 浏览器][19]的粉丝。对我来说,它总是显得功能太少了。(不过,随着[Midori Next][20]的推出,这种情况可能会改变。)Web更像是我需要的Web浏览器。最重要的是它带有Firefox同步功能,这样我就可以同步我所有的书签和密码了。 +我也很高兴看到 Midori 浏览器被 GNOME Web 所取代。我不是 [Midori 浏览器][19]的粉丝。对我来说,它总是显得功能太少了。(不过,随着 [Midori Next][20] 的推出,这种情况可能会改变。)GNOME Web 更像是我需要的网页浏览器。最重要的是它带有 Firefox Sync,这样我就可以同步我所有的书签和密码了。 -与许多 Linux 发行版不同,Bodhi 并没有一个独立的软件中心。相反,如果你点击 AppCenter 图标,它会打开浏览器,并导航到 Bodhi 网站的软件中心页面[AppCenter page][21]。这里的应用程序是按类别排序的。它们中的大多数是[轻量级应用程序][22]。 +与许多 Linux 发行版不同,Bodhi 并没有一个独立的软件中心。相反,如果你点击 AppCenter 图标,它会打开浏览器,并导航到 Bodhi 网站的软件中心页面 [AppCenter 页面][21]。这里的应用程序是按类别排序的,它们中的大多数是[轻量级应用程序][22]。 ![Bodhi Linux Appcenter][23] -如果你点击其中一个页面并点击“安装”,Bodhi 会开始它的安装(在你输入密码之后)。这是通过一个名为[apturl][24]的小程序实现的,它是“源自web浏览器安装软件包的一种非常简单的方法”。它非常灵巧,我希望更多基于ubuntu的发行版使用它。 +如果你点击其中一个页面并点击“安装”,(在你输入密码之后)Bodhi 就会安装它。这是通过一个名为 [apturl][24] 的小程序实现的,它是“是一个非常简单的从网页浏览器安装软件包的方法”。它非常灵巧,我希望更多基于 Ubuntu 的发行版使用它。 -总的来说,我喜欢 Moksha 桌面。它坚持我们几十年来看到的桌面风格(这是我最喜欢的)。它不干涉你,却很容易改变和定制。我唯一怀念的是,当我点击超级键时,应用程序菜单不打开。但我猜你不可能拥有生活中的一切。 +总的来说,我喜欢 Moksha 桌面。它坚持我们几十年来看到的桌面风格(这是我最喜欢的)。它不会影响你,却很容易改变和定制。我唯一怀念的是,当我按下超级键时,应用程序菜单不打开。但我猜你不可能拥有生活中的一切。 ### 结语 -我对最近发布的 Bodhi Linux 感到十分惊喜。过去,我经常折腾它。并且我一直很喜欢它,但最近的这个版本是迄今为止最好的。在某种程度上,他们通过增加对新内核的支持,打破了Bodhi只适用于旧系统的想法。 +我对最近发布的 Bodhi Linux 感到十分惊喜。过去,我经常折腾它。并且我一直很喜欢它,但最近的这个版本是迄今为止最好的。在某种程度上,他们打破了 Bodhi 只适合老系统的想法,加入了对较新内核的支持。 -如果你想在拥有 Ubuntu 体验的同时改善一下视觉体验,那就试试[Bodhi Linux][3]吧。 +如果你想换换个环境,同时又想在 Ubuntu 的世界里寻找新的风景,那就试试[Bodhi Linux][3]吧。 -你用过 Bodhi Linux 吗?你最喜欢的基于ubuntu的发行版是什么?请在下面的评论中告诉我们。 - -如果你觉得这篇文章很有趣,请花点时间在社交媒体、Hacker News或其他网站上分享 [Reddit][25]. +你用过 Bodhi Linux 吗?你最喜欢的基于 Ubuntu 的发行版是什么?请在下面的评论中告诉我们。 -------------------------------------------------------------------------------- @@ -95,8 +87,8 @@ via: https://itsfoss.com/bodhi-linux-review/ 作者:[John Paul][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[qfzy1233](https://github.com/qfzy1233) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 46c8c472fb3d78fdcc8f717949ac3d6565163c4a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 27 Apr 2020 15:16:07 +0800 Subject: [PATCH 283/394] PUB @qfzy1223 https://linux.cn/article-12155-1.html --- ... Linux 5.1 Review- Slightly Different Lightweight Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md (99%) diff --git a/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/published/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md similarity index 99% rename from translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md rename to published/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md index 579013dd09..f4380adb2a 100644 --- a/translated/tech/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md +++ b/published/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (qfzy1233) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12155-1.html) [#]: subject: (Bodhi Linux 5.1 Review: Slightly Different Lightweight Linux) [#]: via: (https://itsfoss.com/bodhi-linux-review/) [#]: author: (John Paul https://itsfoss.com/author/john/) From 3280ffb42dc8c051f7778e5f30c71ebd32e8b7f7 Mon Sep 17 00:00:00 2001 From: luzw3 Date: Mon, 27 Apr 2020 16:23:02 +0800 Subject: [PATCH 284/394] =?UTF-8?q?=E7=94=B3=E9=A2=86=E6=96=87=E7=AB=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...00424 What you need to know about open source ad blockers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200424 What you need to know about open source ad blockers.md b/sources/tech/20200424 What you need to know about open source ad blockers.md index c3fb98def0..1be2a98950 100644 --- a/sources/tech/20200424 What you need to know about open source ad blockers.md +++ b/sources/tech/20200424 What you need to know about open source ad blockers.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (CrazyShipOne) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From e199633a1ce24e9a1a18526c07a69bf979643a05 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 27 Apr 2020 18:22:08 +0800 Subject: [PATCH 285/394] PRF @lxbwolf --- ...orkspaces with Great Teeming Workspaces.md | 1153 ++--------------- 1 file changed, 88 insertions(+), 1065 deletions(-) diff --git a/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md b/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md index db5f0bf1ca..683f3dc313 100644 --- a/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md +++ b/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md @@ -1,1136 +1,159 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Manage complex Git workspaces with Great Teeming Workspaces) [#]: via: (https://opensource.com/article/20/2/git-great-teeming-workspaces) [#]: author: (Daniel Gryniewicz https://opensource.com/users/dang) -使用 Great Teeming Workspaces 管理复杂的 Git 工作空间 +使用 GTWS 管理复杂的 Git 工作空间 ====== -GTWS 是一系列脚本,这些脚本能让我们在开发环境中管理一个有不同项目和不同版本的工程时变得更简单。 -![Coding on a computer][1] -[GTWS][2] 是一个 Git 的复杂工作空间管理工具包,可以让我们在开发环境中管理一个有不同项目和不同版本的工程时变得更简单。 +> GTWS 是一系列脚本,它使我们在开发环境中管理不同的项目和项目的各个版本变得很容易。 -有点像 Python 的 [venv][3],但不是为 Python 语言准备的。GTWS 用来处理多项目的多个版本的工作空间。你可以很容易地创建、更新、进入和离开工作空间,每个项目或版本的组合(最多)有一个本地的 origin,用来与 upstream 同步 — 其余的所有工作空间都从本地的 origin 更新。 +![](https://img.linux.net.cn/data/attachment/album/202004/27/182149xh9s7kb5bkf5875b.jpg) + +[Great Teeming Workspaces][2](GTWS)是一个 Git 的复杂工作空间管理工具包,它使我们在开发环境中管理不同的项目和项目的各个版本变得很容易。 + +有点像 Python 的 [venv][3],但不是为 Python 语言准备的。GTWS 用来管理多个项目的多个版本的工作空间。你可以很容易地创建、更新、进入和离开工作空间,每个项目或版本的组合(最多)有一个本地的 origin,用来与 upstream 同步 — 其余的所有工作空间都从本地的 origin 更新。 ### 部署 ``` -${GTWS_ORIGIN}/<project>/<repo>[/<version>] -${GTWS_BASE_SRCDIR}/<project>/<version>/<workspacename>/{<repo>[,<repo>...]} +${GTWS_ORIGIN}//[/] +${GTWS_BASE_SRCDIR}////{[,...]} ``` -源目录的每一级(包括全局的 home 目录)可以包含一个 **.gtwsrc** 文件,这个文件中维护与当前级相关的设置和 bash 代码。每一级的配置会覆盖上一级。 +源代码目录的每一级(包括全局的家目录)可以包含一个 `.gtwsrc` 文件,这个文件中维护与当前级相关的设置和 bash 代码。每一级的配置会覆盖上一级。 ### 安装 用下面的命令检出 GTWS: ``` -`git clone https://github.com/dang/gtws.git` +git clone https://github.com/dang/gtws.git ``` -配置你的 **${HOME}/.gtwsrc**。它应该包含 **GTWS_ORIGIN**,也可以再包含 **GTWS_SETPROMPT**。 +配置你的 `${HOME}/.gtwsrc`。它应该包含 `GTWS_ORIGIN`,也可以再包含 `GTWS_SETPROMPT`。 把仓库目录加到环境变量中: ``` -`export PATH="${PATH}:/path/to/gtws` +export PATH="${PATH}:/path/to/gtws ``` ### 配置 -通过级联 **.gtwsrc** 文件来进行配置。它从根目录向下遍历,会执行在每级目录中找到的 **.gtwsrc** 文件。下级目录的文件会覆盖上一级。 +通过级联 `.gtwsrc` 文件来进行配置。它从根目录向下遍历,会执行在每级目录中找到的 `.gtwsrc` 文件。下级目录的文件会覆盖上一级。 -在你最上层的文件 **~/.gtws/.gtwsrc** 中进行如下设置: +在你最上层的文件 `~/.gtws/.gtwsrc` 中进行如下设置: - * **GTWS_BASE_SRCDIR:** 所有项目源文件目录树的 base。默认为 **$HOME/src**。 - * **GTWS_ORIGIN:** 指定 origin git 目录树的路径。默认为 **$HOME/origin**。 - * **GTWS_SETPROMPT:** 可选配置。如果配置了这个参数,shell 提示符会有工作空间的名字。 - * **GTWS_DEFAULT_PROJECT:** 不指定项目或项目未知时默认的项目名。如果不指定,使用命令行时必须指明项目。 - * **GTWS_DEFAULT_PROJECT_VERSION:** 检出的默认版本。默认为 **master**。 + * `GTWS_BASE_SRCDIR`:所有项目源文件目录树的基目录。默认为 `$HOME/src`。 + * `GTWS_ORIGIN`: 指定 origin git 目录树的路径。默认为 `$HOME/origin`。 + * `GTWS_SETPROMPT`: 可选配置。如果配置了这个参数,shell 提示符会有工作空间的名字。 + * `GTWS_DEFAULT_PROJECT`: 不指定项目或项目未知时默认的项目名。如果不指定,使用命令行时必须指明项目。 + * `GTWS_DEFAULT_PROJECT_VERSION`: 检出的默认版本。默认为 `master`。 在每个项目的根目录进行以下设置: - * **GTWS_PROJECT:** 项目的名字(和 base 目录)。 - * **gtws_project_clone:** 这个函数用于克隆一个项目的指定版本。如果未定义,它会假定项目的 origin 对每一个版本都有一个单独的目录,这样会导致克隆一堆 Git 仓库。 - * **gtws_project_setup:** 在克隆完所有的仓库后,可以选择是否调用这个函数,调用后可以对项目进行必要的配置,如在 IDE 中配置工作空间。 + * `GTWS_PROJECT`: 项目的名字(和基目录)。 + * `gtws_project_clone`: 这个函数用于克隆一个项目的指定版本。如果未定义,它会假定项目的 origin 对每一个版本都有一个单独的目录,这样会导致克隆一堆 Git 仓库。 + * `gtws_project_setup`: 在克隆完所有的仓库后,可以选择是否调用这个函数,调用后可以对项目进行必要的配置,如在 IDE 中配置工作空间。 在项目版本级进行以下设置: - * **GTWS_PROJECT_VERSION:** 项目的版本。用于正确地从 origin 拉取代码。类似 Git 中的分支名字。 + * `GTWS_PROJECT_VERSION:` 项目的版本。用于正确地从 origin 拉取代码。类似 Git 中的分支名字。 下面这些参数可以在目录树的任意地方进行配置,如果能生效,它们可以被重写多次: - * **GTWS_PATH_EXTRA:** 这些是工作空间中加到路径后的额外的路径元素。 - * **GTWS_FILES_EXTRA:** 这些是不在版本控制内,但应该在工作空间中被检出的额外的文件。这些文件包括 **.git/info/exclude**,每个文件都与仓库的 base 相关联。 + * `GTWS_PATH_EXTRA`: 这些是工作空间中加到路径后的额外的路径元素。 + * `GTWS_FILES_EXTRA`: 这些是不在版本控制内,但应该在工作空间中被检出的额外的文件。这些文件包括 `.git/info/exclude`,每个文件都与仓库的基目录相关联。 ### origin 目录 -**GTWS_ORIGIN** (大部分脚本中)指向拉取和推送的原始 Git 检出目录。 +`GTWS_ORIGIN` (大部分脚本中)指向拉取和推送的原始 Git 检出目录。 -**${GTWS_ORIGIN}** 部署: +`${GTWS_ORIGIN}` 部署: - * **/<project>** - * 这是一个项目的仓库 base。 - * 如果指定了 **gtws_project_clone**,你可以配置任意的部署路径。 - * 如果没有指定 **gtws_project_clone**,这个路径下必须有个名为 **git** 的子目录,且 **git** 目录下有一系列用来克隆的裸 Git 仓库。 + * `/` + * 这是一个项目的仓库的基目录。 + * 如果指定了 `gtws_project_clone`,你可以配置任意的部署路径。 + * 如果没有指定 `gtws_project_clone`,这个路径下必须有个名为 `git` 的子目录,且 `git` 目录下有一系列用来克隆的裸 Git 仓库。 ### 工作流示例 -假设你有一个项目名为 **Foo**,它的 upstream 为 **github.com/foo/foo.git**。这个仓库有个名为 **bar** 的子模块,它的 upstream 是 **github.com/bar/bar.git**。Foo 项目在 master 分支开发,使用稳定版本的分支。 +假设你有一个项目名为 `Foo`,它的 upstream 为 `github.com/foo/foo.git`。这个仓库有个名为 `bar` 的子模块,它的 upstream 是 `github.com/bar/bar.git`。Foo 项目在 master 分支开发,使用稳定版本的分支。 为了能在 Foo 中使用 GTWS,你首先要配置目录结构。本例中假设你使用默认的目录结构。 - * 配置你最上层的 **.gtwsrc**: - * **cp ${GTWS_LOC}/examples/gtwsrc.top ~/.gtwsrc** - * 根据需要修改 **~/.gtwsrc**。 + * 配置你最上层的 `.gtwsrc`: + * `cp ${GTWS_LOC}/examples/gtwsrc.top ~/.gtwsrc` + * 根据需要修改 `~/.gtwsrc`。 * 创建顶级目录: - * **mkdir -p ~/origin ~/src** + * `mkdir -p ~/origin ~/src` * 创建并配置项目目录: - * **mkdir -p ~/src/foo** -**cp ${GTWS_LOC}/examples/gtwsrc.project ~/src/foo/.gtwsrc** - * 根据需要修改 **~/src/foo/.gtwsrc**。 + * `mkdir -p ~/src/foo` + + `cp ${GTWS_LOC}/examples/gtwsrc.project ~/src/foo/.gtwsrc` + * 根据需要修改 `~/src/foo/.gtwsrc`。 * 创建并配置 master 版本目录: - * **mkdir -p ~/src/foo/master** -**cp ${GTWS_LOC}/examples/gtwsrc.version ~/src/foo/master/.gtwsrc** - * 根据需要修改 **~/src/foo/master/.gtwsrc**。 + * `mkdir -p ~/src/foo/master` + + `cp ${GTWS_LOC}/examples/gtwsrc.version ~/src/foo/master/.gtwsrc` + * 根据需要修改 `~/src/foo/master/.gtwsrc`。 * 进入版本目录并创建一个临时工作空间来配置镜像: - * **mkdir -p ~/src/foo/master/tmp** -**cd ~/src/foo/master/tmp -git clone --recurse-submodules git://github.com/foo/foo.git -cd foo -gtws-mirror -o ~/origin -p foo**(译注:这个地方原文有误,不加 `-s` 参数会报错) - * 上面命令会创建 **~/origin/foo/git/foo.git** 和 **~/origin/foo/submodule/bar.git**。 + * `mkdir -p ~/src/foo/master/tmp` + + `cd ~/src/foo/master/tmp` + + `git clone --recurse-submodules git://github.com/foo/foo.git` + + `cd foo` + + `gtws-mirror -o ~/origin -p foo`(译注:这个地方原文有误,不加 `-s` 参数会报错) + * 上面命令会创建 `~/origin/foo/git/foo.git` 和 `~/origin/foo/submodule/bar.git`。 * 以后的克隆操作会从这些 origin 而不是 upstream 克隆。 * 现在可以删除工作空间了。 -到现在为止,Foo 的 master 分支的工作可以结束了。假设你现在想修复一个 bug,名为 **bug1234**。你可以脱离你当前的工作空间为修复这个 bug 单独创建一个工作空间,之后在新创建的工作空间中开发。 +到现在为止,Foo 的 master 分支的工作可以结束了。假设你现在想修复一个 bug,名为 `bug1234`。你可以脱离你当前的工作空间为修复这个 bug 单独创建一个工作空间,之后在新创建的工作空间中开发。 * 进入版本目录,创建一个新的工作空间: - * **cd ~/src/foo/master -mkws bug1234** - * 上面的命令创建了 **bug1234/**,在这个目录下检出了 Foo(和它的子模块 **bar**),并创建了 **build/foo** 来构建它。 + * `cd ~/src/foo/master` + + `mkws bug1234` + * 上面的命令创建了 `bug1234/`,在这个目录下检出了 Foo(和它的子模块 `bar`),并创建了 `build/foo` 来构建它。 * 有两种方式进入工作空间: - * **cd ~/src/foo/master/bug1234 -startws** -或者 -**cd ~/src/foo/master/** -**startws bug1234** - * 上面的命令在 bug1234 工作空间中开启了一个子 shell。这个 shell 有 GTWS 的环境和你在各级 **.gtwsrc** 文件中设置的环境。它也把你工作空间的 base 路径加入到了 CD,因此你可以从 base 路径 **cd** 到相关的目录中。 - * 现在你可以修复 bug1234了,构建、测试、提交你的修改。当你可以把代码推送到 upstream 时,执行下面的命令: -**cd foo -wspush**  - * **wspush** 会把代码推送到与你工作空间相关的分支 — 先推送到本地的 origin,再推送到 upstream。 + * `cd ~/src/foo/master/bug1234` + + `startws` + + 或者 + + `cd ~/src/foo/master/` + + `startws bug1234` + * 上面的命令在 `bug1234` 工作空间中开启了一个子 shell。这个 shell 有 GTWS 的环境和你在各级 `.gtwsrc` 文件中设置的环境。它也把你工作空间的基目录加入到了 CD,因此你可以从 base 路径 `cd` 到相关的目录中。 + * 现在你可以修复 `bug1234` 了,构建、测试、提交你的修改。当你可以把代码推送到 upstream 时,执行下面的命令: + + `cd foo` + + `wspush`  + * `wspush` 会把代码推送到与你工作空间相关的分支 — 先推送到本地的 origin,再推送到 upstream。 * 当 upstream 有修改时,你可以用下面的命令同步到本地: -**git sync** - * 上面的命令调用了 GTWS 的 **git-sync** 脚本,会从本地 origin 更新代码。使用下面的命令来更新本地的 origin: -**git sync -o**  - * 上面的命令会更新你本地的 origin 和子模块的镜像,然后用那些命令来更新你的检出仓库的代码。**git-sync** 也有一些其他的很好的工鞥。 + + `git sync` + * 上面的命令调用了 GTWS 的 `git-sync` 脚本,会从本地 origin 更新代码。使用下面的命令来更新本地的 origin: + + `git sync -o`  + * 上面的命令会更新你本地的 origin 和子模块的镜像,然后用那些命令来更新你的检出仓库的代码。`git-sync` 也有一些其他的很好的工鞥。 * 当要结束工作空间中的工作时,直接退出 shell: -**exit** + + `exit` * 你可以在任何时间重复进入工作空间,也可以在同一时间在相同的工作空间中开多个 shell。 - * 当你不需要某个工作空间时,你可以使用 **rmws** 来删除它,或者直接删除它的目录树。 - * 还有一个脚本 **tmws** 使用 tmux 进入工作空间,能创建一系列的窗口/窗格,这完美契合我的工作流。你可以根据你自己的需求来修改它。 + * 当你不需要某个工作空间时,你可以使用 `rmws` 来删除它,或者直接删除它的目录树。 + * 还有一个脚本 `tmws` 使用 tmux 进入工作空间,能创建一系列的窗口/窗格,这完美契合我的工作流。你可以根据你自己的需求来修改它。 -### 脚本内容 - -``` -#!/bin/bash -# Functions for gtws -# - -GTWS_LOC=$(readlink -f $(dirname "${BASH_SOURCE[0]}")) -export GTWS_LOC - -# if is_interactive; then echo "interactive" fi -# -# Check for an interactive shell -is_interactive() { -        case $- in -                *i*) -                        # Don't die in interactive shells -                        return 0 -                        ;; -                *) -                        return 1 -                        ;; -        esac -} - -# if can_die; then exit -# -# Check to see if it's legal to exit during die -can_die() { -        if (( BASH_SUBSHELL > 0 )); then -                debug_print "\t\tbaby shell; exiting" -                return 0 -        fi -        if ! is_interactive; then -                debug_print "\t\tNot interactive; exiting" -                return 0 -        fi -        debug_print "\t\tParent interactive; not exiting" -        return 1 -} - -# In a function: -# command || die "message" || return 1 -# Outside a function: -# command || die "message" -# -# Print a message and exit with failure -die() { -        echo -e "Failed: $1" >&2 -        if [ ! -z "$(declare -F | grep "GTWScleanup")" ]; then -                GTWScleanup -        fi -        if can_die; then -                exit 1 -        fi -        return 1 -} - -# Alternativess for using die properly to handle both interactive and script useage: -# -# Version 1: -# -#testfunc() { -#       command1 || die "${FUNCNAME}: command1 failed" || return 1 -#       command2 || die "${FUNCNAME}: command2 failed" || return 1 -#       command3 || die "${FUNCNAME}: command3 failed" || return 1 -#} -# -# Version 2: -# -#testfunc() { -#       ( -#               command1 || die "${FUNCNAME}: command1 failed" -#               command2 || die "${FUNCNAME}: command2 failed" -#               command3 || die "${FUNCNAME}: command3 failed" -#       ) -#       return $? -#} -# -# Optionally, the return can be replaced with this: -#       local val=$? -#       [[ "${val}" == "0" ]] || die -#       return ${val} -# This will cause the contaning script to abort - -# usage "You need to provide a frobnicator" -# -# Print a message and the usage for the current script and exit with failure. -usage() { -        local myusage; -        if [ -n "${USAGE}" ]; then -                myusage=${USAGE} -        else -                myusage="No usage given" -        fi -        local me; -        if [ -n "${ME}" ]; then -                me=${ME} -        else -                me=$(basename $0) -        fi -        if [ -n "$1" ]; then -                echo "$@" -        fi -        echo "" -        if [ -n "${DESCRIPTION}" ]; then -                echo -e "${me}: ${DESCRIPTION}" -                echo "" -        fi -        echo "Usage:" -        echo "${me} ${myusage}" -        if [ -n "${LONGUSAGE}" ]; then -                echo -e "${LONGUSAGE}" -        fi -        exit 1 -} - -# debug_print "Print debug information" -# -# Print debug information based on GTWS_VERBOSE -debug_print() { -        if [ -n "${GTWS_VERBOSE}" ]; then -                echo -e "${GTWS_INDENT}$@" >&2 -        fi -} - -# debug_trace_start -# -# Start tracing all commands -debug_trace_start() { -        if [ -n "${GTWS_VERBOSE}" ]; then -                set -x -        fi -} - -# debug_trace_stop -# -# Stop tracing all commands -debug_trace_stop() { -        set +x -} - -# cmd_exists ${cmd} -# -# Determine if a command exists on the system -function cmd_exists { -        which $1 > /dev/null 2>&1 -        if [ "$?" == "1" ]; then -                die "You don't have $1 installed, sorry" || return 1 -        fi -} - -# is_git_repo ${dir} -# -# return success if ${dir} is in a git repo, or failure otherwise -is_git_repo() { -        debug_print "is_git_repo $1" -        if [[ $1 == *:* ]]; then -                debug_print "    remote; assume good" -                return 0 -        elif [ ! -d "$1" ]; then -                debug_print "    fail: not dir" -                return 1 -        fi -        cd "$1" -        git rev-parse --git-dir >/dev/null 2>&1 -        local ret=$? -        cd - > /dev/null -        debug_print "    retval: $ret" -        return $ret -} - -# find_git_repo ${basedir} ${repo_name} repo_dir -# -# Find the git repo for ${repo_name} in ${basedir}.  It's one of ${repo_name} -# or ${repo_name}.git -# -# Result will be in the local variable repo_dir  Or: -# -# repo_dir=$(find_git_repo ${basedir} ${repo_name}) -# -function find_git_repo { -        local basedir=$1 -        local repo_name=$2 -        local __resultvar=$3 -        local try="${basedir}/${repo_name}" - -        if ! is_git_repo "${try}" ; then -                try=${try}.git -        fi - -        is_git_repo "${try}" || die "${repo_name} in ${basedir} is not a git repository" || return 1 - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$try'" -        else -                echo "$try" -        fi -} - -# git_top_dir top -# -# Get the top level of the git repo contaning PWD, or return failure; -# -# Result will be in local variable top  Or: -# -# top = $(git_top_dir) -# -# Result will be in local variable top -function git_top_dir { -        local  __resultvar=$1 -        local __top="$(git rev-parse --show-toplevel 2>/dev/null)" - -        if [ -z "${__top}" ]; then -                die "${PWD} is not a git repo" || return 1 -        fi -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__top'" -        else -                echo "$__top" -        fi -} - -# is_git_rebase -# -# return success if git repo is in a rebase -is_git_rebase() { -        debug_print "is_git_rebase $1" -        (test -d "$(git rev-parse --git-path rebase-merge)" || \ -                test -d "$(git rev-parse --git-path rebase-apply)" ) -        local ret=$? -        debug_print "    retval: $ret" -        return $ret -} - -# is_docker -# -# return success if process is running inside docker -is_docker() { -        debug_print "is_docker" -        grep -q docker /proc/self/cgroup -        return $? -} - -# is_gtws -# -# return success if process is running inside a workspace -is_gtws() { -        if [ -n "${GTWS_WS_GUARD}" ]; then -                return 0 -        fi -        return 1 -} - -function gtws_rcp { -        rsync --rsh=ssh -avzS --progress --ignore-missing-args --quiet "$@" -} - -function gtws_cpdot { -        local srcdir=$1 -        local dstdir=$2 - -        debug_print "${FUNCNAME} - ${srcdir} to ${dstdir}" -        if [ -d "${srcdir}" ] && [ -d "${dstdir}" ]; then -                shopt -s dotglob -                cp -a "${srcdir}"/* "${dstdir}"/ -                shopt -u dotglob -        fi -} - -# gtws_find_dockerfile dockerfile -# -# Result will be in local variable dockerfile  Or: -# -# dockerfile = $(gtws_find_dockerfile) -# -# Result will be in local variable dockerfile -# -# Get the path to the most-specific Dockerfile -function gtws_find_dockerfile { -        local  __resultvar=$1 -        local __dir="${GTWS_WSPATH}" -        local __file="Dockerfile" - -        debug_print "${FUNCNAME} - trying ${__dir}/${__file}" -        if [ ! -f "${__dir}/${__file}" ]; then -                # Version dir -                __dir=$(dirname "${__dir}") -                debug_print "${FUNCNAME} - trying ${__dir}/${__file}" -        fi -        if [ ! -f "${__dir}/${__file}" ]; then -                # Project dir -                __dir=$(dirname "${__dir}") -                debug_print "${FUNCNAME} - trying ${__dir}/${__file}" -        fi -        if [ ! -f "${__dir}/${__file}" ]; then -                # Top level, flavor -                __dir="${GTWS_LOC}/dockerfiles" -                __file="Dockerfile-${FLAVOR}" -                debug_print "${FUNCNAME} - trying ${__dir}/${__file}" -        fi -        if [ ! -f "${__dir}/${__file}" ]; then -                # Top level, base -                __dir="${GTWS_LOC}/dockerfiles" -                __file="Dockerfile-base" -                debug_print "${FUNCNAME} - trying ${__dir}/${__file}" -        fi -        if [ ! -f "${__dir}/${__file}" ]; then -                die "Could not find a Dockerfile" || return 1 -        fi - -        debug_print "${FUNCNAME} - found ${__dir}/${__file}" -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'${__dir}/${__file}'" -        else -                echo "$__dir" -        fi -} - -# gtws_smopvn ${GTWS_SUBMODULE_ORIGIN:-${GTWS_ORIGIN}} ${GTWS_PROJECT} ${GTWS_PROJECT_VERSION} ${GTWS_WSNAME} smopvn -# -# Result will be in local variable smopvn.  Or: -# -# smopvn = $(gtws_smopvn ${GTWS_SUBMODULE_ORIGIN:-${GTWS_ORIGIN}} ${GTWS_PROJECT} ${GTWS_PROJECT_VERSION} ${GTWS_WSNAME}) -# -# Result will be in local variable smovpn -# -# Get the path to submodules for this workspace -function gtws_smopvn { -        local origin=$1 -        local project=$2 -        local version=$3 -        local name=$4 -        local  __resultvar=$5 -        local __smopv="${origin}/${project}/submodule" - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__smopv'" -        else -                echo "$__smopv" -        fi -} - -# gtws_opvn ${GTWS_ORIGIN} ${GTWS_PROJECT} ${GTWS_PROJECT_VERSION} ${GTWS_WSNAME} opvn -# -# Result will be in local variable opvn.  Or: -# -# opvn = $(gtws_opvn ${GTWS_ORIGIN} ${GTWS_PROJECT} ${GTWS_PROJECT_VERSION} ${GTWS_WSNAME}) -# -# Result will be in local variable opvn. -# -# Get the path to git repos for this workspace -function gtws_opvn { -        local origin=$1 -        local project=$2 -        local version=$3 -        local name=$4 -        local  __resultvar=$5 -        local __opv="${origin}/${project}/${version}" - -        if [[ $__opv == *:* ]]; then -                __opv="${__opv}/${name}" -                debug_print "remote; using opvn $__opv" -        elif [ ! -d "${__opv}" ]; then -                __opv="${origin}/${project}/git" -                if [ ! -d "${__opv}" ]; then -                        die "No opvn for ${origin} ${project} ${version}" || return 1 -                fi -        fi -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__opv'" -        else -                echo "$__opv" -        fi -} - -# gtws_submodule_url ${submodule} url -# -# Result will be in local variable url  Or: -# -# url = $(gtws_submodule_url ${submodule}) -# -# Result will be in local variable url -# -# Get the URL for a submodule -function gtws_submodule_url { -        local sub=$1 -        local  __resultvar=$2 -        local __url=$(git config --list | grep "submodule.*url" | grep "\<${sub}\>" | cut -d = -f 2) - -        if [ -z "${__url}" ]; then -                local rpath=${PWD} -                local subsub=$(basename "${sub}") -                cd "$(dirname "${sub}")" -                debug_print "${FUNCNAME} trying ${PWD}" -                __url=$(git config --list | grep submodule | grep "\<${subsub}\>" | cut -d = -f 2) -                cd "${rpath}" -        fi - -        debug_print "${FUNCNAME} $sub url: $__url" -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__url'" -        else -                echo "$__url" -        fi -} - -# gtws_submodule_mirror ${smopv} ${submodule} ${sub_sub_basename} mloc -# -# Result will be in local variable mloc  Or: -# -# mloc = $(gtws_submodule_mirror ${smopv} ${submodule} ${sub_sub_basename}) -# -# Result will be in local variable mloc -# -# Get the path to a local mirror of the submodule, if it exists -function gtws_submodule_mirror { -        local smopv=$1 -        local sub=$2 -        local sub_sub=$3 -        local  __resultvar=$4 -        local __mloc="" -        local url=$(gtws_submodule_url ${sub}) -        if [ -n "${url}" ]; then -                local urlbase=$(basename ${url}) -                # XXX TODO - handle remote repositories -                #if [[ ${smopv} == *:* ]]; then -                ## Remote SMOPV means clone from that checkout; I don't cm -                #refopt="--reference ${smopv}/${name}/${sub}" -                if [ -d "${smopv}/${urlbase}" ]; then -                        __mloc="${smopv}/${urlbase}" -                fi -        fi - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__mloc'" -        else -                echo "$__mloc" -        fi -} - -# gtws_submodule_paths subpaths -# -# Result will be in local variable subpaths  Or: -# -# subpaths = $(gtws_submodule_paths) -# -# Result will be in local variable subpaths -# -# Get the paths to submodules in a get repo.  Does not recurse -function gtws_submodule_paths { -        local  __resultvar=$1 -        local __subpaths=$(git submodule status | sed 's/^ *//' | cut -d ' ' -f 2) - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__subpaths'" -        else -                echo "$__subpaths" -        fi -} - -# gtws_submodule_clone [<base-submodule-path>] [<sub-sub-basename>] -# -# This will set up all the submodules in a repo.  Should be called from inside -# the parent repo -function gtws_submodule_clone { -        local smopv=$1 -        local sub_sub=$2 -        local sub_paths=$(gtws_submodule_paths) -        local rpath="${PWD}" - -        if [ -z "${smopv}" ]; then -                smopv=$(gtws_smopvn "${GTWS_SUBMODULE_ORIGIN:-${GTWS_ORIGIN}}" "${GTWS_PROJECT}" "${GTWS_PROJECT_VERSION}" "${GTWS_WSNAME}") -        fi -        git submodule init || die "${FUNCNAME}: Failed to init submodules" || return 1 -        for sub in ${sub_paths}; do -                local refopt="" -                local mirror=$(gtws_submodule_mirror "${smopv}" "${sub}" "${sub_sub}") -                debug_print "${FUNCNAME} mirror: ${mirror}" -                if [ -n "${mirror}" ]; then -                        refopt="--reference ${mirror}" -                fi -                git submodule update ${refopt} "${sub}" -                # Now see if there are recursive submodules -                cd "${sub}" -                gtws_submodule_clone "${smopv}/${sub}_submodule" "${sub}" || return 1 -                cd "${rpath}" -        done -} - -# gtws_repo_clone <base-repo-path> <repo> <branch> [<base-submodule-path>] [<target-directory>] -function gtws_repo_clone { -        local baserpath=${1%/} -        local repo=$2 -        local branch=$3 -        local basesmpath=$4 -        local rname=${5:-${repo%.git}} -        local rpath="${baserpath}/${repo}" -        local origpath=${PWD} - -        if [[ ${rpath} != *:* ]]; then -                if [ ! -d "${rpath}" ]; then -                        rpath="${rpath}.git" -                fi -        fi -        if [ -z "${basesmpath}" ]; then -                basesmpath="${baserpath}" -        fi -        debug_print "${FUNCNAME}: cloning ${baserpath} - ${repo} : ${branch} into ${GTWS_WSNAME}/${rname} submodules: ${basesmpath}" - -        # Main repo -        #git clone --recurse-submodules -b "${branch}" "${rpath}" || die "failed to clone ${rpath}:${branch}" || return 1 -        git clone -b "${branch}" "${rpath}" ${rname} || die "${FUNCNAME}: failed to clone ${rpath}:${branch}" || return 1 - -        # Update submodules -        cd "${rname}" || die "${FUNCNAME}: failed to cd to ${rpath}" || return 1 -        gtws_submodule_clone "${basesmpath}" || return 1 -        cd "${origpath}" || die "${FUNCNAME}: Failed to cd to ${origpath}" || return 1 - -        # Copy per-repo settings, if they exist -        gtws_cpdot "${baserpath%/git}/extra/repo/${rname}" "${origpath}/${rname}" - -        # Extra files -        for i in ${GTWS_FILES_EXTRA}; do -                local esrc= - -                IFS=':' read -ra ARR <<< "$i" -                if [ -n "${ARR[1]}" ]; then -                        dst="${rname}/${ARR[1]}" -                else -                        dst="${rname}/${ARR[0]}" -                fi - -                if [ -n "${GTWS_REMOTE_IS_WS}" ]; then -                        esrc="${baserpath}/${dst}" -                else -                        esrc="${baserpath%/git}" -                fi - -                gtws_rcp "${esrc}/${ARR[0]}" "${dst}" -        done -} - -# gtws_project_clone_default ${GTWS_ORIGIN} ${GTWS_PROJECT} ${GTWS_PROJECT_VERSION} ${GTWS_WSNAME} [${SUBMODULE_BASE}] -# -# Clone a version of a project into ${GTWS_WSPATH} (which is the current working directory).  This is the default version of this that clones <origin>/<project>/<version>/* -function gtws_project_clone_default { -        local origin=$1 -        local project=$2 -        local version=$3 -        local name=$4 -        local basesmpath=$5 -        local opv=$(gtws_opvn "${origin}" "${project}" "${version}" "${name}") -        local wspath=${PWD} -        local repos= -        local -A branches - -        if [ -z "${GTWS_PROJECT_REPOS}" ]; then -                for i in "${opv}"/*; do -                        repos="$(basename $i) $repos" -                        branches[$i]=${version} -                done -        else -                for i in ${GTWS_PROJECT_REPOS}; do -                        IFS=':' read -ra ARR <<< "$i" -                        repos="${ARR[0]} $repos" -                        if [ -n "${ARR[1]}" ]; then -                                branches[${ARR[0]}]=${ARR[1]} -                        else -                                branches[${ARR[0]}]=${version} -                        fi -                done -        fi - -        if [ -z "${basesmpath}" ] || [ ! -d "${basesmpath}" ]; then -                basesmpath="${opv}" -        fi - -        for repo in ${repos}; do -                gtws_repo_clone "${opv}" "${repo}" "${branches[${repo}]}" "${basesmpath}" -        done - -        # Copy per-WS settings, if they exist -        gtws_cpdot "${opv%/git}/extra/ws" "${wspath}" -} - -# gtws_repo_setup ${wspath} ${repo_path} -# -# The project can define gtws_repo_setup_local taking the same args to do -# project-specific setup.  It will be called last. -# -# Post-clone setup for an individual repo -function gtws_repo_setup { -        local wspath=$1 -        local rpath=$2 -        local savedir="${PWD}" - -        if [ ! -d "${rpath}" ]; then -                return 0 -        fi - -        cd "${rpath}/src" 2>/dev/null \ -                || cd ${rpath} \ -                || die "Couldn't cd to ${rpath}" || return 1 - -        maketags ${GTWS_MAKETAGS_OPTS} > /dev/null 2> /dev/null & - -        cd ${wspath} || die "Couldn't cd to ${wspath}" || return 1 - -        mkdir -p "${wspath}/build/$(basename ${rpath})" - -        cd "${savedir}" - -        if [ -n "$(declare -F | grep "\<gtws_repo_setup_local\>")" ]; then -                gtws_repo_setup_local "${wspath}" "${rpath}" \ -                        || die "local repo setup failed" || return 1 -        fi -} - -# gtws_project_setup${GTWS_WSNAME} ${GTWS_ORIGIN} ${GTWS_PROJECT} ${GTWS_PROJECT_VERSION} -# -# The project can define gtws_project_setup_local taking the same args to do -# project-specific setup.  It will be called last. -# -# Post clone setup of a workspace in ${GTWS_WSPATH} (which is PWD) -function gtws_project_setup { -        local wsname=$1 -        local origin=$2 -        local project=$3 -        local version=$4 -        local wspath=${PWD} -        local opv=$(gtws_opvn "${origin}" "${project}" "${version}" "placeholder") - -        for i in "${wspath}"/*; do -                gtws_repo_setup "${wspath}" "${i}" -        done - -        mkdir "${wspath}"/install -        mkdir "${wspath}"/chroots -        mkdir "${wspath}"/patches - -        if [ -n "$(declare -F | grep "\<gtws_project_setup_local\>")" ]; then -                gtws_project_setup_local "${wsname}" "${origin}" "${project}" \ -                        "${version}" || die "local project setup failed" || return 1 -        fi -} - -# load_rc /path/to/workspace -# -# This should be in the workspace-level gtwsrc file -# Recursively load all RC files, starting at / -function load_rc { -        local BASE=$(readlink -f "${1}") -        # Load base RC first -        debug_print "load_rc: Enter + Top: ${BASE}" -        source "${HOME}"/.gtwsrc -        while [ "${BASE}" !=  "/" ]; do -                if [ -f "${BASE}"/.gtwsrc ]; then -                        load_rc "$(dirname ${BASE})" -                        debug_print "\tLoading ${BASE}/.gtwsrc" -                        source "${BASE}"/.gtwsrc -                        return 0 -                fi -                BASE=$(readlink -f $(dirname "${BASE}")) -        done -        # Stop at / - -        return 1 -} - -# clear_env -# -# Clear the environment of GTWS_* except for the contents of GTWS_SAVEVARS. -# The default values for GTWS_SAVEVARS are below. -function clear_env { -        local savevars=${GTWS_SAVEVARS:-"LOC PROJECT PROJECT_VERSION VERBOSE WSNAME"} -        local verbose="${GTWS_VERBOSE}" -        debug_print "savevars=$savevars" - -        # Reset prompt -        if [ -n "${GTWS_SAVEPS1}" ]; then -                PS1="${GTWS_SAVEPS1}" -        fi -        if [ -n "${GTWS_SAVEPATH}" ]; then -                export PATH=${GTWS_SAVEPATH} -        fi -        unset LD_LIBRARY_PATH -        unset PYTHONPATH -        unset PROMPT_COMMAND -        unset CDPATH -        unset SDIRS - -        # Save variables -        for i in ${savevars}; do -                SRC=GTWS_${i} -                DST=SAVE_${i} -                debug_print "\t $i: ${DST} = ${!SRC}" -                eval ${DST}=${!SRC} -        done - -        # Clear GTWS evironment -        for i in ${!GTWS*} ; do -                if [ -n "${verbose}" ]; then -                        echo -e "unset $i" >&2 -                fi -                unset $i -        done - -        # Restore variables -        for i in ${savevars}; do -                SRC=SAVE_${i} -                DST=GTWS_${i} -                if [ -n "${verbose}" ]; then -                        echo -e "\t $i: ${DST} = ${!SRC}" >&2 -                fi -                if [ -n "${!SRC}" ]; then -                        eval export ${DST}=${!SRC} -                fi -                unset ${SRC} -        done -} - -# save_env ${file} ${nukevars} -# -# Save the environment of GTWS_* to the give file, except for the variables -# given to nuke.  The default values to nuke are given below. -function save_env { -        local fname=${1} -        local nukevars=${2:-"SAVEPATH ORIGIN WS_GUARD LOC SAVEPS1"} -        debug_print "nukevars=$nukevars" - -        for i in ${!GTWS*} ; do -                for j in ${nukevars}; do -                        if [ "${i}" == "GTWS_${j}" ]; then -                                debug_print "skipping $i" -                                continue 2 -                        fi -                done -                debug_print "saving $i" -                echo "export $i=\"${!i}\"" >> "${fname}" -        done -} - -# gtws_tmux_session_name ${PROJECT} ${VERSION} ${WSNAME} sesname -# -# Result will be in local variable sesname  Or: -# -# sesname = $(gtws_tmux_session_name ${PROJECT} ${VERSION} ${WSNAME}) -# -# Result will be in local variable sesname -# -# Get the tmux session name for a given workspace -function gtws_tmux_session_name { -        local project=$1 -        local version=$2 -        local wsname=$3 -        local  __resultvar=$4 -        local sesname="${project//./_}/${version//./_}/${wsname//./_}" - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$sesname'" -        else -                echo "$sesname" -        fi -} - -# gtws_tmux_session_info ${SESSION_NAME} running attached -# -# Determine if a session is running, and if it is attached -# -# Result will be in local variables running and attached -# -# Test with: -# if $running ; then -#       echo "is running" -# fi - -function gtws_tmux_session_info { -        local ses_name=$1 -        local  __result_running=$2 -        local  __result_attached=$3 - -        local __num_ses=$(tmux ls | grep "^${ses_name}" | wc -l) -        local __attached=$(tmux ls | grep "^${ses_name}" | grep attached) - -        echo "$ses_name ses=${__num_ses}" - -        if [[ "$__result_running" ]]; then -                if [ "${__num_ses}" != "0" ]; then -                        eval $__result_running="true" -                else -                        eval $__result_running="false" -                fi -        fi -        if [[ "$__result_attached" ]]; then -                if [ -n "${__attached}" ]; then -                        eval $__result_attached="true" -                else -                        eval $__result_attached="false" -                fi -        fi -} - -# gtws_tmux_kill ${BASENAME} -# -# Kill all sessiont matching a pattern -function gtws_tmux_kill { -        local basename=$1 -        local old_sessions=$(tmux ls 2>/dev/null | fgrep "${basename}" | cut -f 1 -d:) -        for session in ${old_sessions}; do -                tmux kill-session -t "${session}" -        done -} - -# gtws_tmux_cleanup -# -# Clean up defunct tmux sessions -function gtws_tmux_cleanup { -        local old_sessions=$(tmux ls 2>/dev/null | egrep "^[0-9]{14}.*[0-9]+\\)$" | cut -f 1 -d:) -        for session in ${old_sessions}; do -                tmux kill-session -t "${session}" -        done -} - -# gtws_tmux_attach ${SESSION_NAME} -# -# Attach to a primary session.  It will remain after detaching. -function gtws_tmux_attach { -        local ses_name=$1 - -        tmux attach-session -t "${ses_name}" -} - -# gtws_tmux_slave ${SESSION_NAME} -# -# Create a secondary session attached to the primary session.  It will exit it -# is detached. -function gtws_tmux_slave { -        local ses_name=$1 - -        # Session is is date and time to prevent conflict -        local session=`date +%Y%m%d%H%M%S` -        # Create a new session (without attaching it) and link to base session -        # to share windows -        tmux new-session -d -t "${ses_name}" -s "${session}" -        # Attach to the new session -        gtws_tmux_attach "${session}" -        # When we detach from it, kill the session -        tmux kill-session -t "${session}" -} - -function cdorigin() { -        if [ -n "$(declare -F | grep "gtws_project_cdorigin")" ]; then -                gtws_project_cdorigin $@ -        else -                gtws_cdorigin $@ -        fi -} - -function gtws_get_origin { -        local opv=$1 -        local target=$2 -        local __origin= -        local  __resultvar=$3 - -        # If it's a git repo with a local origin, use that. -        __origin=$(git config --get remote.origin.url) -        if [ ! -d "${__origin}" ]; then -                __origin="${__origin}.git" -        fi -        if [ ! -d "${__origin}" ]; then -                # Try to figure it out -                if [ ! -d "${opv}" ]; then -                        die "No opv for $target" || return 1 -                fi -                find_git_repo "${opv}" "${target}" __origin || return 1 -        fi - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$__origin'" -        else -                echo "$__origin" -        fi -} - -function gtws_cdorigin() { -        local opv=$(gtws_opvn "${GTWS_ORIGIN}" "${GTWS_PROJECT}" "${GTWS_PROJECT_VERSION}" "${GTWS_WSNAME}") -        local gitdir="" -        local target="" -        if [ -n "$1" ]; then -                target="$@" -        else -                git_top_dir gitdir || return 1 -                target=$(basename $gitdir) -        fi - -        gtws_get_origin $opv $target origin || return 1 -        cd "${origin}" -} - -# Copy files to another machine in the same workspace -function wsrcp { -        local target="${!#}" -        local length=$(($#-1)) -        local base=${PWD} - -        if [ -z "${1}" -o -z "${2}" ]; then -                echo "usage: ${FUNCNAME} <path> [<path>...] <target>" -                return 1 -        fi - -        for path in "${@:1:$length}"; do -                gtws_rcp "${path}" "${target}:${base}/${path}" -        done -} - -# Override "cd" inside the workspace to go to GTWS_WSPATH by default -function cd { -        if [ -z "$@" ]; then -                cd "${GTWS_WSPATH}" -        else -                builtin cd $@ -        fi -} - -# Generate diffs/interdiffs for changes and ship to WS on other boxes -function gtws_interdiff { -        local targets=$@ -        local target= -        local savedir=${PWD} -        local topdir=$(git_top_dir) -        local repo=$(basename ${topdir}) -        local mainpatch="${GTWS_WSPATH}/patches/${repo}-full.patch" -        local interpatch="${GTWS_WSPATH}/patches/${repo}-incremental.patch" - -        if [ -z "${targets}" ]; then -                echo "Usage: ${FUNCNAME} <targethost>" -                die "Must give targethost" || return 1 -        fi -        cd "${topdir}" -        if [ -f "${mainpatch}" ]; then -                git diff | interdiff "${mainpatch}" - > "${interpatch}" -        fi -        git diff > "${mainpatch}" -        for target in ${targets}; do -                gtws_rcp "${mainpatch}" "${interpatch}" \ -                        "${target}:${GTWS_WSPATH}/patches" -        done -        cd "${savedir}" -} - -function gtws_debug { -        local cmd=$1 -        if [ -z "${cmd}" ]; then -                echo "Must give a command" -                echo -                die "${FUNCNAME} <cmd-path>" || return 1 -        fi -        local cmdbase=$(basename $cmd) -        local pid=$(pgrep "${cmdbase}") - -        ASAN_OPTIONS="abort_on_error=1" cgdb ${cmd} ${pid} -} - -# remote_cmd "${target}" "${command}" output -# -# Result will be in local variable output  Or: -# -# output = $(remote_cmd "${target}" "${command}") -# -# Result will be in local variable output -# -# Run a command remotely and capture sdtout.  Make sure to quote the command -# appropriately. -remote_cmd() { -        local target=$1 -        local cmd=$2 -        local  __resultvar=$3 -        local output= - -        if [ -z "${GTWS_VERBOSE}" ]; then -                output=$(ssh "${target}" "${cmd}" 2>/dev/null) -        else -                output=$(ssh "${target}" "${cmd}") -        fi -        local ret=$? - -        if [[ "$__resultvar" ]]; then -                eval $__resultvar="'$output'" -        else -                echo "${output}" -        fi -        return ${ret} -} -``` -------------------------------------------------------------------------------- @@ -1139,7 +162,7 @@ via: https://opensource.com/article/20/2/git-great-teeming-workspaces 作者:[Daniel Gryniewicz][a] 选题:[lujun9972][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From ea687cb5ad34f0b2ce476096fa3767e783d0a110 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 27 Apr 2020 18:23:04 +0800 Subject: [PATCH 286/394] PUB @lxbwolf https://linux.cn/article-12156-1.html --- ...ge complex Git workspaces with Great Teeming Workspaces.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md (99%) diff --git a/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md b/published/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md similarity index 99% rename from translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md rename to published/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md index 683f3dc313..9ae4ee5618 100644 --- a/translated/tech/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md +++ b/published/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12156-1.html) [#]: subject: (Manage complex Git workspaces with Great Teeming Workspaces) [#]: via: (https://opensource.com/article/20/2/git-great-teeming-workspaces) [#]: author: (Daniel Gryniewicz https://opensource.com/users/dang) From 462acb38c1bd5a819fc75a1def6370c72c6f64e9 Mon Sep 17 00:00:00 2001 From: luzw3 Date: Mon, 27 Apr 2020 18:37:34 +0800 Subject: [PATCH 287/394] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E8=AF=91=E6=96=87=20?= =?UTF-8?q?tech/20200424=20What=20you=20need=20to=20know=20about=20open=20?= =?UTF-8?q?source=20ad=20blockers.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d to know about open source ad blockers.md | 55 ------------------- ...d to know about open source ad blockers.md | 55 +++++++++++++++++++ 2 files changed, 55 insertions(+), 55 deletions(-) delete mode 100644 sources/tech/20200424 What you need to know about open source ad blockers.md create mode 100644 translated/tech/20200424 What you need to know about open source ad blockers.md diff --git a/sources/tech/20200424 What you need to know about open source ad blockers.md b/sources/tech/20200424 What you need to know about open source ad blockers.md deleted file mode 100644 index 1be2a98950..0000000000 --- a/sources/tech/20200424 What you need to know about open source ad blockers.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (CrazyShipOne) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What you need to know about open source ad blockers) -[#]: via: (https://opensource.com/article/20/4/ad-blockers) -[#]: author: (Joshua Pearce https://opensource.com/users/jmpearce) - -What you need to know about open source ad blockers -====== -Three open source ad blockers were tested against a "no ad blocker" -control. -![Browser of things][1] - -A new [study][2] meant to investigate energy conservation of free and open source ad blockers has unexpectedly shown that Internet ads are wasting shocking amounts of your time. - -More importantly, the results show how you can get that time back. The study estimates that the average Internet user would save over 100 hours a year by using [uBlock Origi][3][n][3][,][3] a free and open source ad blocker. uBlock Origin was the most effective ad blocker tested, but all ad blockers save time, energy and money according to the study. - -![Ad blocker screen comparison][4] - -The results show that page load time dropped 11% with [AdBlock+][5], 22% with [Privacy Badger][6], and 28% with [uBlock Origi][3][n][3]. These are not significant on a single page, but Internet users spend more than half of their time online rapidly clicking through websites, spending less than 15 seconds on a given page. With all these clicks, the additional time to load ads really starts to add up. - -The article _[Energy Conservation with Open Source Ad Blockers][7]_, published in the journal _Technologies,_ was originally conceived to address rising energy consumption. Internet-related electricity consumption is rising rapidly as global Internet users spend more than 6.5 hours per day online. Americans, for example, have more than doubled the time they spend online since 2000 to almost 24 hours a week. Open source ad blockers have the potential to reduce the time, and thus the electricity, spent by eliminating ads during Internet browsing and video streaming. - -In the study, three open source ad blockers were tested against a "no ad blocker" control. Page load times were recorded for browsing a representative selection of the most-accessed websites worldwide, including web searching (Google, Yahoo, Bing), information (Weather.com, Wikipedia), and news sites (CNN, Fox, New York Times). In addition, the study analyzed the time spent watching ads on videos for both trending and non-trending content. This part of the study was more challenging due to the lack of data on the ratio of YouTube watching time spent on trending vs. non-trending content. The time wasted viewing ads per video ranged from 0.06% up to a staggering 21%. Thus, the total hours lost to loading ads was only recorded for browsing. - -Overall, the results showed that the energy wasted loading ads is not trivial. As a lot of the electricity used for running computers continues to come from coal, which causes air pollution and premature death, the study analyzed the potential for ad blockers to save American lives. The results were shocking: the energy conserved if everyone in the United States used the open source ad blocker would save over 36 American lives per year. - -Electricity costs money, so cutting ads could also save consumers money. In the United States, if all Internet users enabled Privacy Badger on their computers, Americans would save more than $91 million annually. Globally, the results of the investigation were even more striking. uBlock Origin could save global consumers more than $1.8 billion a year. - -This study was done before everyone was forced to stay home because of the COVID-19 pandemic, so all the values can be viewed as conservative underestimates. Overall, the study found open source ad blockers are a potentially effective technology for energy conservation. - -Although free and open source ad blockers save energy and are good for the environment, you are probably going to use them primarily to block annoying ads and save yourself time. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/ad-blockers - -作者:[Joshua Pearce][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/jmpearce -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things) -[2]: https://www.mdpi.com/2227-7080/8/2/18 -[3]: https://github.com/gorhill/uBlock -[4]: https://opensource.com/sites/default/files/uploads/os_ad_blocker_story_.png (Ad blocker screen comparison) -[5]: https://adblockplus.org/ -[6]: https://privacybadger.org/ -[7]: https://www.academia.edu/42434401/Energy_Conservation_with_Open_Source_Ad_Blockers diff --git a/translated/tech/20200424 What you need to know about open source ad blockers.md b/translated/tech/20200424 What you need to know about open source ad blockers.md new file mode 100644 index 0000000000..981a892257 --- /dev/null +++ b/translated/tech/20200424 What you need to know about open source ad blockers.md @@ -0,0 +1,55 @@ +[#]: collector: (lujun9972) +[#]: translator: (CrazyShipOne) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What you need to know about open source ad blockers) +[#]: via: (https://opensource.com/article/20/4/ad-blockers) +[#]: author: (Joshua Pearce https://opensource.com/users/jmpearce) + +关于开源广告拦截器你需要知道的事 +====== +三个开源广告拦截器针对“无广告拦截器"的情况进行了测试。 +![Browser of things][1] + +一项为了调查免费开源广告拦截器节能情况的[研究][2],意外地发现了互联网广告正在浪费你大量的时间。 + +更重要的是,研究结果表明了你可以挽救回失去的时间。这项研究评估发现,使用 [uBlock Origin][3](一个开源免费的广告拦截器)的情况下平均每个网民一年可以节约超过 100 个小时的时间。 uBlock Origin 是测试中最节能的广告拦截器,不过其他的广告拦截器也为网民节省了时间,能源以及金钱。 + +![Ad blocker screen comparison][4] + +在研究结果中,[AdBlock+][5] 减少了11 % 的页面加载时间,[Privacy Badger][6] 减少了22 %,[uBlock Origin][3] 减少了28 %。对于单独一个页面来说这个时间並不算多,但是网民们浏览页面时常常花费半数以上的时间在网站上快速点击,并且通常在一个页面停留少于 15 秒。鉴于这种情况,加载广告的额外时间增加了许多。 + +发布于 _Technologies_ 杂志上的 _[Energy Conservation with Open Source Ad Blockers][7]_ 最初旨在解决日益增长的能源消耗问题。由于全球网民每日花费超过 6.5 小时上网冲浪,互联网相关用电量正在快速地增加。比如,美国自 2000 年以来网上冲浪时间已经翻倍至几乎一周24小时的时间。开源广告拦截器通过消灭网上冲浪和观看视频时产生的广告,具有节约能源和时间的潜力。 + +在研究过程中,三个开源广告拦截器针对“无广告拦截器”情况进行了测试。一系列全世界最具代表性访问最频繁网站的页面加载时间被记录在案,其中包括搜索引擎(Google,Yahoo,Bing),信息网站(Weather.com,Wikipedia)以及新闻门户(CNN,Fox,New York Times)。除此之外,研究还分析了观看流行与非流行视频内容时广告所花费的时间。这部分研究由于缺乏 Youtube 上流行和非流行内容观看比例的数据而非常具有挑战性。每个视频浪费的广告时间可以从 0.06 % 上升到惊人的 21 %。而且,这还只是浏览器上记录的加载广告而失去的时间。 + +总的来说,研究结果表明加载广告所浪费的能源并不是最重要的。由于运行计算机所需的大量电能来自于造成空气污染和人类减寿的煤炭,研究分析了广告拦截器挽救美国人生命的潜在可能性。结果是令人震惊的:如果每一个美国人使用开源广告拦截器,所节约的能源每年将会拯救超过36个美国人的生命 + +电能即金钱,所以削减广告也可以为消费者节约钱财。在美国,如果所有的网民都在他们的电脑上开启 [Privacy Badger][8],美国人每年可以节约超过 9100 万美元。全球的研究结果则更令人吃惊。uBlock Origin 每年可以为全球消费者节约 18 亿美元。 + +这项研究开始于人们因为新冠肺炎大流行而被迫居家之前,因此所有的数据都可以被认为是保守的估算。整体来说,研究发现了开源广告拦截器是一项潜在的可以节约能源的有效技术。 + +虽然免费的开源广告拦截器可以节约能源并且对自然环境友好,但是可能你只是因为它们可以拦截烦人的广告以节省时间而使用它们。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/ad-blockers + +作者:[Joshua Pearce][a] +选题:[lujun9972][b] +译者:[CrazyShipOne](https://github.com/CrazyShipOne) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jmpearce +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things) +[2]: https://www.mdpi.com/2227-7080/8/2/18 +[3]: https://github.com/gorhill/uBlock +[4]: https://opensource.com/sites/default/files/uploads/os_ad_blocker_story_.png (Ad blocker screen comparison) +[5]: https://adblockplus.org/ +[6]: https://privacybadger.org/ +[7]: https://www.academia.edu/42434401/Energy_Conservation_with_Open_Source_Ad_Blockers +[8]: https://privacybadger.org/ From 060d673bb066fc5da5a58b18b7488ab3844e030d Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Mon, 27 Apr 2020 20:41:28 +0800 Subject: [PATCH 288/394] APL --- sources/tech/20200425 Inlining optimisations in Go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200425 Inlining optimisations in Go.md b/sources/tech/20200425 Inlining optimisations in Go.md index 3784d6868b..0e29d0d178 100644 --- a/sources/tech/20200425 Inlining optimisations in Go.md +++ b/sources/tech/20200425 Inlining optimisations in Go.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From cad96ad4d31b19ad60adbfd86f3e9f6a43fd172e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 27 Apr 2020 22:01:57 +0800 Subject: [PATCH 289/394] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @CrazyShipOne 恭喜你,完成了第一篇翻译贡献! --- ...d to know about open source ad blockers.md | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/translated/tech/20200424 What you need to know about open source ad blockers.md b/translated/tech/20200424 What you need to know about open source ad blockers.md index 981a892257..670a16fce6 100644 --- a/translated/tech/20200424 What you need to know about open source ad blockers.md +++ b/translated/tech/20200424 What you need to know about open source ad blockers.md @@ -1,36 +1,37 @@ [#]: collector: (lujun9972) [#]: translator: (CrazyShipOne) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What you need to know about open source ad blockers) [#]: via: (https://opensource.com/article/20/4/ad-blockers) [#]: author: (Joshua Pearce https://opensource.com/users/jmpearce) -关于开源广告拦截器你需要知道的事 +开源的广告拦截器不但节能,而且能拯救生命! ====== -三个开源广告拦截器针对“无广告拦截器"的情况进行了测试。 -![Browser of things][1] +> 三个开源广告拦截器与“无广告拦截器”对照组进行了测试。 -一项为了调查免费开源广告拦截器节能情况的[研究][2],意外地发现了互联网广告正在浪费你大量的时间。 +![](https://img.linux.net.cn/data/attachment/album/202004/27/220109b86sidn56sn6inoh.jpg) -更重要的是,研究结果表明了你可以挽救回失去的时间。这项研究评估发现,使用 [uBlock Origin][3](一个开源免费的广告拦截器)的情况下平均每个网民一年可以节约超过 100 个小时的时间。 uBlock Origin 是测试中最节能的广告拦截器,不过其他的广告拦截器也为网民节省了时间,能源以及金钱。 +一项旨在调查自由开源的广告拦截器节能的情况的[研究][2],意外地发现了互联网广告正在浪费你大量的时间。 + +更重要的是,研究结果表明了你可以挽救回这些失去的时间。这项研究评估发现,使用 [uBlock Origin][3](一个开源免费的广告拦截器)的情况下平均每个网民一年可以节约超过 100 个小时的时间。uBlock Origin 是测试中最有效的广告拦截器,不过其他的广告拦截器也为网民节省了时间、能源以及金钱。 ![Ad blocker screen comparison][4] -在研究结果中,[AdBlock+][5] 减少了11 % 的页面加载时间,[Privacy Badger][6] 减少了22 %,[uBlock Origin][3] 减少了28 %。对于单独一个页面来说这个时间並不算多,但是网民们浏览页面时常常花费半数以上的时间在网站上快速点击,并且通常在一个页面停留少于 15 秒。鉴于这种情况,加载广告的额外时间增加了许多。 +在研究结果中,[AdBlock+][5] 减少了 11% 的页面加载时间,[Privacy Badger][6] 减少了 22%,[uBlock Origin][3] 减少了 28%。对于单独一个页面来说这个时间並不算多,但是网民们一半以上的浏览时间都是在网站间快速跳转,通常在一个页面停留少于 15 秒。鉴于这种情况,加载广告的额外时间加起来就很多了。 -发布于 _Technologies_ 杂志上的 _[Energy Conservation with Open Source Ad Blockers][7]_ 最初旨在解决日益增长的能源消耗问题。由于全球网民每日花费超过 6.5 小时上网冲浪,互联网相关用电量正在快速地增加。比如,美国自 2000 年以来网上冲浪时间已经翻倍至几乎一周24小时的时间。开源广告拦截器通过消灭网上冲浪和观看视频时产生的广告,具有节约能源和时间的潜力。 +发布于 Technologies 杂志上的《[用开源的广告拦截器节能][7]》一文最初旨在解决日益增长的能源消耗问题。随着全球网民每日上网时间超过 6.5 小时,与互联网相关的用电量正在快速地增加。以美国人为例,自 2000 年他们的上网时间已经增加了一倍,几乎达到每周 24 小时。开源广告拦截器通过消灭上网和观看视频时产生的广告,潜在地减少了时间,从而减少用电。 -在研究过程中,三个开源广告拦截器针对“无广告拦截器”情况进行了测试。一系列全世界最具代表性访问最频繁网站的页面加载时间被记录在案,其中包括搜索引擎(Google,Yahoo,Bing),信息网站(Weather.com,Wikipedia)以及新闻门户(CNN,Fox,New York Times)。除此之外,研究还分析了观看流行与非流行视频内容时广告所花费的时间。这部分研究由于缺乏 Youtube 上流行和非流行内容观看比例的数据而非常具有挑战性。每个视频浪费的广告时间可以从 0.06 % 上升到惊人的 21 %。而且,这还只是浏览器上记录的加载广告而失去的时间。 +在研究过程中,对三个开源广告拦截器与“无广告拦截器”对照组进行了测试。研究人员记录了浏览全球访问量最大的网站的页面加载时间,其中包括网络搜索(谷歌、雅虎、必应)、信息(Weather.com、维基百科)和新闻网站(CNN、福克斯、纽约时报)。除此之外,研究还分析了观看流行与非流行视频内容时广告所花费的时间。这部分研究由于缺乏 Youtube 上流行和非流行内容观看比例的数据而非常具有挑战性。每个视频浪费在广告观看上的时间可以从 0.06% 到惊人的 21% 不等。而且,这还只是浏览器上记录的加载广告而失去的时间。 -总的来说,研究结果表明加载广告所浪费的能源并不是最重要的。由于运行计算机所需的大量电能来自于造成空气污染和人类减寿的煤炭,研究分析了广告拦截器挽救美国人生命的潜在可能性。结果是令人震惊的:如果每一个美国人使用开源广告拦截器,所节约的能源每年将会拯救超过36个美国人的生命 +总的来说,研究结果表明加载广告所浪费的能源并不是是小事。由于运行电脑所使用的大量电力仍然来自于煤炭,而煤炭会造成空气污染和过早死亡,因此该研究分析了广告拦截器拯救美国人生命的潜力。(LCTT 译注:由于这项研究是美国人完成的,所以这里仅提及了美国人,但是同理可推至全球。)结果是令人震惊的:如果美国人都使用开源广告拦截器,每年节约的能源将会拯救超过 36 个美国人的生命。 -电能即金钱,所以削减广告也可以为消费者节约钱财。在美国,如果所有的网民都在他们的电脑上开启 [Privacy Badger][8],美国人每年可以节约超过 9100 万美元。全球的研究结果则更令人吃惊。uBlock Origin 每年可以为全球消费者节约 18 亿美元。 +电能即金钱,所以削减广告也可以为消费者节约钱财。在美国,如果所有的网民都在他们的电脑上开启 [Privacy Badger][8],美国人每年可以节约超过 9100 万美元。在全球范围内,调查研究的结果则更令人吃惊。uBlock Origin 每年可以为全球消费者节约 18 亿美元。 -这项研究开始于人们因为新冠肺炎大流行而被迫居家之前,因此所有的数据都可以被认为是保守的估算。整体来说,研究发现了开源广告拦截器是一项潜在的可以节约能源的有效技术。 +这项研究始于人们因为新冠肺炎大流行而被迫居家之前,因此所有的数据都可以被认为是保守的估算。整体来说,研究发现了开源广告拦截器是一项潜在的节能技术。 -虽然免费的开源广告拦截器可以节约能源并且对自然环境友好,但是可能你只是因为它们可以拦截烦人的广告以节省时间而使用它们。 +虽然自由开源的广告拦截器可以节约能源,对自然环境也有好处,但你可能主要是为了拦截恼人的广告和节省自己的时间而使用它们。 -------------------------------------------------------------------------------- @@ -39,7 +40,7 @@ via: https://opensource.com/article/20/4/ad-blockers 作者:[Joshua Pearce][a] 选题:[lujun9972][b] 译者:[CrazyShipOne](https://github.com/CrazyShipOne) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1dc9b3607e1530751eaca54b5a993100c6452f6a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Mon, 27 Apr 2020 22:03:12 +0800 Subject: [PATCH 290/394] PUB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @CrazyShipOne 本文首发地址: https://linux.cn/article-12157-1.html 你的 LCTT 专页: https://linux.cn/lctt/CrazyShipOne 请注册以领取 LCCN:https://lctt.linux.cn/ --- ...424 What you need to know about open source ad blockers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200424 What you need to know about open source ad blockers.md (98%) diff --git a/translated/tech/20200424 What you need to know about open source ad blockers.md b/published/20200424 What you need to know about open source ad blockers.md similarity index 98% rename from translated/tech/20200424 What you need to know about open source ad blockers.md rename to published/20200424 What you need to know about open source ad blockers.md index 670a16fce6..c28cbc6080 100644 --- a/translated/tech/20200424 What you need to know about open source ad blockers.md +++ b/published/20200424 What you need to know about open source ad blockers.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (CrazyShipOne) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12157-1.html) [#]: subject: (What you need to know about open source ad blockers) [#]: via: (https://opensource.com/article/20/4/ad-blockers) [#]: author: (Joshua Pearce https://opensource.com/users/jmpearce) From 909b8c9d284298ac227520a33c91e11991d572b2 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 28 Apr 2020 00:52:47 +0800 Subject: [PATCH 291/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20Lubunt?= =?UTF-8?q?u=2020.04=20Review:=20Lightweight,=20Minimalistic,=20Polished?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 Lubuntu 20.04 Review- Lightweight, Minimalistic, Polished.md --- ...ew- Lightweight, Minimalistic, Polished.md | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 sources/tech/20200428 Lubuntu 20.04 Review- Lightweight, Minimalistic, Polished.md diff --git a/sources/tech/20200428 Lubuntu 20.04 Review- Lightweight, Minimalistic, Polished.md b/sources/tech/20200428 Lubuntu 20.04 Review- Lightweight, Minimalistic, Polished.md new file mode 100644 index 0000000000..c6857014ef --- /dev/null +++ b/sources/tech/20200428 Lubuntu 20.04 Review- Lightweight, Minimalistic, Polished.md @@ -0,0 +1,154 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Lubuntu 20.04 Review: Lightweight, Minimalistic, Polished) +[#]: via: (https://itsfoss.com/lubuntu-20-04-review/) +[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) + +Lubuntu 20.04 Review: Lightweight, Minimalistic, Polished +====== + +_**Lubuntu 20.04 LTS is significantly different than its previous LTS version. It is aiming to give you a more polished experience rather than just focusing on older computer. Read more about it as I review Lubuntu 20.04.**_ + +### Lubuntu 20.04 Review: First LTS release with LXQt + +I have been using Lubuntu 20.04 from a few days before the release. I usually dwell in Arch world with Manjaro and Cinnamon desktop so using Lubuntu was a pleasant change for me. + +Here’s what I have noticed and felt about Lubuntu 20.04. + +#### Bye bye LXDE, Hello LXQt! + +For a long time, [Lubuntu][1] relied on [LXDE][2] to provide a lightweight Linux experience. It now uses LXQt desktop environment. + +[LXDE][3] is based on GTK (the libraries used by GNOME) and more specifically on GTK+ 2 which is dated in 2020. Dissatisfied with GTK+ 3, LXDE developer Hong Jen Yee decided to port the entire desktop to Qt (the libraries used by KDE). LXDE, the Qt port of it, and the [Razor-qt][4] project were combined to form [LXQt][5]. Although today, LXDE and LXQt coexist as separate projects. + +Since LXDE developer itself is focusing on LXQt, it makes no sense for Lubuntu to stick with a desktop environment that had its last stable release more than three years ago. + +Lubuntu 18.04 is the last version of with [LXDE][3]. Fortunately it’s a long term support edition. It will be supported officially by Lubuntu team till 2021. + +![][6] + +#### Not exclusively for older machines + +As the definition of “older machine” has changed in 2020 Lubuntu 18.04 is the last 32bit version. Nowadays even a 10 year old machine comes with at least 2 gigabytes of ram and a dual-core 64bit processor. + +As per that, [Lubuntu Team will no longer provide minimum system requirements and will no longer primarily focus on older hardware][7]. Although LXQt is still a lightweight, classic yet polished and feature rich desktop environment. + +The First Lubuntu release with LXQt was 18.10, giving the developers three standard releases to perfect the LXQt desktop before the Lubuntu 20.04 LTS release, which is a good development strategy. + +#### Not the regular Ubiquity, Lubuntu 20.04 uses Calamares installer + +![Lubuntu 20.04 Calamares Installer][8] + +A fresh installation begins with the new [Calamares][9] installer, in place of the Ubiquity installer that other [official Ubuntu flavors][10] use. + +The whole process is done in approximately 10 minutes, slightly faster than the previous Lubuntu releases. + +As the .iso comes with the essential applications pre-installed you can get your system fully configured pretty fast too. + +#### No upgrade from Lubuntu 18.04 to Lubuntu 20.04 + +Normally, you can [upgrade Ubuntu from one LTS to another LTS release][11]. But Lubuntu team advises not to upgrade from Lubuntu 18.04 to 20.04. They recommend a fresh install and rightly so. + +Lubuntu 18.04 used LXDE desktop while 20.04 uses LXQt. Due to the extensive changes in the desktop environments, upgrading to 20.04 from 18.04 will result in a broken system. + +#### **More KDE and Qt applications** + +![][12] + +Here are some of the applications that are available by default in this new release and as I can see, not all of them are lightweight and most of them are Qt-based. + +Even the software center used is KDE’s Discover instead of Ubuntu’s GNOME software center. + + * Ark – archive manager + * Bluedevil – bluetooth connector + * Discover Software Center – package management system + * FeatherPad – text editor + * FireFox – web browser + * K3b – CD/DVD burner + * Kcalc – calculator + * KDE partition manager – partition manager + * LibreOffice – Office suite (Qt interface version) + * LXimage-Qt – image viewer and screenshot tool + * Muon – package manager + + + * Noblenote – note taker + * PCManFM-Qt – File manager + * Qlipper – clipboard manager + * qPDFview – PDF viewer + * PulseAudio – audio controller + * Qtransmission – bittorrent client (Qt interface version) + * Quassel – IRC client + * ScreenGrab – Screenshot creator + * Skanlite – scanning + * Startup Disk Creator – USB boot disk maker + * Trojita – email client + * VLC – media player + * [MPV video player][13] + + + +#### Testing Lubuntu 20.04 LTS + +Boot times on the LXQt version of Lubuntu are under a minute, booting from an SSD though. + +LXQt currently requires slightly more memory than the Gtk+ v2-based LXDE, but the alternative Gtk+ v3 toolkit would also have required more memory. + +After a reboot the system runs approximately at a very low of 340 MB for the modern standards, 100 MB more than LXDE. + +![htop running on Lubuntu 20.04][14] + +LXQt is not only for users with an older hardware but also for those who are seeking a simple and classic experience at their new machine. + +The desktop layout looks similar to KDE’s Plasma desktop, don’t you think? + +![Lubuntu 20.04 Desktop][15] + +There’s an application menu in the lower-left corner, a taskbar for pinned and active applications, and a system tray in the lower-right corner. + +Lubuntu in its LXQt version can be easily customized and everything is in the menu under preferences, with most key items under LXQt Settings. + +It is worth-mentioning that LXQt uses the popular [Openbox window manager][16] by default. + +Like the last three releases, 20.04 LTS comes with a default dark theme Lubuntu Arc, but it is quick and easy to change it if it doesn’t suit your taste. + +In daily use, Lubuntu 20.04 has proven to me completely trouble-free as every Ubuntu flavour in fact. + +#### Conclusion + +Lubuntu team has successfully made the transition to a modern, still lightweight and minimal desktop environment. LXDE looks like abandoned and it is a good thing to move away to an active project. + +I hope that Lubuntu 20.04 makes you as much enthusiastic as I am, and if so don’t hesitate to let me know at the comments below. Stay tuned! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/lubuntu-20-04-review/ + +作者:[Dimitrios Savvopoulos][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/dimitrios/ +[b]: https://github.com/lujun9972 +[1]: https://lubuntu.me/ +[2]: https://github.com/lxde +[3]: https://lxde.org/ +[4]: https://web.archive.org/web/20160220061334/http://razor-qt.org/ +[5]: https://lxqt.org/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Lubuntu-20-04-review.jpg?ssl=1 +[7]: https://itsfoss.com/lubuntu-no-more-old-distro/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/lubuntu-20-04-installer.jpg?ssl=1 +[9]: https://calamares.io/ +[10]: https://itsfoss.com/which-ubuntu-install/ +[11]: https://itsfoss.com/upgrade-ubuntu-version/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/Lubuntu-20.04.gif?ssl=1 +[13]: https://itsfoss.com/mpv-video-player/ +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/htop.jpg?fit=800%2C629&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/Lubuntu-20.04-desktop.jpg?fit=800%2C450&ssl=1 +[16]: https://en.wikipedia.org/wiki/Openbox From a9b137c8958749f4bcd0879a01ef6f0848374cbb Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 28 Apr 2020 00:55:09 +0800 Subject: [PATCH 292/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20Using?= =?UTF-8?q?=20Files=20and=20Folders=20on=20Desktop=20Screen=20in=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md --- ...and Folders on Desktop Screen in Ubuntu.md | 100 ++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md diff --git a/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md b/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md new file mode 100644 index 0000000000..40105e3aed --- /dev/null +++ b/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md @@ -0,0 +1,100 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using Files and Folders on Desktop Screen in Ubuntu) +[#]: via: (https://itsfoss.com/add-files-on-desktop-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Using Files and Folders on Desktop Screen in Ubuntu +====== + +_**This beginner tutorial discusses a few difficulties you may face while adding files and folders on the desktop screen on Ubuntu.**_ + +I know a few people who are habitual of putting all the important/frequently used files on the desktop screen for quick access. + +![][1] + +I am not a fan of a cluttered desktop screen but I can imagine that it might actually be helpful to some people. + +For the past few releases, it has been difficult to add files on the desktop screen in Ubuntu’s default GNOME desktop. It’s not really Ubuntu’s fault. + +The [GNOME][2] developers thinks that there is no place for icons and files on the desktop screen. There is no need of putting files on the desktop when you can easily search for it in the menu. And that’s part true. + +This is why the newer version of [GNOME’s File Manager Nautilus][3] doesn’t support icons and files on the desktop very well. + +That said, it’s not impossible to add files and folders on the desktop. Let me show you how you can still use it. + +### Adding files and folders on the desktop screen in Ubuntu + +![][4] + +I am using Ubuntu 20.04 in this tutorial. The steps may or may not vary for other Ubuntu versions. + +#### Add the files and folders to the “Desktop folder” + +If you open the file manager, you should see an entry called Desktop in the left sidebar or in the folders list. This folder represents your desktop screen (in a way). + +![Desktop folder can be used to add files to the desktop screen][5] + +Anything you add to this folder will be reflected on the desktop screen. + +![Anything added to the Desktop folder will be reflected on the desktop screen][6] + +If you delete files from this ‘Desktop folder’, it will be removed from the desktop screen as well. + +#### Drag and drop files to desktop screen doesn’t work + +Now, if you try to drag and drop files from the file manager on the desktop, it won’t work. It’s not a bug, it’s a feature that irks a lot of people. + +A workaround would be to open two instances of the file manager. Open Desktop folder in one of them and then drag and drop files to this folder and they will be added on the desktop. + +I know that’s not ideal but you don’t have a lot of choices here. + +#### You cannot use Ctrl+C and Ctrl+V to copy-paste on the desktop, use the right click menu + +To add salt to injury, you cannot use Ctrl+V the famous keyboard shortcut to paste files on the desktop screen. + +But you can still use the right click context menu and select Paste from there to put the copied files on the desktop. You can even create new folders this way. + +![Right click menu can be used for copy-pasting files to desktop][7] + +Does it make sense? Not to me but that’s how it is in Ubuntu 20.04. + +#### You cannot delete files and folder using the Delete key, use the right click menu again + +What’s worse is that you cannot use the delete key or shift delete key to remove files from the desktop screen. But you can still right click on the files or folders and select “Move to trash” to delete the file. + +![Delete files from desktop using right click][8] + +Alright, so now you know that at least there is a way to add files on the desktop with some restrictions. But it doesn’t end here unfortunately. + +You cannot search for files with their names on the desktop screen. Normally, if you start typing ‘abc’, files starting with ‘abc’ are highlighted. You don’t get it here. + +I don’t know why so many restrictions have been put on adding files on the desktop. Thankfully, I don’t use it a lot otherwise I have been way too frustrated. + +If interested, you may read about [adding application shortcut on the desktop in Ubuntu][9] as well. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/add-files-on-desktop-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://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/files-on-desktop-ubuntu.jpg?ssl=1 +[2]: https://www.gnome.org/ +[3]: https://wiki.gnome.org/Apps/Files +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-files-desktop-ubuntu.png?ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/desktop-folder-ubuntu.png?ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-files-desktop-screen-ubuntu.jpg?ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/adding-new-files-ubuntu-desktop.jpg?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/delete-files-from-desktop-ubuntu.jpg?ssl=1 +[9]: https://itsfoss.com/ubuntu-desktop-shortcut/ From 8522d8fd9a834046262f65c769c6a3490abe3677 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 28 Apr 2020 00:55:58 +0800 Subject: [PATCH 293/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200427=20How=20?= =?UTF-8?q?to=20secure=20your=20Linux=20email=20services=20with=20SSL/TLS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200427 How to secure your Linux email services with SSL-TLS.md --- ... your Linux email services with SSL-TLS.md | 209 ++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 sources/tech/20200427 How to secure your Linux email services with SSL-TLS.md diff --git a/sources/tech/20200427 How to secure your Linux email services with SSL-TLS.md b/sources/tech/20200427 How to secure your Linux email services with SSL-TLS.md new file mode 100644 index 0000000000..163e6b017f --- /dev/null +++ b/sources/tech/20200427 How to secure your Linux email services with SSL-TLS.md @@ -0,0 +1,209 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to secure your Linux email services with SSL/TLS) +[#]: via: (https://opensource.com/article/20/4/securing-linux-email) +[#]: author: (Marc Skinner https://opensource.com/users/marc-skinner) + +How to secure your Linux email services with SSL/TLS +====== +Protect your Linux email services by understanding security +certificates. +![email or newsletters via inbox and browser][1] + +Traditionally, email services send data in an unprotected way—whether you are sending emails via SMTP or receiving them via IMAP or POP, the defaults are in cleartext. With more online applications enforcing encryption and the general consensus to protect your data, it's best to secure your email services with a Secure Sockets Layer/Transport Layer Security (SSL/TLS) security certificate. + +First, a quick review of email services and protocols. Email is sent via a service called Simple Mail Transport Protocol (SMTP) using TCP port 25. This protocol sends emails from server to server based on DNS mail exchanger (MX) record lookups. Once an email is on the email server, it is retrieved using one of two services: Internet Message Access Protocol (IMAP) using port TCP 143, or Post Office Protocol (POP3) using port TCP 110. All of these services, by default, send your email and authentication to/from these services in plain text—thus, it's very unprotected! + +To protect the email data and authentication, these services have added a security feature in which they can utilize an SSL/TLS certificate to wrap the data flow and communication with encryption. How SSL/TLS encryption secures information is beyond the scope of this article, but [Bryant Son's internet security article][2] covers it in great detail. At a high level, SSL/TLS encryption is a public/private encryption algorithm. + +By adding these security features into the services, they can listen on new TCP ports: + +Service | Default TCP Port | SSL/TLS Port +---|---|--- +SMTP | 25 | 587 +IMAP | 143 | 993 +POP3 | 110 | 995 + +### Generate SSL/TLS certificates + +SSL/TLS certificates can be generated for free using tools like [OpenSSL][3], or they can be purchased for a range of prices from public certificate authorities (CAs). In the past, generating your own certificate was easy and worked in most cases, but with the increasing demand for better security, most email clients don't trust self-generated SSL/TLS certificates without a manual exception. + +If your use case is private or for testing, then saving money with a self-generated certificate makes sense. But if you're rolling this out to a large group or have paying customers, then you're better served by purchasing a certificate from a public, trusted company that sells them. + +In either case, the process to start requesting a new certificate is to use the OpenSSL tooling on your Linux system to create a certificate signing request (CSR): + + +``` +`$ openssl req -new -newkey rsa:2048 -nodes -keyout mail.mydomain.key -out mail.mydomain.csr` +``` + +This command will create a new CSR and private key at the same time for the service you are trying to secure. The process will ask you a number of questions associated with the certificate: location details, server fully qualified domain name (FQDN), email contact information, etc. Once you have filled out the information, the key and CSR will be generated. + +#### If you generate your own certificate + +If you want to generate your own certificate, you must create your own [root CA][4] before issuing the CSR command above. You can create your own root CA with: + + +``` +`$ openssl genrsa -des3 -out myCA.key 2048` +``` + +It will prompt you to add a passphrase. Please give it a secure passphrase and don't lose it—this is your private root CA key, and as the name states, it's the root of all trust in your certificates. + +Next, generate the root CA certificate: + + +``` +`$ openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem` +``` + +After answering a few more questions, you will generate a root CA certificate with a five-year lifespan. + +Using the CSR file from the steps above, you can request a new certificate to be generated and signed by the root CA you just created: + + +``` +`$ openssl x509 -req -in mail.mydomain.csr -CA myCA.pem -CAkey myCA.key -CAcreateserial -out mail.mydomain.pem -days 1825 -sha256` +``` + +Enter your private root CA key passphrase to create and sign the certificate. + +Now you have the two files needed to configure your email services for enhanced security: the private key file, **mail.mydomain.key**, and the public certificate file, **mail.mydomain.pem**. + +#### If you purchase a certificate + +If you purchase a certificate from a vendor, it will ask you to upload that CSR to its system, as it is used as the input to generate the SSL/TLS certificate. The certificate will be accessible as a file (such as **mail.mydomain.pem**). Many SSL vendors also require you to download an intermediate certificate. If this is the case, you must combine the two certificate files into one, so the email service can process them both in combination. You can combine your certificate with a third-party intermediate certificate with: + + +``` +`$ cat mail.mydomain.pem gd_bundle-g2-g1.crt > mail.mydomain.pem` +``` + +Notice that the output's file extension is **.pem**, which stands for Privacy-Enhanced Mail. + +Now you have the two files you need to configure your email services for enhanced security: the private key file, **mail.mydomain.key**, and the public combined certificate file, **mail.mydomain.pem**. + +### Create a safe directory for your files + +Whether you created your own key or bought one from a vendor, create a safe, root-owned directory for the two files you created above. An example workflow to create a safe play would be: + + +``` +$ mkdir /etc/pki/tls +$ chown root:root /etc/pki/tls +$ chmod 700 /etc/pki/tls +``` + +Make sure to set the permissions on your files after you copy them into **/etc/pki/tls** with: + + +``` +`$ chmod 600 /etc/pki/tls/*` +``` + +### Configure your SMTP and IMAP services + +Next, configure both the SMTP and the IMAP services to use the new security certificates. The programs used in this example for SMTP and IMAP are **postfix** and **dovecot**. + +Edit ***/_****etc****_/*****postfix/main.cf** in your preferred text editor. Add the following lines: + + +``` +smtpd_use_tls = yes +smtpd_tls_cert_file = /etc/pki/tls/mail.mydomain.pem +smtpd_tls_key_file = /etc/pki/tls/mail.mydomain.key +``` + +### Customize your config + +The following options allow you to disable/enable different ciphers, protocols, etc.: + + +``` +smtpd_tls_eecdh_grade = strong +smtpd_tls_protocols= !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 +smtpd_tls_mandatory_protocols= !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 +smtpd_tls_mandatory_ciphers = high +smtpd_tls_security_level=may +smtpd_tls_ciphers = high +tls_preempt_cipherlist = yes +smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL +smtpd_tls_exclude_ciphers = aNULL, MD5 , DES, ADH, RC4, PSD, SRP, 3DES, eNULL +smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 +smtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1 +``` + +Edit **/etc/dovecot/dovecot.conf** by adding these three lines: + + +``` +ssl = required +ssl_cert = </etc/pki/tls/mail.mydomain.pem +ssl_key = </etc/pki/tls/mail.mydomain.key +``` + +Add the following options to disable/enable different ciphers, protocols, and more (I'll leave understanding and considering these up to you): + + +``` +ssl_cipher_list = EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:ALL:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SSLv2 +ssl_prefer_server_ciphers = yes +ssl_protocols = !SSLv2 !SSLv3 !TLSv1 !TLSv1.1 +ssl_min_protocol = TLSv1.2 +``` + +### Set context for SELinux + +If your Linux distribution has SELinux enabled, set the correct SELinux context for your new certificate files. + +For Postfix SELinux: + + +``` +`$ chcon -u system_u -t cert_t mail.mydomain.*` +``` + +For Dovecot SELinux: + + +``` +`$ chcon -u system_u -t dovecot_cert_t mail.mydomain.*` +``` + +Restart both services and connect with your updated email client configurations. Some email clients will auto-detect the new port numbers; others will require you to update them. + +### Test your setup + +Quickly test from the command line with **openssl** and the **s_client** plugin: + + +``` +$ openssl s_client -connect mail.mydomain.com:993 +$ openssl s_client -starttls imap -connect mail.mydomain.com:143 +$ openssl s_client -starttls smtp -connect mail.mydomain.com:587 +``` + +These test commands will show a plethora of data about the connection, certificate, cipher, session, and protocol you're using. This is not only a good way to validate that the new configuration is working but also to confirm you're using the appropriate certificate and security settings you defined in the **postfix** or **dovecot** configuration files. + +Stay secure! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/securing-linux-email + +作者:[Marc Skinner][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/marc-skinner +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/newsletter_email_mail_web_browser.jpg?itok=Lo91H9UH (email or newsletters via inbox and browser) +[2]: https://opensource.com/article/19/11/internet-security-tls-ssl-certificate-authority +[3]: https://www.openssl.org/ +[4]: https://en.wikipedia.org/wiki/Root_certificate From 3a0ea87cb0f427dc80d1393deee304b1b02b91bd Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 28 Apr 2020 00:56:50 +0800 Subject: [PATCH 294/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200427=20DevOps?= =?UTF-8?q?=20vs.=20Agile:=20Do=20they=20have=20anything=20in=20common=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md --- ... Agile- Do they have anything in common.md | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md diff --git a/sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md b/sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md new file mode 100644 index 0000000000..a8fcf422c6 --- /dev/null +++ b/sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md @@ -0,0 +1,85 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (DevOps vs. Agile: Do they have anything in common?) +[#]: via: (https://opensource.com/article/20/4/devops-vs-agile-common) +[#]: author: (Taz Brown https://opensource.com/users/heronthecli) + +DevOps vs. Agile: Do they have anything in common? +====== +Agile and DevOps have many differences, yet they both seek to address +complexity, improve quality, and innovate around software design. +![Women in tech boardroom][1] + +The topic of DevOps vs. Agile is almost like debating iPhone vs. Android—everyone has an opinion, and emotions can become heated, especially if people disagree. + +After writing _[DevOps v. Agile: What's the difference?][2]_ and reading the comments on the article, I wanted to add some more thoughts—including how some of my thinking has changed on the topic. + +My perspective comes from where I am now but also where I have been. I used to be a systems administrator and infrastructure engineer, and now I am a senior scrum master with a major utility company in Missouri. (I actually was a scrum master before I was an admin or engineer, but I digress.) + +My team consists of six frontend software engineers and IT programmer analysts, a business analyst, two product owners, and me. Recently, we learned that management wants our team to become a [DevSecOps][3] team, so our core scrum team is working with a DevSecOps team that is helping us make the transition. No one is naive to the fact that this will not be easy, but the DevSecOps team's experience gives us confidence that we can succeed. + +Our team's manager recently hired a senior software engineer who will drive the DevSecOps goal. As a scrum master, I will continue to focus on continuous improvement. The team is fairly young, so they don't have expansive work experience, but they are smart and driven, and there is much room for greatness. In addition, our entire organization is going through an Agile transformation, so most people are new to all things Agile, including the [Agile Manifesto][4] and the [Five Scrum Values][5]. + +![Spray paint on a container][6] + +Kyle Glenn on Unsplash + +### Agile, Scrum, DevOps, and more + +There is a clear relationship between DevOps and Agile. Agile is the methodology, Scrum is the framework, and DevOps falls under the agile [umbrella][7] along with kanban, lean, large-scale Scrum, Extreme Programming, Crystal, and more. For example, our Scrum team is an Agile team that will operate as a DevSecOps team. + +Neither DevOps nor Agile is about the tools. Rather, both are about the [mindset and culture][8]. When it is done right, teams think and act differently and achieve greater results, including faster software delivery, continuous integration (CI), continuous delivery (CD), continuous improvement, working software, faster solutions, more collaboration, and fewer silos. Additional results are seen in quality testing, better automation, and improved systems, processes, and practices. + +#### Common concepts + +Some of the Agile concepts they have in common are associated with the Agile Manifesto; the most familiar of the 12 principles are the first four: + + * Individual and interactions over processes and tools + * Working software over comprehensive documentation + * Customer collaboration over contract negotiations + * Responding to change over following a plan + + + +Some of the DevOps concepts they have in common are the CI/CD pipeline, optimizing software delivery and quality, a culture of innovation, service-level objectives and indicators (SLOs and SLIs), collaboration across teams, and automation. + +#### DevOps and Agile benefits + +DevOps speeds up things between developers and operations. Furthermore, even though DevOps isn't about the tools, the fact that the dev and ops teams use the same tech stack creates a shared language and empathy between the two. Our Scrum team uses Jira to track all bugs, enhancements, and team performance. Common DevOps tools are Jenkins, AWS, SonarQube, GitHub, Splunk, and Ansible. While the tools differ from team to team, the mindset and culture should be common across all. + +DevOps also creates less division between dev and ops and a sense of understanding of what it's like to walk in each other's shoes because now they function as one. + +Agile teams continuously deliver often and fast, adapting incrementally along the way. Working in two-week sprints appears to be the sweet spot for most software- or product-delivery teams. Agile teams may utilize DevOps principles in their work (e.g., implementing a CI/CD pipeline), and dev teams that work with ops are likely to work in the same two-week increments. + +DevOps traditionally leads to continuous deployment, delivery, and integration. Teamwork is integrated; problems and failures are jointly owned by development, operations, and other entities, such as quality assurance (QA), testing, automation, etc. + +### Summing up + +I believe that Agile and DevOps breathe the same air, with many concepts and theories crossing between them. + +While I have no doubts that there will be counter opinions and even some sharply worded disagreements with my opinions, I think we would all agree that Agile and DevOps seek to address complexity, improve quality, and innovate around software design. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/devops-vs-agile-common + +作者:[Taz Brown][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/heronthecli +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/christina-wocintechchat-com-rg1y72ekw6o-unsplash_1.jpg?itok=MoIv8HlK (Women in tech boardroom) +[2]: https://opensource.com/article/20/2/devops-vs-agile +[3]: https://opensource.com/article/19/1/what-devsecops +[4]: https://agilemanifesto.org/ +[5]: https://www.scrumalliance.org/about-scrum/values +[6]: https://opensource.com/sites/default/files/uploads/roomtogrow_kyleglenn.jpg (Spray paint on a container) +[7]: https://opensource.com/article/20/4/kanban-devops +[8]: https://opensource.com/article/19/5/values-devops-mindset From cbfd6769ce8bc91db18dbcc9f86b1b06e8e8b8e0 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 28 Apr 2020 00:57:31 +0800 Subject: [PATCH 295/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200427=20Compar?= =?UTF-8?q?ing=20subscription,=20pay-per-bug,=20and=20consulting=20softwar?= =?UTF-8?q?e=20business=20models?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md --- ...and consulting software business models.md | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md diff --git a/sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md b/sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md new file mode 100644 index 0000000000..c7d76c5590 --- /dev/null +++ b/sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Comparing subscription, pay-per-bug, and consulting software business models) +[#]: via: (https://opensource.com/article/20/4/open-source-business) +[#]: author: (Jos Poortvliet https://opensource.com/users/jospoortvliet) + +Comparing subscription, pay-per-bug, and consulting software business models +====== +Learn how NextCloud achieves business revenue that is one-third +consulting and two-thirds subscription. +![A chair in a field.][1] + +At FOSS Backstage this year, I hosted a discussion on open source models and shared why I think subscriptions are a great way to support open source products. + +### Picking a business model + +The company I co-founded, Nextcloud, only offers its services to customers on a (per user) subscription model. Some customers ask us during the sales conversation why they cannot just get access to our engineers on an hourly basis as they get from third party consultants: pay for the bug fix or support case, and be done? + +When we discussed how to build our new company in 2016 during our very first "[hackweek][2]," our business model was an important conversation. The team discussed different approaches, and we decided to go for a subscription model. Such a model felt more in line with our mission and principles to [create a great product and run a trustworthy company.][3] + +Why? While hourly rates seem like an easy way to get a quick fix for a problem, getting paid for fixing issues creates an incentive to create more buggy software, which of course, was not how we want to run our business. + +Let's look a bit deeper at the choices. + +### Subscription + +As a customer, you want the most reliable software. And when (not if, when) things go wrong, you want them fixed as quickly as possible. Our company offers customers a subscription to our services. Such a subscription includes direct and unlimited access to our engineers the moment you run into a problem. These two points are very important. It means that a customer has the certainty of having the very best resources at their fingertips at the moment they need them, and as much as they need them, in a way that only the original software vendor can deliver. + +For that, they pay a fee that scales with the number of users. + +### Pay-per-bug + +What if, instead, you could pay per issue fixed? In a way, this choice is similar to insurance. Indeed, when you need cold medicine once a year, the cost of a health insurance policy with a monthly premium seems prohibitive. But when a car accident crushes your spine and your medical costs skyrocket, not having to sell your house makes up for that premium and then some. + +There is also the bigger picture: The incentives potentially created by a pay-per-bug model. It is a simple, albeit cynical calculation: If we got paid per bug we fix for customers, leaving more bugs in our product would increase our income. Now we're not saying every company offering product consulting by the hour is extorting their customers, merely that this backward incentive exists, even when most moral businesses would not give in to it. + +Conversely, now that we offer insurance, we lower our support costs by building a better product, just like art insurance providers do what they can to ensure the art kept at their customers' exhibition is secure to keep their costs low. Our support team deeply cares about how our customers use our product: a better setup and good security practices not only make happier customers; it saves them time. + +Or, in other words, it helps maximize the ROI or TEI the customer gains from deploying Nextcloud. + +That is what we'd call a win-win and a business model an open source company can be proud of. + +### Consulting + +Now I discuss this business model regularly with others, and I invariably get told: "You might be right, but most of my customers only want to pay for the bugs we fix, or for features. Consulting is our main source of income! And I have no illusions about changing that." + +Yes, that's an issue. We open source folk honestly have a sales and marketing issue. And yes, you might think that, as a marketing guy, I just see everything as a nail I can hit with my communications hammer. But really, communication is core to the issue—how you communicate your value—which, in turn, requires you to be aware of your value. + +Recently, I had some challenging discussions with users on our forums who were upset that our engineers had not fixed their issues quickly enough. These users were clearly business users, and giving free support on GitHub obviously isn't exactly a great advertisement for the need for a subscription. So some abuse was thrown our way, and I took the hit. When complaining about it all to a fellow entrepreneurial friend of mine, he remarked: "Isn't that good news? They were frustrated and angry because clearly, you have something to offer, they need it, and are annoyed that they are forced to pay you for it. A good place to be in if you want to sell something!" Right he was, of course. + +The lesson I want to share with this anecdote is: You have something to offer. Your current customers will certainly be upset if you tell them that, going forward, they can only get your services under a subscription. But the angrier they are, the more you know they _need_ you, and you should persist! + +But moving to subscription from consulting requires a great deal of discipline, including saying "no" often. We have hard, internal rules, and one of these is that sales can only sell consulting valued at up to 50% of the subscription value, and only for deals greater than $10,000. + +But it has worked. The breakdown of our business revenue is now about one-third consulting and two-thirds subscription. Engineering hours for consulting work are not the limiting factor for expanding our customer base; sales and sales engineering is. We doubled our order intake last year and plan to do the same this year. + +### Bottomline: Sustainability + +For us, a better product and more sustainable business follows from the subscription model. It also benefits software engineers, who prefer to build a better product and spend less time on debugging issues with customers. A pay-by-the-hour model, with all the time tracking and incentive to keep customers dependent, does not work for us. + +What has your experience been? Tell us in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-business + +作者:[Jos Poortvliet][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/jospoortvliet +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk (A chair in a field.) +[2]: https://nextcloud.com/blog/invitation-to-our-hackweek-in-stuttgart/ +[3]: https://nextcloud.com/blog/the-nextcloud-mission-and-principles/ From 383bb876b7559bda0658f1ced1a979786fb2f999 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Tue, 28 Apr 2020 00:57:59 +0800 Subject: [PATCH 296/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200426=206=20ti?= =?UTF-8?q?ps=20for=20securing=20your=20WordPress=20website?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200426 6 tips for securing your WordPress website.md --- ...ips for securing your WordPress website.md | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 sources/tech/20200426 6 tips for securing your WordPress website.md diff --git a/sources/tech/20200426 6 tips for securing your WordPress website.md b/sources/tech/20200426 6 tips for securing your WordPress website.md new file mode 100644 index 0000000000..757ff42d30 --- /dev/null +++ b/sources/tech/20200426 6 tips for securing your WordPress website.md @@ -0,0 +1,175 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (6 tips for securing your WordPress website) +[#]: via: (https://opensource.com/article/20/4/wordpress-security) +[#]: author: (Lucy Carney https://opensource.com/users/lucy-carney) + +6 tips for securing your WordPress website +====== +Even beginners can—and should—take these steps to protect their +WordPress sites against cyberattacks. +![A lock on the side of a building][1] + +Already powering over 30% of the internet, WordPress is the fastest-growing content management system (CMS) in the world—and it's not hard to see why. With tons of customization available through coding and plugins, top-notch SEO, and a supreme reputation for blogging, WordPress has certainly earned its popularity. + +However, with popularity comes other, less appealing attention. WordPress is a common target for intruders, malware, and cyberattacks—in fact, WordPress accounted for around [90% of hacked CMS platforms][2] in 2019. + +Whether you're a first-time WordPress user or an experienced developer, there are important steps you can take to protect your WordPress website. The following six key tips will get you started. + +### 1\. Choose reliable hosting + +Hosting is the unseen foundation of all websites—without it, you can't publish your site online. But hosting does much more than simply host your site. It's also responsible for site speed, performance, and security. + +The first thing to do is to check if a host includes SSL security in its plans. + +SSL is an essential security feature for all websites, whether you're running a small blog or a large online store. You'll need a more [advanced SSL certificate][3] if you're accepting payments, but for most sites, the basic free SSL should be fine. + +Other security features to look out for include: + + * Frequent, automatic offsite backups + * Malware and antivirus scanning and removal + * Distributed denial of service (DDoS) protection + * Real-time network monitoring + * Advanced firewall protection + + + +In addition to these digital security features, it's worth thinking about your hosting provider's _physical_ security measures as well. These include limiting access to data centers with security guards, CCTV, and two-factor or biometric authentication. + +### 2\. Use security plugins + +One of the best—and easiest—ways of protecting your website's security is to install a security plugin, such as [Sucuri][4], which is an open source, GPLv2 licensed project. Security plugins are vitally important because they automate security, which means you can focus on running your site rather than committing all your time to fighting off online threats. + +These plugins detect and block malicious attacks and alert you about any issues that require your attention. In short, they constantly work in the background to protect your site, meaning you don't have to stay awake 24/7 to fight off hackers, bugs, and other digital nasties. + +A good security plugin will provide all the essential security features you need for free, but some advanced features require a paid subscription. For example, you'll need to pay if you want to unlock [Sucuri's website firewall][5]. Enabling a web application firewall (WAF) blocks common threats and adds an extra layer of security to your site, so it's a good idea to look for this feature when choosing a security plugin. + +### 3\. Choose trustworthy plugins and themes + +The joy of WordPress is that it is open source, so anyone and everyone can pitch in with themes and plugins that they've developed. This can also pose problems when it comes to picking a high-quality theme or plugin. + +It serves to be cautious when picking a free theme or plugin, as some are poorly designed—or worse, may hide malicious code. + +To avoid this, always source free themes and plugins from reputable sources, such as the WordPress library. Always read reviews and research the developer to see if they've built any other programs. + +Outdated or poorly designed themes and plugins can leave "backdoors" open for attackers or bugs to get into your site, which is why it pays to be careful in your choices. However, you should also be wary of nulled or cracked themes. These are premium themes that have been compromised by hackers and are for sale illegally. You might buy a nulled theme believing that it's all above-board—only to have your site damaged by hidden malicious code. + +To avoid nulled themes, don't get drawn in by discounted prices, and always stick to reputable stores, such as the official [WordPress directory][6]. If you're looking elsewhere, stick to large and trusted stores, such as [Themify][7], a theme and plugin store that has been running since 2010. Themify ensures all its WordPress themes pass the [Google Mobile-Friendly][8] test and are open source under the [GNU General Public License][9]. + +### 4\. Run regular updates + +It's a fundamental WordPress rule: _always keep your site up to date._ However, it's a rule not everyone sticks to—in fact, only [43% of WordPress sites][10] are running the latest version. + +The problem is that when your site becomes outdated, it becomes susceptible to glitches, bugs, intrusions, and crashes because it falls behind on security and performance fixes. Outdated sites can't fix bugs the same way as updated sites can, and attackers can tell which sites are outdated. This means they can search for the most vulnerable sites and attack accordingly. + +This is why you should always run your site on the latest version of WordPress. And in order to keep your security at its strongest, you must update your plugins and themes as well as your core WordPress software. + +If you choose a managed WordPress hosting plan, you might find that your provider will check and run updates for you—be clear whether your host offers software _and_ plugin updates. If not, you can install an open source plugin manager, such as the GPLv2-licensed [Easy Updates Manager plugin][11], as an alternative. + +### 5\. Strengthen your logins + +Aside from creating a secure WordPress website through carefully choosing your theme and installing security plugins, you also need to safeguard against unauthorized access through logins. + +#### Password protection + +The first and simplest way to strengthen your login security is to change your password—especially if you're using an [easily guessed phrase][12] such as "123456" or "qwerty." + +Instead, try to use a long passphrase rather than a password, as they are harder to crack. The best way is to use a series of unrelated words strung together that you find easy to remember. + +Here are some other tips: + + * Never reuse passwords + * Don't include obvious words such as family members' names or your favorite football team + * Never share your login details with anyone + * Include capitals and numbers to add complexity to your passphrase + * Don't write down or store your login details anywhere + * Use a [password manager][13] + + + +#### Change your login URL + +It's a good idea to change your default login web address from the standard format: yourdomain.com/wp-admin. This is because hackers know this is the default URL, so you risk brute-force attacks by not changing it. + +To avoid this, change the URL to something different. Use an open source plugin such as the GPLv2-licensed [WPS Hide Login][14] for safe, quick, and easy customization. + +#### Apply two-factor authentication + +For extra protection against unauthorized logins and brute-force attacks, you should add two-factor authentication. This means that even if someone _does_ get access to your login details, they'll need a code that's sent directly to your phone to gain access to your WordPress site's admin. + +Adding two-factor authentication is pretty easy. Simply install yet another plugin—this time, search the WordPress Plugin Directory for "two-factor authentication," and select the plugin you want. One option is [Two Factor][15], a popular GPLv2 licensed project that has over 10,000 active installations. + +#### Limit login attempts + +WordPress tries to be helpful by letting you guess your login details as many times as you like. However, this is also helpful to hackers trying to gain unauthorized access to your WordPress site to release malicious code. + +To combat brute-force attacks, install a plugin that limits login attempts and set how many guesses you want to allow. + +### 6\. Disable file editing + +This isn't such a beginner-friendly step, so don't attempt it unless you're a confident coder—and always back up your site first! + +That said, disabling file editing _is_ an important measure if you're really serious about protecting your WordPress website. If you don't hide your files, it means anyone can edit your theme and plugin code straight from the admin area—which is dangerous if an intruder gets in. + +To deny unauthorized access, go to your **wp-config.php** file and enter: + + +``` +<Files wp-config.php> +order allow,deny +deny from all +</Files> +``` + +Or, to remove the theme and plugin editing options from your WordPress admin area completely, edit your **wp-config.php** file by adding: + + +``` +`define( 'DISALLOW_FILE_EDIT', true );` +``` + +Once you've saved and reloaded the file, the plugin and theme editors will disappear from your menus within the WordPress admin area, stopping anyone from editing your theme or plugin code—including you**.** Should you need to restore access to your theme and plugin code, just delete the code you added to your **wp-config.php** file when you disabled editing. + +Whether you block unauthorized access or totally disable file editing, it's important to take action to protect your site's code. Otherwise, it's easy for unwelcome visitors to edit your files and add new code. This means an attacker could use the editor to gather data from your WordPress site or even use your site to launch attacks on others. + +For an easier way of hiding your files, you can use a security plugin that will do it for you, such as Sucuri. + +### WordPress security recap + +WordPress is an excellent open source platform that should be enjoyed by beginners and developers alike without the fear of becoming a victim of an attack. Sadly, these threats aren't going anywhere anytime soon, so it's vital to stay on top of your site's security. + +Using the measures outlined above, you can create a stronger, more secure level of protection for your WordPress site and ensure a much more enjoyable experience for yourself. + +Staying secure is an ongoing commitment rather than a one-time checklist, so be sure to revisit these steps regularly and stay alert when building and using your CMS. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/wordpress-security + +作者:[Lucy Carney][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/lucy-carney +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) +[2]: https://cyberforces.com/en/wordpress-most-hacked-cms +[3]: https://opensource.com/article/19/11/internet-security-tls-ssl-certificate-authority +[4]: https://wordpress.org/plugins/sucuri-scanner/ +[5]: https://sucuri.net/website-firewall/ +[6]: https://wordpress.org/themes/ +[7]: https://themify.me/ +[8]: https://developers.google.com/search/mobile-sites/ +[9]: http://www.gnu.org/licenses/gpl.html +[10]: https://wordpress.org/about/stats/ +[11]: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/ +[12]: https://www.forbes.com/sites/kateoflahertyuk/2019/04/21/these-are-the-worlds-most-hacked-passwords-is-yours-on-the-list/#4f157c2f289c +[13]: https://opensource.com/article/16/12/password-managers +[14]: https://wordpress.org/plugins/wps-hide-login/ +[15]: https://en-gb.wordpress.org/plugins/two-factor/ From 06ff74321accae13a94eec3af4a27783f98c2815 Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Tue, 28 Apr 2020 08:37:54 +0800 Subject: [PATCH 297/394] translating --- .../20200424 16 Things to do After Installing Ubuntu 20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => source}/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md (99%) diff --git a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md b/source/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md similarity index 99% rename from sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md rename to source/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md index cca31a0426..5637651850 100644 --- a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md +++ b/source/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (qfzy1233) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From f624b93b436b8df0d8ca53185d38c9cd9e44faa5 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 28 Apr 2020 08:43:08 +0800 Subject: [PATCH 298/394] translated --- ...v5- Why there is IPv4, IPv6 but no IPv5.md | 76 ------------------- ...v5- Why there is IPv4, IPv6 but no IPv5.md | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) delete mode 100644 sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md create mode 100644 translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md diff --git a/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md deleted file mode 100644 index 4934186f76..0000000000 --- a/sources/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?) -[#]: via: (https://itsfoss.com/what-happened-to-ipv5/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5? -====== - -If you have spent any amount of time in the world of the internet, you should have heard about the IPv4 and IPv6 protocols that our computers use every day. - -One question that you might be asking is: Why there is no IPv5? Why IPv6 came after IPv4 and not IPv5? Was there ever a IPv5 and if yes, whatever happened to IPv5? - -The answer is yes, there was an IPv5…sort of. Let me quickly explain a few things around it. - -### The early history of the internet - -![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1] - -In the late 1960s, the US Department of Defense’s [Advanced Research Projects Agency][2] (ARPA) started a [project][3] to link computers across the country. The initial goal was to create a networked system of all of the ARPA-funded computers across the country. - -Since this was the first time a network of this scale was put together, they were also creating the technology and hardware as they went. One of the first things they worked was an internet protocol (IP) named [Transmission Control Protocol][4] (TCP). This protocol “reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network”. Basically, it made sure data got where it needed to go safely. - -Originally, TCP was designed to be [“a host-level, end-to-end protocol and a packaging and routing protocol”][5]. However, they realized that they needed to split the protocol to make it more manageable. It was decided that IP would handle packaging and routing. - -By this time TCP had gone through three versions, so the new protocol became known as IPv4. - -### The birth of IPv5 - -IPv5 started life under a different name: Internet Stream Protocol (or ST). It was created to experiment with streaming voice and video [“by Apple, NeXT, and Sun Microsystems”][6]. - -This new protocol was capable of “transferring data packets on specific frequencies while maintaining communication”. - -### So what happened to IPv5? - -![][7] - -IPv5 was never accepted as an official internet protocol. This was mainly due to the 32-bit limitation. - -IPV5 used the same addressing system as IPv4. Each address was made up of four sets of numbers between 0 and 255. This limited the number of possible addresses to [4.3 billion][6]. - -In the early 1970s, that might have seemed like more than the world would ever need. However, the explosive growth of the Internet proved that idea wrong. In 2011, the world officially ran out of the IPv4 addresses. - -In the 1990s, a new project was started to work on the next generation of internet protocol (IPng). This led to the 128-bit IPv6. An IPv6 address contains a [“series of eight 4-character hexadecimal numbers”][6] that can contain numbers from 0 to 9 and letters from A to F. Unlike IPv4, IPv6 had trillions of possible addresses, so we should be safe for a while. - -Meanwhile, IPv5 laid the groundwork for the voice-over-IP technology that we use to communicate all over the world today. **So, I guess in some small way, you could say that IPv5 still survives to this day**. - -I hope you liked this anecdote about internet history. You may read some other [trivia article about Linux and tech in general][8]. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][9]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/what-happened-to-ipv5/ - -作者:[John Paul][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/john/ -[b]: https://github.com/lujun9972 -[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Arpa_internet.png?fit=800%2C573&ssl=1 -[2]: https://en.wikipedia.org/wiki/DARPA -[3]: https://en.wikipedia.org/wiki/ARPANET -[4]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol -[5]: https://fcw.com/articles/2006/07/31/what-ever-happened-to-ipv5.aspx -[6]: https://www.lifewire.com/what-happened-to-ipv5-3971327 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-happened-to-ipv5.png?ssl=1 -[8]: https://itsfoss.com/category/story/ -[9]: https://reddit.com/r/linuxusersgroup diff --git a/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md new file mode 100644 index 0000000000..71bfe2137a --- /dev/null +++ b/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md @@ -0,0 +1,76 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?) +[#]: via: (https://itsfoss.com/what-happened-to-ipv5/) +[#]: author: (John Paul https://itsfoss.com/author/john/) + +IPv5 发生了什么?为什么有 IPv4、IPv6 但没有 IPv5? +====== + +如果你花过很多时间在互联网上,那么你应该已经听说过计算机每天使用的 IPv4 和 IPv6 协议。 + +你可能会问的一个问题是:为什么没有 IPv5?为什么 IPv6 在 IPv4 之后而不是 IPv5 之后出现?是否有 IPv5,如果是,那么 IPv5 发生了什么? + +答案是肯定的,曾经有一个 IPv5。让我解释一下这里发生的事。 + +### 互联网的早期历史 + +![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1] + +在 1960 年代后期,美国国防部的[高级研究计划局][2] (ARPA) 发起了一个[项目][3]来连接全国的计算机。最初的目标是创建一个由全国 ARPA 资助的所有计算机组成的网络系统。 + +由于这是第一次将如此规模的网络整合在一起,因此他们也在不断发展自己的技术和硬件。他们的第一件工作是名为[传输控制协议][4] (TCP) 的互联网协议 (IP)。该协议“可靠、有序、并会对通过 IP 网络传输的八进制(字节)流错误检测”。基本上,它确保数据安全到达。 + +最初,TCP 被设计为[“主机级别的端到端协议以及打包和路由协议”][5]。但是,他们意识到他们需要拆分协议以使其更易于管理。于是决定由 IP 处理打包和路由。 + +那时,TCP 已经经历了三个版本,因此新协议被称为 IPv4。 + +### IPv5 的诞生 + +IPv5 以不同的名称开始使用:互联网流协议(或 ST)。它是[由 Apple、NeXT 和 Sun Microsystems][6] 创建用于实验流式传输语音和视频。 + +该新协议能够“在保持通信的同时在特定频率上传输数据包”。 + +### 那么 IPv5 发生了什么? + +![][7] + +IPv5 从未被接受为正式的互联网协议。这主要是由于 32 位限制。 + +IPV5 使用与 IPv4 相同的寻址系统。每个地址由 0 到 255 之间的四组数字组成。这将可能的地址数量限制为 [43 亿][6]。 + +在 1970 年代初,这似乎比全世界所需要的还要多。但是,互联网的爆炸性增长证明了这一想法是错误的。2011年,世界正式耗尽了 IPv4 地址。 + +在 1990 年代,一个新项目开始致力于下一代互联网协议 (IPng)。这导致了 128 位的 IPv6。IPv6 地址包含 [“8 组 4 字符的十六进制数字”][6],它可以包含从 0 到 9 的数字和从 A 到 F 的字母。与 IPv4 不同,IPv6 拥有数万亿个可能的地址,因此我们应该能安全一阵子。 + +同时,IPv5 奠定了 VoIP 的基础,而该技术已被我们用于当今世界范围内的通信。**因此,我想往小了说,你可以说 IPv5 仍然可以保留到了今天**。 + +希望你喜欢有关互联网历史的轶事。你可以阅读其他[关于 Linux 和技术的琐事文章] [8]。 + +如果你觉得这篇文章有趣,请花一点时间在社交媒体、Hacker News 或 [Reddit][9] 上分享它。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-happened-to-ipv5/ + +作者:[John Paul][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/john/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Arpa_internet.png?fit=800%2C573&ssl=1 +[2]: https://en.wikipedia.org/wiki/DARPA +[3]: https://en.wikipedia.org/wiki/ARPANET +[4]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol +[5]: https://fcw.com/articles/2006/07/31/what-ever-happened-to-ipv5.aspx +[6]: https://www.lifewire.com/what-happened-to-ipv5-3971327 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/what-happened-to-ipv5.png?ssl=1 +[8]: https://itsfoss.com/category/story/ +[9]: https://reddit.com/r/linuxusersgroup From ad862bdb1dcffac6e1a97fe6bc5d4939992d7ed8 Mon Sep 17 00:00:00 2001 From: geekpi Date: Tue, 28 Apr 2020 08:50:47 +0800 Subject: [PATCH 299/394] translating --- ...ing Pixel Art With Free and Open Source Editor Pixelorama.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md b/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md index fc3c4b7bab..b4b0949dab 100644 --- a/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md +++ b/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 78f8d77d2f68681f6d686c3c2a150d6dddae0ec9 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 28 Apr 2020 09:43:46 +0800 Subject: [PATCH 300/394] PRF @geekpi --- ...ings You Should Know About Ubuntu 20.04.md | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md b/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md index 30a3049bfe..c6679159bf 100644 --- a/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md +++ b/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Things You Should Know About Ubuntu 20.04) @@ -10,13 +10,11 @@ 关于 Ubuntu 20.04 你应该了解的事情 ====== -[Ubuntu 20.04][1] 即将发布,你可能对升级、安装等有一些问题和疑问。 +[Ubuntu 20.04][1] 已经发布,你可能对升级、安装等有一些问题和疑问。 -我在各种社交媒体渠道上主持了一些问答环节,回答像你这样的读者的疑虑。 +我在各种社交媒体渠道上主持了一些问答环节,回答像你这样的读者的疑虑。我将列出这些关于 Ubuntu 20.04 的常见问题,并给出答案。我希望它能帮助你消除你的疑虑。如果你仍有问题,请随时在下面的评论栏提问。 -我将列出这些关于Ubuntu 20.04的常见问题,并给出答案。我希望它能帮助你消除你的疑虑。如果你仍有问题,请随时在下面的评论栏提问。 - -### Ubuntu 20.04: 已回复的问题 +### Ubuntu 20.04:已回复的问题 ![][2] @@ -28,25 +26,25 @@ Ubuntu 20.04 LTS 于 2020 年 4 月 23 日发布。所有变种,如 Kubuntu、 #### Ubuntu 20.04 的系统要求是什么? -对于默认的 GNOME 版本,应至少具有 4GB 的内存、2 GHz 双核处理器和至少 25GB 的磁盘空间。 +对于默认的 GNOME 版本,应至少具有 4GB 的内存、2GHz 双核处理器和至少 25GB 的磁盘空间。 其他 [Ubuntu 变种][3]可能有不同的系统要求。 #### 我可以在 32 位系统上使用 Ubuntu 20.04 吗? -完全不行。你不能在 32 位系统上使用 Ubuntu 20.04。即使你使用的是 32 位 Ubuntu 18.04,也不能升级到 Ubuntu 20.04。过去几年有 32 位的系统 ISO。 +完全不行。你不能在 32 位系统上使用 Ubuntu 20.04。即使你使用的是 32 位 Ubuntu 18.04,也不能升级到 Ubuntu 20.04。32 位的系统 ISO 是以前用的。 ![Error while upgrading 32-bit Ubuntu 18.04 to Ubuntu 20.04][4] -#### 我可以在Ubuntu 20.04上使用 Wine 吗? +#### 我可以在 Ubuntu 20.04 上使用 Wine 吗? -是的,你仍然可以在 Ubuntu 20.04 上使用 Wine,因为仍然有 32 位库,来用于 Wine 和 [Steam Play][5] 所需的软件包。 +是的,你仍然可以在 Ubuntu 20.04 上使用 Wine,因为仍然用于 Wine 和 [Steam Play][5] 软件包所需的 32 位库。 #### 我需要购买 Ubuntu 20.04 或许可证? -不,Ubuntu 是完全免费使用的。你不必像在 Windows 中那样购买许可证密钥或激活 Ubuntu。 +不,Ubuntu 完全可以免费使用。你不必像在 Windows 中那样购买许可证密钥或激活 Ubuntu。 -Ubuntu 的下载页会请求你捐赠一些资金,如果你想捐赠一些钱来帮助开发这个系统,这完全取决于你。 +Ubuntu 的下载页会请求你捐赠一些资金,如果你想为开发这个强大的操作系统捐钱,由你自己决定。 #### GNOME 版本是什么? @@ -54,21 +52,23 @@ Ubuntu 20.04 有 GNOME 3.36。 #### Ubuntu 20.04 的性能是否优于 Ubuntu 18.04? -是的,在几个方面。Ubuntu 20.04 安装速度更快,甚至加速更快。我在 4:40 的视频中展示了性能比较。 +是的,在几个方面。Ubuntu 20.04 系统速度更快,甚至超快。我在下面这个视频的 4:40 处展示了性能对比。 -在 GNOME 3.36 中,滚动、窗口动画和其他 UI 元素更加流畅,并提供了更流畅的体验。 +- [video](https://img.linux.net.cn/static/video/Top%207%20Best%20Features%20You%27ll%20Love%20in%20Ubuntu%2020.04-lpq8pm_xkSE.mp4) + +在 GNOME 3.36 中,滚动、窗口动画和其他 UI 元素更加流畅,提供了更流畅的体验。 #### Ubuntu 20.04 将支持多长时间? -它是一个长期支持 (LTS) 版本,与任何 LTS 版本一样,它将在五年内得到支持。这意味着 Ubuntu 20.04 将在 2025 年 4 月之前获得安全和维护更新。 +它是一个长期支持(LTS)版本,与任何 LTS 版本一样,它将在五年内得到支持。这意味着 Ubuntu 20.04 将在 2025 年 4 月之前获得安全和维护更新。 #### 升级到 Ubuntu 20.04 时,是否会丢失数据? -你可以从 Ubuntu 19.10 或 Ubuntu 18.04 升级到 Ubuntu 20.04。你无需创建 live USB 并从中安装。你所需要的是一个良好的互联网连接,来下载约1.5GB 的数据。 +你可以从 Ubuntu 19.10 或 Ubuntu 18.04 升级到 Ubuntu 20.04。你无需创建 live USB 并从中安装。你所需要的是一个良好的互联网连接,来下载约 1.5GB 的数据。 -从现有系统升级不会破坏你的文件。你应该会有所有文件,并且大多数现有软件应具有相同的版本或升级后的版本。 +从现有系统升级不会破坏你的文件。你应该会留有所有文件,并且大多数现有软件应具有相同的版本或升级后的版本。 -如果你使用了某些第三方工具或[其他 PPA][6],升级过程将禁用它们。如果 Ubuntu 20.04 适合这些其他存储库,那么可以再次启用它们。 +如果你使用了某些第三方工具或[其他 PPA][6],升级过程将禁用它们。如果 Ubuntu 20.04 可以使用这些其他存储库,那么可以再次启用它们。 升级大约需要一个小时,重启后,你将登录到新版本。 @@ -78,21 +78,21 @@ Ubuntu 20.04 有 GNOME 3.36。 ![][7] -如果你正在使用 Ubuntu 19.10 并有正确的更新设置(如前面部分所述),那么应在 Ubuntu 18.04 后的几天内通知你升级到 Ubuntu 20.04。 +如果你正在使用 Ubuntu 19.10 并有正确的更新设置(如前面部分所述),那么应在发布后的几天内通知你升级到 Ubuntu 20.04。 -对于 Ubuntu 18.04 用户,可能需要几周时间才能正式通知他们 Ubuntu 18.04 可用。可能,你可能会在第一个点版本 Ubuntu 20.04.1 后获得提示。 +对于 Ubuntu 18.04 用户,可能需要几周时间才能正式通知他们 Ubuntu 20.04 可用。可能,你可能会在第一个点版本 Ubuntu 20.04.1 后获得提示。 #### 如果我升级到 Ubuntu 20.04,我可以降级到 19.10 或 18.04 吗? -不行。虽然升级到新版本很容易,但无法选择降级。 如果你想回到 Ubuntu 18.04,你将重新[安装 Ubuntu18.04][8]。 +不行。虽然升级到新版本很容易,但无法选择降级。如果你想回到 Ubuntu 18.04,你需要重新[安装 Ubuntu 18.04][8]。 #### 我使用的是 Ubuntu 18.04 LTS。我应该升级到 Ubuntu 20.04 LTS 吗? 这取决于你。如果你对 Ubuntu 20.04 中的新功能印象深刻,并希望上手尝试,那么你应该升级。 -如果你想要一个更稳定的系统,我建议等待第一个点版本 Ubuntu 20.04.1,新版本将有 bug 修复。20.04.1 通常在 Ubuntu 20.04 发布后大约两个月到来。 +如果你想要一个更稳定的系统,我建议等待第一个点版本 Ubuntu 20.04.1,新版本会有 bug 修复。20.04.1 通常在 Ubuntu 20.04 发布后大约两个月到来。 -其他情况下,我建议尽早升级到 Ubuntu 20.04。Ubuntu 20.04 具有更新的内核、性能改进,尤其是仓库中有更新版本的软件。 +无论是那种情况,我都建议你或早或晚升级到 Ubuntu 20.04。Ubuntu 20.04 具有更新的内核、性能改进,尤其是仓库中有更新版本的软件。 在外部磁盘上进行备份,并且有良好的互联网连接,升级不应成为问题。 @@ -113,13 +113,13 @@ via: https://itsfoss.com/ubuntu-20-04-faq/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [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/ubuntu-20-04-release-features/ +[1]: https://linux.cn/article-12142-1.html [2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu_20_04_faq.jpg?ssl=1 [3]: https://itsfoss.com/which-ubuntu-install/ [4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/ubuntu-32-bit.jpg?ssl=1 From 6cb125fc9c54e0bfe75b5484b68ea65eb3e4af8b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 28 Apr 2020 09:46:57 +0800 Subject: [PATCH 301/394] PUB @geekpi https://linux.cn/article-12158-1.html --- .../20200422 Things You Should Know About Ubuntu 20.04.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200422 Things You Should Know About Ubuntu 20.04.md (98%) diff --git a/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md b/published/20200422 Things You Should Know About Ubuntu 20.04.md similarity index 98% rename from translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md rename to published/20200422 Things You Should Know About Ubuntu 20.04.md index c6679159bf..a6a56b25f2 100644 --- a/translated/tech/20200422 Things You Should Know About Ubuntu 20.04.md +++ b/published/20200422 Things You Should Know About Ubuntu 20.04.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12158-1.html) [#]: subject: (Things You Should Know About Ubuntu 20.04) [#]: via: (https://itsfoss.com/ubuntu-20-04-faq/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 517d740add3258ab448a75da02d182bc53ab4809 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 28 Apr 2020 14:32:02 +0800 Subject: [PATCH 302/394] =?UTF-8?q?Revert=20"=E7=94=B3=E9=A2=86=E5=8E=9F?= =?UTF-8?q?=E6=96=87"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20200424 16 Things to do After Installing Ubuntu 20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {source => sources}/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md (99%) diff --git a/source/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md similarity index 99% rename from source/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md rename to sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md index 5637651850..cca31a0426 100644 --- a/source/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md +++ b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: (qfzy1233) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 34e3debb2bc3b4231736bc31b9cb2fa1196cb83f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 28 Apr 2020 14:37:57 +0800 Subject: [PATCH 303/394] Rename sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md to sources/talk/20200427 DevOps vs. Agile- Do they have anything in common.md --- .../20200427 DevOps vs. Agile- Do they have anything in common.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200427 DevOps vs. Agile- Do they have anything in common.md (100%) diff --git a/sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md b/sources/talk/20200427 DevOps vs. Agile- Do they have anything in common.md similarity index 100% rename from sources/tech/20200427 DevOps vs. Agile- Do they have anything in common.md rename to sources/talk/20200427 DevOps vs. Agile- Do they have anything in common.md From 4c5f404a98520faada11aed9869662a07163d4b6 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Tue, 28 Apr 2020 14:43:44 +0800 Subject: [PATCH 304/394] Rename sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md to sources/talk/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md --- ...ption, pay-per-bug, and consulting software business models.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md (100%) diff --git a/sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md b/sources/talk/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md similarity index 100% rename from sources/tech/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md rename to sources/talk/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md From 1f19b90198533641d6525b26574c628c2f5e2f85 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 28 Apr 2020 15:17:31 +0800 Subject: [PATCH 305/394] APL --- .../20200421 Using Python to visualize COVID-19 projections.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200421 Using Python to visualize COVID-19 projections.md b/sources/tech/20200421 Using Python to visualize COVID-19 projections.md index 96fcb61521..a1ff4658fb 100644 --- a/sources/tech/20200421 Using Python to visualize COVID-19 projections.md +++ b/sources/tech/20200421 Using Python to visualize COVID-19 projections.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From ff377d7295dedd255ef591344db484c003e53208 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 28 Apr 2020 17:15:17 +0800 Subject: [PATCH 306/394] TSL --- ...ython to visualize COVID-19 projections.md | 255 ------------------ ...ython to visualize COVID-19 projections.md | 239 ++++++++++++++++ 2 files changed, 239 insertions(+), 255 deletions(-) delete mode 100644 sources/tech/20200421 Using Python to visualize COVID-19 projections.md create mode 100644 translated/tech/20200421 Using Python to visualize COVID-19 projections.md diff --git a/sources/tech/20200421 Using Python to visualize COVID-19 projections.md b/sources/tech/20200421 Using Python to visualize COVID-19 projections.md deleted file mode 100644 index a1ff4658fb..0000000000 --- a/sources/tech/20200421 Using Python to visualize COVID-19 projections.md +++ /dev/null @@ -1,255 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using Python to visualize COVID-19 projections) -[#]: via: (https://opensource.com/article/20/4/python-data-covid-19) -[#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta) - -Using Python to visualize COVID-19 projections -====== -I'll demonstrate how to create two visualizations of the spread of a -virus across the globe, provided open data and using open source -libraries. -![Colorful sound wave graph][1] - -Using [Python][2] and some graphing libraries, you can project the total number of confirmed cases of COVID-19, and also display the total number of deaths for a country (this article uses India as an example) on a given date. Humans sometimes need help interpreting and processing the meaning of data, so this article also demonstrates how to create an animated horizontal bar graph for five countries, showing the variation of cases by date. - -### Projecting confirmed cases and deaths for India - -This is done in three steps. - -#### 1\. Download data - -Scientific data isn't always open, but fortunately, many modern science and healthcare organizations are eager to share information with each other and the public. Data about COVID-19 cases is available online, and it's updated frequently. - -To parse the data, you first must download it:  - -Load the data directly into a Pandas DataFrame. Pandas provides a function, **read_csv()**, which can take a URL and give back a DataFrame object, as shown below: - - -``` -import pycountry -import plotly.express as px -import pandas as pd -URL_DATASET = r'' -df1 = pd.read_csv(URL_DATASET) -print(df1.head(3))  # Get first 3 entries in the dataframe -print(df1.tail(3))  # Get last 3 entries in the dataframe -``` - -The top row of the data set contains column names: - - 1. Date - 2. Country - 3. Confirmed - 4. Recovered - 5. Deaths - - - -The output of the **head** query includes a unique identifier (not listed as a column) plus an entry for each column: - - -``` -0 2020-01-22 Afghanistan 0 0 0 -1 2020-01-22 Albania 0 0 0 -1 2020-01-22 Algeria 0 0 0 -``` - -The output of the **tail** query is similar but contains the tail end of the data set: - - -``` -12597 2020-03-31 West Bank and Gaza 119 18 1 -12598 2020-03-31 Zambia 35 0 0 -12599 2020-03-31 Zimbabwe 8 0 1 -``` - -From the output, you can see that the DataFrame (**df1**) has the following columns: - - 1. Date - 2. Country - 3. Confirmed - 4. Recovered - 5. Dead - - - -Further, you can see that the **Date** column has entries starting from January 22 to March 31. This database is updated daily, so you will have current values. - -#### 2\. Select data for India - -In this step, we will select only those rows in the DataFrame that include India. This is shown in the script below: - - -``` -#### ----- Step 2 (Select data for India)---- -df_india = df1[df1['Country'] == 'India'] -print(df_india.head(3)) -``` - -#### 3\. Plot data - -Here we create a bar chart. We will put the dates on the X-axis and the number of confirmed cases and the number of deaths on the Y-axis. There are a few noteworthy things about this part of the script which are as follows: - - * The line of code: **plt.rcParams["_figure.figsize"_]=20,20** is meant only for Jupyter. So remove it if you are using some other IDE. - - * Notice the line of code: **ax1 = plt.gca()**. To ensure that both the plots i.e. for confirmed cases as well as for deaths are plotted on the same graph, we need to give to the second graph the **ax** object of the plot. So we use **gca()** to do this. (By the way, 'gca' stands for 'get current axis'). - - - - -The complete script is given below: - - -``` -#  Author:- Anurag Gupta # email:- [999.anuraggupta@gmail.com][3] -%matplotlib inline -import matplotlib.pyplot as plt -import pandas as pd - -#### ----- Step 1 (Download data)---- -URL_DATASET = r'' -df1 = pd.read_csv(URL_DATASET) -# print(df1.head(3))  # Uncomment to see the dataframe - -#### ----- Step 2 (Select data for India)---- -df_india = df1[df1['Country'] == 'India'] -print(df_india.head(3)) - -#### ----- Step 3 (Plot data)---- -# Increase size of plot -plt.rcParams["figure.figsize"]=20,20  # Remove if not on Jupyter -# Plot column 'Confirmed' -df_india.plot(kind = 'bar', x = 'Date', y = 'Confirmed', color = 'blue') - -ax1 = plt.gca() -df_india.plot(kind = 'bar', x = 'Date', y = 'Deaths', color = 'red', ax = ax1) -plt.show() -``` - -The entire script is [available on GitHub][4]. - -### Creating an animated horizontal bar graph for five countries - -Note for Jupyter: To run this in Jupyter as a dynamic animation rather than as a static png, you need to add a magic command at the beginning of your cell, namely: **%matplotlib notebook**. This will keep the figure alive instead of displaying a static png file and can hence also show animations. If you are on another IDE, remove this line. - -#### 1\. Download the data - -This step is exactly the same as in the previous script, and therefore, it need not be repeated. - -#### 2\. Create a list of all dates - -If you examine the data you downloaded, you notice that it has a column **Date**. Now, this column has a date value for each country. So the same date is occurring a number of times. We need to create a list of dates with only unique values. This will be used on the X-axis of our bar charts. We have a line of code like: **list_dates = df[_‘Date’_].unique()**. The **unique()** method will pick up only the unique values for each date. - -#### 3\. Pick five countries and create an **ax** object - -Take a list of five countries. (You can choose whatever countries you prefer, or even increase or decrease the number of countries). I have also taken a list of five colors for the bars of each country. (You can change this too if you like). One important line of code here is: **fig, ax = plt.subplots(figsize=(15, 8))**. This is needed to create an **ax** object. - -#### 4\. Write the call back function - -If you want to do animation in Matplotlib, you need to create an object of a class called **matplotlib.animation.FuncAnimation**. The signature of this class is available online. The constructor of this class, apart from other parameters, also takes a parameter called **func**, and you have to give this parameter a callback function. So in this step, we will write the callback function, which is repeatedly called in order to render the animation. - -#### 5\. Create **FuncAnimation** object - -This step has partly been explained in the previous step. - -Our code to create an object of this class is: - - -``` -my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, -                    frames= list_dates, blit=True, -                    interval=20) -``` - -The three important parameters to be given are: - - * **fig**, which must be given a fig object, which we created earlier. - * **func**, which must be the call back function. - * **frames**, which must contain the variable on which the animation is to be done. Here in our case, it will be the list of dates we created earlier. - - - -#### 6\. Save the animation to an mp4 file - -You can save the animation created into an mp4 file. But for this you need **ffmpeg**. You can download this using pip by **pip install ffmpeg-python**, or using conda (on Jupyter) **install -c conda-forge ffmpeg**. - -And finally, you can run the animation using **plt.show()**. Please note that on many platforms, the **ffmpeg** may not work properly and may require further "tweaking." - - -``` -%matplotlib notebook -#  Author:- Anurag Gupta # email:- [999.anuraggupta@gmail.com][3] -import pandas as pd -import matplotlib.pyplot as plt -import matplotlib.animation as animation -from time import sleep - -#### ---- Step 1:- Download data -URL_DATASET = r'' -df = pd.read_csv(URL_DATASET, usecols = ['Date', 'Country', 'Confirmed']) -# print(df.head(3)) # uncomment this to see output - -#### ---- Step 2:- Create list of all dates -list_dates = df['Date'].unique() -# print(list_dates) # Uncomment to see the dates - -#### --- Step 3:- Pick 5 countries. Also create ax object -fig, ax = plt.subplots(figsize=(15, 8)) -# We will animate for these 5 countries only -list_countries = ['India', 'China', 'US', 'Italy', 'Spain'] -# colors for the 5 horizontal bars -list_colors = ['black', 'red', 'green', 'blue', 'yellow'] - -### --- Step 4:- Write the call back function -# plot_bar() is the call back function used in FuncAnimation class object -def plot_bar(some_date): -    df2 = df[df['Date'].eq(some_date)] -    ax.clear() -    # Only take Confirmed column in descending order -    df3 = df2.sort_values(by = 'Confirmed', ascending = False) -    # Select the top 5 Confirmed countries -    df4 = df3[df3['Country'].isin(list_countries)] -    # print(df4)  # Uncomment to see that dat is only for 5 countries -    sleep(0.2)  # To slow down the animation -    # ax.barh() makes a horizontal bar plot. -    return ax.barh(df4['Country'], df4['Confirmed'], color= list_colors) - -###----Step 5:- Create FuncAnimation object--------- -my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, -                    frames= list_dates, blit=True, -                    interval=20) - -### --- Step 6:- Save the animation to an mp4 -# Place where to save the mp4. Give your file path instead -path_mp4 = r'C:\Python-articles\population_covid2.mp4'   -# my_anim.save(path_mp4, fps=30, extra_args=['-vcodec', 'libx264']) -my_anim.save(filename = path_mp4, writer = 'ffmpeg', -             fps=30, -             extra_args= ['-vcodec', 'libx264', '-pix_fmt', 'yuv420p']) -plt.show() -``` - -The complete script is [available on GitHub][5]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/python-data-covid-19 - -作者:[AnuragGupta][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/999anuraggupta -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) -[2]: https://opensource.com/resources/python -[3]: mailto:999.anuraggupta@gmail.com -[4]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_india -[5]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_animated diff --git a/translated/tech/20200421 Using Python to visualize COVID-19 projections.md b/translated/tech/20200421 Using Python to visualize COVID-19 projections.md new file mode 100644 index 0000000000..3768686e8c --- /dev/null +++ b/translated/tech/20200421 Using Python to visualize COVID-19 projections.md @@ -0,0 +1,239 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using Python to visualize COVID-19 projections) +[#]: via: (https://opensource.com/article/20/4/python-data-covid-19) +[#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta) + +使用 Python 来可视化 COVID-19 预测 +====== + +> 我将演示如何使用开源库利用提供的全球病毒传播的开放数据来创建两个可视效果。 + +![Colorful sound wave graph][1] + +使用 [Python][2] 和一些图形库,你可以预测出 COVID-19 确诊病例的总数,也可以显示一个国家(本文以印度为例)在给定日期的死亡总数。人们有时需要帮助解释和处理数据的意义,所以本文还演示了如何为五个国家创建一个动画横条形图,以显示按日期显示病例的变化。 + +### 印度的确诊病例和死亡人数预测 + +这要分三步来完成。 + +#### 1、下载数据 + +科学数据并不总是开放的,但幸运的是,许多现代科学和医疗机构都乐于相互之间及与公众共享信息。关于 COVID-19 病例的数据可以在网上查到,并且经常更新。 + +要解析这些数据,首先必须先下载。 。 + +直接将数据加载到 Pandas `DataFrame` 中。Pandas 提供了一个函数 `read_csv()`,它可以获取一个 URL 并返回一个 `DataFrame` 对象,如下所示。 + + +``` +import pycountry +import plotly.express as px +import pandas as pd +URL_DATASET = r'https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv' +df1 = pd.read_csv(URL_DATASET) +print(df1.head(3)) # 获取数据帧中的前 3 项 +print(df1.tail(3)) # 获取数据帧中的后 3 项 +``` + +数据集的顶行包含列名。 + +1. `Date` +2. `Country` +3. `Confirmed` +4. `Recovered` +5. `Deaths` + +`head` 查询的输出包括一个唯一的标识符(不作为列列出)和每个列的条目。 + +``` +0 2020-01-22 Afghanistan 0 0 0 +1 2020-01-22 Albania 0 0 0 +1 2020-01-22 Algeria 0 0 0 +``` + +`tail` 查询的输出类似,但包含数据集的尾端。 + +``` +12597 2020-03-31 West Bank and Gaza 119 18 1 +12598 2020-03-31 Zambia 35 0 0 +12599 2020-03-31 Zimbabwe 8 0 1 +``` + +从输出中,可以看到 DataFrame(`df1`)有以下几个列: + +1. 日期 +2. 国家 +3. 确诊 +4. 康复 +5. 死亡 + +此外,你可以看到 `Date` 栏中的条目从 1 月 22 日开始到 3 月 31 日。这个数据库每天都会更新,所以你会有当前的值。 + +#### 2、选择印度的数据 + +在这一步中,我们将只选择 DataFrame 中包含印度的那些行。这在下面的脚本中可以看到。 + +``` +#### ----- Step 2 (Select data for India)---- +df_india = df1[df1['Country'] == 'India'] +print(df_india.head(3)) +``` + +#### 3、数据绘图 + +在这里,我们创建一个条形图。我们将把日期放在 X 轴上,把确诊的病例数和死亡人数放在 Y 轴上。这一部分的脚本有以下几个值得注意的地方。 + + * `plt.rcParams["_figure.figure.figsize"_]=20,20` 这一行代码只适用于 Jupyter。所以如果你使用其他 IDE,请删除它。 + * 注意这行代码:`ax1 = plt.gca()`。为了确保两个图,即确诊病例和死亡病例的图都被绘制在同一个图上,我们需要给第二个图的 `ax` 对象。所以我们使用 `gca()` 来完成这个任务。(顺便说一下,`gca` 代表“get current axis”) + +完整的脚本如下所示。 + +``` +# Author:- Anurag Gupta # email:- 999.anuraggupta@gmail.com +%matplotlib inline +import matplotlib.pyplot as plt +import pandas as pd + +#### ----- Step 1 (Download data)---- +URL_DATASET = r'https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv' +df1 = pd.read_csv(URL_DATASET) +# print(df1.head(3)) # Uncomment to see the dataframe + +#### ----- Step 2 (Select data for India)---- +df_india = df1[df1['Country'] == 'India'] +print(df_india.head(3)) + +#### ----- Step 3 (Plot data)---- +# Increase size of plot +plt.rcParams["figure.figsize"]=20,20 # Remove if not on Jupyter +# Plot column 'Confirmed' +df_india.plot(kind = 'bar', x = 'Date', y = 'Confirmed', color = 'blue') + +ax1 = plt.gca() +df_india.plot(kind = 'bar', x = 'Date', y = 'Deaths', color = 'red', ax = ax1) +plt.show() +``` + +整个脚本[可在 GitHub 上找到][4]。 + +#### 为五个国家创建一个动画水平条形图 + +关于 Jupyter 的注意事项:要在 Jupyter 中以动态动画的形式运行,而不是静态 png 的形式,你需要在单元格的开头添加一个神奇的命令,即: `%matplotlib notebook`。这将使图形保持动态,而不是显示静态的 png 文件,因此也可以显示动画。如果你在其他 IDE 上,请删除这一行。 + +#### 1、下载数据 + +这一步和前面的脚本完全一样,所以不需要重复。 + +#### 2、创建一个所有日期的列表 + +如果你检查你下载的数据,你会发现它有一列 `Date`。现在,这一列对每个国家都有一个日期值。因此,同一个日期会出现多次。我们需要创建一个只具有唯一值的日期列表。这会用在我们条形图的 X 轴上。我们有一行代码,如 `list_dates = df[_'Date'_].unique()`。`unique()` 方法将只提取每个日期的唯一值。 + +#### 3、挑选五个国家并创建一个 `ax` 对象。 + +做一个五个国家的名单。(你可以选择你喜欢的国家,甚至可以增加或减少国家的数量。)我也做了一个五个颜色的列表,每个国家的条形图的颜色对应一种。(如果你喜欢的话,也可以改一下。)这里有一行重要的代码是:`fig, ax = plt.subplots(figsize=(15, 8))`。这是创建一个 `ax` 对象所需要的。 + +#### 4、编写回调函数 + +如果你想在 Matplotlib 中做动画,你需要创建一个名为 `matplotlib.animation.FuncAnimation` 的类的对象。这个类的签名可以在网上查到。这个类的构造函数,除了其他参数外,还需要一个叫 `func` 的参数,你必须给这个参数一个回调函数。所以在这一步中,我们会写个回调函数,这个回调函数会被反复调用,以渲染动画。 + +#### 5、创建 `FuncAnimation` 对象 + +这一步在上一步中已经部分说明了。 + +我们创建这个类的对象的代码是: + +``` +my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, + frames= list_dates, blit=True, + interval=20) +``` + +要给出的三个重要参数是: + +* `fig`,必须给出一个 fig 对象,也就是我们之前创建的 fig 对象。 +* `func`,必须是回调函数。 +* `frames`,必须包含要做动画的变量。在我们这里,它是我们之前创建的日期列表。 + +#### 6、将动画保存为 mp4 文件 + +你可以将创建的动画保存为 mp4 文件。但是,你需要 `ffmpeg`。你可以用 `pip` 下载:`pip install ffmpeg-python`,或者用 conda(在 Jupyter 上):`install -c conda-forge ffmpeg`。 + +最后,你可以使用 `plt.show()` 运行动画。请注意,在许多平台上,`ffmpeg` 可能无法正常工作,可能需要进一步“调整”。 + +``` +%matplotlib notebook +# Author:- Anurag Gupta # email:- 999.anuraggupta@gmail.com +import pandas as pd +import matplotlib.pyplot as plt +import matplotlib.animation as animation +from time import sleep + +#### ---- Step 1:- Download data +URL_DATASET = r'https://raw.githubusercontent.com/datasets/covid-19/master/data/countries-aggregated.csv' +df = pd.read_csv(URL_DATASET, usecols = ['Date', 'Country', 'Confirmed']) +# print(df.head(3)) # uncomment this to see output + +#### ---- Step 2:- Create list of all dates +list_dates = df['Date'].unique() +# print(list_dates) # Uncomment to see the dates + +#### --- Step 3:- Pick 5 countries. Also create ax object +fig, ax = plt.subplots(figsize=(15, 8)) +# We will animate for these 5 countries only +list_countries = ['India', 'China', 'US', 'Italy', 'Spain'] +# colors for the 5 horizontal bars +list_colors = ['black', 'red', 'green', 'blue', 'yellow'] + +### --- Step 4:- Write the call back function +# plot_bar() is the call back function used in FuncAnimation class object +def plot_bar(some_date): + df2 = df[df['Date'].eq(some_date)] + ax.clear() + # Only take Confirmed column in descending order + df3 = df2.sort_values(by = 'Confirmed', ascending = False) + # Select the top 5 Confirmed countries + df4 = df3[df3['Country'].isin(list_countries)] + # print(df4) # Uncomment to see that dat is only for 5 countries + sleep(0.2) # To slow down the animation + # ax.barh() makes a horizontal bar plot. + return ax.barh(df4['Country'], df4['Confirmed'], color= list_colors) + +###----Step 5:- Create FuncAnimation object--------- +my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, + frames= list_dates, blit=True, + interval=20) + +### --- Step 6:- Save the animation to an mp4 +# Place where to save the mp4. Give your file path instead +path_mp4 = r'C:\Python-articles\population_covid2.mp4' +# my_anim.save(path_mp4, fps=30, extra_args=['-vcodec', 'libx264']) +my_anim.save(filename = path_mp4, writer = 'ffmpeg', + fps=30, + extra_args= ['-vcodec', 'libx264', '-pix_fmt', 'yuv420p']) +plt.show() +``` + +完整的脚本[可以在 GitHub 上找到][5]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/python-data-covid-19 + +作者:[AnuragGupta][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/999anuraggupta +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://opensource.com/resources/python +[3]: mailto:999.anuraggupta@gmail.com +[4]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_india +[5]: https://raw.githubusercontent.com/ag999git/jupyter_notebooks/master/corona_bar_animated From 0186888ddb45ff748be764b1f41eb9d95fe785bd Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Tue, 28 Apr 2020 21:05:34 +0800 Subject: [PATCH 307/394] TSL --- .../20200425 Inlining optimisations in Go.md | 215 ------------------ .../20200425 Inlining optimisations in Go.md | 211 +++++++++++++++++ 2 files changed, 211 insertions(+), 215 deletions(-) delete mode 100644 sources/tech/20200425 Inlining optimisations in Go.md create mode 100644 translated/tech/20200425 Inlining optimisations in Go.md diff --git a/sources/tech/20200425 Inlining optimisations in Go.md b/sources/tech/20200425 Inlining optimisations in Go.md deleted file mode 100644 index 0e29d0d178..0000000000 --- a/sources/tech/20200425 Inlining optimisations in Go.md +++ /dev/null @@ -1,215 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Inlining optimisations in Go) -[#]: via: (https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go) -[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) - -Inlining optimisations in Go -====== - -This is a post about how the Go compiler implements inlining and how this optimisation affects your Go code. - -_n.b._ This article focuses on _gc_, the de facto Go compiler from [golang.org][1]. The concepts discussed apply broadly to other Go compilers like gccgo and llgo but may differ in implementation and efficacy. - -### What is inlining? - -Inlining is the act of combining smaller functions into their respective callers. In the early days of computing this optimisation was typically performed by hand. Nowadays inlining is one of a class of fundamental optimisations performed automatically during the compilation process. - -### Why is inlining important? - -Inlining is important for two reasons. The first is it removes the overhead of the function call itself. The second is it permits the compiler to more effectively apply other optimisation strategies. - -#### Function call overhead - -Calling a function[1][2] in any language carries a cost. There are the overheads of marshalling parameters into registers or onto the stack (depending on the ABI) and reversing the process on return. Invoking a function call involves jumping the program counter from one point in the instruction stream to another which can cause a pipeline stall. Once inside the function there is usually some preamble required to prepare a new stack frame for the function to execute and a similar epilogue needed to retire the frame before returning to the caller. - -In Go a function call carries additional costs to support dynamic stack growth. On entry the amount of stack space available to the goroutine is compared to the amount required for the function. If insufficient stack space is available, the preamble jumps into the runtime logic that grows the stack by copying it to a new, larger, location. Once this is done the runtime jumps back to the start of the original function, the stack check is performed again, which now passes, and the call continues. In this way goroutines can start with a small stack allocation which grows only when needed.[2][3] - -This check is cheap–only a few instructions–and because goroutine stacks grows geometrically the check rarely fails. Thus, the branch prediction unit inside a modern processor can hide the cost of the stack check by assuming it will always be successful. In the case where the processor mis-predicts the stack check and has to discard the work done while it was executing speculatively, the cost of the pipeline stall is relatively small compared to the cost of the work needed for the runtime to grow a goroutines stack. - -While the overhead of the generic and Go specific components of each function call are well optimised by modern processors using speculative execution techniques, those overheads cannot be entirely eliminated, thus each function call carries with it a performance cost over and above the time it takes to perform useful work. As a function call’s overhead is fixed, smaller functions pay a larger cost relative to larger ones because they tend to do less useful work per invocation. - -The solution to eliminating these overheads must therefore be to eliminate the function call itself, which the Go compiler does, under certain conditions, by replacing the call to a function with the contents of the function. This is known as _inlining_ because it brings the body of the function in line with its caller. - -#### Improved optimisation opportunities - -Dr. Cliff Click describes inlining as _the_ optimisation performed by modern compilers as it forms the basis for optimisations like constant proportion and dead code elimination. In effect, inlining allows the compiler to _see_ _furthe_r, allowing it to observe, in the context that a particular function is being called, logic that can be further simplified or eliminated entirely. As inlining can be applied recursively optimisation decisions can be made not only in the context of each individual function, but also applied to the chain of functions in a call path. - -### Inlining in action - -The effects of inlining can be demonstrated with this small example - -``` -package main - -import "testing" - -//go:noinline -func max(a, b int) int { - if a > b { - return a - } - return b -} - -var Result int - -func BenchmarkMax(b *testing.B) { - var r int - for i := 0; i < b.N; i++ { - r = max(-1, i) - } - Result = r -} -``` - -Running this benchmark gives the following result:[3][4] - -``` -% go test -bench=.  -BenchmarkMax-4   530687617         2.24 ns/op -``` - -The cost of `max(-1, i)` is around 2.24 nanoseconds on my 2015 MacBook Air. Now let’s remove the `//go:noinline` pragma and see the result: - -``` -% go test -bench=.  -BenchmarkMax-4   1000000000         0.514 ns/op -``` - -From 2.24 ns to 0.51 ns, or according to `benchstat`, a 78% improvement. - -``` -% benchstat {old,new}.txt -name   old time/op  new time/op  delta -Max-4  2.21ns ± 1%  0.49ns ± 6%  -77.96%  (p=0.000 n=18+19) -``` - -Where did these improvements come from? - -First, the removal of the function call and associated preamble[4][5] was a major contributor. Pulling the contents of `max` into its caller reduced the number of instructions executed by the processor and eliminated several branches. - -Now the contents of `max` are visible to the compiler as it optimises `BenchmarkMax` it can make some additional improvements. Consider that once `max` is inlined, this is what the body of `BenchmarkMax` looks like to the compiler: - -``` -func BenchmarkMax(b *testing.B) { - var r int - for i := 0; i < b.N; i++ { - if -1 > i { - r = -1 - } else { - r = i - } - } - Result = r -} -``` - -Running the benchmark again we see our manually inlined version performs as well as the version inlined by the compiler - -``` -% benchstat {old,new}.txt -name   old time/op  new time/op  delta -Max-4  2.21ns ± 1%  0.48ns ± 3%  -78.14%  (p=0.000 n=18+18) -``` - -Now the compiler has access to the result of inlining `max` into `BenchmarkMax` it can apply optimisation passes which were not possible before. For example, the compiler has noted that `i` is initialised to `0` and only incremented so any comparison with `i` can assume `i` will never be negative. Thus, the condition `-1 > i` will never be true.[5][6] - -Having proved that `-1 > i` will never be true, the compiler can simplify the code to - -``` -func BenchmarkMax(b *testing.B) { - var r int - for i := 0; i < b.N; i++ { - if false { - r = -1 - } else { - r = i - } - } - Result = r -} -``` - -and because the branch is now a constant, the compiler can eliminate the unreachable path leaving it with - -``` -func BenchmarkMax(b *testing.B) { - var r int - for i := 0; i < b.N; i++ { - r = i - } - Result = r -} -``` - -Thus, through inlining and the optimisations it unlocks, the compiler has reduced the expression `r = max(-1, i)` to simply `r = i`. - -### The limits of inlining - -In this article I’ve discussed, so called, _leaf_ inlining; the act of inlining a function at the bottom of a call stack into its direct caller. Inlining is a recursive process, once a function has been inlined into its caller, the compiler may inline the resulting code into _its_ caller, as so on. For example, this code - -``` -func BenchmarkMaxMaxMax(b *testing.B) { - var r int - for i := 0; i < b.N; i++ { - r = max(max(-1, i), max(0, i)) - } - Result = r -} -``` - -runs as fast as the previous example as the compiler is able to repeatedly apply the optimisations outlined above to reduce the code to the same `r = i` expression. - -In the next article I’ll discuss an alternative inlining strategy when the Go compiler wishes to inline a function in the middle of a call stack. Finally I’ll discuss the limits that the compiler is prepared to go to to inline code, and which Go constructs are currently beyond its capability. - - 1. In Go, a method is just a function with a predefined formal parameter, the receiver. The relative costs of calling a free function vs a invoking a method, assuming that method is not called through an interface, are the same.[][7] - 2. Up until Go 1.14 the stack check preamble was also used by the garbage collector to stop the world by setting all active goroutine’s stacks to zero, forcing them to trap into the runtime the next time they made a function call. This system was [recently replaced][8] with a mechanism which allowed the runtime to pause an goroutine without waiting for it to make a function call.[][9] - 3. I’m using the `//go:noinline` pragma to prevent the compiler from inlining `max`. This is because I want to isolate the effects of inlining on `max` rather than disabling optimisations globally with `-gcflags='-l -N'`. I go into detail about the `//go:` comments in [this presentation][10].[][11] - 4. You can check this for yourself by comparing the output of `go test -bench=. -gcflags=-S` with and without the `//go:noinline` annotation.[][12] - 5. You can check this yourself with the `-gcflags=-d=ssa/prove/debug=on` flag.[][13] - - - -#### Related posts: - - 1. [Five things that make Go fast][14] - 2. [Why is a Goroutine’s stack infinite ?][15] - 3. [How to write benchmarks in Go][16] - 4. [Go’s hidden #pragmas][17] - - - --------------------------------------------------------------------------------- - -via: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go - -作者:[Dave Cheney][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://dave.cheney.net/author/davecheney -[b]: https://github.com/lujun9972 -[1]: https://github.com/golang/go -[2]: tmp.gBQ2tEtMHc#easy-footnote-bottom-1-4053 (In Go, a method is just a function with a predefined formal parameter, the receiver. The relative costs of calling a free function vs a invoking a method, assuming that method is not called through an interface, are the same.) -[3]: tmp.gBQ2tEtMHc#easy-footnote-bottom-2-4053 (Up until Go 1.14 the stack check preamble was also used by the garbage collector to stop the world by setting all active goroutine’s stacks to zero, forcing them to trap into the runtime the next time they made a function call. This system was recently replaced with a mechanism which allowed the runtime to pause an goroutine without waiting for it to make a function call.) -[4]: tmp.gBQ2tEtMHc#easy-footnote-bottom-3-4053 (I’m using the //go:noinline pragma to prevent the compiler from inlining max. This is because I want to isolate the effects of inlining on max rather than disabling optimisations globally with -gcflags='-l -N'. I go into detail about the //go: comments in this presentation.) -[5]: tmp.gBQ2tEtMHc#easy-footnote-bottom-4-4053 (You can check this for yourself by comparing the output of go test -bench=. -gcflags=-S with and without the //go:noinline annotation.) -[6]: tmp.gBQ2tEtMHc#easy-footnote-bottom-5-4053 (You can check this yourself with the -gcflags=-d=ssa/prove/debug=on flag.) -[7]: tmp.gBQ2tEtMHc#easy-footnote-1-4053 -[8]: https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md -[9]: tmp.gBQ2tEtMHc#easy-footnote-2-4053 -[10]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas -[11]: tmp.gBQ2tEtMHc#easy-footnote-3-4053 -[12]: tmp.gBQ2tEtMHc#easy-footnote-4-4053 -[13]: tmp.gBQ2tEtMHc#easy-footnote-5-4053 -[14]: https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast (Five things that make Go fast) -[15]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?) -[16]: https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go (How to write benchmarks in Go) -[17]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas (Go’s hidden #pragmas) diff --git a/translated/tech/20200425 Inlining optimisations in Go.md b/translated/tech/20200425 Inlining optimisations in Go.md new file mode 100644 index 0000000000..80f86ae47e --- /dev/null +++ b/translated/tech/20200425 Inlining optimisations in Go.md @@ -0,0 +1,211 @@ +[#]: collector: (lujun9972) +[#]: translator: (lxbwolf) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Inlining optimisations in Go) +[#]: via: (https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go) +[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) + +Go 中的内联优化 +====== + +本文讨论 Go 编译器是如何实现内联的以及这种优化方法如何影响你的 Go 代码。 + +*请注意:*本文重点讨论 *gc*,实际上是 [golang.org](https://github.com/golang/go) 的 Go 编译器。讨论到的概念可以广泛用于其他 Go 编译器,如 gccgo 和 llgo,但它们在实现方式和功能上可能有所差异。 + +### 内联是什么? + +内联就是把简短的函数在调用它的地方展开。在计算机发展历程的早期,这个优化是由程序员手动实现的。现在,内联已经成为编译过程中自动实现的基本优化过程的其中一步。 + +### 为什么内联很重要? + +有两个原因。第一个是它消除了函数调用本身的虚耗。第二个是它使得编译器能更高效地执行其他的优化策略。 + +#### 函数调用的虚耗 + +在任何语言中,调用一个函数 [1][2] 都会有消耗。把参数编组进寄存器或放入栈中(取决于 ABI),在返回结果时倒序取出时会有虚耗。引入一次函数调用会导致程序计数器从指令流的一点跳到另一点,这可能导致管道阻塞。函数内部通常有前置处理,需要为函数执行准备新的栈帧,还有与前置相似的后续处理,需要在返回给调用方之前释放栈帧空间。 + +在 Go 中函数调用会消耗额外的资源来支持栈的动态增长。在进入函数时,goroutine 可用的栈空间与函数需要的空间大小相等。如果可用空间不同,前置处理就会跳到把数据复制到一块新的、更大的空间的运行时逻辑,而这会导致栈空间变大。当这个复制完成后,运行时跳回到原来的函数入口,再执行栈空间检查,函数调用继续执行。这种方式下,goroutine 开始时可以申请很小的栈空间,在有需要时再申请更大的空间。[2][3] + +这个检查消耗很小 — 只有几个指令 — 而且由于 goroutine 是成几何级数增长的,因此这个检查很少失败。这样,现代处理器的分支预测单元会通过假定检查肯定会成功来隐藏栈空间检查的消耗。当处理器预测错了栈空间检查,必须要抛弃它推测性执行的操作时,与为了增加 goroutine 的栈空间运行时所需的操作消耗的资源相比,管道阻塞的代价更小。 + +虽然现代处理器可以用预测性执行技术优化每次函数调用中的泛型和 Go 特定的元素的虚耗,但那些虚耗不能被完全消除,因此在每次函数调用执行必要的工作过程中都会有性能消耗。一次函数调用本身的虚耗是固定的,与更大的函数相比,调用小函数的代价更大,因为在每次调用过程中它们做的有用的工作更少。 + +消除这些虚耗的方法必须是要消除函数调用本身,Go 的编译器就是这么做的,在某些条件下通过用函数的内容来替换函数调用来实现。这个过程被称为*内联*,因为它在函数调用处把函数体展开了。 + +#### 改进的优化机会 + +Cliff Click 博士把内联描述为现代编译器做的优化措施,像常量传播(译注:此处作者笔误,原文为 constant proportion,修正为 constant propagation)和死码消除一样,都是编译器的基本优化方法。实际上,内联可以让编译器看得更深,使编译器可以观察调用的特定函数的上下文内容,可以看到能继续简化或彻底消除的逻辑。由于可以递归地执行内联,因此不仅可以在每个独立的函数上下文处进行这种优化,也可以在整个函数调用链中进行。 + +### 实践中的内联 + +下面这个例子可以演示内联的影响: + +```go +package main + +import "testing" + +//go:noinline +func max(a, b int) int { + if a > b { + return a + } + return b +} + +var Result int + +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = max(-1, i) + } + Result = r +} +``` + +运行这个基准,会得到如下结果:[3](https://github.com/LCTT/TranslateProject/blob/master/sources/tech/tmp.gBQ2tEtMHc#easy-footnote-bottom-3-4053) + +```bash +% go test -bench=. +BenchmarkMax-4 530687617 2.24 ns/op +``` + +在我的 2015 MacBook Air 上 `max(-1, i)` 的耗时约为 2.24 纳秒。现在去掉 `//go:noinline` 编译指令,再看下结果: + +```bash +% go test -bench=. +BenchmarkMax-4 1000000000 0.514 ns/op +``` + +从 2.24 纳秒降到了 0.51 纳秒,或者从 `benchstat` 的结果可以看出,有 78% 的提升。 + +```bash +% benchstat {old,new}.txt +name old time/op new time/op delta +Max-4 2.21ns ± 1% 0.49ns ± 6% -77.96% (p=0.000 n=18+19) +``` + +这个提升是从哪儿来的呢? + +首先,移除掉函数调用以及与之关联的前置处理 [4](https://github.com/LCTT/TranslateProject/blob/master/sources/tech/tmp.gBQ2tEtMHc#easy-footnote-bottom-4-4053) 是主要因素。把 `max` 函数的函数体在调用处展开,减少了处理器执行的指令数量并且消除了一些分支。 + +现在由于编译器优化了 `BenchmarkMax`,因此它可以看到 `max` 函数的内容,进而可以做更多的提升。当 `max` 被内联后,`BenchmarkMax` 呈现给编译器的样子,看起来是这样的: + +```go +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + if -1 > i { + r = -1 + } else { + r = i + } + } + Result = r +} +``` + +再运行一次基准,我们看一下手动内联的版本和编译器内联的版本的表现: + +```bash +% benchstat {old,new}.txt +name old time/op new time/op delta +Max-4 2.21ns ± 1% 0.48ns ± 3% -78.14% (p=0.000 n=18+18) +``` + +现在编译器能看到在 `BenchmarkMax` 里内联 `max` 的结果,可以执行以前不能执行的优化措施。例如,编译器注意到 `i` 初始值为 `0`,仅做自增操作,因此所有与 `i` 的比较都可以假定 `i` 不是负值。这样条件表达式 `-1 > i` 永远不是 true。[5](https://github.com/LCTT/TranslateProject/blob/master/sources/tech/tmp.gBQ2tEtMHc#easy-footnote-bottom-5-4053) + +证明了 `-1 > i` 永远不为 true 后,编译器可以把代码简化为: + +```go +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + if false { + r = -1 + } else { + r = i + } + } + Result = r +} +``` + +并且因为分支里是个常量,编译器可以通过下面的方式移除不会走到的分支: + +```go +func BenchmarkMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = i + } + Result = r +} +``` + +这样,通过内联和由内联解锁的优化过程,编译器把表达式 `r = max(-1, i))` 简化为 `r = i`。 + +### 内联的限制 + +本文中我论述的内联称作*叶子*内联;把函数调用栈中最底层的函数在调用它的函数处展开的行为。内联是个递归的过程,当把函数内联到调用它的函数 A 处后,编译器会把内联后的结果代码再内联到 A 的调用方,这样持续内联下去。例如,下面的代码: + +```go +func BenchmarkMaxMaxMax(b *testing.B) { + var r int + for i := 0; i < b.N; i++ { + r = max(max(-1, i), max(0, i)) + } + Result = r +} +``` + +与之前的例子中的代码运行速度一样快,因为编译器可以对上面的代码重复地进行内联,也把代码简化到 `r = i` 表达式。 + +下一篇文章中,我会论述当 Go 编译器想要内联函数调用栈中间的某个函数时选用的另一种内联策略。最后我会论述编译器为了内联代码准备好要达到的极限,这个极限 Go 现在的能力还达不到。 + +1. 在 Go 中,一个方法就是一个有预先定义的形参和接受者的函数。假设这个方法不是通过接口调用的,调用一个无消耗的函数所消耗的代价与引入一个方法是相同的。 +2. 在 Go 1.14 以前,栈检查的前置处理也被 gc 用于 STW,通过把所有活跃的 goroutine 栈空间设为 0,来强制它们切换为下一次函数调用时的运行时状态。这个机制[最近被替换](https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md)为一种新机制,新机制下运行时可以不用等 goroutine 进行函数调用就可以暂停 goroutine。 +3. 我用 `//go:noinline` 编译指令来阻止编译器内联 `max`。这是因为我想把内联 `max` 的影响与其他影响隔离开,而不是用 `-gcflags='-l -N'` 选项在全局范围内禁止优化。 +4. 你可以自己通过比较 `go test -bench=. -gcflags=-S`有无 `//go:noinline` 注释时的不同结果来验证一下。 +5. 你可以用 `-gcflags=-d=ssa/prove/debug=on` 选项来自己验证一下。 + +#### 相关文章: + +1. [使 Go 变快的 5 件事](https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast) +2. [为什么 Goroutine 的栈空间会无限增长?](https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite) +3. [Go 中怎么写基准测试](https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go) +4. [Go 中隐藏的编译指令](https://dave.cheney.net/2018/01/08/gos-hidden-pragmas) + +-------------------------------------------------------------------------------- + +via: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go + +作者:[Dave Cheney][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://dave.cheney.net/author/davecheney +[b]: https://github.com/lujun9972 +[1]: https://github.com/golang/go +[2]: tmp.gBQ2tEtMHc#easy-footnote-bottom-1-4053 (In Go, a method is just a function with a predefined formal parameter, the receiver. The relative costs of calling a free function vs a invoking a method, assuming that method is not called through an interface, are the same.) +[3]: tmp.gBQ2tEtMHc#easy-footnote-bottom-2-4053 (Up until Go 1.14 the stack check preamble was also used by the garbage collector to stop the world by setting all active goroutine’s stacks to zero, forcing them to trap into the runtime the next time they made a function call. This system was recently replaced with a mechanism which allowed the runtime to pause an goroutine without waiting for it to make a function call.) +[4]: tmp.gBQ2tEtMHc#easy-footnote-bottom-3-4053 (I’m using the //go:noinline pragma to prevent the compiler from inlining max. This is because I want to isolate the effects of inlining on max rather than disabling optimisations globally with -gcflags='-l -N'. I go into detail about the //go: comments in this presentation.) +[5]: tmp.gBQ2tEtMHc#easy-footnote-bottom-4-4053 (You can check this for yourself by comparing the output of go test -bench=. -gcflags=-S with and without the //go:noinline annotation.) +[6]: tmp.gBQ2tEtMHc#easy-footnote-bottom-5-4053 (You can check this yourself with the -gcflags=-d=ssa/prove/debug=on flag.) +[7]: tmp.gBQ2tEtMHc#easy-footnote-1-4053 +[8]: https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md +[9]: tmp.gBQ2tEtMHc#easy-footnote-2-4053 +[10]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas +[11]: tmp.gBQ2tEtMHc#easy-footnote-3-4053 +[12]: tmp.gBQ2tEtMHc#easy-footnote-4-4053 +[13]: tmp.gBQ2tEtMHc#easy-footnote-5-4053 +[14]: https://dave.cheney.net/2014/06/07/five-things-that-make-go-fast (Five things that make Go fast) +[15]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?) +[16]: https://dave.cheney.net/2013/06/30/how-to-write-benchmarks-in-go (How to write benchmarks in Go) +[17]: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas (Go’s hidden #pragmas) From 711b86d8e1bd4020f0e59406d2db0484ac01c056 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Tue, 28 Apr 2020 21:21:03 +0800 Subject: [PATCH 308/394] modify --- .../20200425 Inlining optimisations in Go.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/translated/tech/20200425 Inlining optimisations in Go.md b/translated/tech/20200425 Inlining optimisations in Go.md index 80f86ae47e..dc13968c1d 100644 --- a/translated/tech/20200425 Inlining optimisations in Go.md +++ b/translated/tech/20200425 Inlining optimisations in Go.md @@ -66,7 +66,7 @@ func BenchmarkMax(b *testing.B) { } ``` -运行这个基准,会得到如下结果:[3](https://github.com/LCTT/TranslateProject/blob/master/sources/tech/tmp.gBQ2tEtMHc#easy-footnote-bottom-3-4053) +运行这个基准,会得到如下结果:[3][4] ```bash % go test -bench=. @@ -90,7 +90,7 @@ Max-4 2.21ns ± 1% 0.49ns ± 6% -77.96% (p=0.000 n=18+19) 这个提升是从哪儿来的呢? -首先,移除掉函数调用以及与之关联的前置处理 [4](https://github.com/LCTT/TranslateProject/blob/master/sources/tech/tmp.gBQ2tEtMHc#easy-footnote-bottom-4-4053) 是主要因素。把 `max` 函数的函数体在调用处展开,减少了处理器执行的指令数量并且消除了一些分支。 +首先,移除掉函数调用以及与之关联的前置处理 [4][5] 是主要因素。把 `max` 函数的函数体在调用处展开,减少了处理器执行的指令数量并且消除了一些分支。 现在由于编译器优化了 `BenchmarkMax`,因此它可以看到 `max` 函数的内容,进而可以做更多的提升。当 `max` 被内联后,`BenchmarkMax` 呈现给编译器的样子,看起来是这样的: @@ -116,7 +116,7 @@ name old time/op new time/op delta Max-4 2.21ns ± 1% 0.48ns ± 3% -78.14% (p=0.000 n=18+18) ``` -现在编译器能看到在 `BenchmarkMax` 里内联 `max` 的结果,可以执行以前不能执行的优化措施。例如,编译器注意到 `i` 初始值为 `0`,仅做自增操作,因此所有与 `i` 的比较都可以假定 `i` 不是负值。这样条件表达式 `-1 > i` 永远不是 true。[5](https://github.com/LCTT/TranslateProject/blob/master/sources/tech/tmp.gBQ2tEtMHc#easy-footnote-bottom-5-4053) +现在编译器能看到在 `BenchmarkMax` 里内联 `max` 的结果,可以执行以前不能执行的优化措施。例如,编译器注意到 `i` 初始值为 `0`,仅做自增操作,因此所有与 `i` 的比较都可以假定 `i` 不是负值。这样条件表达式 `-1 > i` 永远不是 true。[5][6] 证明了 `-1 > i` 永远不为 true 后,编译器可以把代码简化为: @@ -166,11 +166,11 @@ func BenchmarkMaxMaxMax(b *testing.B) { 下一篇文章中,我会论述当 Go 编译器想要内联函数调用栈中间的某个函数时选用的另一种内联策略。最后我会论述编译器为了内联代码准备好要达到的极限,这个极限 Go 现在的能力还达不到。 -1. 在 Go 中,一个方法就是一个有预先定义的形参和接受者的函数。假设这个方法不是通过接口调用的,调用一个无消耗的函数所消耗的代价与引入一个方法是相同的。 -2. 在 Go 1.14 以前,栈检查的前置处理也被 gc 用于 STW,通过把所有活跃的 goroutine 栈空间设为 0,来强制它们切换为下一次函数调用时的运行时状态。这个机制[最近被替换](https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md)为一种新机制,新机制下运行时可以不用等 goroutine 进行函数调用就可以暂停 goroutine。 -3. 我用 `//go:noinline` 编译指令来阻止编译器内联 `max`。这是因为我想把内联 `max` 的影响与其他影响隔离开,而不是用 `-gcflags='-l -N'` 选项在全局范围内禁止优化。 -4. 你可以自己通过比较 `go test -bench=. -gcflags=-S`有无 `//go:noinline` 注释时的不同结果来验证一下。 -5. 你可以用 `-gcflags=-d=ssa/prove/debug=on` 选项来自己验证一下。 +1. 在 Go 中,一个方法就是一个有预先定义的形参和接受者的函数。假设这个方法不是通过接口调用的,调用一个无消耗的函数所消耗的代价与引入一个方法是相同的。[][7] +2. 在 Go 1.14 以前,栈检查的前置处理也被 gc 用于 STW,通过把所有活跃的 goroutine 栈空间设为 0,来强制它们切换为下一次函数调用时的运行时状态。这个机制[最近被替换][8]为一种新机制,新机制下运行时可以不用等 goroutine 进行函数调用就可以暂停 goroutine。[][9] +3. 我用 `//go:noinline` 编译指令来阻止编译器内联 `max`。这是因为我想把内联 `max` 的影响与其他影响隔离开,而不是用 `-gcflags='-l -N'` 选项在全局范围内禁止优化。关于 `//go:` 注释在[这篇文章][10]中详细论述。[][11] +4. 你可以自己通过比较 `go test -bench=. -gcflags=-S`有无 `//go:noinline` 注释时的不同结果来验证一下。[][12] +5. 你可以用 `-gcflags=-d=ssa/prove/debug=on` 选项来自己验证一下。[][13] #### 相关文章: From 18324716b266335f6a4abff2998ae23bdcec4871 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 28 Apr 2020 22:33:30 +0800 Subject: [PATCH 309/394] PRF @geekpi --- ...e and Open Source Audio-Video Converter.md | 37 +++++++++---------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md index 1c8c5e6fe4..f9e8e8cf16 100644 --- a/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md +++ b/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md @@ -1,26 +1,28 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter) [#]: via: (https://itsfoss.com/mystiq/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -MystiQ:一个免费开源音频/视频转换器 +MystiQ:一个自由开源的音视频转换器 ====== -_**简述:MystiQ 是可用于 Linux 和 Windows 的新开源视频转换器工具。它的底层使用 FFMPEG,并为你提供基于 Qt 的整洁干净的图形界面。**_ +![](https://img.linux.net.cn/data/attachment/album/202004/28/223258cr9rxzyrj344kh68.jpg) + +> MystiQ 是一款全新的开源视频转换工具,适用于 Linux 和 Windows。它的底层使用 FFMPEG,并为你提供了一个基于 Qt 的整洁干净的图形界面。 ### MystiQ,一个基于 QT 的 FFmpeg GUI 前端 ![][1] -一个音频/视频转换工具可为跨多个平台的每位计算机用户提供方便。 +音频/视频转换工具可为每位跨多个平台的计算机用户提供方便。 -出于同样的原因,我着重介绍 [MystiQ][2] 是个好主意,这是一个相对较新的视频/音频转换器工具,可用于 Linux 和 Windows。截至目前,它还不支持 macOS,但可能会在不久的将来出现。 +出于同样的原因,我想着重介绍 [MystiQ][2] 是个好主意,这是一个相对较新的视频/音频转换器工具,适用于 Linux 和 Windows。截至目前,它还不支持 macOS,但可能会在不久的将来支持。 -MystiQ 是基于 [Qt 5 界面][4]的 [FFmpeg][3] 图形前端。 现在,你可以随时[在 Linux 命令行中安装并使用 ffmpeg][5],但这不是很舒服,是吗? 这就是为什么 [Handbrake][6] 和 MystiQ 之类的工具可以使我们的生活更轻松的原因。 +MystiQ 是基于 [Qt 5 界面][4]的 [FFmpeg][3] 图形前端。现在,你可以随时[在 Linux 命令行中安装并使用 ffmpeg][5],但这不是很舒服,是吗?这就是为什么 [Handbrake][6] 和 MystiQ 之类的工具可以使我们的生活更方便的原因。 由于 MystiQ 基于 FFmpeg,因此你可以将其用于一些基本的视频编辑,例如修剪、旋转等。 @@ -34,36 +36,31 @@ MystiQ 是基于 [Qt 5 界面][4]的 [FFmpeg][3] 图形前端。 现在,你可 * 视频转换 * 音频转换(也可从视频中提取音频) - * 支持格式:MP4、WEBM、MKV、MP3、MOV、OGG、WAV、ASF、FLV、3GP、M4A 等。 + * 支持的格式:MP4、WEBM、MKV、MP3、MOV、OGG、WAV、ASF、FLV、3GP、M4A 等。 * 跨平台(Windows 和 Linux) * 适用于 32 位和 64 位系统的安装包 * 能够调整音频质量(采样率、比特率等)进行转换 - * **基本视频编辑功能**(剪辑视频、插入字幕、旋转视频、缩放视频等) + * 基本的视频编辑功能(剪辑视频、插入字幕、旋转视频、缩放视频等) * 将彩色视频转换为黑白 - * 可轻松转换视频的多个预设以获得最佳质量或获得最佳压缩效果。 - - -#### [在 Linux 中使用 SoundConverter 轻松转换音频文件格式][9] - -如果你想将音频文件格式转换为 wav、mp3、ogg 或任何其他格式,SoundConverter 是你在 Linux 中所需的工具。 + * 有几个预设方案,可轻松转换视频以获得最佳质量或获得最佳压缩效果。 ### 安装 MystiQ 你可能没有在软件中心中找到它,但将它安装在 Linux 发行版上非常容易。 -它提供了 **.AppImage** 文件和 **.deb/.rpm** 文件(32 位和 64 位软件包)。如果你好奇想使用的话,可以阅读[如何使用 AppImage 文件][10]。 +它提供了 .AppImage 文件和 .deb / .rpm 文件(32 位和 64 位软件包)。如果你不清楚如何使用的话,可以阅读[如何使用 AppImage 文件][10]。 如果你想帮助他们测试软件进行改进,你还可以找到他们的 [GitHub 页面][11],并查看源码或任何近期的预发布软件包。 你可以在其官方网站下载适用于 Linux 和 Windows 的安装程序文件。 -[下载 MystiQ][2] +- [下载 MystiQ][2] -**总结** +### 总结 -在本文中,我使用 [Pop!\_OS][12] 20.04 测试了 MytiQ 转换器,并且在转换视频和音频时没遇到问题。而且,对于像我这样的普通用户来说,它的转换速度足够快。 +在本文中,我使用 [Pop!_OS][12] 20.04 测试了 MytiQ 转换器,并且在转换视频和音频时没遇到任何问题。而且,对于像我这样的普通用户来说,它的转换速度足够快。 -请尝试一下,让我知道你对它的想法!另外,如果你在 Linux 上一直使用其他工具转换视频和音频,那它是什么? +欢迎尝试一下,让我知道你对它的想法!另外,如果你在 Linux 上一直使用其他工具转换视频和音频,那它是什么? -------------------------------------------------------------------------------- @@ -72,7 +69,7 @@ via: https://itsfoss.com/mystiq/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From b186bf1620d39d846764aa952c4bf5768961975c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Tue, 28 Apr 2020 22:34:15 +0800 Subject: [PATCH 310/394] PUB @geekpi https://linux.cn/article-12160-1.html --- ...21 MystiQ- A Free and Open Source Audio-Video Converter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md (98%) diff --git a/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/published/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md similarity index 98% rename from translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md rename to published/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md index f9e8e8cf16..c4c99dac95 100644 --- a/translated/tech/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md +++ b/published/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12160-1.html) [#]: subject: (MystiQ: A Free and Open Source Audio/Video Converter) [#]: via: (https://itsfoss.com/mystiq/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From 80391aec594fe5c70820faf2e08a42b872344c9d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 00:55:21 +0800 Subject: [PATCH 311/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20Upgrad?= =?UTF-8?q?ing=20Fedora=2031=20to=20Fedora=2032?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md --- ...200428 Upgrading Fedora 31 to Fedora 32.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md diff --git a/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md b/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md new file mode 100644 index 0000000000..1807d5e6a7 --- /dev/null +++ b/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md @@ -0,0 +1,99 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Upgrading Fedora 31 to Fedora 32) +[#]: via: (https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/) +[#]: author: (Adam Šamalík https://fedoramagazine.org/author/asamalik/) + +Upgrading Fedora 31 to Fedora 32 +====== + +![][1] + +Fedora 32 [is available now][2]. You’ll likely want to upgrade your system to get the latest features available in Fedora. Fedora Workstation has a graphical upgrade method. Alternatively, Fedora offers a command-line method for upgrading Fedora 30 to Fedora 31. + +Before upgrading, visit the [wiki page of common Fedora 32 bugs][3] to see if there’s an issue that might affect your upgrade. Although the Fedora community tries to ensure upgrades work well, there’s no way to guarantee this for every combination of hardware and software that users might have. + +### Upgrading Fedora 31 Workstation to Fedora 32 + +Soon after release time, a notification appears to tell you an upgrade is available. You can click the notification to launch the **GNOME Software** app. Or you can choose Software from GNOME Shell. + +Choose the _Updates_ tab in GNOME Software and you should see a screen informing you that Fedora 32 is Now Available. + +If you don’t see anything on this screen, try using the reload button at the top left. It may take some time after release for all systems to be able to see an upgrade available. + +Choose _Download_ to fetch the upgrade packages. You can continue working until you reach a stopping point, and the download is complete. Then use GNOME Software to restart your system and apply the upgrade. Upgrading takes time, so you may want to grab a coffee and come back to the system later. + +### Using the command line + +If you’ve upgraded from past Fedora releases, you are likely familiar with the _dnf upgrade_ plugin. This method is the recommended and supported way to upgrade from Fedora 31 to Fedora 32. Using this plugin will make your upgrade to Fedora 32 simple and easy. + +#### 1\. Update software and back up your system + +Before you do start the upgrade process, make sure you have the latest software for Fedora 31. This is particularly important if you have modular software installed; the latest versions of dnf and GNOME Software include improvements to the upgrade process for some modular streams. To update your software, use _GNOME Software_ or enter the following command in a terminal. + +``` +sudo dnf upgrade --refresh +``` + +Additionally, make sure you back up your system before proceeding. For help with taking a backup, see [the backup series][4] on the Fedora Magazine. + +#### 2\. Install the DNF plugin + +Next, open a terminal and type the following command to install the plugin: + +``` +sudo dnf install dnf-plugin-system-upgrade +``` + +#### 3\. Start the update with DNF + +Now that your system is up-to-date, backed up, and you have the DNF plugin installed, you can begin the upgrade by using the following command in a terminal: + +``` +sudo dnf system-upgrade download --releasever=32 +``` + +This command will begin downloading all of the upgrades for your machine locally to prepare for the upgrade. If you have issues when upgrading because of packages without updates, broken dependencies, or retired packages, add the _‐‐allowerasing_ flag when typing the above command. This will allow DNF to remove packages that may be blocking your system upgrade. + +#### 4\. Reboot and upgrade + +Once the previous command finishes downloading all of the upgrades, your system will be ready for rebooting. To boot your system into the upgrade process, type the following command in a terminal: + +``` +sudo dnf system-upgrade reboot +``` + +Your system will restart after this. Many releases ago, the _fedup_ tool would create a new option on the kernel selection / boot screen. With the _dnf-plugin-system-upgrade_ package, your system reboots into the current kernel installed for Fedora 31; this is normal. Shortly after the kernel selection screen, your system begins the upgrade process. + +Now might be a good time for a coffee break! Once it finishes, your system will restart and you’ll be able to log in to your newly upgraded Fedora 32 system. + +![][5] + +### Resolving upgrade problems + +On occasion, there may be unexpected issues when you upgrade your system. If you experience any issues, please visit the [DNF system upgrade quick docs][6] for more information on troubleshooting. + +If you are having issues upgrading and have third-party repositories installed on your system, you may need to disable these repositories while you are upgrading. For support with repositories not provided by Fedora, please contact the providers of the repositories. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/upgrading-fedora-31-to-fedora-32/ + +作者:[Adam Šamalík][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://fedoramagazine.org/author/asamalik/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/31-32-816x345.png +[2]: https://fedoramagazine.org/announcing-fedora-32/ +[3]: https://fedoraproject.org/wiki/Common_F32_bugs +[4]: https://fedoramagazine.org/taking-smart-backups-duplicity/ +[5]: https://cdn.fedoramagazine.org/wp-content/uploads/2016/06/Screenshot_f23-ws-upgrade-test_2016-06-10_110906-1024x768.png +[6]: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/#Resolving_post-upgrade_issues From 3e7abc111a46ee3921a0aca1fc2fa0e22210c8db Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 00:56:11 +0800 Subject: [PATCH 312/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20Fedora?= =?UTF-8?q?=2032=20is=20officially=20here!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 Fedora 32 is officially here.md --- .../20200428 Fedora 32 is officially here.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20200428 Fedora 32 is officially here.md diff --git a/sources/tech/20200428 Fedora 32 is officially here.md b/sources/tech/20200428 Fedora 32 is officially here.md new file mode 100644 index 0000000000..67989780ea --- /dev/null +++ b/sources/tech/20200428 Fedora 32 is officially here.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fedora 32 is officially here!) +[#]: via: (https://fedoramagazine.org/announcing-fedora-32/) +[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) + +Fedora 32 is officially here! +====== + +![][1] + +It’s here! We’re proud to announce the release of Fedora 32. Thanks to the hard work of thousands of Fedora community members and contributors, we’re celebrating yet another on-time release. + +If you just want to get to the bits without delay, head over to right now. For details, read on! + +## **All of Fedora’s Flavors** + +Fedora Editions are targeted outputs geared toward specific “showcase” uses. + +Fedora Workstation focuses on the desktop. In particular, it’s geared toward software developers who want a “just works” Linux operating system experience. This release features [GNOME 3.36][2], which has plenty of great improvements as usual. My favorite is the new lock screen! + +Fedora Server brings the latest in cutting-edge open source server software to systems administrators in an easy-to-deploy fashion. For edge computing use cases, [Fedora IoT][3] provides a strong foundation for IoT ecosystems. + +Fedora CoreOS is an emerging Fedora Edition. It’s an automatically-updating, minimal operating system for running containerized workloads securely and at scale. It offers several [update streams][4] that can be followed for automatic updates that occur roughly every two weeks. Currently the **next** stream is based on Fedora 32, with the **testing** and **stable** streams to follow. You can find information about released artifacts that follow the **next** stream from [the download page][5] and information about how to use those artifacts in the [Fedora CoreOS Documentation][6]. + +Of course, we produce more than just the editions. [Fedora Spins][7] and [Labs][8] target a variety of audiences and use cases, including the [Fedora Astronomy Lab][9], which brings a complete open source toolchain to both amateur and professional astronomers, and desktop environments like [KDE Plasma][10] and [Xfce][11]. New in Fedora 32 is the [Comp Neuro Lab][12], developed by our Neuroscience Special Interest Group to enable computational neuroscience. + +And, don’t forget our alternate architectures: [ARM AArch64, Power, and S390x][13]. Of particular note, we have improved support for the Rockchip system-on-a-chip devices including the Rock960, RockPro64, and Rock64. + +**General improvements** + +No matter what variant of Fedora you use, you’re getting the latest the open source world has to offer. Following our “[First][14]” foundation, we’ve updated key programming language and system library packages, including GCC 10, Ruby 2.7, and Python 3.8. Of course, with Python 2 past end-of-life, we’ve removed most Python 2 packages from Fedora. A legacy python27 package is provided for developers and users who still need it. In Fedora Workstation, we’ve enabled the EarlyOOM service by default to improve the user experience in low-memory situations. + +We’re excited for you to try out the new release! Go to and download it now. Or if you’re already running a Fedora operating system, follow the easy [upgrade instructions][15]. + +## **In the unlikely event of a problem….** + +If you run into a problem, check out the [Fedora 32 Common Bugs][16] page, and if you have questions, visit our [Ask Fedora][17] user-support platform. + +## **Thank you everyone** + +Thanks to the thousands of people who contributed to the Fedora Project in this release cycle, and especially to those of you who worked extra hard to make this another on-time release during a pandemic. Fedora is a community, and it’s great to see how much we’ve supported each other. I invite you to join us in the [Red Hat Summit Virtual Experience][18] 28-29 April to learn more about Fedora and other communities. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/announcing-fedora-32/ + +作者:[Matthew Miller][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://fedoramagazine.org/author/mattdm/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/f32-final-816x345.png +[2]: https://www.gnome.org/news/2020/03/gnome-3-36-released/ +[3]: https://iot.fedoraproject.org/ +[4]: https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/ +[5]: https://getfedora.org/en/coreos/download?stream=next +[6]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/ +[7]: https://spins.fedoraproject.org/ +[8]: https://labs.fedoraproject.org/ +[9]: https://labs.fedoraproject.org/en/astronomy/ +[10]: https://spins.fedoraproject.org/en/kde/ +[11]: https://spins.fedoraproject.org/en/xfce/ +[12]: https://labs.fedoraproject.org/en/comp-neuro +[13]: https://alt.fedoraproject.org/alt/ +[14]: https://docs.fedoraproject.org/en-US/project/#_first +[15]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/ +[16]: https://fedoraproject.org/wiki/Common_F32_bugs +[17]: http://ask.fedoraproject.org +[18]: https://www.redhat.com/en/summit From b9a825004c3b4672ddcd66513f2f0fa8e34a921e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 00:56:44 +0800 Subject: [PATCH 313/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20What?= =?UTF-8?q?=E2=80=99s=20new=20in=20Fedora=2032=20Workstation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 What-s new in Fedora 32 Workstation.md --- ...428 What-s new in Fedora 32 Workstation.md | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 sources/tech/20200428 What-s new in Fedora 32 Workstation.md diff --git a/sources/tech/20200428 What-s new in Fedora 32 Workstation.md b/sources/tech/20200428 What-s new in Fedora 32 Workstation.md new file mode 100644 index 0000000000..402a8e63a7 --- /dev/null +++ b/sources/tech/20200428 What-s new in Fedora 32 Workstation.md @@ -0,0 +1,89 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (What’s new in Fedora 32 Workstation) +[#]: via: (https://fedoramagazine.org/whats-new-fedora-32-workstation/) +[#]: author: (Ryan Lerch https://fedoramagazine.org/author/ryanlerch/) + +What’s new in Fedora 32 Workstation +====== + +![][1] + +Fedora 32 Workstation is the [latest release][2] of our free, leading-edge operating system. You can download it from [the official website here][3] right now. There are several new and noteworthy changes in Fedora 32 Workstation. Read more details below. + +### GNOME 3.36 + +Fedora 32 Workstation includes the latest release of GNOME Desktop Environment for users of all types. GNOME 3.36 in Fedora 32 Workstation includes many updates and improvements, including: + +#### Redesigned Lock Screen + +The lock screen in Fedora 32 is a totally new experience. The new design removes the “window shade” metaphor used in previous releases, and focuses on ease and speed of use. + +![Unlock screen in Fedora 32][4] + +#### New Extensions Application + +Fedora 32 features the new Extensions application, to easily manage your GNOME Extensions. In the past, extensions were installed, configured, and enabled using either the Software application and / or the Tweak Tool. + +![The new Extensions application in Fedora 32][5] + +Note that the Extensions application is not installed by default on Fedora 32. To either use the Software application to search and install, or use the following command in the terminal: + +``` +sudo dnf install gnome-extensions-app +``` + +#### Reorganized Settings + +Eagle-eyed Fedora users will notice that the Settings application has been re-organized. The structure of the settings categories is a lot flatter, resulting in more settings being visible at a glance. + +Additionally, the **About** category now has a more information about your system, including which windowing system you are running (e.g. Wayland) + +![The reorganized settings application in Fedora 32][6] + +#### Redesigned Notifications / Calendar popover + +The Notifications / Calendar popover — toggled by clicking on the Date and Time at the top of your desktop — has had numerous small style tweaks. Additionally, the popover now has a **Do Not Disturb** switch to quickly disable all notifications. This quick access is useful when presenting your screen, and not wanting your personal notifications appearing. + +![The new Notification / Calendar popover in Fedora 32 ][7] + +#### Redesigned Clocks Application + +The Clocks application is totally redesigned in Fedora 32. It features a design that works better on smaller windows. + +![The Clocks application in Fedora 32][8] + +GNOME 3.36 also provides many additional features and enhancements. Check out the [GNOME 3.36 Release Notes][9] for further information + +* * * + +### Improved Out of Memory handling + +Previously, if a system encountered a low-memory situation, it may have encountered heavy swap usage (aka [swap thrashing][10])– sometimes resulting in the Workstation UI slowing down, or becoming unresponsive for periods of time. Fedora 32 Workstation now ships and enables EarlyOOM by default. EarlyOOM enables users to more quickly recover and regain control over their system in low-memory situations with heavy swap usage. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/whats-new-fedora-32-workstation/ + +作者:[Ryan Lerch][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://fedoramagazine.org/author/ryanlerch/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/fedora32workstation-816x345.jpg +[2]: https://fedoramagazine.org/announcing-fedora-32/ +[3]: https://getfedora.org/workstation +[4]: https://fedoramagazine.org/wp-content/uploads/2020/04/unlock.gif +[5]: https://fedoramagazine.org/wp-content/uploads/2020/04/extensions.png +[6]: https://fedoramagazine.org/wp-content/uploads/2020/04/settings.png +[7]: https://fedoramagazine.org/wp-content/uploads/2020/04/donotdisturb.png +[8]: https://fedoramagazine.org/wp-content/uploads/2020/04/clocks.png +[9]: https://help.gnome.org/misc/release-notes/3.36/ +[10]: https://en.wikipedia.org/wiki/Thrashing_(computer_science) From 480a6e2fe955db047b0a5d460390d1a8af643e3e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 01:04:33 +0800 Subject: [PATCH 314/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200429=20Manjar?= =?UTF-8?q?o=2020=20Lysia=20Arrives=20with=20ZFS=20and=20Snap=20Support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md --- ...Lysia Arrives with ZFS and Snap Support.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md diff --git a/sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md new file mode 100644 index 0000000000..377a58f34a --- /dev/null +++ b/sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md @@ -0,0 +1,112 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Manjaro 20 Lysia Arrives with ZFS and Snap Support) +[#]: via: (https://itsfoss.com/manjaro-20-release/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Manjaro 20 Lysia Arrives with ZFS and Snap Support +====== + +_**Manjaro Linux has refreshed its ISO with Manjaro 20 “Lysia”. It now supports Snap and Flatpak packages in Pamac. ZFS option is added in Manjaro Architect installer and the latest kernel 5.6 is used as the base.**_ + +It’s raining new distribution releases. Ubuntu 20.04 LTS was released last week. Fedora 32 will be releasing shortly and [Manjaro has released version 20][1] codenamed Lysia. + +### What’s new in Manjaro 20 Lysia? + +Plenty actually. Let me show you some of the major new features in Manjaro 20. + +#### New Matcha theme + +Manjaro 20 has a new default theme called Matcha. It gives the desktop a more polished look. + +![][2] + +#### Snap and Flatpak support in Pamac and terminal + +Snap and Flatpak package support is improved. You can use them in command line if you want. + +You can also enable Snap and Flatpak support in the Pamac GUI package manager. + +![Enable Snap support in Pamac Manjaro][3] + +Once enabled, you can find and install Snap/Flatpak applications in the Pamac software manager. + +![Snap applications in Pamac][4] + +#### Pamac offers to install new software based on search (in GNOME) + +In the GNOME variant, if you search for something, Pamac software manager will now offer to install software that match the query. GNOME Software Center does that in other distributions that use GNOME desktop. + +#### ZFS support lands in Manjaro Architect + +You can now easily use ZFS as root in Manjaro Linux. The [ZFS file system][5] support is available in [Manjaro Architect][6]. + +Do note that I am saying Manjaro Architect, the terminal based installer. It’s not the same as the regular graphical [Calamares installer][7]. + +![][8] + +#### Linux kernel 5.6 + +The latest stable [Linux kernel 5.6][9] brings more hardware support for thunderbolt, Nvidia and USB4. You can also use [WireGuard VPN][10]. + +![][11] + +#### Miscellaneous other features + + * New desktop environment versions: Xfce 4.14, GNOME 3.36 and KDE Plasma 5.18 + * zsh is the new default shell + * Display-Profiles allows you to store one or more profiles for your preferred display configuration + * Improved Gnome-Layout-Switcher + * Latest drivers + * Improved and polished Manjaro tools + + + +### How to get Manjaro 20 Lysia? + +_**If you are already using it, just update your Manjaro Linux system and you should already be using version 20.**_ + +Manjaro uses a rolling release model which means you don’t have to manually upgrade from one version to another. You don’t have to reinstall as soon as there is a new version is released. + +If Manjaro is rolling release distribution, why does it release a new version every now and then? It’s because they have to refresh the ISO so that new users downloading Manjaro will not have to install updates for last few years. This is why Arch Linux also refreshes its ISO every month. + +Manjaro ‘ISO refreshes’ are codenamed and have a version because it helps the developers clearly mark each stage of development. + +So, the bottom line is that if you are already using it, just [update your Manjaro Linux system][12] using Pamac or command line. + +If you want to try Manjaro or if you want to use ZFS, then you can [install Manjaro][13] by downloading the ISO from its website: + +[Download Manjaro Linux][14] + +Enjoy the new release of Manjaro Linux. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/manjaro-20-release/ + +作者:[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://forum.manjaro.org/t/manjaro-20-0-lysia-released/138633 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-lysia.jpeg?resize=800%2C440&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-snap-in-pamac-manjaro.jpg?resize=800%2C490&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/snap-app-pacman.jpg?resize=800%2C489&ssl=1 +[5]: https://itsfoss.com/what-is-zfs/ +[6]: https://itsfoss.com/manjaro-architect-review/ +[7]: https://calamares.io/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pacman-prompts-install-apps.jpg?resize=800%2C331&ssl=1 +[9]: https://itsfoss.com/linux-kernel-5-6/ +[10]: https://itsfoss.com/wireguard/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-neofetch-screen.jpg?resize=800%2C495&ssl=1 +[12]: https://itsfoss.com/update-arch-linux/ +[13]: https://itsfoss.com/install-manjaro-linux/ +[14]: https://manjaro.org/download/ From 8716d84eb3961d2b94e88e5b9943a1f5b7915dd6 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 01:05:41 +0800 Subject: [PATCH 315/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20How=20?= =?UTF-8?q?I=20empower=20and=20reach=20millions=20through=20open=20source?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 How I empower and reach millions through open source.md --- ... and reach millions through open source.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 sources/tech/20200428 How I empower and reach millions through open source.md diff --git a/sources/tech/20200428 How I empower and reach millions through open source.md b/sources/tech/20200428 How I empower and reach millions through open source.md new file mode 100644 index 0000000000..a3c23dd073 --- /dev/null +++ b/sources/tech/20200428 How I empower and reach millions through open source.md @@ -0,0 +1,78 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How I empower and reach millions through open source) +[#]: via: (https://opensource.com/article/20/4/interview-Netha-Hussain) +[#]: author: (Jay Barber https://opensource.com/users/jaybarber) + +How I empower and reach millions through open source +====== +Learn how Netha Hussain, winner of the 2020 Women in Open Source +Academic Award, shares knowledge and inspires people. +![Lightbulb][1] + +"I wanted to link to a particular Wikipedia article on my blog, but I found there wasn't one on that topic, so I wrote it myself," says Netha Hussain, 2020 [Women in Open Source Academic Award][2] winner. "That's the beauty of open source; anyone can contribute." + +![Photo by Lvova Anastasiya \(Львова Анастасия, Lvova\), CC BY-SA][3] + +Practicality drove Netha's entry into open source culture, and it has continued to be at the center of her work in the ten years since. + +She received her first computer in high school, but it did not immediately spark her passion. She says she mostly used it for games and other diversions, as many teenagers do. It wasn't until she entered medical school and realized that technology could be a powerful tool to help her achieve her goals that Netha truly found her path. Taking stock of her many contributions to [Wikimedia][4], [Mozilla][5], and [TED][6], it's fair to say that once she engaged with open source culture, she never looked back. + +### Finding ways to help + +Growing up in India, Netha was initially drawn to mathematics but soon found herself pulled in other directions. "At the time, I would have expected to continue down that path, mathematics or maybe writing, but the thing that I've always most wanted to do is help people," Netha says. "Medicine seemed to be the most direct path to providing real, tangible assistance to those around me, so I became a doctor." + +That drive to help continues to guide her now as she prepares to defend her doctoral thesis in clinical neuroscience at the University of Gothenburg in Sweden. + +"At a certain point, I decided that rather than limiting myself to what I could do through treating patients, I could also contribute in a research capacity, working to discover new, better ways to help others. I came to all of this via an unexpected route, but I love the idea of exploring and finding my own ways to help. I'm so satisfied and fulfilled by the work I'm doing now. It has been a wonderful journey." + +As she nears the completion of her degree, Netha reflects upon what she's looking forward to next. An infectious smile appears as she remarks, "I'm really excited to have more time to contribute to projects in the open source community." + +Why is she so enamored with open source? It comes back to utility. "In open source practices, I found a philosophy that closely matched my own ideals and a way of doing things that allowed me to help more people. Open source is fueled by collaboration. I've seen the things that can be accomplished by people working together, and it makes me very excited to think where it will take us in the future." + +### Reaching millions, one edit at a time + +Her first article, written to help an international audience understand her blog post, was only the first of many. Netha has now written 300 articles (200 in English and 100 in Malayalam), contributed 13,000 edits for [Wikipedia][7], added 9,000 images to [Wikimedia Commons][8], and provided 120,000 edits to [Wikidata][9]. Her commitment to bringing useful information to others can also be seen in her five years spent volunteering to translate Mozilla projects and TED talks into the Malayalam language. + +Such prolific output was born out of a simple realization. "I had shared so much on my blog but was only reaching a select audience. On Wikipedia and elsewhere, I had access to a potential audience of millions. There's a lot of power in that." + +Many of the articles Netha has written center on issues relevant to women, and that is very much by design. "I find myself writing on topics that are important to women because I feel they are an underserved community, and it is important to me that Wikipedia, as such a vital repository of information, be reflective of all users, all voices. I care deeply about the visibility of women on Wikipedia." + +Netha's commitment to women's issues led her to organize edit-a-thon initiatives and other activities with women's groups. She was also able to leverage similar strategies to assist the LGBTQ+ community in India during the campaign to legalize gay marriage. + +"In India, there are a lot of taboos around homosexuality, and I saw an opportunity to utilize my experience to help another segment of the population. Together, we were able to generate a lot of awareness, whether through raising up biographical articles on famous members of the LGBTQ+ community or shining a spotlight on anti-LGBTQ+ laws. I'm very proud of the opportunities I've had to support such efforts." + +### A path to the future + +It's clear that Netha believes strongly in empowering people, especially other women who may wish to explore open source methodologies as she has. Her advice is simple, but powerful. "Believe in yourself, and know that you have the skills and talent to do whatever you'd like to do," she finds the words easily, as if she's been waiting to be asked the question. "Follow your passion, and do what you want. There will be times of uncertainty but always move forward. Keep studying. Keep learning new things. That's how you grow, both in your field and as a person." + +Having achieved so much already, it's no surprise that Netha is enthusiastic about new challenges on the horizon. "I've put in a lot of effort to get here, but as you learn new strategies and new ways of collaborating, the work gets easier. Now, I don't consider it work at all. It's mostly fun to me." + +_Also read Jay Barber's [interview with Megan Byrd-Sanicki][10], who won the 2020 Women in Open Source Community Award._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/interview-Netha-Hussain + +作者:[Jay Barber][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/jaybarber +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lightbulb-idea-think-yearbook-lead.png?itok=5ZpCm0Jh (Lightbulb) +[2]: https://www.redhat.com/en/about/women-in-open-source +[3]: https://opensource.com/sites/default/files/uploads/netha_headshot.png (Photo by Lvova Anastasiya (Львова Анастасия, Lvova), CC BY-SA) +[4]: https://www.wikimedia.org/ +[5]: https://www.mozilla.org/en-US/ +[6]: https://www.ted.com/ +[7]: https://www.wikipedia.org/ +[8]: https://commons.wikimedia.org/wiki/Main_Page +[9]: https://www.wikidata.org/wiki/Wikidata:Main_Page +[10]: https://opensource.com/article/20/4/interview-Megan-Byrd-Sanicki From 247ae60e2a53605215cc15dfff0341c16aaf42b5 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 01:06:34 +0800 Subject: [PATCH 316/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20Open?= =?UTF-8?q?=20source=20has=20room=20for=20everyone?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 Open source has room for everyone.md --- ...00428 Open source has room for everyone.md | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sources/tech/20200428 Open source has room for everyone.md diff --git a/sources/tech/20200428 Open source has room for everyone.md b/sources/tech/20200428 Open source has room for everyone.md new file mode 100644 index 0000000000..bab55ddfbe --- /dev/null +++ b/sources/tech/20200428 Open source has room for everyone.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Open source has room for everyone) +[#]: via: (https://opensource.com/article/20/4/interview-Megan-Byrd-Sanicki) +[#]: author: (Jay Barber https://opensource.com/users/jaybarber) + +Open source has room for everyone +====== +Learn how Megan Byrd-Sanicki, 2020 Women in Open Source Community Award +winner, brings people together. +![Dandelion held out over water][1] + +"Growing up, I was a bit of a field marshal," Megan Byrd-Sanicki, 2020 [Women in Open Source Community Award][2] winner, says with a smile. "I was always the one pulling classmates together. 'We're going to play a game. Come on, everyone, I'll teach you the rules.' I'd also have an eye to the sidelines, trying to identify who wasn't being included and how I could draw them in." + +![Photo by Megan Sanicki, Used with permission][3] + +That drive to bring people together and set up a structure for them to excel carries through much of her career and community work. "I look back on who I was in second-grade gym class and have to admit that it's still who I am today." + +Megan has been active in open source for a decade, first as Executive Director of the [Drupal Association][4], and now as the Manager of Research and Operations for Google's Open Source Program Office. "I'm fortunate in my current position because it offers a view into Google's more than 2000 open source projects with different objectives, different governance structures, and different strategies. It's been just a phenomenal learning opportunity." Megan was also recently elected to the [Open Source Initiative][5] Board of Directors, where she strives to strengthen the leadership in open source that the organization offers to projects and businesses around the globe. + +### Lessons from the basement steps + +Far from being set on technology, Megan originally thought she'd go into business. Sitting on the basement steps, listening to her father make sales calls, she knew his entire product line by age 16, but she also internalized other lessons. + +"I learned from him that doing business means solving problems and helping people," Megan says. "And I've kept that front-of-mind throughout my career. In some ways, I'm not surprised by this path; it's a natural extension of who I am, but it's also taken me places I would never have dreamed possible." + +Open source isn't just a career for Megan; she also uses the same strategies in her community involvement. "Right now, I'm working with a great group of engineers, data scientists, and epidemiologists at [Covid Act Now][6]. The team members are volunteering their expertise, collaborating openly to provide data modeling to public officials so that they can make informed decisions as quickly as possible." + +She's also active in [FOSS Responders][7], a group focused on shining a light on open source projects and community members affected by COVID-19-related event cancellations. "In times of turmoil, it can be difficult for projects to find the help they need. We help organizations and individuals who need assistance aggregate and amplify their requests." An important component of the organization is administering the [FOSS Responders Fund][7], a mechanism to capture some of the open source funding requests that may fall through the cracks otherwise. + +### Engaging people in a changing world + +The twin themes that influence Megan's community engagement are a clear commitment to the principles of open source and a drive to bring people together. "When people have dreams, things they're actively trying to accomplish, it creates a shared sense of purpose and a strong 'why.' People engage easily around why. I know I do," Megan says when asked what drives her in these efforts. + +"Whether helping raise funds for Drupal's mission or enabling open source projects to become more sustainable, there's a real human impact. I get really passionate about the butterfly effect that results from helping people meet their goals and realize their dreams and visions." + +As open source becomes a larger and larger part of the technology space, Megan is hopeful for the future. "The exciting thing is that the story isn't done. As a community, we're still figuring things out," she says. "There's so much we need to learn about open source, and it can evolve in so many ways, while the landscape changes around us. We need to have the right conversations and figure out how to evolve together, ensuring there's a place at the table for everyone." + +In her words, it's possible to hear those same lessons learned from listening to her father's business calls—doing business is about solving problems and helping people. "Helping more people understand how to use and contribute to open source to solve problems is really rewarding. Whether it is to drive innovation, accelerate velocity, or achieve business goals, there are lots of ways to gain value from open source." + +### Own your awesome + +When asked what advice she has for other women wanting to engage with the open source community, Megan lights up. "Remember that open source has room for everyone. It can be daunting, but in my experience, people want to help. Ask for help when you need it, but also be clear on where you can contribute, how you can contribute, and what your needs are." + +She also recognizes that among all the voices in open source, a lack of centralized leadership can sometimes be felt, but she cautions against looking at it as a privileged role, reserved for only a few. "Be the leader you need. When there's a void in leadership, each individual can fill that void for themselves. Every contributor to open source is a leader, whether they're leading others, leading the community, or just leading themselves. Don't wait to be given permission and own your awesome." + +The open source journey for Megan has been just that: a trek where her path wasn't always clear. She's never shied away from adventure or run from uncertainty, though. "I look at life as this beautiful tapestry that you're weaving, but day to day, you only get to see the threads in the back. If you could see the full picture, you'd realize that you've contributed to this wonderful work in countless ways just by doing your best every day." + +_Also read Jay Barber's [interview with Netha Hussain][8], who won the 2020 Women in Open Source Academic Award._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/interview-Megan-Byrd-Sanicki + +作者:[Jay Barber][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/jaybarber +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/dandelion_blue_water_hand.jpg?itok=QggW8Wnw (Dandelion held out over water) +[2]: https://www.redhat.com/en/about/women-in-open-source +[3]: https://opensource.com/sites/default/files/uploads/megan_sanicki_headshot_small_0.png (Photo by Megan Sanicki, Used with permission) +[4]: https://www.drupal.org/association +[5]: https://opensource.org/ +[6]: https://www.covidactnow.org/ +[7]: https://fossresponders.com/ +[8]: https://opensource.com/article/20/4/interview-Netha-Hussain From 9460816ae1aa48d049d5b51fa02bbb940cf7454c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 01:07:55 +0800 Subject: [PATCH 317/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200428=20Learn?= =?UTF-8?q?=20Bash=20with=20this=20book=20of=20puzzles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200428 Learn Bash with this book of puzzles.md --- ...28 Learn Bash with this book of puzzles.md | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 sources/tech/20200428 Learn Bash with this book of puzzles.md diff --git a/sources/tech/20200428 Learn Bash with this book of puzzles.md b/sources/tech/20200428 Learn Bash with this book of puzzles.md new file mode 100644 index 0000000000..08a07b93c5 --- /dev/null +++ b/sources/tech/20200428 Learn Bash with this book of puzzles.md @@ -0,0 +1,60 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Learn Bash with this book of puzzles) +[#]: via: (https://opensource.com/article/20/4/bash-it-out-book) +[#]: author: (Carlos Aguayo https://opensource.com/users/hwmaster1) + +Learn Bash with this book of puzzles +====== +'Bash it out' covers basic, medium, and advanced Bash scripting using 16 +puzzles. +![Puzzle pieces coming together to form a computer screen][1] + +Computers are both my hobby and my profession. I have about 10 of them scattered around my apartment, all running Linux (including my Macs). Since I enjoy upgrading my computers and my computer skills, when I came across [_Bash it out_][2] by Sylvain Leroux, I jumped on the chance to buy it. I use the command line a lot on Debian Linux, and it seemed like a great opportunity to expand my Bash knowledge. I smiled when the author explained in the preface that he uses Debian Linux, which is one of my two favorite distributions. + +Bash lets you automate tasks, so it's a labor-saving, interesting, and useful tool. Before reading the book, I already had a fair amount of experience with Bash on Unix and Linux. I'm not an expert, in part because the scripting language is so extensive and powerful. I first became intrigued with Bash when I saw it on the welcome screen of [EndeavourOS][3], an Arch-based Linux distribution. + +The following screenshots show some options from EndeavourOS. Beleieve it or not, these panels just point to Bash scripts, each of which accomplish some relatively complex tasks. And because it's all open source, I can modify any of these scripts if I want. + +![EndeavourOS after install][4] + +![EndeavourOS install apps][5] + +### Always something to learn + +My impressions of this book are very favorable. It's not long, but it is well-thought-out. The author has very extensive knowledge of Bash and an uncanny ability to explain how to use it. The book covers basic, medium, and advanced Bash scripting using 16 puzzles, which he calls "challenges." This taught me to see Bash scripting as a programming puzzle to solve, which makes it more interesting to play with. + +An exciting aspect of Bash is that it's deeply integrated with the Linux system. While part of its power lies in its syntax, it's also powerful because it has access to so much. You can script repetitive tasks, or tasks that are easy but you're just tired of performing manually. Nothing is too great or too small, and _Bash it out_ helps you understand both what you can do, and how to achieve it. + +This review would not be complete if I didn't mention David Both's free resource [_A sysadmin's guide to Bash scripting_][6] on Opensource.com. This 17-page PDF guide is different from _Bash it out_, but together they make a winning combination for anyone who wants to learn about it. + +I am not a computer programmer, but _Bash it out_ has increased my desire to get into more advanced levels of Bash scripting—I might inadvertently end up as a computer programmer without planning to. + +One reason I love Linux is because of how powerful and versatile the operating system is. However much I know about Linux, there is always something new to learn that makes me appreciate Linux even more. + +In a competitive and ever-changing job market, it behooves all of us to continuously update our skills. This book helped me learn Bash in a very hands-on way. It almost felt as if the author was in the same room with me, patiently guiding me in my learning. + +The author, Leroux, has an uncanny ability to engage readers. This is a rare gift that I think is even more valuable than his technical expertise. In fact, I am writing this book review to thank the author for anticipating my own learning needs; although we have never met, I have benefited in real ways from his gifts. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/bash-it-out-book + +作者:[Carlos Aguayo][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/hwmaster1 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://www.amazon.com/Bash-Out-Strengthen-challenges-difficulties/dp/1521773262/ +[3]: https://endeavouros.com/ +[4]: https://opensource.com/sites/default/files/uploads/endeavouros-welcome.png (EndeavourOS after install) +[5]: https://opensource.com/sites/default/files/uploads/endeavouros-install-apps.png (EndeavourOS install apps) +[6]: https://opensource.com/downloads/bash-scripting-ebook From 7ca0289cffc81041571e36e25b34ebdf50a897ba Mon Sep 17 00:00:00 2001 From: DarkSun Date: Wed, 29 Apr 2020 01:10:48 +0800 Subject: [PATCH 318/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200427=20New=20?= =?UTF-8?q?zine:=20How=20Containers=20Work!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200427 New zine- How Containers Work.md --- .../20200427 New zine- How Containers Work.md | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 sources/tech/20200427 New zine- How Containers Work.md diff --git a/sources/tech/20200427 New zine- How Containers Work.md b/sources/tech/20200427 New zine- How Containers Work.md new file mode 100644 index 0000000000..fa2198ebbc --- /dev/null +++ b/sources/tech/20200427 New zine- How Containers Work.md @@ -0,0 +1,121 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (New zine: How Containers Work!) +[#]: via: (https://jvns.ca/blog/2020/04/27/new-zine-how-containers-work/) +[#]: author: (Julia Evans https://jvns.ca/) + +New zine: How Containers Work! +====== + +On Friday I published a new zine: “How Containers Work!”. I also launched a fun redesign of [wizardzines.com][1]. + +You can get it for $12 at . If you buy it, you’ll get a PDF that you can either print out or read on your computer. Or you can get a pack of [all 8 zines][2] so far. + +Here’s the cover and table of contents: + +[![][3]][4] + +### why containers? + +I’ve spent a lot of time [figuring][5] [out][6] [how to][7] [run][8] [things][9] [in][10] [containers][11] over the last 3-4 years. And at the beginning I was really confused! I knew a bunch of things about Linux, and containers didn’t seem to fit in with anything I thought I knew (“is it a process? what’s a network namespace? what’s happening?“). The whole thing seemed really weird. + +It turns out that containers ARE actually pretty weird. They’re not just one thing, they’re what you get when you glue together 6 different features that were mostly designed to work together but have a bunch of confusing edge cases. + +As usual, the thing that helped me the most in my container adventures is a good understanding of the **fundamentals** – what exactly is actually happening on my server when I run a container? + +So that’s what this zine is about – cgroups, namespaces, pivot_root, seccomp-bpf, and all the other Linux kernel features that make containers work. + +Once I understood those ideas, it got a **lot** easier to debug when my containers were doing surprising things in production. I learned a couple of interesting and strange things about containers while writing this zine too – I’ll probably write a blog post about one of them later this week. + +### containers aren’t magic + +This picture (page 6 of the zine) shows you how to run a fish container image with only 15 lines of bash. This is heavily inspired by [bocker][12], which “implements” Docker in about 100 lines of bash. + + + +The main things I see missing from that script compared to what Docker actually does when running a container (other than using an actual container image and not just a tarball) are: + + * it doesn’t drop any capabilities – the container is still running as root and has full root privileges (just in a different mount + PID namespace) + * it doesn’t block any system calls with seccomp-bpf + + + +### container command line tools + +The zine also goes over a bunch of command line tools & files that you can use to inspect running containers or play with Linux container features. Here’s a list: + + * `mount -t overlay` (create and view overlay filesystems) + * `unshare` (create namespaces) + * `nsenter` (use an existing namespace) + * `getpcaps` (get a process’s capabilities) + * `capsh` (drop or add capabilities, etc) + * `cgcreate` (create a cgroup) + * `cgexec` (run a command in an existing cgroup) + * `chroot` (change root directory. not actually what containers use but interesting to play with anyway) + * `/sys/fs/cgroups` (for information about cgroups, like `memory.usage_in_bytes`) + * `/proc/PID/ns` (all a process’s namespaces) + * `lsns` (another way to view namespaces) + + + +I also made a short youtube video a while back called [ways to spy on a Docker container][13] that demos some of these command line tools. + +### container runtime agnostic + +I tried to keep this zine pretty container-runtime-agnostic – I mention Docker a couple of times because it’s so widely used, but it’s about the Linux kernel features that make containers work in general, not Docker or LXC or systemd-nspawn or Kubernetes or whatever. If you understand the fundamentals you can figure all those things out! + +### we redesigned wizardzines.com! + +On Friday I also launched a redesign of [wizardzines.com][1]! [Melody Starling][14] (who is amazing) did the design. I think now it’s better organized but the tiny touch that I’m most delighted by is that now the zines jump with joy when you hover over them. + +One cool thing about working with a designer is – they don’t just make things _look_ better, they help _organize_ the information better so the website makes more sense and it’s easier to find things! This is probably obvious to anyone who knows anything about design but I haven’t worked with designers very much (or maybe ever?) so it was really cool to see. + +One tiny example of this: Melody had the idea of adding a tiny FAQ on the landing page for each zine, where I can put the answers to all the questions people always ask! Here’s what the little FAQ box looks like: + +[![][15]][4] + +I probably want to edit those questions & answers over time but it’s SO NICE to have somewhere to put them. + +### what’s next: maybe debugging! or working more on flashcards! + +The two projects I’m thinking about the most right now are + + 1. a zine about debugging, which I started last summer and haven’t gotten around to finishing yet + 2. a [flashcards project][16] that I’ve been adding to slowly over the last couple of months. I think could become a nice way to explain basic ideas. + + + +Here’s a link to where to [get the zine][4] again :) + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2020/04/27/new-zine-how-containers-work/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com +[2]: https://wizardzines.com/zines/all-the-zines/ +[3]: https://jvns.ca/images/containers-cover.jpg +[4]: https://wizardzines.com/zines/containers +[5]: https://stripe.com/en-ca/blog/operating-kubernetes +[6]: https://jvns.ca/blog/2016/09/15/whats-up-with-containers-docker-and-rkt/ +[7]: https://jvns.ca/blog/2016/10/10/what-even-is-a-container/ +[8]: https://jvns.ca/blog/2016/12/22/container-networking/ +[9]: https://jvns.ca/blog/2016/10/26/running-container-without-docker/ +[10]: https://jvns.ca/blog/2017/02/17/mystery-swap/ +[11]: https://jvns.ca/blog/2016/10/02/a-list-of-container-software/ +[12]: https://github.com/p8952/bocker +[13]: https://www.youtube.com/watch?v=YCVSdnYzH34&t=1s +[14]: https://melody.dev +[15]: https://jvns.ca/images/wizardzines-faq.png +[16]: https://flashcards.wizardzines.com From 08a4631d0d7b1c10131ba93bb1ab691acfd384c2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 29 Apr 2020 08:48:20 +0800 Subject: [PATCH 319/394] translated --- ...ox is an All-in-one Messenger for Linux.md | 98 ------------------- ...ox is an All-in-one Messenger for Linux.md | 98 +++++++++++++++++++ 2 files changed, 98 insertions(+), 98 deletions(-) delete mode 100644 sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md create mode 100644 translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md diff --git a/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md b/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md deleted file mode 100644 index 5e6a8a2d5c..0000000000 --- a/sources/tech/20200331 Rambox is an All-in-one Messenger for Linux.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Rambox is an All-in-one Messenger for Linux) -[#]: via: (https://itsfoss.com/rambox/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Rambox is an All-in-one Messenger for Linux -====== - -_**Brief: Rambox is an all-in-one messenger that lets you combine multiple services like Discord, Slack, Facebook Messenger and hundreds of more such services in one place.**_ - -### Rambox: Add multiple messaging Services in a single app - -![][1] - -Rambox is one of the best ways to manage multiple services for communication through a single app installed. You can use [multiple messaging services][2] like Facebook Messenger, Gmail chats, AOL, Discord, Google Duo, [Viber][3] and a lot more from the same interface. - -This way, you don’t need to install individual apps or keep them opened in browser all the time. You can use a master password to lock the Rambox application. You can also use do not disturb feature. - -Rambox offers an [open source community edition][4] which is free to use. The paid pro version gives you access to 600+ apps while the community addition has 99+ apps. Pro version has additional features like themes, hibernation, ad-block, spell check and premium support. - -Don’t worry. The open source community edition itself is quite useful and you may not even need those pro features. - -### Features of Rambox - -![][5] - -While you should find most of the essential features in the open-source edition, you might notice some of them limited to the pro version. - -Here, I’ve mentioned all the essential features available: - - * You get about 100 apps/services to choose from in the open-source edition - * Ability to protect the app with a single Master password lock - * Ability to lock each session that you load up - * Do Not Disturb mode - * Ability to sync apps and configuration across multiple devices. - * You can create and add custom apps - * Support for keyboard shortcuts - * Ability to enable/disable apps without needing to delete them - * JS & CSS injection support to tweak the styling of apps - * Ad-block (**pro version**) - * Hibernation support (**pro version**) - * Theme support (**pro version**) - * Mobile view **(pro version)** - * Spell check **(pro version)** - * Work hours – to schedule a time for incoming notifications **(pro version)** - * Proxies support **(pro version)** - - - -In addition to what I’ve listed here, you might find some more features in the Rambox Pro edition. To know more about it, you can refer to the [official list of features][6]. - -It is also worth noting that you cannot have more than 3 active simultaneous device connections. - -### Installing Rambox on Linux - -You can easily get started using Rambox using the **.AppImage** file available on the [official download page][4]. If you’re curious, you can refer our guide on how to [use the AppImage file on Linux][7]. - -In either case, you can also get it from the [Snap store][8]. Also, feel free to check their [GitHub releases section][9] for **.deb / .rpm** or other packages. - -[Download Rambox Community Edition][4] - -### Wrapping Up - -It can be a little overwhelming to have a lot of apps installed using Rambox. So, I’d suggest you monitor the RAM usage when adding more apps and using them for work. - -There is also a similar app called [Franz][10] which is also part open source and part premium like Rambox. - -Even though solutions like Rambox or Franz are quite useful, they aren’t always resource-friendly, specially if you start using tens of services at the same time. So, keep an eye on your system resources (if you notice a performance impact). - -Otherwise, it’s an impressive app that does the work that you’d expect. Have you tried it out? Feel free to let me know your thoughts! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/rambox/ - -作者:[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://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/rambox-ce.jpg?ssl=1 -[2]: https://itsfoss.com/best-messaging-apps-linux/ -[3]: https://itsfoss.com/viber-linux-client-beta-install/ -[4]: https://rambox.pro/#ce -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/rambox-preferences.png?ssl=1 -[6]: https://rambox.pro/#features -[7]: https://itsfoss.com/use-appimage-linux/ -[8]: https://snapcraft.io/rambox -[9]: https://github.com/ramboxapp/community-edition/releases -[10]: https://itsfoss.com/franz-messaging-app/ diff --git a/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md b/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md new file mode 100644 index 0000000000..28a57f2842 --- /dev/null +++ b/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md @@ -0,0 +1,98 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Rambox is an All-in-one Messenger for Linux) +[#]: via: (https://itsfoss.com/rambox/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Rambox 是 Linux 中多合一的消息收发工具 +====== + +_**简介:Rambox 是一个多合一消息收发工具,允许你将多种服务(如 Discord、Slack、Facebook Messenger)和数百个此类服务结合在一起。**_ + +### Rambox:在单个应用中添加多个消息服务 + +![][1] + +Rambox 是通过安装单个应用管理多个通信服务的最佳方式之一。你可以在一个界面使用[多个消息服务][2],如 Facebook Messenger、Gmail chats、AOL、Discord、Google Duo、[Viber][3] 等。 + +这样,你就不需要安装单独的应用或者在浏览器中保持打开。你可以使用主密码锁定 Rambox 应用。你还可以使用"请勿打扰"功能。 + +Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你访问 600 多个应用,而社区版则包含 99 多个应用。专业版本具有额外的功能,如主题、休眠、ad-block、拼写检查和高级支持。 + +不用担心。开源社区版本身非常有用,你甚至不需要这些专业功能。 + +### Rambox 的功能 + +![][5] + +虽然你应该在开源版中找到大多数基本功能,但你可能会注意到其中一些功能仅限于专业版。 + +此处,我说下所有的基本功能: + + * 在开源版本中,你有大约 100 个应用/服务可供选择 + * 能够使用单个主密码锁保护应用 + * 能够锁定加载的每个会话 + * 请勿打扰模式 + * 能够跨多个设备同步应用和配置 + * 你可以创建和添加自定义应用 + * 支持键盘快捷键 + * 启用/禁用应用而无需删除它们 + * JS 和 CSS 注入支持,以调整应用的样式 + * Ad-block (**专业版**) + * 休眠支持 (**专业版**) + * 主题支持(**专业版**) + * 移动视图 (**专业版**) + * 拼写检查 (**专业版**) + * 工作时间 - 计划传入通知时间 (**专业版**) + * 代理支持 (**专业版**) + + + +除了我在这里列出的内容外,你还可以在 Rambox Pro 版本中找到更多功能。要了解有关它的更多信息,你可以参考[正式功能列表][6]。 + +还值得注意的是,你不能有超过 3 个活跃并发设备连接。 + +### 在 Linux 上安装 Rambox + +你可以在[官方下载页][4]获取 **.AppImage** 文件来运行 Rambox。如果你好奇,你可以参考我们的指南,了解如何[在 Linux 上使用 AppImage 文件][7]。 + +另外,你也可以从 [Snap 商店][8]获取它。此外,请查看其 [GitHub release][9] 部分的 **.deb / .rpm** 或其他包。 + +[Download Rambox Community Edition][4] + +### 总结 + +使用 Rambox 安装大量应用可能会有点让人不知所措。因此,我建议你在添加更多应用并将其用于工作时监视内存使用情况。 + +还有一个类似的应用称为 [Franz][10],它也像 Rambox 部分开源、部分高级版。 + +尽管像 Rambox 或 Franz 这样的解决方案非常有用,但它们并不总是资源友好,特别是如果你同时使用数十个服务。因此,请留意系统资源(如果你注意到对性能的影响)。 + +除此之外,这是一个令人印象深刻的应用。你有试过了么?欢迎随时让我知道你的想法! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/rambox/ + +作者:[Ankush Das][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/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/rambox-ce.jpg?ssl=1 +[2]: https://itsfoss.com/best-messaging-apps-linux/ +[3]: https://itsfoss.com/viber-linux-client-beta-install/ +[4]: https://rambox.pro/#ce +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/rambox-preferences.png?ssl=1 +[6]: https://rambox.pro/#features +[7]: https://itsfoss.com/use-appimage-linux/ +[8]: https://snapcraft.io/rambox +[9]: https://github.com/ramboxapp/community-edition/releases +[10]: https://itsfoss.com/franz-messaging-app/ From bbbc641a6619d6009d59675eeed8d027a40820f4 Mon Sep 17 00:00:00 2001 From: geekpi Date: Wed, 29 Apr 2020 09:03:15 +0800 Subject: [PATCH 320/394] translating --- ...00428 Using Files and Folders on Desktop Screen in Ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md b/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md index 40105e3aed..32eeaa9c95 100644 --- a/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md +++ b/sources/tech/20200428 Using Files and Folders on Desktop Screen in Ubuntu.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 17709c477be42b43b7f6430e1629e2a77ab8153b Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Wed, 29 Apr 2020 09:25:21 +0800 Subject: [PATCH 321/394] qfzy1233 is translating --- .../20200424 16 Things to do After Installing Ubuntu 20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md index cca31a0426..5637651850 100644 --- a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md +++ b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (qfzy1233) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 1f2fb8ee41e52ab2ccc6b7a9406489aa0b48b911 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 09:41:42 +0800 Subject: [PATCH 322/394] PRF @wxy --- ... DNF and YUM, Why is Yum Replaced by DNF.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md index f73a3e180b..98f6e0cefe 100644 --- a/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md +++ b/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md @@ -1,20 +1,22 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (The Difference Between DNF and YUM, Why is Yum Replaced by DNF?) [#]: via: (https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -DNF 和 YUM 的区别,为什么 YUM 会被 DNF 取代? +DNF 和 Yum 的区别,为什么 Yum 会被 DNF 取代? ====== 由于 Yum 中许多长期存在的问题仍未得到解决,因此 [Yum 包管理器][1]已被 [DNF 包管理器][2]取代。这些问题包括性能差、内存占用过多、依赖解析速度变慢等。 -DNF 使用 `libsolv` 进行依赖解析,由 SUSE 开发和维护,旨在提高性能。DNF 主要是用 Python 编写的,它有自己的应对依赖解析的方法。 +DNF 使用 `libsolv` 进行依赖解析,由 SUSE 开发和维护,旨在提高性能。 -Yum 是 RPM 的前端工具,它管理依赖关系和资源库,然后使用 RPM 来安装、下载和删除包。它的 API 没有完整的文档,它的扩展系统只允许 Python 插件。 +Yum 主要是用 Python 编写的,它有自己的应对依赖解析的方法。它的 API 没有完整的文档,它的扩展系统只允许 Python 插件。 + +Yum 是 RPM 的前端工具,它管理依赖关系和资源库,然后使用 RPM 来安装、下载和删除包。 为什么他们要建立一个新的工具,而不是修复现有的问题呢? @@ -33,17 +35,17 @@ Ales Kozamblak 解释说,这个修复在技术上是不可行的,而且 Yum 2 | API 有完整的文档 | API 没有完整的文档 3 | 由 C、C++、Python 编写的 | 只用 Python 编写 4 | DNF 目前在 Fedora、RHEL 8、CentOS 8、OEL 8 和 Mageia 6/7 中使用 | YUM 目前在 RHEL 6/7、CentOS 6/7、OEL 6/7 中使用 -5 | DNf 支持各种扩展 | Yum 只支持基于 Python 的扩展 +5 | DNF 支持各种扩展 | Yum 只支持基于 Python 的扩展 6 | API 有良好的文档,因此很容易创建新的功能 | 因为 API 没有正确的文档化,所以创建新功能非常困难 7 | DNF 在同步存储库的元数据时,使用的内存较少 | 在同步存储库的元数据时,YUM 使用了过多的内存 8 | DNF 使用满足性算法来解决依赖关系解析(它是用字典的方法来存储和检索包和依赖信息)| 由于使用公开 API 的原因,Yum 依赖性解析变得迟钝 9 | 从内存使用量和版本库元数据的依赖性解析来看,性能都不错 | 总的来说,在很多因素的影响下,表现不佳 10 | DNF 更新:在 DNF 更新过程中,如果包中包含不相关的依赖,则不会更新 | YUM 将在没有验证的情况下更新软件包 -11 | 如果启用的存储库没有响应,DNF 将跳过它,并继续使用可用的存储库出来事务 | 如果有存储库不可用,YUM 会立即停止 +11 | 如果启用的存储库没有响应,DNF 将跳过它,并继续使用可用的存储库处理事务 | 如果有存储库不可用,YUM 会立即停止 12 | `dnf update` 和 `dnf upgrade` 是等价的 | 在 Yum 中则不同 13 | 安装包的依赖关系不更新 | Yum 为这种行为提供了一个选项 14 | 清理删除的包:当删除一个包时,DNF 会自动删除任何没有被用户明确安装的依赖包 | Yum 不会这样做 -15 | 存储库缓存更新计划:默认情况下,系统启动后 10 分钟后,DNF 每小时检查一次对配置的存储库的更新。这个动作由系统定时器单元 `/usr/lib/systemd/system/system/dnf-makecache.timer` 控制 | Yum 也会这样做 +15 | 存储库缓存更新计划:默认情况下,系统启动后 10 分钟后,DNF 每小时会对配置的存储库检查一次更新。这个动作由系统定时器单元 `dnf-makecache.timer` 控制 | Yum 也会这样做 16 | 内核包不受 DNF 保护。不像 Yum,你可以删除所有的内核包,包括运行中的内核包 | Yum 不允许你删除运行中的内核 17 | libsolv:用于解包和读取资源库。hawkey: 为 libsolv 提供简化的 C 和 Python API 库。librepo: 提供 C 和 Python(类似 libcURL)API 的库,用于下载 Linux 存储库元数据和软件包。libcomps: 是 yum.comps 库的替代品。它是用纯 C 语言编写的库,有 Python 2 和 Python 3 的绑定。| Yum 不使用单独的库来执行这些功能 18 | DNF 包含 29000 行代码 | Yum 包含 56000 行代码 @@ -56,7 +58,7 @@ via: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 7d1f1683e0a6f1af8ade655a83dafa6d7289d8a2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 09:42:53 +0800 Subject: [PATCH 323/394] PUB @wxy https://linux.cn/article-12161-1.html --- ...ference Between DNF and YUM, Why is Yum Replaced by DNF.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md (98%) diff --git a/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/published/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md similarity index 98% rename from translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md rename to published/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md index 98f6e0cefe..8521ab4291 100644 --- a/translated/tech/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md +++ b/published/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12161-1.html) [#]: subject: (The Difference Between DNF and YUM, Why is Yum Replaced by DNF?) [#]: via: (https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) From b7f0e1f5f16340ca1cace9038c9ca98185dee42d Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 29 Apr 2020 10:00:52 +0800 Subject: [PATCH 324/394] Rename sources/tech/20200428 Fedora 32 is officially here.md to sources/news/20200428 Fedora 32 is officially here.md --- sources/{tech => news}/20200428 Fedora 32 is officially here.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200428 Fedora 32 is officially here.md (100%) diff --git a/sources/tech/20200428 Fedora 32 is officially here.md b/sources/news/20200428 Fedora 32 is officially here.md similarity index 100% rename from sources/tech/20200428 Fedora 32 is officially here.md rename to sources/news/20200428 Fedora 32 is officially here.md From 1152c82f7e00ea69e60a93e896f7d325a23e063f Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 29 Apr 2020 10:08:24 +0800 Subject: [PATCH 325/394] Rename sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md to sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md --- ...20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md (100%) diff --git a/sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md similarity index 100% rename from sources/tech/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md rename to sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md From 8892869d68b62bd805f5a72617da4cb30750d486 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Wed, 29 Apr 2020 10:15:44 +0800 Subject: [PATCH 326/394] Rename sources/tech/20200428 How I empower and reach millions through open source.md to sources/talk/20200428 How I empower and reach millions through open source.md --- ...200428 How I empower and reach millions through open source.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200428 How I empower and reach millions through open source.md (100%) diff --git a/sources/tech/20200428 How I empower and reach millions through open source.md b/sources/talk/20200428 How I empower and reach millions through open source.md similarity index 100% rename from sources/tech/20200428 How I empower and reach millions through open source.md rename to sources/talk/20200428 How I empower and reach millions through open source.md From cad41935fea060af0eb836f1b0060f4bedab2423 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 11:24:47 +0800 Subject: [PATCH 327/394] APL --- sources/news/20200428 Fedora 32 is officially here.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20200428 Fedora 32 is officially here.md b/sources/news/20200428 Fedora 32 is officially here.md index 67989780ea..a3066f6ae1 100644 --- a/sources/news/20200428 Fedora 32 is officially here.md +++ b/sources/news/20200428 Fedora 32 is officially here.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 06f5b5082c96092be7b3d64385c52111fad1e4bd Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 11:56:19 +0800 Subject: [PATCH 328/394] TSL&PRF --- .../20200428 Fedora 32 is officially here.md | 77 ------------------- .../20200428 Fedora 32 is officially here.md | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 77 deletions(-) delete mode 100644 sources/news/20200428 Fedora 32 is officially here.md create mode 100644 translated/news/20200428 Fedora 32 is officially here.md diff --git a/sources/news/20200428 Fedora 32 is officially here.md b/sources/news/20200428 Fedora 32 is officially here.md deleted file mode 100644 index a3066f6ae1..0000000000 --- a/sources/news/20200428 Fedora 32 is officially here.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora 32 is officially here!) -[#]: via: (https://fedoramagazine.org/announcing-fedora-32/) -[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) - -Fedora 32 is officially here! -====== - -![][1] - -It’s here! We’re proud to announce the release of Fedora 32. Thanks to the hard work of thousands of Fedora community members and contributors, we’re celebrating yet another on-time release. - -If you just want to get to the bits without delay, head over to right now. For details, read on! - -## **All of Fedora’s Flavors** - -Fedora Editions are targeted outputs geared toward specific “showcase” uses. - -Fedora Workstation focuses on the desktop. In particular, it’s geared toward software developers who want a “just works” Linux operating system experience. This release features [GNOME 3.36][2], which has plenty of great improvements as usual. My favorite is the new lock screen! - -Fedora Server brings the latest in cutting-edge open source server software to systems administrators in an easy-to-deploy fashion. For edge computing use cases, [Fedora IoT][3] provides a strong foundation for IoT ecosystems. - -Fedora CoreOS is an emerging Fedora Edition. It’s an automatically-updating, minimal operating system for running containerized workloads securely and at scale. It offers several [update streams][4] that can be followed for automatic updates that occur roughly every two weeks. Currently the **next** stream is based on Fedora 32, with the **testing** and **stable** streams to follow. You can find information about released artifacts that follow the **next** stream from [the download page][5] and information about how to use those artifacts in the [Fedora CoreOS Documentation][6]. - -Of course, we produce more than just the editions. [Fedora Spins][7] and [Labs][8] target a variety of audiences and use cases, including the [Fedora Astronomy Lab][9], which brings a complete open source toolchain to both amateur and professional astronomers, and desktop environments like [KDE Plasma][10] and [Xfce][11]. New in Fedora 32 is the [Comp Neuro Lab][12], developed by our Neuroscience Special Interest Group to enable computational neuroscience. - -And, don’t forget our alternate architectures: [ARM AArch64, Power, and S390x][13]. Of particular note, we have improved support for the Rockchip system-on-a-chip devices including the Rock960, RockPro64, and Rock64. - -**General improvements** - -No matter what variant of Fedora you use, you’re getting the latest the open source world has to offer. Following our “[First][14]” foundation, we’ve updated key programming language and system library packages, including GCC 10, Ruby 2.7, and Python 3.8. Of course, with Python 2 past end-of-life, we’ve removed most Python 2 packages from Fedora. A legacy python27 package is provided for developers and users who still need it. In Fedora Workstation, we’ve enabled the EarlyOOM service by default to improve the user experience in low-memory situations. - -We’re excited for you to try out the new release! Go to and download it now. Or if you’re already running a Fedora operating system, follow the easy [upgrade instructions][15]. - -## **In the unlikely event of a problem….** - -If you run into a problem, check out the [Fedora 32 Common Bugs][16] page, and if you have questions, visit our [Ask Fedora][17] user-support platform. - -## **Thank you everyone** - -Thanks to the thousands of people who contributed to the Fedora Project in this release cycle, and especially to those of you who worked extra hard to make this another on-time release during a pandemic. Fedora is a community, and it’s great to see how much we’ve supported each other. I invite you to join us in the [Red Hat Summit Virtual Experience][18] 28-29 April to learn more about Fedora and other communities. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/announcing-fedora-32/ - -作者:[Matthew Miller][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://fedoramagazine.org/author/mattdm/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/f32-final-816x345.png -[2]: https://www.gnome.org/news/2020/03/gnome-3-36-released/ -[3]: https://iot.fedoraproject.org/ -[4]: https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/ -[5]: https://getfedora.org/en/coreos/download?stream=next -[6]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/ -[7]: https://spins.fedoraproject.org/ -[8]: https://labs.fedoraproject.org/ -[9]: https://labs.fedoraproject.org/en/astronomy/ -[10]: https://spins.fedoraproject.org/en/kde/ -[11]: https://spins.fedoraproject.org/en/xfce/ -[12]: https://labs.fedoraproject.org/en/comp-neuro -[13]: https://alt.fedoraproject.org/alt/ -[14]: https://docs.fedoraproject.org/en-US/project/#_first -[15]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/ -[16]: https://fedoraproject.org/wiki/Common_F32_bugs -[17]: http://ask.fedoraproject.org -[18]: https://www.redhat.com/en/summit diff --git a/translated/news/20200428 Fedora 32 is officially here.md b/translated/news/20200428 Fedora 32 is officially here.md new file mode 100644 index 0000000000..5b9bfbf49d --- /dev/null +++ b/translated/news/20200428 Fedora 32 is officially here.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Fedora 32 is officially here!) +[#]: via: (https://fedoramagazine.org/announcing-fedora-32/) +[#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) + +Fedora 32 正式发布! +====== + +![][1] + +它来了! 我们很荣幸地宣布 Fedora 32 的发布。感谢成千上万的 Fedora 社区成员和贡献者的辛勤工作,我们又一次准时发布了。 + +如果你只想马上就能拿到它,请马上访问 。更多详情,请继续阅读本文。 + +### Fedora 的全部变种 + +Fedora Editions 是针对特定的“展示”用途输出的。 + +Fedora Workstation 专注于桌面系统。特别是,它面向的是那些希望获得“可以工作的” Linux 操作系统体验的软件开发者。这个版本采用了 [GNOME 3.36][2],一如既往地有很多很棒的改进。我最喜欢的是新的锁屏! + +Fedora Server 以一种易于部署的方式为系统管理员带来了新锐的开源服务器软件。对于边缘计算用例,[Fedora IoT][3] 为 IoT 生态系统提供了坚实的基础。 + +Fedora CoreOS 是一个新兴的 Fedora Edition。它是一个自动更新的、最小化的操作系统,用于安全地大规模运行容器化工作负载。它提供了几个[更新流][4],遵循大约每两周一次的自动更新。目前,next 流是基于 Fedora 32,后续还有 testing 流和 stable 流。你可以从[下载页面][5]中找到关于按 next 流发布的工件的信息,并在 [Fedora CoreOS 文档][6]中找到关于如何使用这些工件的信息。 + +当然,我们制作的不仅仅是 Editions。[Fedora Spins][7] 和[实验室][8]针对的是不同的受众和用例,包括[Fedora 天文学实验室][9],它为业余和专业的天文学家带来了完整的开源工具链,还有像 [KDE Plasma][10] 和 [Xfce][11] 这样的桌面环境。Fedora 32 中新增的 [计算神经科学实验室][12] 是由我们的神经科学特别兴趣小组开发的,它可以实现计算神经科学。 + +还有,别忘了我们的备用架构,[ARM AArch64、Power 和 S390x][13]。特别值得一提的是,我们改进了对 Rockchip 系统级芯片的支持,包括 Rock960、RockPro64 和 Rock64。 + +### 一般性的改进 + +无论你使用 Fedora 的哪个变体,你都能获得最新的开源世界。遵循我们的“[First][14]”理念,我们更新了关键的编程语言和系统库包,包括 GCC 10、Ruby 2.7 和 Python 3.8。当然,随着 Python 2 已经过了报废期,我们已经从 Fedora 中删除了大部分 Python 2 包,但我们为仍然需要它的开发者和用户提供了一个遗留的 python27 包。在 Fedora Workstation 中,我们默认启用了 EarlyOOM 服务,以改善低内存情况下的用户体验。 + +我们非常期待你能尝试一下新版本的使用体验! 现在就去 下载它。或者如果你已经在运行 Fedora 操作系统,请按照简单的[升级说明][15]进行升级。 + +### 万一出现问题…… + +如果你遇到问题,请查看[Fedora 32 常见错误][16]页面,如果有问题,请访问我们的 [Askedora][17] 用户支持平台。 + +### 谢谢大家 + +感谢在这个发布周期中为 Fedora 项目做出贡献的成千上万的人,特别是感谢那些在大流行期间为又一次准时发布而付出额外努力的人。Fedora 是一个社区,很高兴看到我们彼此之间的支持。我邀请大家参加 4 月28-29 日的[红帽峰会虚拟体验][18],了解更多关于 Fedora 和其他社区的信息。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/announcing-fedora-32/ + +作者:[Matthew Miller][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://fedoramagazine.org/author/mattdm/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/f32-final-816x345.png +[2]: https://www.gnome.org/news/2020/03/gnome-3-36-released/ +[3]: https://iot.fedoraproject.org/ +[4]: https://docs.fedoraproject.org/en-US/fedora-coreos/update-streams/ +[5]: https://getfedora.org/en/coreos/download?stream=next +[6]: https://docs.fedoraproject.org/en-US/fedora-coreos/getting-started/ +[7]: https://spins.fedoraproject.org/ +[8]: https://labs.fedoraproject.org/ +[9]: https://labs.fedoraproject.org/en/astronomy/ +[10]: https://spins.fedoraproject.org/en/kde/ +[11]: https://spins.fedoraproject.org/en/xfce/ +[12]: https://labs.fedoraproject.org/en/comp-neuro +[13]: https://alt.fedoraproject.org/alt/ +[14]: https://docs.fedoraproject.org/en-US/project/#_first +[15]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/ +[16]: https://fedoraproject.org/wiki/Common_F32_bugs +[17]: http://ask.fedoraproject.org +[18]: https://www.redhat.com/en/summit From 5d5cd0484d61b867d1b3d21cb394ed559b34b025 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 11:59:17 +0800 Subject: [PATCH 329/394] PUB @wxy https://linux.cn/article-12164-1.html --- .../20200428 Fedora 32 is officially here.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20200428 Fedora 32 is officially here.md (98%) diff --git a/translated/news/20200428 Fedora 32 is officially here.md b/published/20200428 Fedora 32 is officially here.md similarity index 98% rename from translated/news/20200428 Fedora 32 is officially here.md rename to published/20200428 Fedora 32 is officially here.md index 5b9bfbf49d..acad6862f5 100644 --- a/translated/news/20200428 Fedora 32 is officially here.md +++ b/published/20200428 Fedora 32 is officially here.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12164-1.html) [#]: subject: (Fedora 32 is officially here!) [#]: via: (https://fedoramagazine.org/announcing-fedora-32/) [#]: author: (Matthew Miller https://fedoramagazine.org/author/mattdm/) From 95109ddc9f3af37e04d426ff034d8c1bc5027d10 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 21:49:06 +0800 Subject: [PATCH 330/394] PRF @geekpi --- ...Addresses, and Interface Speed on Linux.md | 72 +++++++++---------- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md b/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md index e586660e0c..10d95aab72 100644 --- a/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md +++ b/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md @@ -1,34 +1,30 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux) [#]: via: (https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -如何在 Linux 上检查可用的网络接口、关联的 IP 地址、MAC 地址和接口速度 +如何在 Linux 上检查网卡信息 ====== -默认在设置服务器时,你将配置主网络接口。 +![](https://img.linux.net.cn/data/attachment/album/202004/29/214835m1ms3n00s6qbcycz.jpg) -这是每个人所做的构建工作的一部分。 +默认情况下,在设置服务器时你会配置主网络接口。这是每个人所做的构建工作的一部分。有时出于各种原因,你可能需要配置额外的网络接口。 -有时出于各种原因,你可能需要配置额外的网络接口。 +这可以是通过网络绑定bonding/协作teaming来提供高可用性,也可以是用于应用需求或备份的单独接口。 -这可以是网络绑定/团队合作或高可用性,也可以是用于应用需求或备份的单独接口。 +为此,你需要知道计算机有多少接口以及它们的速度来配置它们。 -为此,你需要知道计算机有多少接口以及它们的配置速度。 - -有许多命令可检查可用的网络接口,但是我们仅使用 IP 命令。 - -稍后,我们将使用所有这些工具编写单独的文章。 +有许多命令可检查可用的网络接口,但是我们仅使用 `ip` 命令。以后,我们会另外写一篇文章来全部介绍这些工具。 在本教程中,我们将向你显示可用网络网卡(NIC)信息,例如接口名称、关联的 IP 地址、MAC 地址和接口速度。 -### 什么是 IP 命令 +### 什么是 ip 命令 -**[IP 命令][1]**类似于 ifconfig, 用于分配静态 IP 地址、路由和默认网关等。 +[ip 命令][1] 类似于 `ifconfig`, 用于分配静态 IP 地址、路由和默认网关等。 ``` # ip a @@ -47,15 +43,15 @@ ### 什么是 ethtool 命令 -ethtool 用于查询或控制网络驱动或硬件设置。 +`ethtool` 用于查询或控制网络驱动或硬件设置。 ``` # ethtool eth0 ``` -### 1)如何在 Linux 上使用 IP 命令检查可用的网络接口 +### 1)如何在 Linux 上使用 ip 命令检查可用的网络接口 -在不带任何参数的情况下运行 IP 命令时,它会提供大量信息,但是,如果仅需要可用的网络接口,请使用以下定制的 IP 命令。 +在不带任何参数的情况下运行 `ip` 命令时,它会提供大量信息,但是,如果仅需要可用的网络接口,请使用以下定制的 `ip` 命令。 ``` # ip a |awk '/state UP/{print $2}' @@ -64,13 +60,13 @@ eth0: eth1: ``` -### 2)如何在 Linux 上使用 IP 命令检查网络接口的 IP 地址 +### 2)如何在 Linux 上使用 ip 命令检查网络接口的 IP 地址 -如果只想查看 IP 地址分配给了哪个接口,请使用以下定制的 IP 命令。 +如果只想查看 IP 地址分配给了哪个接口,请使用以下定制的 `ip` 命令。 ``` # ip -o a show | cut -d ' ' -f 2,7 -or +或 ip a |grep -i inet | awk '{print $7, $2}' lo 127.0.0.1/8 @@ -78,18 +74,18 @@ lo 127.0.0.1/8 192.168.1.102/24 ``` -### 3)如何在 Linux 上使用 IP 命令检查网卡的 MAC 地址 +### 3)如何在 Linux 上使用 ip 命令检查网卡的 MAC 地址 如果只想查看网络接口名称和相应的 MAC 地址,请使用以下格式。 -检查特定的网络接口的 MAC 地址。 +检查特定的网络接口的 MAC 地址: ``` # ip link show dev eth0 |awk '/link/{print $2}' 00:00:00:55:43:5c ``` -检查所有网络接口的 MAC 地址。 +检查所有网络接口的 MAC 地址,创建该脚本: ``` # vi /opt/scripts/mac-addresses.sh @@ -97,12 +93,12 @@ lo 127.0.0.1/8 #!/bin/sh ip a |awk '/state UP/{print $2}' | sed 's/://' | while read output; do -echo $output: -ethtool -P $output + echo $output: + ethtool -P $output done ``` -运行下面的 shell 脚本获取多个网络接口的 MAC 地址。 +运行该脚本获取多个网络接口的 MAC 地址: ``` # sh /opt/scripts/mac-addresses.sh @@ -115,9 +111,9 @@ Permanent address: 00:00:00:55:43:5d ### 4)如何在 Linux 上使用 ethtool 命令检查网络接口速度 -如果要在 Linux 上检查网络接口速度,请使用 ethtool 命令。 +如果要在 Linux 上检查网络接口速度,请使用 `ethtool` 命令。 -检查特定网络接口的速度。 +检查特定网络接口的速度: ``` # ethtool eth0 |grep "Speed:" @@ -125,7 +121,7 @@ Permanent address: 00:00:00:55:43:5d Speed: 10000Mb/s ``` -检查所有网络接口速度。 +检查所有网络接口速度,创建该脚本: ``` # vi /opt/scripts/port-speed.sh @@ -133,12 +129,12 @@ Speed: 10000Mb/s #!/bin/sh ip a |awk '/state UP/{print $2}' | sed 's/://' | while read output; do -echo $output: -ethtool $output |grep "Speed:" + echo $output: + ethtool $output |grep "Speed:" done ``` -运行以下 shell 脚本获取多个网络接口速度。 +运行该脚本获取多个网络接口速度: ``` # sh /opt/scripts/port-speed.sh @@ -151,7 +147,7 @@ Speed: 10000Mb/s ### 5)验证网卡信息的 Shell 脚本 -通过此 **[shell 脚本][2]**,你可以收集上述所有信息,例如网络接口名称、网络接口的 IP 地址,网络接口的 MAC 地址以及网络接口的速度。 +通过此 shell 脚本你可以收集上述所有信息,例如网络接口名称、网络接口的 IP 地址,网络接口的 MAC 地址以及网络接口的速度。创建该脚本: ``` # vi /opt/scripts/nic-info.sh @@ -161,14 +157,14 @@ hostname echo "-------------" for iname in $(ip a |awk '/state UP/{print $2}') do -echo "$iname" -ip a | grep -A2 $iname | awk '/inet/{print $2}' -ip a | grep -A2 $iname | awk '/link/{print $2}' -ethtool $iname |grep "Speed:" + echo "$iname" + ip a | grep -A2 $iname | awk '/inet/{print $2}' + ip a | grep -A2 $iname | awk '/link/{print $2}' + ethtool $iname |grep "Speed:" done ``` -运行以下 shell 脚本检查网卡信息。 +运行该脚本检查网卡信息: ``` # sh /opt/scripts/nic-info.sh @@ -192,7 +188,7 @@ via: https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-spee 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From d4649a859a8783f4009c79b60d5c39ebacac3e21 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 21:49:38 +0800 Subject: [PATCH 331/394] PUB @geekpi https://linux.cn/article-12165-1.html --- ... Addresses, MAC Addresses, and Interface Speed on Linux.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md (98%) diff --git a/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md b/published/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md similarity index 98% rename from translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md rename to published/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md index 10d95aab72..8464da643e 100644 --- a/translated/tech/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md +++ b/published/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12165-1.html) [#]: subject: (How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux) [#]: via: (https://www.2daygeek.com/linux-unix-check-network-interfaces-names-nic-speed-ip-mac-address/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) From a3a6873ca6a01afc1200612d2c4695acbc13e60a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 23:01:06 +0800 Subject: [PATCH 332/394] APL --- ...200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md index 377a58f34a..dfa900d9cf 100644 --- a/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md +++ b/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 5ca67f76337225ef128bf79ac114127056740d4b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 23:29:56 +0800 Subject: [PATCH 333/394] TSL&PRF --- ...Lysia Arrives with ZFS and Snap Support.md | 112 ------------------ ...Lysia Arrives with ZFS and Snap Support.md | 110 +++++++++++++++++ 2 files changed, 110 insertions(+), 112 deletions(-) delete mode 100644 sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md create mode 100644 translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md diff --git a/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md deleted file mode 100644 index dfa900d9cf..0000000000 --- a/sources/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manjaro 20 Lysia Arrives with ZFS and Snap Support) -[#]: via: (https://itsfoss.com/manjaro-20-release/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Manjaro 20 Lysia Arrives with ZFS and Snap Support -====== - -_**Manjaro Linux has refreshed its ISO with Manjaro 20 “Lysia”. It now supports Snap and Flatpak packages in Pamac. ZFS option is added in Manjaro Architect installer and the latest kernel 5.6 is used as the base.**_ - -It’s raining new distribution releases. Ubuntu 20.04 LTS was released last week. Fedora 32 will be releasing shortly and [Manjaro has released version 20][1] codenamed Lysia. - -### What’s new in Manjaro 20 Lysia? - -Plenty actually. Let me show you some of the major new features in Manjaro 20. - -#### New Matcha theme - -Manjaro 20 has a new default theme called Matcha. It gives the desktop a more polished look. - -![][2] - -#### Snap and Flatpak support in Pamac and terminal - -Snap and Flatpak package support is improved. You can use them in command line if you want. - -You can also enable Snap and Flatpak support in the Pamac GUI package manager. - -![Enable Snap support in Pamac Manjaro][3] - -Once enabled, you can find and install Snap/Flatpak applications in the Pamac software manager. - -![Snap applications in Pamac][4] - -#### Pamac offers to install new software based on search (in GNOME) - -In the GNOME variant, if you search for something, Pamac software manager will now offer to install software that match the query. GNOME Software Center does that in other distributions that use GNOME desktop. - -#### ZFS support lands in Manjaro Architect - -You can now easily use ZFS as root in Manjaro Linux. The [ZFS file system][5] support is available in [Manjaro Architect][6]. - -Do note that I am saying Manjaro Architect, the terminal based installer. It’s not the same as the regular graphical [Calamares installer][7]. - -![][8] - -#### Linux kernel 5.6 - -The latest stable [Linux kernel 5.6][9] brings more hardware support for thunderbolt, Nvidia and USB4. You can also use [WireGuard VPN][10]. - -![][11] - -#### Miscellaneous other features - - * New desktop environment versions: Xfce 4.14, GNOME 3.36 and KDE Plasma 5.18 - * zsh is the new default shell - * Display-Profiles allows you to store one or more profiles for your preferred display configuration - * Improved Gnome-Layout-Switcher - * Latest drivers - * Improved and polished Manjaro tools - - - -### How to get Manjaro 20 Lysia? - -_**If you are already using it, just update your Manjaro Linux system and you should already be using version 20.**_ - -Manjaro uses a rolling release model which means you don’t have to manually upgrade from one version to another. You don’t have to reinstall as soon as there is a new version is released. - -If Manjaro is rolling release distribution, why does it release a new version every now and then? It’s because they have to refresh the ISO so that new users downloading Manjaro will not have to install updates for last few years. This is why Arch Linux also refreshes its ISO every month. - -Manjaro ‘ISO refreshes’ are codenamed and have a version because it helps the developers clearly mark each stage of development. - -So, the bottom line is that if you are already using it, just [update your Manjaro Linux system][12] using Pamac or command line. - -If you want to try Manjaro or if you want to use ZFS, then you can [install Manjaro][13] by downloading the ISO from its website: - -[Download Manjaro Linux][14] - -Enjoy the new release of Manjaro Linux. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/manjaro-20-release/ - -作者:[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://forum.manjaro.org/t/manjaro-20-0-lysia-released/138633 -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-lysia.jpeg?resize=800%2C440&ssl=1 -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-snap-in-pamac-manjaro.jpg?resize=800%2C490&ssl=1 -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/snap-app-pacman.jpg?resize=800%2C489&ssl=1 -[5]: https://itsfoss.com/what-is-zfs/ -[6]: https://itsfoss.com/manjaro-architect-review/ -[7]: https://calamares.io/ -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pacman-prompts-install-apps.jpg?resize=800%2C331&ssl=1 -[9]: https://itsfoss.com/linux-kernel-5-6/ -[10]: https://itsfoss.com/wireguard/ -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-neofetch-screen.jpg?resize=800%2C495&ssl=1 -[12]: https://itsfoss.com/update-arch-linux/ -[13]: https://itsfoss.com/install-manjaro-linux/ -[14]: https://manjaro.org/download/ diff --git a/translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md new file mode 100644 index 0000000000..80a2a95e10 --- /dev/null +++ b/translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md @@ -0,0 +1,110 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Manjaro 20 Lysia Arrives with ZFS and Snap Support) +[#]: via: (https://itsfoss.com/manjaro-20-release/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Manjaro 20 Lysia 到来,支持 ZFS 和 Snap +====== + +![](https://img.linux.net.cn/data/attachment/album/202004/29/232925j8paomvp11pfu12v.jpg) + +> Manjaro Linux 刷新了其 Manjaro 20 “Lysia” 的 ISO。现在在 Pamac 中支持了 Snap 和 Flatpak 软件包。在 Manjaro Architect 安装程序中增加了 ZFS 选项,并使用最新的内核 5.6 作为基础。 + +最近新的发行版的发布像下雨一样。在上周发布了 [Ubuntu 20.04 LTS](https://linux.cn/article-12142-1.html) ,紧接着 [Fedora 32](https://linux.cn/article-12164-1.html) 也刚刚发布,而现在 [Manjaro 发布了版本 20][1],代号为 Lysia。 + +### Manjaro 20 Lysia 有什么新东西? + +其实有很多。让我给大家介绍一下 Manjaro 20 中的一些主要新功能。 + +#### 新的抹茶主题 + +Manjaro 20 有一个新的默认主题,名为 Matcha(抹茶)。它让桌面看起来更有质感。 + +![][2] + +#### 对 Snap 和 Flatpak 的支持 + +Snap 和 Flatpak 软件包的支持得到了改进。如果你愿意,你可以在命令行中使用它们。 + +你还可以在 Pamac 图形界面包管理器中启用 Snap 和 Flatpak 支持。 + +![Enable Snap support in Pamac Manjaro][3] + +启用后,你可以在 Pamac 软件管理器中找到并安装 Snap/Flatpak 应用程序。 + +![Snap applications in Pamac][4] + +#### Pamac 提供了基于搜索安装新软件的方式(在 GNOME 中) + +在 GNOME 变种中,如果你搜索某个东西,Pamac 软件管理器会提供安装符合查询的软件。在其他使用 GNOME 桌面的发行版中,GNOME 软件中心也会这样做。 + +#### ZFS 支持登陆了 Manjaro Architect + +现在,你可以在 Manjaro Linux 中轻松地使用 ZFS 作为根文件系统。在 [Manjaro Architect][6] 中提供了对 [ZFS 文件系统][5]的支持。 + +请注意,我说的是 Manjaro Architect,即基于终端的安装程序。它和普通的图形化的 [Calamares 安装程序][7]不一样。 + +![][8] + +#### Linux kernel 5.6 + +最新的稳定版 [Linux 内核 5.6][9] 带来了更多的硬件支持,如 thunderbolt、Nvidia 和 USB4。你也可以使用 [WireGuard VPN][10]。 + +![][11] + +#### 其他杂项变化 + + * 新的桌面环境版本:Xfce 4.14、GNOME 3.36 和 KDE Plasma 5.18。 + * 新的默认 shell 是 zsh。 + * Display-Profiles 允许你存储一个或多个配置文件,用于你的首选显示配置。 + * 改进后的 Gnome-Layout-Switcher。 + * 最新的驱动程序。 + * 改进和完善了 Manjaro 工具。 + +### 如何取得 Manjaro 20 Lysia? + +如果你已经在使用 Manjaro,只需更新你的 Manjaro Linux 系统,你就应该已经在使用 Lysia 了。 + +Manjaro 采用了滚动发布模式,这意味着你不必手动从一个版本升级到另一个版本。只要有新的版本发布,不需要重新安装就可以使用了。 + +既然 Manjaro 是滚动发布的,为什么每隔一段时间就会发布一个新版本呢?这是因为他们要刷新 ISO,这样下载 Manjaro 的新用户就不用再安装过去几年的更新了。这就是为什么 Arch Linux 也会每个月刷新一次 ISO 的原因。 + +Manjaro 的“ISO 刷新”是有代号和版本的,因为它可以帮助开发者清楚地标明每个开发阶段的发展方向。 + +所以,如果你已经在使用它,只需使用 Pamac 或命令行[更新你的 Manjaro Linux 系统][12]即可。 + +如果你想尝试 Manjaro 或者想使用 ZFS,那么你可以通过从它的网站上[下载 ISO][14] 来[安装 Manjaro][13]。 + +愿你喜欢新的 Manjaro Linux 发布。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/manjaro-20-release/ + +作者:[Abhishek Prakash][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://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://forum.manjaro.org/t/manjaro-20-0-lysia-released/138633 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-lysia.jpeg?resize=800%2C440&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/enable-snap-in-pamac-manjaro.jpg?resize=800%2C490&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/snap-app-pacman.jpg?resize=800%2C489&ssl=1 +[5]: https://itsfoss.com/what-is-zfs/ +[6]: https://itsfoss.com/manjaro-architect-review/ +[7]: https://calamares.io/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pacman-prompts-install-apps.jpg?resize=800%2C331&ssl=1 +[9]: https://itsfoss.com/linux-kernel-5-6/ +[10]: https://itsfoss.com/wireguard/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/manjaro-20-neofetch-screen.jpg?resize=800%2C495&ssl=1 +[12]: https://itsfoss.com/update-arch-linux/ +[13]: https://itsfoss.com/install-manjaro-linux/ +[14]: https://manjaro.org/download/ From 8a93e2a3fcacdb959b7c30d197e6903435047286 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Wed, 29 Apr 2020 23:38:43 +0800 Subject: [PATCH 334/394] PUB @wxy https://linux.cn/article-12166-1.html --- ...0429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/news => published}/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md (98%) diff --git a/translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/published/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md similarity index 98% rename from translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md rename to published/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md index 80a2a95e10..2ed94dd0a8 100644 --- a/translated/news/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md +++ b/published/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12166-1.html) [#]: subject: (Manjaro 20 Lysia Arrives with ZFS and Snap Support) [#]: via: (https://itsfoss.com/manjaro-20-release/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From 2927a899e506b40a719cb0b723d12708a8cfe5f7 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 30 Apr 2020 00:55:03 +0800 Subject: [PATCH 335/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200430=20Three?= =?UTF-8?q?=20Methods=20Boot=20CentOS/RHEL=207/8=20Systems=20in=20Single?= =?UTF-8?q?=20User=20Mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md --- ...OS-RHEL 7-8 Systems in Single User Mode.md | 159 ++++++++++++++++++ 1 file changed, 159 insertions(+) create mode 100644 sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md diff --git a/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md b/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md new file mode 100644 index 0000000000..a3f3768533 --- /dev/null +++ b/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md @@ -0,0 +1,159 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode) +[#]: via: (https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode +====== + +Single user mode, also referred to as maintenance mode, which allows a single super user to recover/repair system problems. + +Generally, these problems cannot be solved in a multi-user environment. The system can boot but will not function properly or you will not be able to log in. + +It uses `runlevel1.target` or `rescue.target` on **[Red Hat][1]** (RHEL) 7/8 based systems. + +In this mode, the system mount all local file systems, but does not activate network interfaces. + +It only enables certain services and minimal functionality to repair the system. + +This method is mostly useful when you want to run fsck to fix corrupted file systems, or to reset a forgotten root password, or to fix a mount point issue on the system. + +You can boot **[CentOS][2]**/**[RHEL][3]** 7/8 systems in single user mode using the below three methods. + + * **Method-1:** Boot CentOS/RHEL 7/8 systems in single user mode by adding the “rd.break” parameter to the kernel + * **Method-2:** Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “rhgb quiet” word with the “init=/bin/bash or init=/bin/sh” parameter in the kernel + * **Method-3:** Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “ro” word with the “rw init=/sysroot/bin/sh” parameter in the kernel + + + +### Method-1: Boot CentOS/RHEL 7/8 systems in single user mode by adding the “rd.break” parameter to the kernel + +Reboot your system, on the GRUB2 boot screen, press the `"e"` key to edit the selected kernel. You need to select the first line, the first one is the latest kernel whereas you can select the different one if you would like to boot your system with the older kernel. + +![][4] + +Depending on your RHEL/CentOS version, find the word **“linux16”** or **“linux”**, press the “End” button on the keyboard, go to the end of the line, and add the keyword **“rd.break”** as shown below in the screenshot, then press **“Ctrl+x”** or **“F10”** to boot into single-user mode. + +You need to find the word **`linux16`** for RHEL/CentOS 7 systems, while **`linux`** for RHEL/CentOS 8 systems. + +![][4] + +This change mount your root file system into **“read only (RO)”** mode. You can check this by running the command below. Also, the output below clearly shows that you are in **“Emergency Mode”**. + +``` +# mount | grep root +``` + +![][4] + +To make changes to the **“sysroot”** file system you need to remount it with READ and WRITE (RW) mode. + +``` +# mount -o remount,rw /sysroot +``` + +Run the below command to change the environment, commonly known as “jailed directory” or “chroot jail”. + +``` +# chroot /sysroot +``` + +![][4] + +Now, single-user mode is completely ready for use. Once you have fixed your problem to exit single user mode, perform the following steps. + +CentOS/RHEL 7/8 uses SELinux by default, so create the following hidden file, which will automatically perform a relabel of all files on next boot. + +``` +# touch /.autorelabel +``` + +Finally, run the below command to restart the system. Alternatively, type “exit” command twice to restart your system. + +``` +# reboot -f +``` + +### Method-2: Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “rhgb quiet” word with the “init=/bin/bash or init=/bin/sh” parameters in the kernel + +Reboot your system, on the GRUB2 boot screen, press the `"e"` key to edit the selected kernel parameters. + +![][4] + +Find the word **“rhgb quiet”** and replace it with **“init=/bin/bash”** or **“init=/bin/sh”**, then press **“Ctrl+x”** or **“F10”** to boot in single user mode. + +Screenshot for **`init=/bin/bash`**. + +![][4] + +Screenshot for **`init=/bin/sh`**. + +![][4] + +By default, this will mount your “/” partition in read-only (RO) mode, so you will need to remount the “/” file system with READ and WRITE (RW) mode to make changes. + +``` +# mount -o remount,rw / +``` + +![][4] + +You can now perform any task that you want. When you are done, run the following command to enable SELinux relabeling on reboot. + +``` +# touch /.autorelabel +``` + +Finally reboot the system. + +``` +# exec /sbin/init 6 +``` + +### Method-3: Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “ro” word with the “rw init=/sysroot/bin/sh” parameter in the kernel + +To interrupt the automatic boot, reboot your system and press any key on the GRUB2 splash screen. + +This will display the list of kernels available on your system and select the latest kernel and press the **`"e"`** key to edit the selected kernel parameters. + +Find the line that starts with the word **“linux”** or **“linux16”** and replace **“ro”** with **“rw init=/sysroot/bin/sh”**. When finished, press **“Ctrl+x”** or **“F10”** to boot in single user mode. + +Change the environment to “chroot jail” by running the below command. + +``` +# chroot /sysroot +``` + +Make any necessary changes to the system. Once done, run the below command to enable SELinux relabeling on reboot. + +``` +# touch /.autorelabel +``` + +Finally reboot the system. + +``` +# reboot -f +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/ + +作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/category/red-hat/ +[2]: https://www.2daygeek.com/category/centos/ +[3]: https://www.2daygeek.com/category/rhel/ +[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 From fd5f92e2b1d0964bd33b91d67a2d94246185c34c Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 30 Apr 2020 00:58:02 +0800 Subject: [PATCH 336/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200429=20Java?= =?UTF-8?q?=20security,=20mainframes=20having=20a=20moment,=20and=20more?= =?UTF-8?q?=20industry=20trends?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md --- ...ving a moment, and more industry trends.md | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md diff --git a/sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md b/sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md new file mode 100644 index 0000000000..beeac5df9d --- /dev/null +++ b/sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md @@ -0,0 +1,71 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Java security, mainframes having a moment, and more industry trends) +[#]: via: (https://opensource.com/article/20/4/java-mainframes-dev-skills-more-industry-trends) +[#]: author: (Tim Hildred https://opensource.com/users/thildred) + +Java security, mainframes having a moment, and more industry trends +====== +A weekly look at open source community and industry trends. +![Person standing in front of a giant computer screen with numbers, data][1] + +As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. + +## [How secure is Java compared to other languages?][2] + +> In this article, we'll look at how the most commonly used programming languages rank in terms of security. I'll explain some factors that make one language less secure than another, and why identified vulnerabilities have increased so much in the past few years. Finally, I'll suggest a few ways Java developers can reduce vulnerabilities in code.   + +**The impact**: If software is eating the world, then hackers are... I guess the thrush thriving in the gullet? Hyperbole aside, the more stuff made of software, the more incentive clever people have to try and figure out how to do things they probably shouldn't be able to. This applies to Java too. + +## [Mainframes are having a moment][3] + +> In addition to being abundant, mainframe jobs pay well, and so far, appear not to be as affected by the pandemic as other areas of tech employment. Salaries for entry-level enterprise computing jobs [average US $70,100 a year][4] [PDF], according to a 2019 report from tech analyst [Forrester Research][5] commissioned by IBM. As recently as this week, jobs boards such as [Indeed][6] and [Dice.com][7] listed hundreds or in some cases thousands of openings for mainframe positions at all levels. Advertised pay ranges from $30 to $35 an hour for a junior mainframe developer to well over $150,000 a year for a mainframe database administration manager. + +**The impact**: That is much, much better than a poke in the eye. + +## [The developer skills on the rise, and in decline][8] + +> Indeed.com analysed job postings using a list of 500 key technology skill terms to see which ones employers are looking for more these days and which are falling out of favour. Such research has helped identify cutting-edge skills over the past five years, with some previous years’ risers now well establish, thanks to explosive growth. + +**The impact**: The "on the rise" skills outnumber the "in decline" skills. Bad news for browser developers... + +## [The IT Pro Podcast: Building cloud-native apps][9] + +> The cloud is eating enterprise IT, and while on-premise applications are going to be around for a long time to come, the importance of being able to successfully take advantage of cloud technologies should not be understated. However, it’s one thing to simply port an existing application to the cloud, but developing software to be run in cloud environments is a different matter altogether. + +**The impact**: What is technology if not manifested mindset? + +## [Communication is key to culture change][10] + +> The outcome is staggering. Business teams feel invested in the development of the solution, they feel a sense of excitement and ownership. So much so, they go out into the corridors of the organisation to evangelise and promote the solution. Conversely, this improves the status of the developers within the business. It allows them to integrate with other stakeholders, contribute to new processes and help to achieve common goals.  + +**The impact**: As a communications person, I couldn't agree more. Communication is the difference between an organization and a movement. + +_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/java-mainframes-dev-skills-more-industry-trends + +作者:[Tim Hildred][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/thildred +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) +[2]: https://www.javaworld.com/article/3537561/how-secure-is-java-compared-to-other-languages.html +[3]: https://spectrum.ieee.org/tech-talk/computing/software/mainframes-programming-language-cobol-news-coronavirus +[4]: https://www.ibm.com/downloads/cas/1EPYAP5D +[5]: https://go.forrester.com/ +[6]: https://www.indeed.com/q-Mainframe-jobs.html +[7]: https://www.dice.com/jobs/q-Mainframe-jobs +[8]: https://www.techcentral.ie/10-developer-skills-on-the-rise-and-five-on-the-decline/ +[9]: https://www.itpro.co.uk/cloud/355348/the-it-pro-podcast-building-cloud-native-apps +[10]: https://www.verdict.co.uk/culture-service-digital-enterprise/ From 4f376efa41c389b881e489cc1e28f64c61be54ec Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 30 Apr 2020 00:58:47 +0800 Subject: [PATCH 337/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200429=20Open?= =?UTF-8?q?=20source=20live=20streaming=20with=20Open=20Broadcaster=20Soft?= =?UTF-8?q?ware?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md --- ...treaming with Open Broadcaster Software.md | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md diff --git a/sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md b/sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md new file mode 100644 index 0000000000..748786de77 --- /dev/null +++ b/sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md @@ -0,0 +1,137 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Open source live streaming with Open Broadcaster Software) +[#]: via: (https://opensource.com/article/20/4/open-source-live-stream) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +Open source live streaming with Open Broadcaster Software +====== +If you have something to say, a skill to teach, or just something fun to +share, broadcast it to the world with OBS. +![An old-fashioned video camera][1] + +If you have a talent you want to share with the world, whether it's making your favorite sourdough bread or speedrunning through a level of your favorite video game, live streaming is the modern show-and-tell. It's a powerful way to tell the world about your hobby through a medium once reserved for exclusive and expensive TV studios. Not only is the medium available to anyone with a relatively good internet connection, but the most popular software to make it happen is open source. + +[OBS][2] (Open Broadcaster Software) is a cross-platform application that serves as a control center for your live stream. A _stream_, strictly speaking, means _progressive and coherent data_. The data in a stream can be audio, video, graphics, text, or anything else you can represent as digital data. OBS is programmed to accept data as input, combine streams together (technically referred to as _mixing_) into one product, and then broadcast it. + +![OBS flowchart][3] + +A _broadcast_ is data that can be received by some target. If you're live streaming, your primary target is a streaming service that can host your stream, so other people can find it in a web browser or media player. A live stream is a live event, so people have to "tune in" to your stream when it's happening, or else they miss it. However, you can also target your own hard drive so you can record a presentation and then post it on the internet later for people to watch at their leisure. + +### Installing OBS + +To install OBS on Windows or macOS, download an installer package from [OBS's website][2]. + +To install OBS on Linux, either install it with your package manager (such as **dnf**, **zypper**, or **apt**) or [install it as a Flatpak][4]. + +### Join a streaming service + +In order to live stream, you must have a stream broker. That is, you need a central location on the internet for your stream to be delivered, so your viewers can get to what you're broadcasting. There are a few popular streaming services online, like YouTube and Twitch. You can also [set up your own video streaming server][5] using open source software. + +Regardless of which option you choose, before you begin streaming, you must have a destination for your stream. If you do use a streaming service, you must obtain a _streaming key_. A streaming key is a hash value (it usually looks something like **2ae2fad4e33c3a89c21**) that is private and unique to you. You use this key to authenticate yourself through your streaming software. Without it, the streaming service can't know you are who you say you are and won't let you broadcast over your user account. + +* * * + +* * * + +* * * + +**![Streaming key][6]** + + * In Twitch, your **Primary Stream Key** is available in the **Channel** panel of your **Creator Dashboard**. + * On YouTube, you must enable live streaming by verifying your account. Once you've done that, your **Stream Key** is in the **Other Features** menu option of your **Channel Dashboard**. + * If you're using your own server, there's no maze-like GUI to navigate. You just [create your own streaming key][7]. + + + +### Enter your streaming key + +Once you have a streaming key, launch OBS and go to the **File** > **Settings** menu. + +In the **Settings** window, click on the **Stream** category in the left column. Set the **Service** to your stream service (Custom, Twitch, YouTube, etc.), and enter your stream key. Click the **OK** button in the bottom right to save your changes. + +### Create sources + +In OBS, _sources_ represent any input signal you want to stream. By default, sources are listed at the bottom of the OBS window. + +![OBS sources][8] + +This might be a webcam, a microphone, an audio stream (such as the sound of a video game you're playing), a screen capture of your computer (a "screencast"), a slideshow you want to present, an image, and so on. Before you start streaming, you should define all the sources you plan on using for your stream. This means you have to do a little pre-production and consider what you anticipate for your show. Any camera you have set up must be defined as a source in OBS. Any extra media you plan on cutting to during your show must be defined as a source. Any sound effects or background music must be defined as a source. + +Not all sources "happen" at once. By adding media to your **Sources** panel in OBS, you're just assembling the raw components for your stream. Once you make devices and data available to OBS, you can create your **Scenes**. + +#### Setting up audio + +Computers have seemingly dozens of ways to route audio. Here's the workflow to follow when setting up sound for your stream: + + 1. Check your cables: verify that your microphone is plugged in. + 2. Go to your computer's sound control panel and set the input to whatever microphone you want OBS to treat as the main microphone. This might be a gaming headset or a boom mic or a desktop podcasting mic or a Bluetooth device or a fancy audio interface with XLR ports. Whatever it is, make sure your computer "hears" your main sound input. + 3. In OBS, create a source for your main microphone and name it something obvious (e.g., boom mic, master sound, or mic). + 4. Do a test. Make sure OBS "hears" your microphone by referring to the audio-level monitors at the bottom of the OBS window. If it's not responding to the input you believe you've set as input, check your cables, check your computer sound control panel, and check OBS. + + + +I've seen more people panic over audio sources than any other issue when streaming, and we've _all_ made the same dumb mistakes (several times each, probably!) when attempting to set a microphone for a live stream or videoconference call. Breathe deep, check your cables, check your inputs and outputs, and [get comfortable with audio][9]. It'll pay off in the end. + +### Create scenes + +A **Scene** in OBS is a screen layout and consists of one or more sources. + +![Scenes in OBS][10] + +For instance, you might create a scene called **Master shot** that shows you sitting at your desk in front of your computer or at the kitchen counter ready to mix ingredients together. The source could be a webcam mounted on a tripod a meter or two in front of you. Because you want to cut to a detail shot, you might create a second scene called **Close-up**, which uses the computer screen and audio as one input source and your microphone as another source, so you can narrate as you demonstrate what you're doing. If you're doing a baking show, you might want to mount a second webcam above the counter, so you can cut to an overhead shot of ingredients being mixed. Here, your source is a different webcam but probably the same microphone (to avoid making changes in the audio). + +A _scene_, in other words, is a lot like a _shot_ in traditional production vernacular, but it can be the combination of many shots. The fun thing about OBS is that you can mix and match a lot of different sources together, so when you're adding a **Scene**, you can resize and position different sources to achieve picture-in-picture, or split-screen, or any other effect you might want. It's common in video game "let's play" streams to have the video game in full-screen, with the player inset in the lower right or left. Or, if you're recording a panel or a multi-player game like D&D you might have several cameras covering several players in a _Brady Bunch_ grid. + +The possibilities are endless. During streaming, you can cut from one scene to another as needed. This is intended to be a dynamic system, so you can change scenes depending on what the viewer needs to see at any given moment. + +Generally, you want to have some preset scenes before you start to stream. Even if you have a friend willing to do video mixing as you stream, you always want a safe scene to fall back to, so take time beforehand to set up at least a master shot that shows you doing whatever it is you're doing. If all else fails, at least you'll have your main shot you can safely and reliably cut to. + +### Transitions + +When switching from one scene to another, OBS uses a transition. Once you have more than one scene, you can configure what kind of transition it uses in the **Transitions** panel. Simple transitions are usually best. By default, OBS uses a subtle crossfade, but you can experiment with others as you see fit. + +### Go live + +To start streaming, do your vocal exercises, find your motivation, and press the **Start Streaming** button. + +![Start streaming in OBS][11] + +As long as you've set up your streaming service correctly, you're on the air (or on the wires, anyway). + +If you're the talent (the person in front of the camera), it might be easiest to have someone control OBS during streaming. But if that's not possible, you can control it yourself as long as you've practiced a little in advance. If you're screencasting, it helps to have a two-monitor setup so you can control OBS without it being on screen. + +### Streaming for success + +Many of us take streaming for granted now that the internet exists and can broadcast media created by _anyone_. It's a hugely powerful means of communication, and we're all responsible for making the most of it. + +If you have something positive to say, a skill to teach, words of encouragement, or just something fun that you want to share, and you feel like you want to broadcast to the world, then take the time to learn OBS. You might not get a million viewers, but independent media is a vital part of [free culture][12]. The world can always use empowering and positive open source voices, and yours may be one of the most important of all. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/open-source-live-stream + +作者:[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/LIFE_film.png?itok=aElrLLrw (An old-fashioned video camera) +[2]: http://obsproject.com +[3]: https://opensource.com/sites/default/files/obs-flowchart.jpg (OBS flowchart) +[4]: https://flatpak.org/setup +[5]: https://opensource.com/article/19/1/basic-live-video-streaming-server +[6]: https://opensource.com/sites/default/files/twitch-key.jpg (Streaming key) +[7]: https://opensource.com/article/19/1/basic-live-video-streaming-server#obs +[8]: https://opensource.com/sites/default/files/uploads/obs-sources.jpg (OBS sources) +[9]: https://opensource.com/article/17/1/linux-plays-sound +[10]: https://opensource.com/sites/default/files/uploads/obs-scenes.jpg (Scenes in OBS) +[11]: https://opensource.com/sites/default/files/uploads/obs-stream-start.jpg (Start streaming in OBS) +[12]: https://opensource.com/article/18/1/creative-commons-real-world From 59e96957f7a828e876de1d425bf9fc5d86b710ca Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 30 Apr 2020 01:00:25 +0800 Subject: [PATCH 338/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200429=20The=20?= =?UTF-8?q?life-changing=20magic=20of=20git=20rebase=20-i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200429 The life-changing magic of git rebase -i.md --- ...he life-changing magic of git rebase -i.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 sources/tech/20200429 The life-changing magic of git rebase -i.md diff --git a/sources/tech/20200429 The life-changing magic of git rebase -i.md b/sources/tech/20200429 The life-changing magic of git rebase -i.md new file mode 100644 index 0000000000..8afb9d7f8e --- /dev/null +++ b/sources/tech/20200429 The life-changing magic of git rebase -i.md @@ -0,0 +1,80 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The life-changing magic of git rebase -i) +[#]: via: (https://opensource.com/article/20/4/git-rebase-i) +[#]: author: (Dave Neary https://opensource.com/users/dneary) + +The life-changing magic of git rebase -i +====== +Make everyone think you write perfect code the first time (and make your +patches easier to review and merge). +![Hands programming][1] + +Software development is messy. So many wrong turns, typos to fix, quick hacks and kludges to correct later, off-by-one errors you find late in the process. With version control, you have a pristine record of every wrong turn and correction made during the process of creating the "perfect" final product—a patch ready to submit upstream. Like the outtakes from movies, they are a little embarrassing and sometimes amusing. + +Wouldn't it be great if you could use version control to save your work regularly at waypoints, and then when you have something you are ready to submit for review, you could hide all of that private drafting work and just submit a single, perfect patch? Meet **git rebase -i**, the perfect way to rewrite history and make everyone think that you produce perfect code the first time! + +### What does git rebase do? + +In case you're not familiar with the intricacies of Git, here is a brief overview. Under the covers, Git associates different versions of your project with a unique identifier, which is made up of a hash of the parent node's unique identifier, and the difference between the new version and its parent node. This creates a tree of revisions, and each person who checks out the project gets their own copy. Different people can take the project in different directions, each starting from potentially different branch points. + +![Master branch vs. private branch][2] + +The master branch in the "origin" repo on the left and the private branch on your personal copy on the right. + +There are two ways to integrate your work back with the master branch in the original repository: one is to use **git merge**, and the other is to use **git rebase**. They work in very different ways. + +When you use **git merge**, a new commit is created on the master branch that includes all of the changes from origin plus all of your local changes. If there are any conflicts (for example, if someone else has changed a file you are also working with), these will be marked, and you have an opportunity to resolve the conflicts before committing this merge commit to your local repository. When you push your changes back to the parent repository, all of your local work will appear as a branch for other users of the Git repository. + +But **git rebase** works differently. It rewinds your commits and replays those commits again from the tip of the master branch. This results in two main changes. First, since your commits are now branching off a different parent node, their hashes will be recalculated, and anyone who has cloned your repository may now have a broken copy of the repository. Second, you do not have a merge commit, so any merge conflicts are identified as your changes are being replayed onto the master branch, and you need to fix them before proceeding with the rebase. When you push your changes now, your work does not appear on a branch, and it looks as though you wrote all of your changes off the very latest commit to the master branch. + +![Merge commits preserve history, and rebase rewrites history.][3] + +Merge commits (left) preserve history, while rebase (right) rewrites history. + +However, both of these options come with a downside: everyone can see all your scribbles and edits as you worked through problems locally before you were ready to share your code. This is where the **\--interactive** (or **-i** for short) flag to **git rebase** comes into the picture. + +### Introducing git rebase -i + +The big advantage of **git rebase** is that it rewrites history. But why stop at just pretending you branched off a later point? There is a way to go even further and rewrite how you arrived at your ready-to-propose code: **git rebase -i**, an interactive **git rebase**. + +This feature is the "magic time machine" function in Git. The flag allows you to make sophisticated changes to revision history while doing a rebase. You can hide your mistakes! Merge many small changes into one pristine feature patch! Reorder how things appear in revision history! + +![output of git rebase -i][4] + +When you run **git rebase -i**, you get an editor session listing all of the commits that are being rebased and a number of options for what you can do to them. The default choice is **pick**. + + * **Pick** maintains the commit in your history. + * **Reword** allows you to change a commit message, perhaps to fix a typo or add additional commentary. + * **Edit** allows you to make changes to the commit while in the process of replaying the branch. + * **Squash** merges multiple commits into one. + * You can reorder commits by moving them around in the file. + + + +When you are finished, simply save the final result, and the rebase will execute. At each stage where you have chosen to modify a commit (either with **reword**, **edit**, **squash**, or when there is a conflict), the rebase stops and allows you to make the appropriate changes before continuing. + +The example above results in "One-liner bug fix" and "Integrate new header everywhere" being merged into one commit, and "New header for docs website" and "D'oh - typo. Fixed" into another. Like magic, the work that went into the other commits is still there on your branch, but the associated commits have disappeared from your history! + +This makes it easy to submit a clean patch to an upstream project using **git send-email** or by creating a pull request against the parent repository with your newly tidied up patchset. This has a number of advantages, including that it makes your code easier to review, easier to accept, and easier to merge. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/git-rebase-i + +作者:[Dave Neary][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/dneary +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming-code-keyboard-laptop.png?itok=pGfEfu2S (Hands programming) +[2]: https://opensource.com/sites/default/files/uploads/master-private-branches.png (Master branch vs. private branch) +[3]: https://opensource.com/sites/default/files/uploads/merge-commit-vs-rebase.png (Merge commits preserve history, and rebase rewrites history.) +[4]: https://opensource.com/sites/default/files/uploads/git-rebase-i.png (output of git rebase -i) From 90c39408a7210b6e6f61f859cafaff0365dff783 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 30 Apr 2020 01:01:29 +0800 Subject: [PATCH 339/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200429=20Drop?= =?UTF-8?q?=20PNG=20and=20JPG=20for=20your=20online=20images:=20Use=20WebP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200429 Drop PNG and JPG for your online images- Use WebP.md --- ...nd JPG for your online images- Use WebP.md | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 sources/tech/20200429 Drop PNG and JPG for your online images- Use WebP.md diff --git a/sources/tech/20200429 Drop PNG and JPG for your online images- Use WebP.md b/sources/tech/20200429 Drop PNG and JPG for your online images- Use WebP.md new file mode 100644 index 0000000000..d664a9fdfc --- /dev/null +++ b/sources/tech/20200429 Drop PNG and JPG for your online images- Use WebP.md @@ -0,0 +1,144 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Drop PNG and JPG for your online images: Use WebP) +[#]: via: (https://opensource.com/article/20/4/webp-image-compression) +[#]: author: (Jeff Macharyas https://opensource.com/users/jeffmacharyas) + +Drop PNG and JPG for your online images: Use WebP +====== +Get started with this open source image editing tool to save time and +space. +![Painting art on a computer screen][1] + +WebP is an image format developed by Google in 2010 that provides superior lossless and lossy compression for images on the web. Using WebP, web developers can create smaller, richer images that improve site speed. A faster loading website is critical to the user experience and for the website's marketing effectiveness. + +For optimal loading across all devices and users, images on your site should not be larger than 500 KB in file size. + +WebP lossless images are often at least 25% smaller in size compared to PNGs. WebP lossy images are often anywhere from 25-34% smaller than comparable JPEG images at equivalent SSIM (structural similarity) quality index. + +Lossless WebP supports transparency, as well. For cases when lossy RGB compression is acceptable, lossy WebP also supports transparency, typically providing three times smaller file sizes compared to PNG. + +Google reports a 64% reduction in file size for images converted from animated GIFs to lossy WebP, and a 19% reduction when converted to lossless WebP. + +The WebP file format is based on the RIFF (resource interchange file format) document format. The file signature is **52 49 46 46** (RIFF), as you can see with [hexdump][2]: + + +``` +$ hexdump --canonical pixel.webp +00000000  52 49 46 46 26 00 00 00  [...]  |RIFF&...WEBPVP8 | +00000010  1a 00 00 00 30 01 00 9d  [...]  |....0....*......| +00000020  0e 25 a4 00 03 70 00 fe  [...]  |.%...p...`....| +0000002e +``` + +The standalone libwebp library serves as a reference implementation for the WebP specification and is available from Google's [Git repository][3] or as a tarball. + +The WebP format is compatible with 80% of the web browsers in use worldwide. At the time of this writing, it is not compatible with Apple's Safari browser. The workaround for this is to serve up a JPG/PNG alongside a WebP, and there are methods and Wordpress plugins to do that. + +### Why does this matter? + +Part of my job is to design and maintain our organization's website. Since the website is a marketing tool and site speed is a critical aspect of the user experience, I have been working to improve the speed, and reducing image sizes by converting them to WebP has been a good solution. + +To test the speed of one of the pages, I turned to **web.dev**, which is powered by Lighthouse, released under the Apache 2.0 license, and can be found at . + +According to its official description, "Lighthouse is an open source, automated tool for improving the quality of web pages. You can run it against any web page—public or requiring authentication. It has audits for performance, accessibility, progressive web apps, SEO, and more. You can run Lighthouse in Chrome DevTools, from the command line, or as a Node module. You give Lighthouse a URL to audit, it runs a series of audits against the page, and then it generates a report on how well the page did. From there, use the failing audits as indicators on how to improve the page. Each audit has a reference doc explaining why the audit is important, as well as how to fix it." + +### Creating a smaller WebP image + +The page I tested returned three images. In the report it generates, it provides recommendations and targets. I chose the "app-graphic" image, which, it reported, is 650 KB. By converting it to WebP, I should save 589 KB, reducing the image to 61 KB. I converted the image in Photoshop and saved it with the default WebP settings, and it returned a file size of 44.9 KB. Better than expected! As the screenshot from Photoshop shows, the images look identical in visual quality. + +![WebP vs JPG comparison][4] + +On the left: 650 KB (actual size). On the right: 589 KB (target size after conversion). + +Of course, the open source image editor [GIMP][5] also supports WebP as an export format. It offers several options for quality and compression profile: + +![GIMP dialog for exporting webp, as a webp][6] + +A zoomed-in look of another image: + +![WebP vs PNG comparison][7] + +PNG (left) and WebP (right), both converted from a JPG, shows the WebP, although smaller in size, is superior in visual quality. + +### Convert to an image to WebP + +To convert images on Linux from JPG/PNG to WebP, you can also use the command-line: + +Use **cwebp** on the command line to convert PNG or JPG image files to WebP format. You can convert a PNG image file to a WebP image with a quality range of 80 with the command: + + +``` +`cwebp -q 80 image.png -o image.webp` +``` + +Alternatively, you can also use [Image Magick][8], which is probably available in your distribution's software repository. The subcommand for conversion is **convert**, and all that's needed is an input and output file: + + +``` +`convert pixel.png pixel.webp` +``` + +### Convert an image to WebP with an editor + +To convert images to WebP with a photo editor, use [GIMP][9]. From version 2.10 on, it supports WebP natively. + +If you're a Photoshop user, you need a plugin to convert the files, as Photoshop does not include it natively. WebPShop 0.2.1, released under the Apache License 2.0 license, is a Photoshop module for opening and saving WebP images, including animations, and can be found at: . + +To use the plugin, put the file found in the **bin** folder inside your Photoshop plugin directory: + +Windows x64—C:\Program Files\Adobe\Adobe Photoshop\Plug-ins\WebPShop.8bi + +Mac—Applications/Adobe Photoshop/Plug-ins/WebPShop.plugin + +### WebP on Wordpress + +Many websites are built using Wordpress (that's what I use). So, how does Wordpress handle uploading WebP images? At the time of this writing, it doesn't. But, there are, of course, plugins to enable it so you can serve up both WebP alongside PNG/JPG images (for the Apple crowd). + +Or there are these [instructions][10] from [Marius Hosting][11]: + +"How about directly uploading WebP images to Wordpress? This is easy. Just add some text line on your theme functions.php file. Wordpress does not natively support viewing and uploading WebP files, but I will explain to you how you can make it work in a few simple steps. Log in to your Wordpress admin area and go to Appearance/Theme Editor and find functions.php. Copy and paste the code below at the end of the file and save it.  + + +``` +`//** *Enable upload for webp image files.*/ function webp_upload_mimes($existing_mimes) { $existing_mimes['webp'] = 'image/webp'; return $existing_mimes; } add_filter('mime_types', 'webp_upload_mimes');` +``` + +If you want to see the thumbnail image preview when you go to Media/Library, you have to add the code below in the same functions.php file. To find the functions.php file, go to Appearance/Theme Editor and find functions.php, then copy and paste the code below at the end of the file and save it." + + +``` +`//** * Enable preview / thumbnail for webp image files.*/ function webp_is_displayable($result, $path) { if ($result === false) { $displayable_image_types = array( IMAGETYPE_WEBP ); $info = @getimagesize( $path ); if (empty($info)) { $result = false; } elseif (!in_array($info[2], $displayable_image_types)) { $result = false; } else { $result = true; } } return $result; } add_filter('file_is_displayable_image', 'webp_is_displayable', 10, 2);` +``` + +### WebP and the future + +WebP is a robust and optimized format. It looks better, it has better compression ratio, and it has all the features of most other common image formats. There's no need to wait—start using it now. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/webp-image-compression + +作者:[Jeff Macharyas][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/jeffmacharyas +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://opensource.com/article/19/8/dig-binary-files-hexdump +[3]: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html +[4]: https://opensource.com/sites/default/files/uploads/webp-vs-jpg-app-graphic.png (WebP vs JPG comparison) +[5]: http://gimp.org +[6]: https://opensource.com/sites/default/files/webp-gimp.webp (GIMP dialog for exporting webp, as a webp) +[7]: https://opensource.com/sites/default/files/uploads/xcompare-png-left-webp-right.png (WebP vs PNG comparison) +[8]: https://imagemagick.org +[9]: https://en.wikipedia.org/wiki/GIMP +[10]: https://mariushosting.com/how-to-upload-webp-files-on-wordpress/ +[11]: https://mariushosting.com/ From b8504387469e63d3693bc749226552628ba01766 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Thu, 30 Apr 2020 01:02:14 +0800 Subject: [PATCH 340/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200429=20Why=20?= =?UTF-8?q?strace=20doesn't=20work=20in=20Docker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200429 Why strace doesn-t work in Docker.md --- ...00429 Why strace doesn-t work in Docker.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20200429 Why strace doesn-t work in Docker.md diff --git a/sources/tech/20200429 Why strace doesn-t work in Docker.md b/sources/tech/20200429 Why strace doesn-t work in Docker.md new file mode 100644 index 0000000000..42414ad377 --- /dev/null +++ b/sources/tech/20200429 Why strace doesn-t work in Docker.md @@ -0,0 +1,161 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Why strace doesn't work in Docker) +[#]: via: (https://jvns.ca/blog/2020/04/29/why-strace-doesnt-work-in-docker/) +[#]: author: (Julia Evans https://jvns.ca/) + +Why strace doesn't work in Docker +====== + +While editing the capabilities page of the [how containers work][1] zine, I found myself trying to explain why `strace` doesn’t work in a Docker container. + +The problem here is – if you run `strace` in a Docker container, this happens: + +``` +$ docker run -it ubuntu:18.04 /bin/bash +$ # ... install strace ... +[email protected]:/# strace ls +strace: ptrace(PTRACE_TRACEME, ...): Operation not permitted +``` + +strace works using the `ptrace` system call, so if `ptrace` isn’t allowed, it’s definitely not gonna work! This is pretty easy to fix – on my machine, this fixes it: + +``` +docker run --cap-add=SYS_PTRACE -it ubuntu:18.04 /bin/bash +``` + +But I wasn’t interested in fixing it, I wanted to know why it happens. So why does strace not work, and why does `--cap-add=SYS_PTRACE` fix it? + +### hypothesis 1: container processes are missing the `CAP_SYS_PTRACE` capability + +I always thought the reason was that Docker container processes by default didn’t have the `CAP_SYS_PTRACE` capability. This is consistent with it being fixed by `--cap-add=SYS_PTRACE`, right? + +But this actually doesn’t make sense for 2 reasons. + +**Reason 1**: Experimentally, as a regular user, I can strace on any process run by my user. But if I check if my current process has the `CAP_SYS_PTRACE` capability, I don’t: + +``` +$ getpcaps $$ +Capabilities for `11589': = +``` + +**Reason 2**: `man capabilities` says this about `CAP_SYS_PTRACE`: + +``` +CAP_SYS_PTRACE + * Trace arbitrary processes using ptrace(2); +``` + +So the point of `CAP_SYS_PTRACE` is to let you ptrace **arbitrary** processes owned by any user, the way that root usually can. You shouldn’t need it to just ptrace a regular process owned by your user. + +And I tested this a third way – I ran a Docker container with `docker run --cap-add=SYS_PTRACE -it ubuntu:18.04 /bin/bash`, dropped the `CAP_SYS_PTRACE` capability, and I could still strace processes even though I didn’t have that capability anymore. What? Why? + +### hypothesis 2: something about user namespaces??? + +My next (much less well-founded) hypothesis was something along the lines of “um, maybe the process is in a different user namespace and strace doesn’t work because of… reasons?” This isn’t really coherent but here’s what happened when I looked into it. + +Is the container process in a different user namespace? Well, in the container: + +``` +[email protected]:/# ls /proc/$$/ns/user -l +... /proc/1/ns/user -> 'user:[4026531837]' +``` + +On the host: + +``` +[email protected]:~$ ls /proc/$$/ns/user -l +... /proc/12177/ns/user -> 'user:[4026531837]' +``` + +Because the user namespace ID (`4026531837`) is the same, the root user in the container is the exact same user as the root user on the host. So there’s definitely no reason it shouldn’t be able to strace processes that it created! + +This hypothesis doesn’t make much sense but I hadn’t realized that the root user in a Docker container is the same as the root user on the host, so I thought that was interesting. + +### hypothesis 3: the ptrace system call is being blocked by a seccomp-bpf rule + +I also knew that Docker uses seccomp-bpf to stop container processes from running a lot of system calls. And ptrace is in the [list of system calls blocked by Docker’s default seccomp profile][2]! (actually the list of allowed system calls is a whitelist, so it’s just that ptrace is not in the default whitelist. But it comes out to the same thing.) + +That easily explains why strace wouldn’t work in a Docker container – if the `ptrace` system call is totally blocked, then of course you can’t call it at all and strace would fail. + +Let’s verify this hypothesis – if we disable all seccomp rules, can we strace in a Docker container? + +``` +$ docker run --security-opt seccomp=unconfined -it ubuntu:18.04 /bin/bash +$ strace ls +execve("/bin/ls", ["ls"], 0x7ffc69a65580 /* 8 vars */) = 0 +... it works fine ... +``` + +Yes! It works! Great. Mystery solved, except… + +### why does `--cap-add=SYS_PTRACE` fix the problem? + +What we still haven’t explained is: why does `--cap-add=SYS_PTRACE` would fix the problem? + +The man page for `docker run` explains the `--cap-add` argument this way: + +``` +--cap-add=[] + Add Linux capabilities +``` + +That doesn’t have anything to do with seccomp rules! What’s going on? + +### let’s look at the Docker source code. + +When the documentation doesn’t help, the only thing to do is go look at the source. + +The nice thing about Go is, because dependencies are often vendored in a Go repository, you can just grep the repository to figure out where the code that does a thing is. So I cloned `github.com/moby/moby` and grepped for some things, like `rg CAP_SYS_PTRACE`. + +Here’s what I think is going on. In containerd’s seccomp implementation, in [contrib/seccomp/seccomp_default.go][3], there’s a bunch of code that makes sure that if a process has a capability, then it’s also given access (through a seccomp rule) to use the system calls that go with that capability. + +``` +case "CAP_SYS_PTRACE": + s.Syscalls = append(s.Syscalls, specs.LinuxSyscall{ + Names: []string{ + "kcmp", + "process_vm_readv", + "process_vm_writev", + "ptrace", + }, + Action: specs.ActAllow, + Args: []specs.LinuxSeccompArg{}, + }) +``` + +There’s some other code that seems to do something very similar in [profiles/seccomp/seccomp.go][4] in moby and the [default seccomp profile][5], so it’s possible that that’s what’s doing it instead. + +So I think we have our answer! + +### `--cap-add` in Docker does a little more than what it says + +The upshot seems to be that `--cap-add` doesn’t do exactly what it says it does in the man page, it’s more like `--cap-add-and-also-whitelist-some-extra-system-calls-if-required`. Which makes sense! If you have a capability like `CAP_SYS_PTRACE` which is supposed to let you use the `process_vm_readv` system call but that system call is blocked by a seccomp profile, that’s not going to help you much! + +So allowing the `process_vm_readv` and `ptrace` system calls when you give the container `CAP_SYS_PTRACE` seems like a reasonable choice. + +### that’s all! + +This was a fun small thing to investigate, and I think it’s a nice example of how containers are made of lots of moving pieces that work together in not-completely-obvious ways. + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2020/04/29/why-strace-doesnt-work-in-docker/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com/zines/containers +[2]: https://docs.docker.com/engine/security/seccomp/ +[3]: https://github.com/containerd/containerd/blob/4be98fa28b62e8a012491d655a4d6818ef87b080/contrib/seccomp/seccomp_default.go#L527-L537 +[4]: https://github.com/moby/moby/blob/cc0dfb6e7b22ad120c60a9ce770ea15415767cf9/profiles/seccomp/seccomp.go#L126-L132 +[5]: https://github.com/moby/moby/blob/master/profiles/seccomp/default.json#L723-L739 From 7cac16013bcdabb3f24f680debbc641cf4d46ee2 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 30 Apr 2020 08:42:03 +0800 Subject: [PATCH 341/394] translated --- ... Free and Open Source Editor Pixelorama.md | 108 ------------------ ... Free and Open Source Editor Pixelorama.md | 107 +++++++++++++++++ 2 files changed, 107 insertions(+), 108 deletions(-) delete mode 100644 sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md create mode 100644 translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md diff --git a/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md b/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md deleted file mode 100644 index b4b0949dab..0000000000 --- a/sources/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create Stunning Pixel Art With Free and Open Source Editor Pixelorama) -[#]: via: (https://itsfoss.com/pixelorama/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Create Stunning Pixel Art With Free and Open Source Editor Pixelorama -====== - -_**Brief: Pixelorama is a cross-platform, free and open source 2D sprite editor. It provides all the necessary tools to create pixel art in a neat user interface.**_ - -### Pixelorama: open source sprite editor - -[Pixelorama][1] is a tool created by young game developers at [Orama Interactive][2]. They have developed a few 2D games and a couple of them use pixel art. - -While Orama is primarily into game development, the developers are also creating utility tools that help them (and others) create those games. - -The free and open source sprite editor, Pixelorama is such a utility tool. It’s built on top of [Godot Engine][3] and is perfect for creating pixel art. - -![Pixelorama screenshot][4] - -You see the pixel art in the screenshot above? It’s been created using Pixelorama. This video shows a timelapse video of creating the above image. - -### Features of Pixelorama - -Here are the main features Pixelorama provides: - - * Multiple tools like penicl, erase, fill bucket color picker etc - * Multiple layer system that allows you to add, remove, move up and down, clone and merge as many layers as you like - * Support for spritesheets - * Import images and edit them inside Pixelorama - * Animation timeline with [Onion Skinning][5] - * Custom brushes - * Save and open your projects in Pixelorama’s custom file format, .pxo - * Horizontal & vertical mirrored drawing - * Tile Mode for pattern creation - * Split screen mode and mini canvas preview - * Zoom with mouse scroll wheel - * Unlimited undo and redo - * Scale, crop, flip, rotate, color invert and desaturate your images - * Keyboard shortcuts - * Available in several languages - * Supports Linux, Windows and macOS - - - -### Installing Pixelorama on Linux - -Pixelorama is available as a Snap application and if you are using Ubuntu, you can find it in the software center itself. - -![Pixelorama is available in Ubuntu Software Center][6] - -Alternatively, if you have [Snap support enabled on your Linux distribution][7], you can install it using this command: - -``` -sudo snap install pixelorama -``` - -If you don’t want to use Snap, no worries. You can download the latest release of Pixelorama from [their GitHub repository][8], [extract the zip file][9] and you’ll see an executable file. Give this file execute permission and double click on it to run the application. - -[Download Pixelorama][10] - -**Conclusion** - -![Pixelorama Welcome Screen][11] - -In the Pixeloaram features, it says that you can import images and edit them. I guess that’s only true for certain kind of files because when I tried to import PNG or JPEG files, the application crashed. - -However, I could easily doodle like a 3 year old and make random pixel art. I am not that into arts but I think this is a [useful tool for digital artists on Linux][12]. - -I liked the idea that despite being game developers, they are creating tools that could help other game developers and artists. That’s the spirit of open source. - -If you like the project and will be using it, consider supporting them by a donation. [It’s FOSS has made a humble donation][13] of $25 to thank their effort. - -[Donate to Pixelorama (personal Paypal account of the lead developer)][14] - -Do you like Pixelorama? Do you use some other open source sprite editor? Feel free to share your views in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/pixelorama/ - -作者:[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.orama-interactive.com/pixelorama -[2]: https://www.orama-interactive.com/ -[3]: https://godotengine.org/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama-v6.jpg?ssl=1 -[5]: https://en.wikipedia.org/wiki/Onion_skinning -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama-ubuntu-software-center.jpg?ssl=1 -[7]: https://itsfoss.com/install-snap-linux/ -[8]: https://github.com/Orama-Interactive/Pixelorama -[9]: https://itsfoss.com/unzip-linux/ -[10]: https://github.com/Orama-Interactive/Pixelorama/releases -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama.jpg?ssl=1 -[12]: https://itsfoss.com/best-linux-graphic-design-software/ -[13]: https://itsfoss.com/donations-foss/ -[14]: https://www.paypal.me/erevos diff --git a/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md b/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md new file mode 100644 index 0000000000..530517a482 --- /dev/null +++ b/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md @@ -0,0 +1,107 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Create Stunning Pixel Art With Free and Open Source Editor Pixelorama) +[#]: via: (https://itsfoss.com/pixelorama/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +使用免费和开源编辑器 Pixelorama 创建令人惊叹的像素艺术 +====== + +_**简介:Pixelorama 是一个跨平台、免费和开源的 2D Sprite 编辑器。它在干净的用户界面中提供了创建像素艺术所有必要工具。**_ + +### Pixelorama:开源 Sprite 编辑器 + +[Pixelorama][1] 是年轻游戏开发人员在 [Orama 互动][2]创建的工具。他们已经开发了一些 2D 游戏,其中一些使用了像素艺术。 + +虽然 Orama 主要投入游戏开发,但开发人员也在创建实用工具,帮助他们(和其他人)创建这些游戏。 + +免费开源的 Sprite 编辑器,Pixelorama 是这样一个实用工具。它构建在 [Godot 引擎][3]之上,非常适合创作像素艺术。 + +![Pixelorama screenshot][4] + +你在上面的截图中看到像素艺术了吗?它是使用 Pixelorama 创建的。此视频显示创建上面图像的延时视频。 + +### Pixelorama 的功能 + +以下是 Pixelorama 提供的主要功能: + + * 多种工具,如铅笔,擦除,填充桶颜色选择器等 + * 多层系统,你可以根据需要添加、删除、上下移动、克隆和合并尽可能多的层 + * 支持 Spritesheets + * 导入图像并在 Pixelorama 中编辑它们 + * 带有 [Onion Skinning][5] 的动画时间线 + * 自定义画笔 + * 以 Pixelorama 的自定义文件格式 .pxo 保存并打开你的项目 + * 水平和垂直镜像绘图 + * 用于图样创建的磁贴模式 + * 拆分屏幕模式和迷你画布预览 + * 使用鼠标滚轮缩放 + * 无限撤消和重做 + * 缩放、裁剪、翻转、旋转、颜色反转和去饱和图像 + * 键盘快捷键 + * 提供多种语言 + * 支持 Linux、Windows 和 macOS + + + +### 在 Linux 上安装 Pixelorama + +Pixelorama 提供 Snap 应用,如果你使用的是 Ubuntu,那么可以在软件中心找到它。 + +![Pixelorama is available in Ubuntu Software Center][6] + +或者,如果你在 [Linux 发行版上启用了 Snap 支持][7],那么可以使用此命令安装它: + +``` +sudo snap install pixelorama +``` + +如果你不想使用 Snap,不用担心。你可以从[他们的 GitHub 仓库]下载最新版本的 Pixelorama,[解压 zip 文件][9],你会看到一个可执行文件。授予此文件执行权限,并双击它运行应用。 + +[下载 Pixelorama][10] + +**总结** + +![Pixelorama Welcome Screen][11] + +在 Pixeloaram 的功能中,它说你可以导入图像并对其进行编辑。我想,这只是对某些类型的文件,因为当我尝试导入 PNG 或 JPEG 文件,程序崩溃了。 + +然而,我可以像一个 3 岁的孩子那样随意涂鸦并制作像素艺术。我并没有深入艺术,但我认为这是一个[在 Linux 上对数字艺术家有用的工具][12]。 + +我喜欢这样的想法:尽管是游戏开发人员,但他们创建的工具,可以帮助其他游戏开发人员和艺术家。这就是开源的精神。 + +如果你喜欢这个项目,并且会使用它,请考虑通过捐赠来支持他们。[FOSS 捐赠了][13] 25 美元,以感谢他们的努力。 + +[向 Pixelorama 捐赠(主要开发者的个人 Paypal 账户)][14] + +你喜欢 Pixelorama 吗?你是否使用其他开源 Sprite 编辑器?请随时在评论栏分享你的观点。 + +-------------------------------------------------------------------------------- + + +作者:[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://www.orama-interactive.com/pixelorama +[2]: https://www.orama-interactive.com/ +[3]: https://godotengine.org/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama-v6.jpg?ssl=1 +[5]: https://en.wikipedia.org/wiki/Onion_skinning +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama-ubuntu-software-center.jpg?ssl=1 +[7]: https://itsfoss.com/install-snap-linux/ +[8]: https://github.com/Orama-Interactive/Pixelorama +[9]: https://itsfoss.com/unzip-linux/ +[10]: https://github.com/Orama-Interactive/Pixelorama/releases +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/pixelorama.jpg?ssl=1 +[12]: https://itsfoss.com/best-linux-graphic-design-software/ +[13]: https://itsfoss.com/donations-foss/ +[14]: https://www.paypal.me/erevos From dd505050c66dd0b7765e8efe3147f85a64edfb1a Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Thu, 30 Apr 2020 08:43:21 +0800 Subject: [PATCH 342/394] Rename sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md to sources/news/20200429 Java security, mainframes having a moment, and more industry trends.md --- ...urity, mainframes having a moment, and more industry trends.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => news}/20200429 Java security, mainframes having a moment, and more industry trends.md (100%) diff --git a/sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md b/sources/news/20200429 Java security, mainframes having a moment, and more industry trends.md similarity index 100% rename from sources/tech/20200429 Java security, mainframes having a moment, and more industry trends.md rename to sources/news/20200429 Java security, mainframes having a moment, and more industry trends.md From 168f8315435b9851f2c37692d67d52555d2a48d1 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 30 Apr 2020 08:49:27 +0800 Subject: [PATCH 343/394] translating --- sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md b/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md index 1807d5e6a7..5dd426ccfc 100644 --- a/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md +++ b/sources/tech/20200428 Upgrading Fedora 31 to Fedora 32.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (geekpi) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From c5fa181b4e130158396d8864458ca0852c8f5fa2 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 09:36:28 +0800 Subject: [PATCH 344/394] PRF @geekpi --- ...v5- Why there is IPv4, IPv6 but no IPv5.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md index 71bfe2137a..b0715669ae 100644 --- a/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md +++ b/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?) @@ -20,19 +20,19 @@ IPv5 发生了什么?为什么有 IPv4、IPv6 但没有 IPv5? ![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1] -在 1960 年代后期,美国国防部的[高级研究计划局][2] (ARPA) 发起了一个[项目][3]来连接全国的计算机。最初的目标是创建一个由全国 ARPA 资助的所有计算机组成的网络系统。 +在 1960 年代后期,美国国防部的[高级研究计划局][2](ARPA)发起了一个[项目][3]来连接全国的计算机。最初的目标是创建一个由全国 ARPA 资助的所有计算机组成的网络系统。 -由于这是第一次将如此规模的网络整合在一起,因此他们也在不断发展自己的技术和硬件。他们的第一件工作是名为[传输控制协议][4] (TCP) 的互联网协议 (IP)。该协议“可靠、有序、并会对通过 IP 网络传输的八进制(字节)流错误检测”。基本上,它确保数据安全到达。 +由于这是第一次将如此规模的网络整合在一起,因此他们也在不断发展自己的技术和硬件。他们首先做的工作之一就是开发名为[传输控制协议][4]Transmission Control Protocol(TCP)的互联网协议Internet Protocol(IP)。该协议“可靠、有序,并会对运行于通过 IP 网络传输的主机上的应用的八进制(字节)流通讯进行错误检测”。简单来说,它可以确保数据安全到达。 -最初,TCP 被设计为[“主机级别的端到端协议以及打包和路由协议”][5]。但是,他们意识到他们需要拆分协议以使其更易于管理。于是决定由 IP 处理打包和路由。 +最初,TCP 被设计为[“主机级别的端到端协议以及封装和路由协议”][5]。但是,他们意识到他们需要拆分协议以使其更易于管理。于是决定由 IP 协议处理封装和路由。 那时,TCP 已经经历了三个版本,因此新协议被称为 IPv4。 ### IPv5 的诞生 -IPv5 以不同的名称开始使用:互联网流协议(或 ST)。它是[由 Apple、NeXT 和 Sun Microsystems][6] 创建用于实验流式传输语音和视频。 +IPv5 开始时有个不同的名字:互联网流协议Internet Stream Protocol(ST)。它是[由 Apple、NeXT 和 Sun Microsystems][6] 为试验流式语音和视频而创建的。 -该新协议能够“在保持通信的同时在特定频率上传输数据包”。 +该新协议能够“在保持通信的同时,以特定频率传输数据包”。 ### 那么 IPv5 发生了什么? @@ -40,15 +40,15 @@ IPv5 以不同的名称开始使用:互联网流协议(或 ST)。它是[ IPv5 从未被接受为正式的互联网协议。这主要是由于 32 位限制。 -IPV5 使用与 IPv4 相同的寻址系统。每个地址由 0 到 255 之间的四组数字组成。这将可能的地址数量限制为 [43 亿][6]。 +IPV5 使用与 IPv4 相同的寻址系统。每个地址由 0 到 255 之间的四组数字组成。这将可能的地址数量限制为 [43 亿][6]个。 -在 1970 年代初,这似乎比全世界所需要的还要多。但是,互联网的爆炸性增长证明了这一想法是错误的。2011年,世界正式耗尽了 IPv4 地址。 +在 1970 年代初,这似乎比全世界所需要的还要多。但是,互联网的爆炸性增长证明了这一想法是错误的。2011 年,世界上的IPv4地址正式用完了。 -在 1990 年代,一个新项目开始致力于下一代互联网协议 (IPng)。这导致了 128 位的 IPv6。IPv6 地址包含 [“8 组 4 字符的十六进制数字”][6],它可以包含从 0 到 9 的数字和从 A 到 F 的字母。与 IPv4 不同,IPv6 拥有数万亿个可能的地址,因此我们应该能安全一阵子。 +在 1990 年代,一个新项目开始致力于研究下一代互联网协议(IPng)。这形成了 128 位的 IPv6。IPv6 地址包含 [“8 组 4 字符的十六进制数字”][6],它可以包含从 0 到 9 的数字和从 A 到 F 的字母。与 IPv4 不同,IPv6 拥有数万亿个可能的地址,因此我们应该能安全一阵子。 -同时,IPv5 奠定了 VoIP 的基础,而该技术已被我们用于当今世界范围内的通信。**因此,我想往小了说,你可以说 IPv5 仍然可以保留到了今天**。 +同时,IPv5 奠定了 VoIP 的基础,而该技术已被我们用于当今世界范围内的通信。**因此,我想在某种程度上,你可以说 IPv5 仍然可以保留到了今天**。 -希望你喜欢有关互联网历史的轶事。你可以阅读其他[关于 Linux 和技术的琐事文章] [8]。 +希望你喜欢有关互联网历史的轶事。你可以阅读其他[关于 Linux 和技术的琐事文章][8]。 如果你觉得这篇文章有趣,请花一点时间在社交媒体、Hacker News 或 [Reddit][9] 上分享它。 @@ -59,7 +59,7 @@ via: https://itsfoss.com/what-happened-to-ipv5/ 作者:[John Paul][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 6ba2b00a0204da854ba1b888e2cd02a401185af7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 09:37:51 +0800 Subject: [PATCH 345/394] PUB @geekpi https://linux.cn/article-12168-1.html --- ...t Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md (98%) diff --git a/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md similarity index 98% rename from translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md rename to published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md index b0715669ae..6dc822b7b6 100644 --- a/translated/tech/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md +++ b/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12168-1.html) [#]: subject: (What Happened to IPv5? Why there is IPv4, IPv6 but no IPv5?) [#]: via: (https://itsfoss.com/what-happened-to-ipv5/) [#]: author: (John Paul https://itsfoss.com/author/john/) From 986637082ec52753160022ab4aa39053f0275b3d Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 10:31:01 +0800 Subject: [PATCH 346/394] PRF --- ...hat Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md index 6dc822b7b6..3a8ab6b8bd 100644 --- a/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md +++ b/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md @@ -20,7 +20,7 @@ IPv5 发生了什么?为什么有 IPv4、IPv6 但没有 IPv5? ![ARPA Logical Map in 1977 | Image courtesy: Wikipedia][1] -在 1960 年代后期,美国国防部的[高级研究计划局][2](ARPA)发起了一个[项目][3]来连接全国的计算机。最初的目标是创建一个由全国 ARPA 资助的所有计算机组成的网络系统。 +在 1960 年代后期,美国国防部的[高级研究计划局][2](DARPA)发起了一个[项目][3]来连接全国的计算机。最初的目标是创建一个由全国 ARPA 资助的所有计算机组成的网络系统。 由于这是第一次将如此规模的网络整合在一起,因此他们也在不断发展自己的技术和硬件。他们首先做的工作之一就是开发名为[传输控制协议][4]Transmission Control Protocol(TCP)的互联网协议Internet Protocol(IP)。该协议“可靠、有序,并会对运行于通过 IP 网络传输的主机上的应用的八进制(字节)流通讯进行错误检测”。简单来说,它可以确保数据安全到达。 From 80ae229a5ab081c126ca5bae69935ce266117225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 30 Apr 2020 13:48:03 +0800 Subject: [PATCH 347/394] Translated --- ...re SFTP Server with Chroot in Debian 10.md | 197 ------------------ ...re SFTP Server with Chroot in Debian 10.md | 197 ++++++++++++++++++ 2 files changed, 197 insertions(+), 197 deletions(-) delete mode 100644 sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md create mode 100644 translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md diff --git a/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md b/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md deleted file mode 100644 index 9d57192270..0000000000 --- a/sources/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md +++ /dev/null @@ -1,197 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Configure SFTP Server with Chroot in Debian 10) -[#]: via: (https://www.linuxtechi.com/configure-sftp-chroot-debian10/) -[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) - -How to Configure SFTP Server with Chroot in Debian 10 -====== - -**SFTP** stands for Secure File Transfer Protocol / SSH File Transfer Protocol, it is one of the most common method which is used to transfer files securely over ssh from our local system to remote server and vice-versa. The main advantage of sftp is that we don’t need to install any additional package except ‘**openssh-server**’, in most of the Linux distributions ‘openssh-server’ package is the part of default installation. Other benefit of sftp is that we can allow user to use sftp only not ssh. - -[![Configure-sftp-debian10][1]][2] - -Recently Debian 10, Code name ‘Buster’ has been released, in this article we will demonstrate how to configure sftp with Chroot ‘Jail’ like environment in Debian 10 System. Here Chroot Jail like environment means that user’s cannot go beyond from their respective home directories or users cannot change directories from their home directories.  Following are the lab details: - - * OS = Debian 10 - * IP Address = 192.168.56.151 - - - -Let’s jump into SFTP Configuration Steps, - -### Step:1) Create a Group for sftp using groupadd command - -Open the terminal, create a group with a name “**sftp_users**” using below groupadd command, - -``` -root@linuxtechi:~# groupadd sftp_users -``` - -### Step:2) Add Users to Group ‘sftp_users’ and set permissions - -In case you want to create new user and want to add that user to ‘sftp_users’ group, then run the following command, - -**Syntax:** #  useradd -m -G sftp_users <user_name> - -Let’s suppose user name is ’Jonathan’ - -``` -root@linuxtechi:~# useradd -m -G sftp_users jonathan -``` - -set the password using following chpasswd command, - -``` -root@linuxtechi:~# echo "jonathan:" | chpasswd -``` - -In case you want to add existing users to ‘sftp_users’ group then run beneath usermod command, let’s suppose already existing user name is ‘chris’ - -``` -root@linuxtechi:~# usermod -G sftp_users chris -``` - -Now set the required permissions on Users, - -``` -root@linuxtechi:~# chown root /home/jonathan /home/chris/ -``` - -Create an upload folder in both the user’s home directory and set the correct ownership, - -``` -root@linuxtechi:~# mkdir /home/jonathan/upload -root@linuxtechi:~# mkdir /home/chris/upload -root@linuxtechi:~# chown jonathan /home/jonathan/upload -root@linuxtechi:~# chown chris /home/chris/upload -``` - -**Note:** User like Jonathan and Chris can upload files and directories to upload folder from their local systems. - -### Step:3) Edit sftp configuration file (/etc/ssh/sshd_config) - -As we have already stated that sftp operations are done over the ssh, so it’s configuration file is “**/etc/ssh/sshd_config**“, Before making any changes I would suggest first take the backup and then edit this file and add the following content, - -``` -root@linuxtechi:~# cp /etc/ssh/sshd_config /etc/ssh/sshd_config-org -root@linuxtechi:~# vim /etc/ssh/sshd_config -……… -#Subsystem sftp /usr/lib/openssh/sftp-server -Subsystem sftp internal-sftp - -Match Group sftp_users - X11Forwarding no - AllowTcpForwarding no - ChrootDirectory %h - ForceCommand internal-sftp -………… -``` - -Save & exit the file. - -To make above changes into the affect, restart ssh service using following systemctl command - -``` -root@linuxtechi:~# systemctl restart sshd -``` - -In above ‘sshd_config’ file we have commented out the line which starts with “Subsystem” and added new entry “Subsystem       sftp    internal-sftp” and new lines like, - -“**Match Group sftp_users”**  –> It means if a user is a part of ‘sftp_users’ group then apply rules which are mentioned below to this entry. - -“**ChrootDierctory %h**” –> It means users can only change directories within their respective home directories, they cannot go beyond their home directories, or in other words we can say users are not permitted to change directories, they will get jai like environment within their directories and can’t access any other user’s and system’s directories. - -“**ForceCommand internal-sftp**” –> It means users are limited to sftp command only. - -### Step:4) Test and Verify sftp - -Login to any other Linux system which is on the same network of your sftp server and then try to ssh sftp server via the users that we have mapped in ‘sftp_users’ group. - -``` -[root@linuxtechi ~]# ssh root@linuxtechi -root@linuxtechi's password: -Write failed: Broken pipe -[root@linuxtechi ~]# ssh root@linuxtechi -root@linuxtechi's password: -Write failed: Broken pipe -[root@linuxtechi ~]# -``` - -Above confirms that users are not allowed to SSH , now try sftp using following commands, - -``` -[root@linuxtechi ~]# sftp root@linuxtechi -root@linuxtechi's password: -Connected to 192.168.56.151. -sftp> ls -l -drwxr-xr-x 2 root 1001 4096 Sep 14 07:52 debian10-pkgs --rw-r--r-- 1 root 1001 155 Sep 14 07:52 devops-actions.txt -drwxr-xr-x 2 1001 1002 4096 Sep 14 08:29 upload -``` - -Let’s try to download a file using sftp ‘**get**‘ command - -``` -sftp> get devops-actions.txt -Fetching /devops-actions.txt to devops-actions.txt -/devops-actions.txt 100% 155 0.2KB/s 00:00 -sftp> -sftp> cd /etc -Couldn't stat remote file: No such file or directory -sftp> cd /root -Couldn't stat remote file: No such file or directory -sftp> -``` - -Above output confirms that we are able to download file from our sftp server to local machine and apart from this we have also tested that users cannot change directories. - -Let’s try to upload a file under “**upload**” folder, - -``` -sftp> cd upload/ -sftp> put metricbeat-7.3.1-amd64.deb -Uploading metricbeat-7.3.1-amd64.deb to /upload/metricbeat-7.3.1-amd64.deb -metricbeat-7.3.1-amd64.deb 100% 38MB 38.4MB/s 00:01 -sftp> ls -l --rw-r--r-- 1 1001 1002 40275654 Sep 14 09:18 metricbeat-7.3.1-amd64.deb -sftp> -``` - -This confirms that we have successfully uploaded a file from our local system to sftp server. - -Now test the SFTP server with winscp tool, enter the sftp server ip address along user’s credentials, - -[![Winscp-sftp-debian10][1]][3] - -Click on Login and then try to download and upload files - -[![Download-file-winscp-debian10-sftp][1]][4] - -Now try to upload files in upload folder, - -[![Upload-File-using-winscp-Debian10-sftp][1]][5] - -Above window confirms that uploading is also working fine, that’s all from this article. If these steps help you to configure SFTP server with chroot environment in Debian 10 then please do share your feedback and comments. - --------------------------------------------------------------------------------- - -via: https://www.linuxtechi.com/configure-sftp-chroot-debian10/ - -作者:[Pradeep Kumar][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.linuxtechi.com/author/pradeep/ -[b]: https://github.com/lujun9972 -[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[2]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Configure-sftp-debian10.jpg -[3]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Winscp-sftp-debian10.jpg -[4]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Download-file-winscp-debian10-sftp.jpg -[5]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Upload-File-using-winscp-Debian10-sftp.jpg diff --git a/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md b/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md new file mode 100644 index 0000000000..a30b6ee817 --- /dev/null +++ b/translated/tech/20190915 How to Configure SFTP Server with Chroot in Debian 10.md @@ -0,0 +1,197 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Configure SFTP Server with Chroot in Debian 10) +[#]: via: (https://www.linuxtechi.com/configure-sftp-chroot-debian10/) +[#]: author: (Pradeep Kumar https://www.linuxtechi.com/author/pradeep/) + +如何在 Debian 10 中使用 Chroot 配置 SFTP 服务 +====== + +**SFTP** 代表安全文件传输协议 / SSH 文件传输协议,它是最常用的一个方法,用于通过ssh将文件从本地系统安全地传输到远程服务器,反之亦然。sftp 的主要优点是,除 ‘**openssh-server**’ 之外,我们不需要安装任何额外的软件包,在大多数的 Linux 发行版中,‘openssh-server’ 软件包是默认安装的一部分。sftp 的另外一个好处是,我们可以允许用户使用 sftp ,而不允许使用 ssh 。 + +[![配置-sftp-debian10][1]][2] + +当前 Debian 10 ,代号‘Buster’,已经发布,在这篇文章中,我们将演示如何在 Debian 10 系统中使用 Chroot ‘Jail’ 类似的环境配置 sftp 。在这里,Chroot Jail 类似环境意味着,用户不能超出各自的 home 目录,或者用户不能从各自的 home 目录更改目录。下面实验的详细情况: + + * OS = Debian 10 + * IP 地址 = 192.168.56.151 + + + +让我们跳转到 SFTP 配置步骤, + +### 步骤:1) 为 sftp 使用 groupadd 命令创建一个组 + +打开终端,使用下面的 groupadd 命令创建一个名为的“**sftp_users**”组, + +``` +root@linuxtechi:~# groupadd sftp_users +``` + +### 步骤:2) 添加用户到组 ‘sftp_users’ 并设置权限 + +假设你想创建新的用户,并且想添加该用户到 ‘sftp_users’ 组中,那么运行下面的命令, + +**语法:** # useradd -m -G sftp_users + +让我们假设用户名是 ’Jonathan’ + +``` +root@linuxtechi:~# useradd -m -G sftp_users jonathan +``` + +使用下面的 chpasswd 命令设置密码, + +``` +root@linuxtechi:~# echo "jonathan:" | chpasswd +``` + +假设你想添加现有的用户到 ‘sftp_users’ 组中,那么运行下面的 usermod 命令,让我们假设已经存在的用户名称是 ‘chris’ + +``` +root@linuxtechi:~# usermod -G sftp_users chris +``` + +现在设置用户所需的权限, + +``` +root@linuxtechi:~# chown root /home/jonathan /home/chris/ +``` + +在各用户的 home 目录中都创建一个上传目录,并设置正确地所有权, + +``` +root@linuxtechi:~# mkdir /home/jonathan/upload +root@linuxtechi:~# mkdir /home/chris/upload +root@linuxtechi:~# chown jonathan /home/jonathan/upload +root@linuxtechi:~# chown chris /home/chris/upload +``` + +**注意:** 像 Jonathan 和 Chris 之类的用户可以从他们的本地系统上传文件和目录。 + +### 步骤:3) 编辑 sftp 配置文件 (/etc/ssh/sshd_config) + +正如我们已经陈述的,sftp 操作是通过 ssh 完成的,所以它的配置文件是 “**/etc/ssh/sshd_config**“, 在做任何更改前,我建议首先备份文件,然后再编辑该文件,接下来添加下面的内容, + +``` +root@linuxtechi:~# cp /etc/ssh/sshd_config /etc/ssh/sshd_config-org +root@linuxtechi:~# vim /etc/ssh/sshd_config +……… +#Subsystem sftp /usr/lib/openssh/sftp-server +Subsystem sftp internal-sftp + +Match Group sftp_users + X11Forwarding no + AllowTcpForwarding no + ChrootDirectory %h + ForceCommand internal-sftp +………… +``` + +保存并退出文件。 + +为使上述更改生效,使用下面的 systemctl 命令来重新启动 ssh 服务 + +``` +root@linuxtechi:~# systemctl restart sshd +``` + +在上面的 ‘sshd_config’ 文件中,我们已经注释掉了以 “Subsystem”开头的行,并添加了新的条目 “Subsystem sftp internal-sftp” 和新的行,像, + +“**Match Group sftp_users”** –> 它意味着如果用户是 ‘sftp_users’ 组中的一员,那么将应用下面提到的规则到这个条目。 + +“**ChrootDierctory %h**” –> 它意味着用户只能在他们自己各自的 home 目录中更改目录,而不能超出他们各自的 home 目录。或者换句话说,我们可以说用户是不允许更改目录的。他们将在他们的目录中获得 jai 类似环境,并且不能访问其他用户的目录和系统的目录。 + +“**ForceCommand internal-sftp**” –> 它意味着用户仅被限制到 sftp 命令。 + +### 步骤:4) 测试和验证 sftp + +登录到你的 sftp 服务器的同一个网络上的任何其它的 Linux 系统,然后通过我们在 ‘sftp_users’ 组中映射的用户来尝试 ssh sftp 服务。 + +``` +[root@linuxtechi ~]# ssh root@linuxtechi +root@linuxtechi's password: +Write failed: Broken pipe +[root@linuxtechi ~]# ssh root@linuxtechi +root@linuxtechi's password: +Write failed: Broken pipe +[root@linuxtechi ~]# +``` + +以上操作证实用户不允许 SSH ,现在使用下面的命令尝试 sftp , + +``` +[root@linuxtechi ~]# sftp root@linuxtechi +root@linuxtechi's password: +Connected to 192.168.56.151. +sftp> ls -l +drwxr-xr-x 2 root 1001 4096 Sep 14 07:52 debian10-pkgs +-rw-r--r-- 1 root 1001 155 Sep 14 07:52 devops-actions.txt +drwxr-xr-x 2 1001 1002 4096 Sep 14 08:29 upload +``` + +让我们使用 sftp ‘**get**‘ 命令来尝试下载一个文件 + +``` +sftp> get devops-actions.txt +Fetching /devops-actions.txt to devops-actions.txt +/devops-actions.txt 100% 155 0.2KB/s 00:00 +sftp> +sftp> cd /etc +Couldn't stat remote file: No such file or directory +sftp> cd /root +Couldn't stat remote file: No such file or directory +sftp> +``` + +上面的输出证实我们能从我们的 sftp 服务器下载文件到本地机器,除此之外,我们也必需测试用户不能更改目录。 + +让我们在 **upload**”目录下尝试上传一个文件, + +``` +sftp> cd upload/ +sftp> put metricbeat-7.3.1-amd64.deb +Uploading metricbeat-7.3.1-amd64.deb to /upload/metricbeat-7.3.1-amd64.deb +metricbeat-7.3.1-amd64.deb 100% 38MB 38.4MB/s 00:01 +sftp> ls -l +-rw-r--r-- 1 1001 1002 40275654 Sep 14 09:18 metricbeat-7.3.1-amd64.deb +sftp> +``` + +这证实我们已经成功地从我们的本地系统上传一个文件到 sftp 服务中。 + +现在使用 winscp 工具来测试 SFTP 服务,输入 sftp 服务器 ip 地址和用户的凭证, + +[![Winscp-sftp-debian10][1]][3] + +在 Login 上单击,然后尝试下载和上传文件 + +[![下载-文件-winscp-debian10-sftp][1]][4] + +现在,在 upload 文件夹中尝试上传文件, + +[![使用-winscp-Debian10-sftp-上传-文件][1]][5] + +上面的窗口证实上传是完好地工作的,这就是这篇文章的全部。如果这些步骤能帮助你在 Debian 10 中使用 chroot 环境配置 SFTP 服务器s,那么请分享你的反馈和评论。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/configure-sftp-chroot-debian10/ + +作者:[Pradeep Kumar][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lujun9972 +[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 +[2]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Configure-sftp-debian10.jpg +[3]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Winscp-sftp-debian10.jpg +[4]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Download-file-winscp-debian10-sftp.jpg +[5]: https://www.linuxtechi.com/wp-content/uploads/2019/09/Upload-File-using-winscp-Debian10-sftp.jpg From e9e66c2a0d1a310249a687ef170345a0b93a004f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Thu, 30 Apr 2020 13:54:18 +0800 Subject: [PATCH 348/394] Translating --- sources/tech/20200417 How to compress files on Linux 5 ways.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200417 How to compress files on Linux 5 ways.md b/sources/tech/20200417 How to compress files on Linux 5 ways.md index 5ce33cd18c..f71e90f9fc 100644 --- a/sources/tech/20200417 How to compress files on Linux 5 ways.md +++ b/sources/tech/20200417 How to compress files on Linux 5 ways.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (robsean) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 2273b6a022ac9d3428ea8939372d0a560e39dd60 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 21:56:47 +0800 Subject: [PATCH 349/394] PRF @wxy --- ...3 Difference Between YUM and RPM Package Manager.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md b/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md index c0bf8b7352..b882a842db 100644 --- a/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md +++ b/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Difference Between YUM and RPM Package Manager) @@ -10,6 +10,8 @@ YUM 和 RPM 包管理器的不同之处 ====== +![](https://img.linux.net.cn/data/attachment/album/202004/30/215525o4e88nen85d8dzd7.jpg) + 软件包管理器在 Linux 系统中扮演着重要的角色。它允许你安装、更新、查看、搜索和删除软件包,以满足你的需求。 每个发行版都有自己的一套包管理器,依据你的 Linux 发行版来分别使用它们。 @@ -18,7 +20,7 @@ RPM 是最古老的传统软件包管理器之一,它是为基于 Red Hat 的 > 如果你想知道 [YUM 和 DNF 包管理器的区别][1]请参考该文章。 -这意味着 yum 可以自动下载并安装所有需要的依赖项,但 rpm 会告诉你安装一个依赖项列表,然后你必须手动安装。 +这意味着 `yum` 可以自动下载并安装所有需要的依赖项,但 `rpm` 会告诉你安装一个依赖项列表,然后你必须手动安装。 当你想用 [rpm 命令][2] 安装一组包时,这实际上是不可能的,而且很费时间。 @@ -76,13 +78,13 @@ via: https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 [a]: https://www.2daygeek.com/author/magesh/ [b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/comparison-difference-between-dnf-vs-yum/ +[1]: https://linux.cn/article-12161-1.html [2]: https://www.2daygeek.com/linux-rpm-command-examples-manage-packages-fedora-centos-rhel-systems/ [3]: https://www.2daygeek.com/linux-yum-command-examples-manage-packages-rhel-centos-systems/ [4]: https://www.2daygeek.com/list-of-command-line-package-manager-for-linux/ From 4073d0b6af97a6fe973a6f244e1e0abc7efb1ada Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 21:57:31 +0800 Subject: [PATCH 350/394] PUB @wxy https://linux.cn/article-12170-1.html --- ...20200423 Difference Between YUM and RPM Package Manager.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200423 Difference Between YUM and RPM Package Manager.md (98%) diff --git a/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md b/published/20200423 Difference Between YUM and RPM Package Manager.md similarity index 98% rename from translated/tech/20200423 Difference Between YUM and RPM Package Manager.md rename to published/20200423 Difference Between YUM and RPM Package Manager.md index b882a842db..bf916108e1 100644 --- a/translated/tech/20200423 Difference Between YUM and RPM Package Manager.md +++ b/published/20200423 Difference Between YUM and RPM Package Manager.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12170-1.html) [#]: subject: (Difference Between YUM and RPM Package Manager) [#]: via: (https://www.2daygeek.com/comparison-difference-between-yum-vs-rpm/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) From cc55978baf5e4de22a8fb5bc546c42be16165a8b Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 22:36:28 +0800 Subject: [PATCH 351/394] PRF --- ...ox is an All-in-one Messenger for Linux.md | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md b/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md index 28a57f2842..93a73f4a54 100644 --- a/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md +++ b/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md @@ -1,16 +1,16 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12171-1.html) [#]: subject: (Rambox is an All-in-one Messenger for Linux) [#]: via: (https://itsfoss.com/rambox/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -Rambox 是 Linux 中多合一的消息收发工具 +Rambox:Linux 中多合一的消息收发工具 ====== -_**简介:Rambox 是一个多合一消息收发工具,允许你将多种服务(如 Discord、Slack、Facebook Messenger)和数百个此类服务结合在一起。**_ +> Rambox 是一个多合一消息收发工具,允许你将多种服务(如 Discord、Slack、Facebook Messenger)和数百个此类服务结合在一起。 ### Rambox:在单个应用中添加多个消息服务 @@ -18,7 +18,7 @@ _**简介:Rambox 是一个多合一消息收发工具,允许你将多种服 Rambox 是通过安装单个应用管理多个通信服务的最佳方式之一。你可以在一个界面使用[多个消息服务][2],如 Facebook Messenger、Gmail chats、AOL、Discord、Google Duo、[Viber][3] 等。 -这样,你就不需要安装单独的应用或者在浏览器中保持打开。你可以使用主密码锁定 Rambox 应用。你还可以使用"请勿打扰"功能。 +这样,你就不需要安装单独的应用或者在浏览器中一直打开着。你可以使用主密码锁定 Rambox 应用。你还可以使用“请勿打扰”功能。 Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你访问 600 多个应用,而社区版则包含 99 多个应用。专业版本具有额外的功能,如主题、休眠、ad-block、拼写检查和高级支持。 @@ -44,24 +44,22 @@ Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你 * Ad-block (**专业版**) * 休眠支持 (**专业版**) * 主题支持(**专业版**) - * 移动视图 (**专业版**) + * 移动设备视图 (**专业版**) * 拼写检查 (**专业版**) - * 工作时间 - 计划传入通知时间 (**专业版**) - * 代理支持 (**专业版**) - - + * 工作时间 - 计划传入通知的时间 (**专业版**) + * 支持代理 (**专业版**) 除了我在这里列出的内容外,你还可以在 Rambox Pro 版本中找到更多功能。要了解有关它的更多信息,你可以参考[正式功能列表][6]。 -还值得注意的是,你不能有超过 3 个活跃并发设备连接。 +还值得注意的是,你不能超过 3 个活跃并发设备的连接。 ### 在 Linux 上安装 Rambox -你可以在[官方下载页][4]获取 **.AppImage** 文件来运行 Rambox。如果你好奇,你可以参考我们的指南,了解如何[在 Linux 上使用 AppImage 文件][7]。 +你可以在[官方下载页][4]获取 .AppImage 文件来运行 Rambox。如果你不清楚,你可以参考我们的指南,了解如何[在 Linux 上使用 AppImage 文件][7]。 -另外,你也可以从 [Snap 商店][8]获取它。此外,请查看其 [GitHub release][9] 部分的 **.deb / .rpm** 或其他包。 +另外,你也可以从 [Snap 商店][8]获取它。此外,请查看其 [GitHub release][9] 部分的 .deb / .rpm 或其他包。 -[Download Rambox Community Edition][4] +- [下载 Rambox 社区版][4] ### 总结 @@ -69,7 +67,7 @@ Rambox 提供可免费使用的[开源社区版][4]。付费专业版允许你 还有一个类似的应用称为 [Franz][10],它也像 Rambox 部分开源、部分高级版。 -尽管像 Rambox 或 Franz 这样的解决方案非常有用,但它们并不总是资源友好,特别是如果你同时使用数十个服务。因此,请留意系统资源(如果你注意到对性能的影响)。 +尽管像 Rambox 或 Franz 这样的解决方案非常有用,但它们并不总是节约资源,特别是如果你同时使用数十个服务。因此,请留意系统资源(如果你注意到对性能的影响)。 除此之外,这是一个令人印象深刻的应用。你有试过了么?欢迎随时让我知道你的想法! @@ -80,7 +78,7 @@ via: https://itsfoss.com/rambox/ 作者:[Ankush Das][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 1696a7b3369362dfd2db3ef57cdba92cb4bf7e02 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Thu, 30 Apr 2020 22:36:53 +0800 Subject: [PATCH 352/394] PUB @geekpi https://linux.cn/article-12171-1.html --- .../20200331 Rambox is an All-in-one Messenger for Linux.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20200331 Rambox is an All-in-one Messenger for Linux.md (100%) diff --git a/translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md b/published/20200331 Rambox is an All-in-one Messenger for Linux.md similarity index 100% rename from translated/tech/20200331 Rambox is an All-in-one Messenger for Linux.md rename to published/20200331 Rambox is an All-in-one Messenger for Linux.md From 3124f64e0addc3396e83f8c3af28cf699d33e97e Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 1 May 2020 01:04:02 +0800 Subject: [PATCH 353/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200501=20How=20?= =?UTF-8?q?to=20Handle=20Automatic=20Updates=20in=20Ubuntu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200501 How to Handle Automatic Updates in Ubuntu.md --- ...w to Handle Automatic Updates in Ubuntu.md | 125 ++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 sources/tech/20200501 How to Handle Automatic Updates in Ubuntu.md diff --git a/sources/tech/20200501 How to Handle Automatic Updates in Ubuntu.md b/sources/tech/20200501 How to Handle Automatic Updates in Ubuntu.md new file mode 100644 index 0000000000..b62af6da74 --- /dev/null +++ b/sources/tech/20200501 How to Handle Automatic Updates in Ubuntu.md @@ -0,0 +1,125 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to Handle Automatic Updates in Ubuntu) +[#]: via: (https://itsfoss.com/auto-updates-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +How to Handle Automatic Updates in Ubuntu +====== + +_**Brief: This tutorial teaches you how to handle the unattended upgrade i.e. the automatic system updates in Ubuntu Linux.**_ + +Sometimes, when you try to [shutdown your Ubuntu system][1], you may come across this screen that stops you from shutting down: + +**Unattended-upgrade in progress during shutdown, please don’t turn off the computer.** + +![Unattended Upgrade In Progress In Ubuntu][2] + +You might wonder what is this “unattended upgrade” and how come it is running without your knowledge. + +The reason is that [Ubuntu][3] takes your system’s security very seriously. By default, it automatically checks for system updates daily and if it finds any security updates, it downloads those updates and install them on its own. For normal system and application updates, it notifies you via the Software Updater tool. + +Since all this happens in the background, you don’t even realize it until you try to shutdown your system or try to install applications on your own. + +Trying to install a new software when these unattended upgrades are in progress leads to the famous [could not get lock error][4]. + +![][5] + +As you can see, the automatic updates present a couple of minor annoyance. You may choose to disable the auto updates but that would mean that you’ll have to check and [update your Ubuntu system][6] manually all the time. + +Do you really need to disable auto updates? + +Please note that this is a security feature. Linux allows you to do practically everything in your system even disabling these security features. +But in my opinion, as a regular user, _**you should not disable the automatic updates**_. It keeps your system safe after all. +For the sake of your system’s security, you may tolerate the minor annoyances that come with the automatic updates. + +Now that you have been warned and you think it is better to take up the additional task of manually updating your system, let’s see how to handle the auto updates. + +As always, there are two ways to do it: GUI and command line. I’ll show you both methods. + +I have used Ubuntu 20.04 here but the steps are valid for Ubuntu 18.04 and any other Ubuntu version. + +### Method 1: Disable automatic updates in Ubuntu graphically + +Go to the menu and look for ‘software & updates’ tool. + +![Software & Updates Settings][7] + +In here, go to Updates tab. Now look for the “Automatically check for updates”. By default it is set to Daily. + +You can change it to Never and your system will never check for updates on its own again. And if it won’t check for updates, it won’t find new updates to install. + +![Disable Auto Updates in Ubuntu Completely][8] + +If you do this, you must manually update your system from time to time. But that’s an additional chore to do and you may not remember it all the time. + +#### Slightly better way to handle auto updates in Ubuntu + +Personally, I would suggest to let it check for updates on its own. If you don’t want it installing the updates automatically, you can change that behavior to get notified about the availability of security updates. + +Keep “Automatically check for updates” to Daily and change “When there are security updates” option to “Display immediately” instead of “Download and install automatically”. + +![Get notified for security updates instead of automatically installing them][9] + +This way, it checks for updates and if there are updates, instead of installing them automatically in the background, the Software Updater tool notifies you that updates are available for your system. Your system already does that for normal system and software updates. + +![Get notified about security updates][10] + +With this setup, you won’t see the “unattended upgrades in progress” when you shutdown your system However, you may still encounter the ‘could not get lock’ error because two separate processes cannot use apt package manager at the same time. + +I believe this is a better solution, don’t you you think? + +As I promised both GUI and command line methods, let me show you how to disable unattended upgrades in the terminal. + +### How to disable automatic updates in Ubuntu using command line + +You’ll find the auto-upgrades settings in the **/etc/apt/apt.conf.d/20auto-upgrades** file. The default text editor in Ubuntu terminal is Nano so you can use this command to edit this configuration file: + +``` +sudo nano /etc/apt/apt.conf.d/20auto-upgrades +``` + +Now, if you don’t want your system to check for updates automatically, you can change the value of APT::Periodic::Update-Package-Lists to 0. + +``` +APT::Periodic::Update-Package-Lists "0"; +APT::Periodic::Unattended-Upgrade "0"; +``` + +If you want it to check for updates but don’t install the unattended-upgrades automatically, you can choose to set it like this: + +``` +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "0"; +``` + +**In the end…** + +The automatic security updates are enabled automatically for a reason and I recommend you keep it like this. A couple of minor annoyances are not really worth risking the security of your system. What do you think? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/auto-updates-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/schedule-shutdown-ubuntu/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/unattended-upgrade-in-progress-in-ubuntu.png?ssl=1 +[3]: https://ubuntu.com/ +[4]: https://itsfoss.com/could-not-get-lock-error/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/12/Could_not_get_lock.jpg?ssl=1 +[6]: https://itsfoss.com/update-ubuntu/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updates-settings-ubuntu-20-04.jpg?ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/disable-auto-updates-ubuntu.jpg?ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/handle-auto-updates-ubuntu.jpg?ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/updates-available-ubuntu.png?ssl=1 From e6d0a79cfef742d1486846b160770f08e40c1094 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 1 May 2020 01:07:37 +0800 Subject: [PATCH 354/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200430=2010=20w?= =?UTF-8?q?ays=20to=20analyze=20binary=20files=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200430 10 ways to analyze binary files on Linux.md --- ...0 ways to analyze binary files on Linux.md | 321 ++++++++++++++++++ 1 file changed, 321 insertions(+) create mode 100644 sources/tech/20200430 10 ways to analyze binary files on Linux.md diff --git a/sources/tech/20200430 10 ways to analyze binary files on Linux.md b/sources/tech/20200430 10 ways to analyze binary files on Linux.md new file mode 100644 index 0000000000..7e05f87298 --- /dev/null +++ b/sources/tech/20200430 10 ways to analyze binary files on Linux.md @@ -0,0 +1,321 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (10 ways to analyze binary files on Linux) +[#]: via: (https://opensource.com/article/20/4/linux-binary-analysis) +[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) + +10 ways to analyze binary files on Linux +====== +These simple commands and tools can help you sail through the task of +analyzing binary files. +![Tux with binary code background][1] + +"There are 10 types of people in this world: those who understand binary and those who don't." + +We work with binaries daily, yet we understand so little about them. By binaries, I mean the executable files that you run daily, right from your command line tools to full-fledged applications. + +Linux provides a rich set of tools that makes analyzing binaries a breeze! Whatever might be your job role, if you are working on Linux, knowing the basics about these tools will help you understand your system better. + +In this article, we will cover some of the most popular of these Linux tools and commands, most of which will be available natively as part of your Linux distribution. If not, you can always use your package manager to install and explore them. Remember: learning to use the right tool at the right occasion requires plenty of patience and practice. + +### file + +What it does: Help to determine the file type. + +This will be your starting point for binary analysis. We work with files daily. Not everything is an executable type; there is a whole wide range of file types out there. Before you start, you need to understand the type of file that is being analyzed. Is it a binary file, a library file, an ASCII text file, a video file, a picture file, a PDF, a data file, etc.? + +The **file** command will help you identify the exact file type that you are dealing with. + + +``` +$ file /bin/ls +/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=94943a89d17e9d373b2794dcb1f7e38c95b66c86, stripped +$ +$ file /etc/passwd +/etc/passwd: ASCII text +$ +``` + +### ldd + +What it does: Print shared object dependencies. + +If you have already used the **file** command above on an executable binary, you can't miss the "dynamically linked" message in the output. What does it mean? + +When software is being developed, we try not to reinvent the wheel. There are a set of common tasks that most software programs require, like printing output or reading from standard in, or opening files, etc. All of these common tasks are abstracted away in a set of common functions that everybody can then use instead of writing their own variants. These common functions are put in a library called **libc** or **glibc**. + +How does one find which libraries the executable is dependent on? That’s where **ldd** command comes into the picture. Running it against a dynamically linked binary shows all its dependent libraries and their paths. + + +``` +$ ldd /bin/ls +        linux-vdso.so.1 =>  (0x00007ffef5ba1000) +        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fea9f854000) +        libcap.so.2 => /lib64/libcap.so.2 (0x00007fea9f64f000) +        libacl.so.1 => /lib64/libacl.so.1 (0x00007fea9f446000) +        libc.so.6 => /lib64/libc.so.6 (0x00007fea9f079000) +        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fea9ee17000) +        libdl.so.2 => /lib64/libdl.so.2 (0x00007fea9ec13000) +        /lib64/ld-linux-x86-64.so.2 (0x00007fea9fa7b000) +        libattr.so.1 => /lib64/libattr.so.1 (0x00007fea9ea0e000) +        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea9e7f2000) +$ +``` + +### ltrace + +What it does: A library call tracer. + +We now know how to find the libraries an executable program is dependent on using the **ldd** command. However, a library can contain hundreds of functions. Out of those hundreds, which are the actual functions being used by our binary? + +The **ltrace** command displays all the functions that are being called at run time from the library. In the below example, you can see the function names being called, along with the arguments being passed to that function. You can also see what was returned by those functions on the far right side of the output. + + +``` +$ ltrace ls +__libc_start_main(0x4028c0, 1, 0x7ffd94023b88, 0x412950 <unfinished ...> +strrchr("ls", '/')                                                                  = nil +setlocale(LC_ALL, "")                                                               = "en_US.UTF-8" +bindtextdomain("coreutils", "/usr/share/locale")                                    = "/usr/share/locale" +textdomain("coreutils")                                                             = "coreutils" +__cxa_atexit(0x40a930, 0, 0, 0x736c6974756572)                                      = 0 +isatty(1)                                                                           = 1 +getenv("QUOTING_STYLE")                                                             = nil +getenv("COLUMNS")                                                                   = nil +ioctl(1, 21523, 0x7ffd94023a50)                                                     = 0 +<< snip >> +fflush(0x7ff7baae61c0)                                                              = 0 +fclose(0x7ff7baae61c0)                                                              = 0 ++++ exited (status 0) +++ +$ +``` + +### Hexdump + +What it does: Display file contents in ASCII, decimal, hexadecimal, or octal. + +Often, it happens that you open a file with an application that doesn’t know what to do with that file. Try opening an executable file or a video file using vim; all you will see is gibberish thrown on the screen. + +Opening unknown files in Hexdump helps you see what exactly the file contains. You can also choose to see the ASCII representation of the data present in the file using some command-line options. This might help give you some clues to what kind of file it is. + + +``` +$ hexdump -C /bin/ls | head +00000000  7f 45 4c 46 02 01 01 00  00 00 00 00 00 00 00 00  |.ELF............| +00000010  02 00 3e 00 01 00 00 00  d4 42 40 00 00 00 00 00  |..>......B@.....| +00000020  40 00 00 00 00 00 00 00  f0 c3 01 00 00 00 00 00  |@...............| +00000030  00 00 00 00 40 00 38 00  09 00 40 00 1f 00 1e 00  |....@.8...@.....| +00000040  06 00 00 00 05 00 00 00  40 00 00 00 00 00 00 00  |........@.......| +00000050  40 00 40 00 00 00 00 00  40 00 40 00 00 00 00 00  |@.@.....@.@.....| +00000060  f8 01 00 00 00 00 00 00  f8 01 00 00 00 00 00 00  |................| +00000070  08 00 00 00 00 00 00 00  03 00 00 00 04 00 00 00  |................| +00000080  38 02 00 00 00 00 00 00  38 02 40 00 00 00 00 00  |8.......8.@.....| +00000090  38 02 40 00 00 00 00 00  1c 00 00 00 00 00 00 00  |8.@.............| +$ +``` + +### strings + +What it does: Print the strings of printable characters in files. + +If Hexdump seems a bit like overkill for your use case and you are simply looking for printable characters within a binary, you can use the **strings** command. + +When software is being developed, a variety of text/ASCII messages are added to it, like printing info messages, debugging info, help messages, errors, and so on. Provided all this information is present in the binary, it will be dumped to screen using **strings**. + + +``` +`$ strings /bin/ls` +``` + +### readelf + +What it does: Display information about ELF files. + +ELF (Executable and Linkable File Format) is the dominant file format for executable or binaries, not just on Linux but a variety of UNIX systems as well. If you have utilized tools like file command, which tells you that the file is in ELF format, the next logical step will be to use the **readelf** command and its various options to analyze the file further. + +Having a reference of the actual ELF specification handy when using **readelf** can be very useful. You can find the specification [here][2].  + + +``` +$ readelf -h /bin/ls +ELF Header: +  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 +  Class:                             ELF64 +  Data:                              2's complement, little endian +  Version:                           1 (current) +  OS/ABI:                            UNIX - System V +  ABI Version:                       0 +  Type:                              EXEC (Executable file) +  Machine:                           Advanced Micro Devices X86-64 +  Version:                           0x1 +  Entry point address:               0x4042d4 +  Start of program headers:          64 (bytes into file) +  Start of section headers:          115696 (bytes into file) +  Flags:                             0x0 +  Size of this header:               64 (bytes) +  Size of program headers:           56 (bytes) +  Number of program headers:         9 +  Size of section headers:           64 (bytes) +  Number of section headers:         31 +  Section header string table index: 30 +$ +``` + +### objdump + +What it does: Display information from an object file. + +Binaries are created when you write source code which gets compiled using a tool called, unsurprisingly, a compiler. This compiler generates machine language instructions equivalent to the source code, which can then be executed by the CPU to perform a given task. This machine language code can be interpreted via mnemonics called an assembly language. An assembly language is a set of instructions that help you understand the operations being performed by the program and ultimately being executed on the CPU. + +**objdump** utility reads the binary or executable file and dumps the assembly language instructions on the screen. Knowledge of assembly is critical to understand the output of the **objdump** command. + +Remember: assembly language is architecture-specific. + + +``` +$ objdump -d /bin/ls | head + +/bin/ls:     file format elf64-x86-64 + +Disassembly of section .init: + +0000000000402150 <_init@@Base>: +  402150:       48 83 ec 08             sub    $0x8,%rsp +  402154:       48 8b 05 6d 8e 21 00    mov    0x218e6d(%rip),%rax        # 61afc8 <__gmon_start__> +  40215b:       48 85 c0                test   %rax,%rax +$ +``` + +### strace + +What it does: Trace system calls and signals. + +If you have used **ltrace**, mentioned earlier, think of **strace** being similar. The only difference is that, instead of calling a library, the **strace** utility traces system calls. System calls are how you interface with the kernel to get work done. + +To give an example, if you want to print something to the screen, you will use the **printf** or **puts** function from the standard library **libc**; however, under the hood, ultimately, a system call named **write** will be made to actually print something to the screen. + + +``` +$ strace -f /bin/ls +execve("/bin/ls", ["/bin/ls"], [/* 17 vars */]) = 0 +brk(NULL)                               = 0x686000 +mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f967956a000 +access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory) +open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 +fstat(3, {st_mode=S_IFREG|0644, st_size=40661, ...}) = 0 +mmap(NULL, 40661, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9679560000 +close(3)                                = 0 +<< snip >> +fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 +mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9679569000 +write(1, "R2  RH\n", 7R2  RH +)                 = 7 +close(1)                                = 0 +munmap(0x7f9679569000, 4096)            = 0 +close(2)                                = 0 +exit_group(0)                           = ? ++++ exited with 0 +++ +$ +``` + +### nm + +What it does: List symbols from object files. + +If you are working with a binary that is not stripped, the **nm** command will provide you with the valuable information that was embedded in the binary during compilation. **nm** can help you identify variables and functions from the binary. You can imagine how useful this would be if you don't have access to the source code of the binary being analyzed. + +To showcase **nm**, we will quickly write a small program and compile it with the **-g** option, and we will also see that the binary is not stripped by using the file command. + + +``` +$ cat hello.c +#include <stdio.h> + +int main() { +    printf("Hello world!"); +    return 0; +} +$ +$ gcc -g hello.c -o hello +$ +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=3de46c8efb98bce4ad525d3328121568ba3d8a5d, not stripped +$ +$ ./hello +Hello world!$ +$ + +$ nm hello | tail +0000000000600e20 d __JCR_END__ +0000000000600e20 d __JCR_LIST__ +00000000004005b0 T __libc_csu_fini +0000000000400540 T __libc_csu_init +                 U __libc_start_main@@GLIBC_2.2.5 +000000000040051d T main +                 U printf@@GLIBC_2.2.5 +0000000000400490 t register_tm_clones +0000000000400430 T _start +0000000000601030 D __TMC_END__ +$ +``` + +### gdb + +What it does: The GNU debugger. + +Well, not everything in the binary can be statically analyzed. We did execute some commands which ran the binary, like **ltrace** and **strace**; however, software consists of a variety of conditions that could lead to various alternate paths being executed. + +The only way to analyze these paths is at run time by having the ability to stop or pause the program at any given location and being able to analyze information and then move further down. +That is where debuggers come into the picture, and on Linux, **gdb** is the defacto debugger. It helps you load a program, set breakpoints at specific places, analyze memory and CPU register, and do much more. It complements the other tools mentioned above and allows you to do much more runtime analysis. + +One thing to notice is, once you load a program using **gdb**, you will be presented with its own **(gdb)** prompt. All further commands will be run in this **gdb** command prompt until you exit. + +We will use the "hello" program that we compiled earlier and use **gdb** to see how it works. + + +``` +$ gdb -q ./hello +Reading symbols from /home/flash/hello...done. +(gdb) break main +Breakpoint 1 at 0x400521: file hello.c, line 4. +(gdb) info break +Num     Type           Disp Enb Address            What +1       breakpoint     keep y   0x0000000000400521 in main at hello.c:4 +(gdb) run +Starting program: /home/flash/./hello + +Breakpoint 1, main () at hello.c:4 +4           printf("Hello world!"); +Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_64 +(gdb) bt +#0  main () at hello.c:4 +(gdb) c +Continuing. +Hello world![Inferior 1 (process 29620) exited normally] +(gdb) q +$ +``` + +### Conclusion + +Once you are comfortable with using these native Linux binary analysis tools and understanding the output they provide, you can then move onto more advanced and professional open source binary analysis tools like [radare2][3]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/linux-binary-analysis + +作者:[Gaurav Kamathe][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/gkamathe +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tux_linux_penguin_code_binary.jpg?itok=TxGxW0KY (Tux with binary code background) +[2]: http://www.skyfree.org/linux/references/ELF_Format.pdf +[3]: https://github.com/radareorg/radare2 From 5be54b8611613430dfccaae341d33b2c19ef4abf Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 1 May 2020 01:08:33 +0800 Subject: [PATCH 355/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200430=20Edit?= =?UTF-8?q?=20music=20recordings=20with=20Audacity=20on=20Linux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200430 Edit music recordings with Audacity on Linux.md --- ...music recordings with Audacity on Linux.md | 161 ++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 sources/tech/20200430 Edit music recordings with Audacity on Linux.md diff --git a/sources/tech/20200430 Edit music recordings with Audacity on Linux.md b/sources/tech/20200430 Edit music recordings with Audacity on Linux.md new file mode 100644 index 0000000000..be6f68f062 --- /dev/null +++ b/sources/tech/20200430 Edit music recordings with Audacity on Linux.md @@ -0,0 +1,161 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Edit music recordings with Audacity on Linux) +[#]: via: (https://opensource.com/article/20/4/audacity) +[#]: author: (David Both https://opensource.com/users/dboth) + +Edit music recordings with Audacity on Linux +====== +How COVID-19 caused me to learn Audacity on the fly and learn to love +it. +![Bird singing and music notes][1] + +In this strange and difficult time of a global pandemic, we are all called upon to do things differently, to change our routines, and to learn new things. + +I have worked from home for many years, so that is nothing new to me. Even though I am allegedly retired, I write articles for Opensource.com and [Enable Sysadmin][2] and books. I also manage my own home network, which is larger than you might think, and my church's network and Linux hosts, and I help a few friends with Linux. All of this keeps me busy doing what I like to do, and all of it is usually well within my comfort zone. + +But COVID-19 has changed all of that. And, like many other types of organizations, my church had to move quickly to a new service-delivery paradigm. And that is what churches do—deliver a specific kind of service. As the church sysadmin and with some knowledge of audio recording and editing (back in the '70s, I mixed the sound and was the only roadie for a couple of regional folk-rock groups in Toledo, Ohio), I decided to learn the open source audio recording and editing software [Audacity][3] to help meet this challenge. + +This is not a comprehensive how-to article about using Audacity. It is about my experiences getting started with this powerful audio-editing tool, but there should be enough information here to help you get started. + +I have learned just what I need to know in order to accomplish my task: combining several separate audio clips into a single MP3 audio file. If you already know Audacity and do things differently or know things that I don't, that is expected. And if you have any suggestions to help me accomplish my task more easily, please share them in the comments. + +### The old way + +I try not to use the term "normal" now because it is hard to know exactly what that is—if such a state even exists. But our old method of producing recordings for our shut-ins, members who are traveling, and anyone else was to record the sermon portion of our regular, in-person church services and post them on our website. + +To do this, I installed a TASCAM SS-R100 solid-state recorder that stores the sermons as MP3 files on a thumb drive. We uploaded the recordings to a special directory of our website so people could download them. The recordings are uploaded using a Bash [program][4] I wrote for the task. _Automate everything!_ I trained a couple of others to perform these tasks using sudo in case I was not available. + +This all worked very well. Until it didn't. + +### The new way + +As soon as the first restrictions on large gatherings occurred, we made some changes. We could still have small gatherings, so four of us met Sunday mornings and recorded an abbreviated service using our in-house recorder and doing the upload the usual way. This worked, but as the crisis deepened and it became more of a risk to meet with even a few people, we had to make more changes. + +Like a huge number of other organizations, we realized we each needed to perform our parts of creating services in separate locations from our own homes. + +Now, depending upon the structure of the service, I receive several recordings that I need to combine to create the full church service. Our music director records each anthem and interlude using her iPhone and sends me the recordings in the M4A (MPEG-4 audio) format. They each range in length from seconds to five minutes and are up to 3MB in size. Likewise, our rector sends me two to six recordings, also in M4A format, that contains his portion of the service. Sometimes, other musicians in our church send solos or duets recorded with their significant others; these can be in MP3 or M4A formats. + +Then, I pull all of this together into a single recording that can be uploaded to our server for people to download. I use Audacity for this because it was available in my repo, and it was easy to get started. + +### Getting started with Audacity + +I had never used [Audacity][5] before this, so, like many others these days, I needed to learn something new just in time to accomplish what I needed to do. I struggled a bit at first, but it turned out to be fun and very enlightening. + +Audacity was easy to install on my Fedora 31 workstation because, as in many distros, it is available from the Fedora repository. + +The first time I opened Audacity with the program launcher icon, the application's window was empty with no projects nor tracks present. Audacity projects have an AUP extension, so if you have an existing project, you could click on the file in your favorite file manager and launch Audacity that way. + +### Convert M4A to MP3 + +As installed by Fedora, Audacity does not recognize M4A files. Regardless of how you proceed, you need to install the [LAME][6] MP3 encoder and [FFmpeg][7] import/export library, both of which are available from the Fedora repository and, most likely, any other distro's repository. + +There are websites that explain how to configure Audacity to use these tools to import and convert audio files from M4A to other types (such as MP3), but I decided to write a script to do it from the command line. For one reason, using a script is faster than doing a lot of extra clicking in a GUI interface, and for another, the file names need some work, so I already needed a script to rename the files. Many people use non-alphanumeric characters to name files, but I don't like dealing with special keyboard characters from the command line. It's easier to manage files with simple alphanumeric names, so my script removes all non-alphanumeric characters from the file names and then converts the files to MP3 format. + +You may choose a different approach, but I like the scripted solution. It is fast, and I only need to run the script once, no matter how many files need to be renamed and converted to MP3. + +### Create a new project + +You can create a new project whether or not any audio tracks are loaded. I recommend creating the project first, before importing any audio files (aka "clips"). From the Menu bar, select **File > Save Project > Save Project As**. This opens a warning dialog window that says, _"'Save project' is for an Audacity project, not an audio file."_ Click the **OK** button to continue to a standard file-save dialog. + +I found that I needed to do this twice. The first time, the warning dialog did not display any buttons, so I had to close the dialog using the window menu or the x icon in the Title bar. + +Name the project whatever you like, and Audacity automatically adds the AUP extension. You now have an empty project. + +### Add audio files to your project + +The first step is to add your audio files to the project. Using the Menu bar, open **File > Import > Audio** and then use the file dialog to select one or more files to import. For my first test project, I loaded all the files at once without sorting the tracks nor aligning the clips in the desired sequence along the timeline. This time, I started by loading the audio files one at a time in the sequence I wanted them from top to bottom. As each file is imported, it is placed into a new track below any existing tracks. The following image shows the files loaded all at one time in the sequence they appear in the working directory. + +![Tracks loaded in Audacity][8] + +There is a timeline across the top of the window's track area. There is also a scroll bar at the bottom of the window, so you can scroll along the timeline when the tracks extend beyond the width of the Audacity window. There is also a vertical scroll bar if there are more tracks than fit into the window. + +Notice the names in the upper-left corner of the waveform section of each track—they are the file names of each track without the extension. These are not there by default, but I find them helpful. To display these names, use the Menu bar to select **Edit > Preferences** and place a check in the **Show Audio Track Name As Overlay** box. + +### Order your audio clips + +Once you have some files loaded into the Audacity workspace, you can start manipulating them. To order your audio clips, select one and use the **Time-Shift** tool (↔︎) to slide them horizontally along the tracks; continue doing this until all the clips line up end to end in the order you want them. Note that the clip you are moving is book-ended by a pair of vertical alignment lines. When they line up perfectly, the end lines of the two aligned tracks change color to alert you. + +You can hover the mouse pointer over the tool icons in the Audacity toolbars to see a pop-up that displays the name of that tool. This helps beginners understand what each tool does. + +![Audacity toolbox][9] + +Here, the **Selection** tool** **is selected in the Audacity toolbar. The **Time-Shift** tool is second from the left on the bottom row. + +The following image shows what happens when you slide the audio clips into place on the project timeline without sorting the tracks into a particular sequence. This may not be optimal for how you like to work. It is not for me. + +![Audio clips in Audacity][10] + +To remove segments of (or complete) audio clips, select them with the **Selection** tool—you can also select multiple adjacent tracks. Then you can press the **Delete** button on your keyboard to delete the selected segment(s). + +In the image above, you can see a vertical black line in track 1 and a vertical green line crossing all the tracks. These are the audio cursors that show the playback positions of a track or the entire project. Choose the **Selection** tool and click the desired position within a track, then click the **Play** button on the transport controls (in the upper-left of the Audacity window) to begin playback. Playback will continue past the end of the selected track and all the way to the end of the project. If tracks overlap on the timeline, they will play simultaneously. + +To begin playback immediately, click the desired starting point on the timeline. To play part of a track, hold down the Left mouse button to select a short segment of the track, and then click the **Play** button. The other transport buttons—Pause, Stop, and so—on are identified with universal icons and work as you would expect. + +You can also click the **Silence Audio Selection** button—the fifth button from the left on the **Edit** toolbar (shown below)—to completely silence a selected segment while leaving it in place for timing purposes. This is how I silenced a number of background clicks and noises. + +![Audacity edit tools][11] + +It took me a while to figure out how to sort the tracks vertically, and it turns out there are a few different ways to accomplish the task. + +You can use the track menu to reorder arrangement. Each track has its own Control Panel on the left side (shown below). The track drop-down Menu bar at the top of the Control Panel opens a menu that provides several track-sequencing options to move a track up, down, to the top, or to the bottom. + +![Moving tracks in Audacity][12] + +The items to move a track up or down move the track one position at a time, so you have to select it as many times as necessary to get the track in the desired position. + +To drag and drop tracks, you must click on the space occupied by the track details. In this screenshot, that's "Mono, 48000Hz 32 bit float". It can be tricky, because if you click too high, you adjust the panning (the left and right stereo position) and if you click too low, you may collapse or select the track. Target the "Mono" or "Stereo" label (whatever your track happens to be) label, and then click and drag the track up or down to reposition it in your workspace. + +### Apply amplification and noise reduction effects + +Some tracks need the overall volume to be adjusted. I used the **Selection** tool to double-click and select the entire track (but you could also select a portion of a track). On the Menu bar, select **Effect > Amplify** to display a small dialog window. You can use the slider or enter a value to specify the amount of amplification. Negative numbers decrease the volume. If you try to increase the volume, you need to place a check in the **Allow Clipping** box. Then click OK. + +I found that amplification is a bit tricky; it is easy to use too much or too little. Start by using small numbers to see the results. You can always use **Ctrl+Z** to undo your changes if you go too far in either direction. + +Another effect I find useful is noise reduction. One of the tracks was recorded with a noticeable 60Hz hum, which is usually due to poor grounding of the microphone or recorder. Fortunately, there were only several seconds of hum and no other sound at the beginning of the recording. + +Applying the noise reduction effect was a little confusing at first. First, I selected a few samples of the humming sound to tell Audacity what sound needed to be reduced, and then I navigated to **Effect > Noise Reduction**. This opens the **Noise Reduction** dialog. I clicked on the **Get Noise Profile** button in the Step 1 section of the dialog, which uses the selected sample as the basis for a set of filter presets. After it gathers the selected sample, though, the dialog disappeared (this is by design). I re-opened the dialog, used the slider to select the noise reduction level in decibels (I set it to 15dB and left the other sliders alone), and then clicked **OK**. + +This worked well—you can hear the residual hum only if you know it is there. I need to experiment with this some more, but since the result was acceptable, so I did not play with the settings any further. + +The reason the dialog box closes after getting a noise profile is actually for the sake of expediency. If you're processing many tracks or segments of audio, each with a different noise profile, you can open the **Noise Reduction** effect, get the current noise profile, and then select the audio you want to clean. You can then run the Noise Reduction filter using **Ctrl+R**, the keyboard shortcut for running the most recent filter. Instead of getting a new noise profile, however, Audacity uses the one you've just stored, and performs the filter instead. This way, you can get a sample with a few clicks but clean lots of audio with just one keyboard shortcut. + +### And so much more + +I have only worked with a few of the basics and have not even begun to scratch the surface of Audacity. I can already see that it has so many more features and tools that will enable me to create even more professional-sounding projects. + +For example, in addition to working with existing audio files, Audacity can make recordings from line inputs, the desktop sound stream, and microphone inputs. It can do special effects like fade in and out and cross-fades. And I have not even tried to figure out what many of the other effects and tools are capable of. + +I have a feeling I will need to learn more in the near future. Hopefully, this story of my very limited experience with Audacity will prompt you to check it out. For much more information, you can find the [Audacity manual][13] online. + +Using Audacity, you can quickly clean up audio file so that any background noise becomes tolerable. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/audacity + +作者:[David Both][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/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) +[2]: https://www.redhat.com/sysadmin/ +[3]: https://www.audacityteam.org/ +[4]: https://opensource.com/article/17/12/using-sudo-delegate +[5]: https://opensource.com/education/16/9/audacity-classroom +[6]: https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html#linlame +[7]: https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html#linff +[8]: https://opensource.com/sites/default/files/uploads/audacity1_tracksloaded.png (Tracks loaded in Audacity) +[9]: https://opensource.com/sites/default/files/uploads/audacity2_tools.png (Audacity toolbox) +[10]: https://opensource.com/sites/default/files/uploads/audacity3_audioclips.png (Audio clips in Audacity) +[11]: https://opensource.com/sites/default/files/uploads/audacity4_edittoolbar.png (Audacity edit tools) +[12]: https://opensource.com/sites/default/files/uploads/audacity5_trackmovement.png (Moving tracks in Audacity) +[13]: https://manual.audacityteam.org/# From 79f7456fc5834d2761be91d0ba272b041d7ef035 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Fri, 1 May 2020 01:11:55 +0800 Subject: [PATCH 356/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200430=20Indust?= =?UTF-8?q?rial=20robots=20could=20'eat=20metal'=20to=20power=20themselves?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md --- ...s could -eat metal- to power themselves.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md diff --git a/sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md b/sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md new file mode 100644 index 0000000000..45995a9660 --- /dev/null +++ b/sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md @@ -0,0 +1,67 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Industrial robots could 'eat metal' to power themselves) +[#]: via: (https://www.networkworld.com/article/3540194/industrial-robots-could-eat-metal-to-power-themselves.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +Industrial robots could 'eat metal' to power themselves +====== +Scavenging energy by foraging for metal could power Internet of Things electronics and robots, suggest researchers at University of Pennsylvania. +Jiraroj Praditcharoenkul / Getty Images + +A fundamental manufacturing shift is on the horizon, some say. It's where robots run all elements of our future factories. The machines will operate using brain-copying artificial intelligence and handle not only manufacturing processes, but also supply-chain logistics, planning, and other roles formerly performed by humans. + +This vision of the future anticipates an industrial workplace where Internet-connected machines will mimic humans, yet do the jobs more precisely, faster and cheaper than humans. + +And the human-copying element may not end there. Researchers at the University of Pennsylvania are suggesting that robots could end up eating like humans, too. + +Robots will "eat metal for energy," according to a [news article][1] published in Medium. The researchers' vision for a "metal-air scavenger" could solve one of the quandaries of future IoT-enabled factories. That quandary is how to power a device that moves without adding mass and weight, as one does by adding bulky batteries. + +The answer, according to the University of Pennsylvania researchers, is to try to electromechanically forage for energy from the metal surfaces that a robot or IoT device traverses, thus converting material garnered, using a chemical reaction, into power. + +"Robots and electronics [would] extract energy from large volumes of energy dense material without having to carry the material on-board," the researchers say in a paper they've published in [ACS Energy Letters][2]. + +It would be like "eating metal, breaking down its chemical bonds for energy like humans do with food." Batteries work by repeatedly breaking and creating chemical bonds. + +The research references the dichotomy between computing and power storage. Computing is well suited to miniaturization, and processers have been progressively reduced in size while performance has increased, but battery storage hasn't. You need a bigger battery for more energy. + +Even if swarming, industrial robots became the size of insects (I've [written about][3] the possibility), there's an issue powering the nano devices – the required size of the power source would defeat the object of the miniaturization. The battery alone could crush the device, and even if it didn't, the machine would need excessive amounts of energy to move, because of the battery mass. This conundrum is one of the reasons there's an emphasis in IoT development to find ways to harvest energy ambiently. + +However, with ambient power – such as is found in [solar or potentially magnetism][4], for example – power density comes into play. That's where the harvesting technology can't pull enough energy out of the environment, or it does it so slowly that it's not as power-effective as traditional batteries. + +Enter the metal-eating robot. The University of Pennsylvania researchers' form of harvesting efficiently replicates a power-dense battery. Metal is more dense than the battery chemistry. + +The group performs their foraging energy production with a hydrogel electrolyte sponge towed by the robot. It uses a cathode, dragged over the surface, to extract amperages from the metal fuel source, such as steel or aluminum. + +"Our [metal-air scavenger] has a power density that's ten times better than the best harvesters, to the point that we can compete against batteries," said James Pikul, an assistant professor in the University of Pennsylvania's Department of Mechanical Engineering and Applied Mechanics and one of the paper authors, in the Medium post. "It's using battery chemistry, but doesn't have the associated weight, because it's taking those chemicals from the environment." + +This method is also potentially better than existing lithium-ion battery chemistry, according to Pikul. + +"One day, a robot that needs to recharge its batteries will just need to find some aluminum to 'eat,'" Pikul said. + +The robot, although ultimately likely to be a better worker than the human, is a messy eater. As it oxidizes the metal it passes over, it leaves a "microscopic layer of rust in its wake," according to the article. + +Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3540194/industrial-robots-could-eat-metal-to-power-themselves.html + +作者:[Patrick Nelson][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.networkworld.com/author/Patrick-Nelson/ +[b]: https://github.com/lujun9972 +[1]: https://medium.com/penn-engineering/penn-engineerings-new-scavenger-technology-allows-robots-to-eat-metal-for-energy-bd12f3b83893 +[2]: https://pubs.acs.org/doi/10.1021/acsenergylett.9b02661 +[3]: https://www.networkworld.com/article/3429200/self-organizing-micro-robots-may-soon-swarm-the-industrial-iot.html +[4]: https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html +[5]: https://www.facebook.com/NetworkWorld/ +[6]: https://www.linkedin.com/company/network-world From 4018bc654c3bb6e82e7ef5953a04fd966701aa93 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 1 May 2020 08:21:17 +0800 Subject: [PATCH 357/394] APL --- .../tech/20200430 10 ways to analyze binary files on Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200430 10 ways to analyze binary files on Linux.md b/sources/tech/20200430 10 ways to analyze binary files on Linux.md index 7e05f87298..f43ae83efa 100644 --- a/sources/tech/20200430 10 ways to analyze binary files on Linux.md +++ b/sources/tech/20200430 10 ways to analyze binary files on Linux.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 533ffb6e1152b567d4628e642b7f468f125f01c6 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 1 May 2020 09:10:29 +0800 Subject: [PATCH 358/394] TSL --- ...0 ways to analyze binary files on Linux.md | 321 ------------------ ...0 ways to analyze binary files on Linux.md | 314 +++++++++++++++++ 2 files changed, 314 insertions(+), 321 deletions(-) delete mode 100644 sources/tech/20200430 10 ways to analyze binary files on Linux.md create mode 100644 translated/tech/20200430 10 ways to analyze binary files on Linux.md diff --git a/sources/tech/20200430 10 ways to analyze binary files on Linux.md b/sources/tech/20200430 10 ways to analyze binary files on Linux.md deleted file mode 100644 index f43ae83efa..0000000000 --- a/sources/tech/20200430 10 ways to analyze binary files on Linux.md +++ /dev/null @@ -1,321 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (10 ways to analyze binary files on Linux) -[#]: via: (https://opensource.com/article/20/4/linux-binary-analysis) -[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) - -10 ways to analyze binary files on Linux -====== -These simple commands and tools can help you sail through the task of -analyzing binary files. -![Tux with binary code background][1] - -"There are 10 types of people in this world: those who understand binary and those who don't." - -We work with binaries daily, yet we understand so little about them. By binaries, I mean the executable files that you run daily, right from your command line tools to full-fledged applications. - -Linux provides a rich set of tools that makes analyzing binaries a breeze! Whatever might be your job role, if you are working on Linux, knowing the basics about these tools will help you understand your system better. - -In this article, we will cover some of the most popular of these Linux tools and commands, most of which will be available natively as part of your Linux distribution. If not, you can always use your package manager to install and explore them. Remember: learning to use the right tool at the right occasion requires plenty of patience and practice. - -### file - -What it does: Help to determine the file type. - -This will be your starting point for binary analysis. We work with files daily. Not everything is an executable type; there is a whole wide range of file types out there. Before you start, you need to understand the type of file that is being analyzed. Is it a binary file, a library file, an ASCII text file, a video file, a picture file, a PDF, a data file, etc.? - -The **file** command will help you identify the exact file type that you are dealing with. - - -``` -$ file /bin/ls -/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=94943a89d17e9d373b2794dcb1f7e38c95b66c86, stripped -$ -$ file /etc/passwd -/etc/passwd: ASCII text -$ -``` - -### ldd - -What it does: Print shared object dependencies. - -If you have already used the **file** command above on an executable binary, you can't miss the "dynamically linked" message in the output. What does it mean? - -When software is being developed, we try not to reinvent the wheel. There are a set of common tasks that most software programs require, like printing output or reading from standard in, or opening files, etc. All of these common tasks are abstracted away in a set of common functions that everybody can then use instead of writing their own variants. These common functions are put in a library called **libc** or **glibc**. - -How does one find which libraries the executable is dependent on? That’s where **ldd** command comes into the picture. Running it against a dynamically linked binary shows all its dependent libraries and their paths. - - -``` -$ ldd /bin/ls -        linux-vdso.so.1 =>  (0x00007ffef5ba1000) -        libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fea9f854000) -        libcap.so.2 => /lib64/libcap.so.2 (0x00007fea9f64f000) -        libacl.so.1 => /lib64/libacl.so.1 (0x00007fea9f446000) -        libc.so.6 => /lib64/libc.so.6 (0x00007fea9f079000) -        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fea9ee17000) -        libdl.so.2 => /lib64/libdl.so.2 (0x00007fea9ec13000) -        /lib64/ld-linux-x86-64.so.2 (0x00007fea9fa7b000) -        libattr.so.1 => /lib64/libattr.so.1 (0x00007fea9ea0e000) -        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea9e7f2000) -$ -``` - -### ltrace - -What it does: A library call tracer. - -We now know how to find the libraries an executable program is dependent on using the **ldd** command. However, a library can contain hundreds of functions. Out of those hundreds, which are the actual functions being used by our binary? - -The **ltrace** command displays all the functions that are being called at run time from the library. In the below example, you can see the function names being called, along with the arguments being passed to that function. You can also see what was returned by those functions on the far right side of the output. - - -``` -$ ltrace ls -__libc_start_main(0x4028c0, 1, 0x7ffd94023b88, 0x412950 <unfinished ...> -strrchr("ls", '/')                                                                  = nil -setlocale(LC_ALL, "")                                                               = "en_US.UTF-8" -bindtextdomain("coreutils", "/usr/share/locale")                                    = "/usr/share/locale" -textdomain("coreutils")                                                             = "coreutils" -__cxa_atexit(0x40a930, 0, 0, 0x736c6974756572)                                      = 0 -isatty(1)                                                                           = 1 -getenv("QUOTING_STYLE")                                                             = nil -getenv("COLUMNS")                                                                   = nil -ioctl(1, 21523, 0x7ffd94023a50)                                                     = 0 -<< snip >> -fflush(0x7ff7baae61c0)                                                              = 0 -fclose(0x7ff7baae61c0)                                                              = 0 -+++ exited (status 0) +++ -$ -``` - -### Hexdump - -What it does: Display file contents in ASCII, decimal, hexadecimal, or octal. - -Often, it happens that you open a file with an application that doesn’t know what to do with that file. Try opening an executable file or a video file using vim; all you will see is gibberish thrown on the screen. - -Opening unknown files in Hexdump helps you see what exactly the file contains. You can also choose to see the ASCII representation of the data present in the file using some command-line options. This might help give you some clues to what kind of file it is. - - -``` -$ hexdump -C /bin/ls | head -00000000  7f 45 4c 46 02 01 01 00  00 00 00 00 00 00 00 00  |.ELF............| -00000010  02 00 3e 00 01 00 00 00  d4 42 40 00 00 00 00 00  |..>......B@.....| -00000020  40 00 00 00 00 00 00 00  f0 c3 01 00 00 00 00 00  |@...............| -00000030  00 00 00 00 40 00 38 00  09 00 40 00 1f 00 1e 00  |....@.8...@.....| -00000040  06 00 00 00 05 00 00 00  40 00 00 00 00 00 00 00  |........@.......| -00000050  40 00 40 00 00 00 00 00  40 00 40 00 00 00 00 00  |@.@.....@.@.....| -00000060  f8 01 00 00 00 00 00 00  f8 01 00 00 00 00 00 00  |................| -00000070  08 00 00 00 00 00 00 00  03 00 00 00 04 00 00 00  |................| -00000080  38 02 00 00 00 00 00 00  38 02 40 00 00 00 00 00  |8.......8.@.....| -00000090  38 02 40 00 00 00 00 00  1c 00 00 00 00 00 00 00  |8.@.............| -$ -``` - -### strings - -What it does: Print the strings of printable characters in files. - -If Hexdump seems a bit like overkill for your use case and you are simply looking for printable characters within a binary, you can use the **strings** command. - -When software is being developed, a variety of text/ASCII messages are added to it, like printing info messages, debugging info, help messages, errors, and so on. Provided all this information is present in the binary, it will be dumped to screen using **strings**. - - -``` -`$ strings /bin/ls` -``` - -### readelf - -What it does: Display information about ELF files. - -ELF (Executable and Linkable File Format) is the dominant file format for executable or binaries, not just on Linux but a variety of UNIX systems as well. If you have utilized tools like file command, which tells you that the file is in ELF format, the next logical step will be to use the **readelf** command and its various options to analyze the file further. - -Having a reference of the actual ELF specification handy when using **readelf** can be very useful. You can find the specification [here][2].  - - -``` -$ readelf -h /bin/ls -ELF Header: -  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 -  Class:                             ELF64 -  Data:                              2's complement, little endian -  Version:                           1 (current) -  OS/ABI:                            UNIX - System V -  ABI Version:                       0 -  Type:                              EXEC (Executable file) -  Machine:                           Advanced Micro Devices X86-64 -  Version:                           0x1 -  Entry point address:               0x4042d4 -  Start of program headers:          64 (bytes into file) -  Start of section headers:          115696 (bytes into file) -  Flags:                             0x0 -  Size of this header:               64 (bytes) -  Size of program headers:           56 (bytes) -  Number of program headers:         9 -  Size of section headers:           64 (bytes) -  Number of section headers:         31 -  Section header string table index: 30 -$ -``` - -### objdump - -What it does: Display information from an object file. - -Binaries are created when you write source code which gets compiled using a tool called, unsurprisingly, a compiler. This compiler generates machine language instructions equivalent to the source code, which can then be executed by the CPU to perform a given task. This machine language code can be interpreted via mnemonics called an assembly language. An assembly language is a set of instructions that help you understand the operations being performed by the program and ultimately being executed on the CPU. - -**objdump** utility reads the binary or executable file and dumps the assembly language instructions on the screen. Knowledge of assembly is critical to understand the output of the **objdump** command. - -Remember: assembly language is architecture-specific. - - -``` -$ objdump -d /bin/ls | head - -/bin/ls:     file format elf64-x86-64 - -Disassembly of section .init: - -0000000000402150 <_init@@Base>: -  402150:       48 83 ec 08             sub    $0x8,%rsp -  402154:       48 8b 05 6d 8e 21 00    mov    0x218e6d(%rip),%rax        # 61afc8 <__gmon_start__> -  40215b:       48 85 c0                test   %rax,%rax -$ -``` - -### strace - -What it does: Trace system calls and signals. - -If you have used **ltrace**, mentioned earlier, think of **strace** being similar. The only difference is that, instead of calling a library, the **strace** utility traces system calls. System calls are how you interface with the kernel to get work done. - -To give an example, if you want to print something to the screen, you will use the **printf** or **puts** function from the standard library **libc**; however, under the hood, ultimately, a system call named **write** will be made to actually print something to the screen. - - -``` -$ strace -f /bin/ls -execve("/bin/ls", ["/bin/ls"], [/* 17 vars */]) = 0 -brk(NULL)                               = 0x686000 -mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f967956a000 -access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory) -open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 -fstat(3, {st_mode=S_IFREG|0644, st_size=40661, ...}) = 0 -mmap(NULL, 40661, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9679560000 -close(3)                                = 0 -<< snip >> -fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 -mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9679569000 -write(1, "R2  RH\n", 7R2  RH -)                 = 7 -close(1)                                = 0 -munmap(0x7f9679569000, 4096)            = 0 -close(2)                                = 0 -exit_group(0)                           = ? -+++ exited with 0 +++ -$ -``` - -### nm - -What it does: List symbols from object files. - -If you are working with a binary that is not stripped, the **nm** command will provide you with the valuable information that was embedded in the binary during compilation. **nm** can help you identify variables and functions from the binary. You can imagine how useful this would be if you don't have access to the source code of the binary being analyzed. - -To showcase **nm**, we will quickly write a small program and compile it with the **-g** option, and we will also see that the binary is not stripped by using the file command. - - -``` -$ cat hello.c -#include <stdio.h> - -int main() { -    printf("Hello world!"); -    return 0; -} -$ -$ gcc -g hello.c -o hello -$ -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=3de46c8efb98bce4ad525d3328121568ba3d8a5d, not stripped -$ -$ ./hello -Hello world!$ -$ - -$ nm hello | tail -0000000000600e20 d __JCR_END__ -0000000000600e20 d __JCR_LIST__ -00000000004005b0 T __libc_csu_fini -0000000000400540 T __libc_csu_init -                 U __libc_start_main@@GLIBC_2.2.5 -000000000040051d T main -                 U printf@@GLIBC_2.2.5 -0000000000400490 t register_tm_clones -0000000000400430 T _start -0000000000601030 D __TMC_END__ -$ -``` - -### gdb - -What it does: The GNU debugger. - -Well, not everything in the binary can be statically analyzed. We did execute some commands which ran the binary, like **ltrace** and **strace**; however, software consists of a variety of conditions that could lead to various alternate paths being executed. - -The only way to analyze these paths is at run time by having the ability to stop or pause the program at any given location and being able to analyze information and then move further down. -That is where debuggers come into the picture, and on Linux, **gdb** is the defacto debugger. It helps you load a program, set breakpoints at specific places, analyze memory and CPU register, and do much more. It complements the other tools mentioned above and allows you to do much more runtime analysis. - -One thing to notice is, once you load a program using **gdb**, you will be presented with its own **(gdb)** prompt. All further commands will be run in this **gdb** command prompt until you exit. - -We will use the "hello" program that we compiled earlier and use **gdb** to see how it works. - - -``` -$ gdb -q ./hello -Reading symbols from /home/flash/hello...done. -(gdb) break main -Breakpoint 1 at 0x400521: file hello.c, line 4. -(gdb) info break -Num     Type           Disp Enb Address            What -1       breakpoint     keep y   0x0000000000400521 in main at hello.c:4 -(gdb) run -Starting program: /home/flash/./hello - -Breakpoint 1, main () at hello.c:4 -4           printf("Hello world!"); -Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_64 -(gdb) bt -#0  main () at hello.c:4 -(gdb) c -Continuing. -Hello world![Inferior 1 (process 29620) exited normally] -(gdb) q -$ -``` - -### Conclusion - -Once you are comfortable with using these native Linux binary analysis tools and understanding the output they provide, you can then move onto more advanced and professional open source binary analysis tools like [radare2][3]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/linux-binary-analysis - -作者:[Gaurav Kamathe][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/gkamathe -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tux_linux_penguin_code_binary.jpg?itok=TxGxW0KY (Tux with binary code background) -[2]: http://www.skyfree.org/linux/references/ELF_Format.pdf -[3]: https://github.com/radareorg/radare2 diff --git a/translated/tech/20200430 10 ways to analyze binary files on Linux.md b/translated/tech/20200430 10 ways to analyze binary files on Linux.md new file mode 100644 index 0000000000..80577dfbcf --- /dev/null +++ b/translated/tech/20200430 10 ways to analyze binary files on Linux.md @@ -0,0 +1,314 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (10 ways to analyze binary files on Linux) +[#]: via: (https://opensource.com/article/20/4/linux-binary-analysis) +[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) + +在 Linux 上分析二进制文件的 10 种方法 +====== + +> 这些简单的命令和工具可以帮助你轻松完成分析二进制文件的任务。 + +![Tux with binary code background][1] + +“这个世界上有 10 种人:懂二进制的人和不懂二进制的人。” + +我们每天都在与二进制文件打交道,但我们对二进制文件却知之甚少。我所说的二进制,是指你每天运行的可执行文件,从你的命令行工具到成熟的应用程序都是。 + +Linux 提供了一套丰富的工具,让分析二进制文件变得轻而易举。无论你的工作角色是什么,如果你在 Linux 上工作,了解这些工具的基本知识将帮助你更好地理解你的系统。 + +在这篇文章中,我们将介绍其中一些最流行的 Linux 工具和命令,其中大部分都是 Linux 发行版的一部分。如果没有找到,你可以随时使用你的软件包管理器来安装和探索它们。请记住:学习在正确的场合使用正确的工具需要大量的耐心和练习。 + +### file + +它的作用:帮助确定文件类型。 + +这将是你进行二进制分析的出发点。我们每天都在与文件打交道。并非所有的文件都是可执行类型,除此之外还有各种各样的文件类型。在你开始之前,你需要了解要分析的文件类型。它是二进制文件、库文件、ASCII 文本文件、视频文件、图片文件、PDF、数据文件等等。 + +`file` 命令将帮助你确定你所处理的文件类型。 + +``` +$ file /bin/ls +/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=94943a89d17e9d373b2794dcb1f7e38c95b66c86, stripped +$ +$ file /etc/passwd +/etc/passwd: ASCII text +$ +``` + +### ldd + +它的作用:打印共享对象依赖关系。 + +如果你已经在一个可执行的二进制文件上使用了上面的 `file` 命令,你肯定会看到输出中的“动态链接dynamically linked”信息。它是什么意思呢? + +在开发软件的时候,我们尽量不要重造轮子。有一组常见的任务是大多数软件程序需要的,比如打印输出或从标准输入/打开的文件中读取等。所有这些常见的任务都被抽象成一组通用的函数,然后每个人都可以使用,而不是写出自己的变体。这些常用的函数被放在一个叫 `libc` 或 `glibc` 的库中。 + +如何找到可执行程序所依赖的库?这就是 `ldd` 命令的作用了。对动态链接的二进制文件运行该命令会显示出所有依赖库和它们的路径。 + +``` +$ ldd /bin/ls + linux-vdso.so.1 => (0x00007ffef5ba1000) + libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fea9f854000) + libcap.so.2 => /lib64/libcap.so.2 (0x00007fea9f64f000) + libacl.so.1 => /lib64/libacl.so.1 (0x00007fea9f446000) + libc.so.6 => /lib64/libc.so.6 (0x00007fea9f079000) + libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fea9ee17000) + libdl.so.2 => /lib64/libdl.so.2 (0x00007fea9ec13000) + /lib64/ld-linux-x86-64.so.2 (0x00007fea9fa7b000) + libattr.so.1 => /lib64/libattr.so.1 (0x00007fea9ea0e000) + libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fea9e7f2000) +$ +``` + +### ltrace + +它的作用:一个库调用跟踪器。 + +我们现在知道如何使用 `ldd` 命令找到一个可执行程序所依赖的库。然而,一个库可以包含数百个函数。在这几百个函数中,哪些是我们的二进制程序正在使用的实际函数? + +`ltrace` 命令可以显示在运行时从库中调用的所有函数。在下面的例子中,你可以看到被调用的函数名称,以及传递给该函数的参数。你也可以在输出的最右边看到这些函数返回的内容。 + +``` +$ ltrace ls +__libc_start_main(0x4028c0, 1, 0x7ffd94023b88, 0x412950 +strrchr("ls", '/') = nil +setlocale(LC_ALL, "") = "en_US.UTF-8" +bindtextdomain("coreutils", "/usr/share/locale") = "/usr/share/locale" +textdomain("coreutils") = "coreutils" +__cxa_atexit(0x40a930, 0, 0, 0x736c6974756572) = 0 +isatty(1) = 1 +getenv("QUOTING_STYLE") = nil +getenv("COLUMNS") = nil +ioctl(1, 21523, 0x7ffd94023a50) = 0 +<< snip >> +fflush(0x7ff7baae61c0) = 0 +fclose(0x7ff7baae61c0) = 0 ++++ exited (status 0) +++ +$ +``` + +### hexdump + +它的作用:以 ASCII、十进制、十六进制或八进制显示文件内容。 + +通常情况下,当你用一个应用程序打开一个文件,而它不知道如何处理该文件时,就会出现这种情况。尝试用 `vim` 打开一个可执行文件或视频文件,你会看到的只是屏幕上抛出的乱码。 + +在 `hexdump` 中打开未知文件,可以帮助你看到文件的具体内容。你也可以选择使用一些命令行选项来查看用 ASCII 表示的文件数据。这可能会帮助你了解到它是什么类型的文件。 + +``` +$ hexdump -C /bin/ls | head +00000000  7f 45 4c 46 02 01 01 00  00 00 00 00 00 00 00 00  |.ELF............| +00000010  02 00 3e 00 01 00 00 00  d4 42 40 00 00 00 00 00  |..>......B@.....| +00000020  40 00 00 00 00 00 00 00  f0 c3 01 00 00 00 00 00  |@...............| +00000030  00 00 00 00 40 00 38 00  09 00 40 00 1f 00 1e 00  |....@.8...@.....| +00000040  06 00 00 00 05 00 00 00  40 00 00 00 00 00 00 00  |........@.......| +00000050  40 00 40 00 00 00 00 00  40 00 40 00 00 00 00 00  |@.@.....@.@.....| +00000060  f8 01 00 00 00 00 00 00  f8 01 00 00 00 00 00 00  |................| +00000070  08 00 00 00 00 00 00 00  03 00 00 00 04 00 00 00  |................| +00000080  38 02 00 00 00 00 00 00  38 02 40 00 00 00 00 00  |8.......8.@.....| +00000090  38 02 40 00 00 00 00 00  1c 00 00 00 00 00 00 00  |8.@.............| +$ +``` + +### strings + +它的作用:打印文件中的可打印字符的字符串。 + +如果你只是在二进制中寻找可打印的字符,那么 `hexdump` 对于你的使用场景来说似乎有点矫枉过正,你可以使用 `strings` 命令。 + +在开发软件的时候,各种文本/ASCII 信息会被添加到其中,比如打印信息、调试信息、帮助信息、错误等。只要这些信息都存在于二进制文件中,就可以用 `strings` 命令将其转储到屏幕上。 + +``` +$ strings /bin/ls +``` + +### readelf + +它的作用:显示有关 ELF 文件的信息。 + +ELF(可执行和可链接文件格式Executable and Linkable File Format)是可执行文件或二进制文件的主流格式,不仅是 Linux 系统,也是各种 UNIX 系统的主流文件格式。如果你已经使用了像 `file` 命令这样的工具,它告诉你文件是 ELF 格式,那么下一步就是使用 `readelf` 命令和它的各种选项来进一步分析文件。 + +在使用 `readelf` 命令时,有一个实际的 ELF 规范的参考是非常有用的。你可以在[这里][2]找到规范。  + +``` +$ readelf -h /bin/ls +ELF Header: +  Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 +  Class:                             ELF64 +  Data:                              2's complement, little endian +  Version:                           1 (current) +  OS/ABI:                            UNIX - System V +  ABI Version:                       0 +  Type:                              EXEC (Executable file) +  Machine:                           Advanced Micro Devices X86-64 +  Version:                           0x1 +  Entry point address:               0x4042d4 +  Start of program headers:          64 (bytes into file) +  Start of section headers:          115696 (bytes into file) +  Flags:                             0x0 +  Size of this header:               64 (bytes) +  Size of program headers:           56 (bytes) +  Number of program headers:         9 +  Size of section headers:           64 (bytes) +  Number of section headers:         31 +  Section header string table index: 30 +$ +``` + +### objdump + +它的作用:从对象文件中显示信息。 + +二进制文件是通过你编写源码的创建的,这些源码会通过一个叫做编译器的工具进行编译。这个编译器会生成相当于源代码的机器语言指令,然后由 CPU 执行,以执行特定的任务。这些机器语言代码可以通过被称为汇编语言的助记词来解读。汇编语言是一组指令,它可以帮助你理解由程序所进行并最终在 CPU 上执行的操作。 + +`objdump` 实用程序读取二进制或可执行文件,并将汇编语言指令转储到屏幕上。汇编语言知识对于理解 `objdump` 命令的输出是至关重要的。 + +请记住:汇编语言是特定于体系结构的。 + +``` +$ objdump -d /bin/ls | head + +/bin/ls: file format elf64-x86-64 + + +Disassembly of section .init: + +0000000000402150 <_init@@Base>: + 402150: 48 83 ec 08 sub $0x8,%rsp + 402154: 48 8b 05 6d 8e 21 00 mov 0x218e6d(%rip),%rax # 61afc8 <__gmon_start__> + 40215b: 48 85 c0 test %rax,%rax +$ +``` + +### strace + +它的作用:跟踪系统调用和信号。 + +如果你用过前面提到的 `ltrace`,那就把 `strace` 想成是类似的。唯一的区别是,`strace` 工具不是追踪调用的库,而是追踪系统调用。系统调用是你与内核对接来完成工作的。 + +举个例子,如果你想把一些东西打印到屏幕上,你会使用标准库 `libc` 中的 `printf` 或 `puts` 函数;但是,在底层,最终会有一个名为 `write` 的系统调用来实际把东西打印到屏幕上。 + +``` +$ strace -f /bin/ls +execve("/bin/ls", ["/bin/ls"], [/* 17 vars */]) = 0 +brk(NULL) = 0x686000 +mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f967956a000 +access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) +open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 +fstat(3, {st_mode=S_IFREG|0644, st_size=40661, ...}) = 0 +mmap(NULL, 40661, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9679560000 +close(3) = 0 +<< snip >> +fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 +mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9679569000 +write(1, "R2 RH\n", 7R2 RH +) = 7 +close(1) = 0 +munmap(0x7f9679569000, 4096) = 0 +close(2) = 0 +exit_group(0) = ? ++++ exited with 0 +++ +$ +``` + +### nm + +它的作用:列出对象文件中的符号。 + +如果你所使用的二进制文件没有被剥离,`nm` 命令将为你提供在编译过程中嵌入到二进制文件中的有价值的信息。`nm` 可以帮助你从二进制文件中识别变量和函数。你可以想象一下,如果你无法访问二进制文件的源代码,这将是多么有用。 + +为了展示 `nm`,我们快速编写了一个小程序,用 `-g` 选项编译,我们会看到这个二进制文件没有被剥离。 + +``` +$ cat hello.c +#include + +int main() { + printf("Hello world!"); + return 0; +} +$ +$ gcc -g hello.c -o hello +$ +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=3de46c8efb98bce4ad525d3328121568ba3d8a5d, not stripped +$ +$ ./hello +Hello world!$ +$ + + +$ nm hello | tail +0000000000600e20 d __JCR_END__ +0000000000600e20 d __JCR_LIST__ +00000000004005b0 T __libc_csu_fini +0000000000400540 T __libc_csu_init + U __libc_start_main@@GLIBC_2.2.5 +000000000040051d T main + U printf@@GLIBC_2.2.5 +0000000000400490 t register_tm_clones +0000000000400430 T _start +0000000000601030 D __TMC_END__ +$ +``` + +### gdb + +它的作用:GNU 调试器。 + +好吧,不是所有的二进制文件中的东西都可以进行静态分析。我们确实执行了一些运行二进制文件(进行分析)的命令,比如 `ltrace` 和 `strace`;然而,软件由各种条件组成,这些条件可能会导致执行不同的替代路径。 + +分析这些路径的唯一方法是在运行时环境,在任何给定的位置停止或暂停程序,并能够分析信息,然后再往下执行。 + +这就是调试器的作用,在 Linux 上,`gdb` 就是调试器的事实标准。它可以帮助你加载程序,在特定的地方设置断点,分析内存和 CPU 的寄存器,还有更多的功能。它是对上面提到的其他工具的补充,可以让你做更多的运行时分析。 + +有一点需要注意的是,一旦你使用 `gdb` 加载一个程序,你会看到它自己的 `(gdb)` 提示符。所有进一步的命令都将在这个 `gdb` 命令提示符中运行,直到你退出。 + +我们将使用我们之前编译的 `hello` 程序,使用 `gdb` 来看看它的工作原理。 + +``` +$ gdb -q ./hello +Reading symbols from /home/flash/hello...done. +(gdb) break main +Breakpoint 1 at 0x400521: file hello.c, line 4. +(gdb) info break +Num Type Disp Enb Address What +1 breakpoint keep y 0x0000000000400521 in main at hello.c:4 +(gdb) run +Starting program: /home/flash/./hello + +Breakpoint 1, main () at hello.c:4 +4 printf("Hello world!"); +Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_64 +(gdb) bt +#0 main () at hello.c:4 +(gdb) c +Continuing. +Hello world![Inferior 1 (process 29620) exited normally] +(gdb) q +$``` + +### 结语 + +一旦你习惯了使用这些原生的 Linux 二进制分析工具,并理解了它们提供的输出,你就可以转向更高级和专业的开源二进制分析工具,比如 [radare2][3]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/linux-binary-analysis + +作者:[Gaurav Kamathe][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tux_linux_penguin_code_binary.jpg?itok=TxGxW0KY (Tux with binary code background) +[2]: http://www.skyfree.org/linux/references/ELF_Format.pdf +[3]: https://github.com/radareorg/radare2 From 4329ba8022652a95dac36fd077841d42f802d404 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Fri, 1 May 2020 10:28:45 +0800 Subject: [PATCH 359/394] Update 20200401 The ins and outs of high-performance computing as a service.md --- ...uts of high-performance computing as a service.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md index 45d258e08c..0f60833aa4 100644 --- a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md +++ b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md @@ -11,22 +11,24 @@ The ins and outs of high-performance computing as a service 高性能计算即 ====== HPC services can be a way to meet expanding supercomputing needs, but depending on the use case, they’re not necessarily better than on-premises supercomputers. Dell EMC -HPC服务可以满足不断扩展的超级计算需求,但根据使用情况,它们不一定比本地超级计算机更好。 戴尔EMC +高性能计算(HPC)服务可能是一种满足不断增长的超级计算需求的方式,但依赖于使用场景,它们不一定比使用本地超级计算机好。 Electronics on missiles and military helicopters need to survive extreme conditions. Before any of that physical hardware can be deployed, defense contractor McCormick Stevenson Corp. simulates the real-world conditions it will endure, relying on finite element analysis software like Ansys, which requires significant computing power. -导弹和军用直升机上的电子设备需要在极端条件下生存。 在部署任何物理硬件之前,国防承包商麦考密克·史蒂文森公司(McCormick Stevenson Corp.)都依赖于像Ansys这样的有限元素分析软件来模拟它会承受的现实条件,该软件需要强大的计算能力。 +戴尔EMC +导弹和军用直升机上的电子设备需要工作在极端条件下。国防承包商麦考密克·史蒂文森公司(McCormick Stevenson Corp.)在部署任何物理设备之前都会事先模拟它所能承受的真实条件。模拟依赖于像Ansys这样的有限元素分析软件,该软件需要强大的算力。 Then one day a few years ago, it unexpectedly ran up against its computing limits. 几年前的一天,它出乎意料地超出了计算极限。 [10 of the world's fastest supercomputers][1] +[世界上最快的10个超级计算机][1] "We had some jobs that would have overwhelmed the computers that we had in office," says Mike Krawczyk, principal engineer at McCormick Stevenson. "It did not make economic or schedule sense to buy a machine and install software." Instead, the company contracted with Rescale, which could sell them cycles on a supercomputer-class system for a tiny fraction of what they would've spent on new hardware. -麦考密克·史蒂文森(McCormick Stevenson)的首席工程师迈克·克劳奇奇(Mike Krawczyk)说:“我们从事的某些工作会使我们在办公室使用的计算机不堪重负。” “购买机器并安装软件在经济上或计划上都不合理。”取而代之的是,该公司与Rescale签约,可以在超级计算机级系统上向他们出售自行车的周期,而这只花费了他们在新硬件上花费的一小部分。 +麦考密克·史蒂文森(McCormick Stevenson)的首席工程师迈克·克劳奇奇(Mike Krawczyk)说:“我们的一些工作会使办公室的计算机不堪重负。” “购买机器并安装软件在经济上或计划上都不划算。” 相反,该公司与Rescale签约,从其购买在超级计算机系统上运行的周期(cycles),而这只花费了他们购买新硬件上所需的一小部分。 McCormick Stevenson had become an early adopter in a market known as supercomputing as a service or high-performance computing (HPC) as a service – two terms that are closely related. HPC is the application of supercomputers to computationally complex problems, while supercomputers are those computers at the cutting edge of processing capacity, according to the National Institute for Computational Sciences. -麦考密克·史蒂文森(McCormick Stevenson)已成为市场上的早期采用者,该市场被称为超级计算即服务或高性能计算(HPC)即服务–这两个紧密相关的术语。根据国家计算科学研究所的说法,HPC是超级计算机在计算复杂问题上的应用,而超级计算机是处理能力最先进的那些计算机。 +麦考密克·史蒂文森(McCormick Stevenson)已成为被称为超级计算即服务或高性能计算(HPC)即服务(两个紧密相关的术语)市场的早期采用者之一。根据国家计算科学研究所(的定义),HPC是超级计算机在计算复杂问题上的应用,而超级计算机是处理能力最先进的那些计算机。 Whatever it's called, these services are upending the traditional supercomputing market and bringing HPC power to customers who could never afford it before. But it's no panacea, and it's definitely not plug-and-play – at least not yet. -无论以何种方式称呼,这些服务都在颠覆传统的超级计算市场,并将HPC功能带给以前买不起的客户。但这不是万能药,而且绝对不是即插即用的,至少现在还没有。 +无论叫它什么,这些服务都在颠覆传统的超级计算市场,并将HPC能力带给以前买不起的客户。但这不是万能的,而且绝对不是即插即用的,至少现在还不是。 ### HPC services in practice HPC服务实践 From 548d4b7a2e4780b5773fe1a50ca43aed5a12cae0 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Fri, 1 May 2020 11:13:36 +0800 Subject: [PATCH 360/394] APL 20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode --- ... Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md b/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md index a3f3768533..5e2fb84c2b 100644 --- a/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md +++ b/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 8f276cb52bf4914db548b9a9fdb5b9fac427ffb7 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Fri, 1 May 2020 18:21:24 +0800 Subject: [PATCH 361/394] Update 20200401 The ins and outs of high-performance computing as a service.md --- ...high-performance computing as a service.md | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md index 0f60833aa4..fc36ff7082 100644 --- a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md +++ b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md @@ -33,52 +33,52 @@ Whatever it's called, these services are upending the traditional supercomputing ### HPC services in practice HPC服务实践 From the end user's perspective, HPC as a service resembles the batch-processing model that dates back to the early mainframe era. "We create an Ansys batch file and send that up, and after it runs, we pull down the result files and import them locally here," Krawczyk says. -从最终用户的角度来看,HPC即服务类似于可追溯到大型机早期的批处理模型。 “我们创建一个Ansys批处理文件并将其发送出去,然后运行它,我们将结果文件下拉并在此处本地导入,” Krawczyk说。 +从最终用户的角度来看,HPC即服务类似于早期大型机时代的批处理模型。 “我们创建一个Ansys批处理文件并将其发送过去,运行它,然后将结果文件取下来并在本地导入它们,” Krawczyk说。 Behind the scenes, cloud providers are running the supercomputing infrastructure in their own data centers – though that doesn't necessarily imply the sort of cutting-edge hardware you might be visualizing when you hear "supercomputer." As Dave Turek, Vice President of Technical Computing at IBM OpenPOWER, explains it, HPC services at their core are "a collection of servers that are strung together with an interconnect. You have the ability to invoke this virtual computing infrastructure that allows you to bring a lot of different servers to work together in a parallel construct to solve the problem when you present it." -在幕后,云提供商正在其自己的数据中心中运行超级计算基础结构,尽管这不一定意味着您在听到“超级计算机”时可能会看到的最先进的硬件。正如IBM OpenPOWER技术计算副总裁Dave Turek解释说的那样,HPC服务的核心是“由互连串在一起的服务器的集合。您可以调用此虚拟计算基础结构,使您能够当您提出问题时,许多不同的服务器可以并行构造在一起以解决问题。” +在HPC服务背后,云提供商在其自己的数据中心中运行超级计算基础设施,尽管这不一定意味着当您听到“超级计算机”时你就会看到最先进的硬件。正如IBM OpenPOWER计算技术副总裁Dave Turek解释的那样,HPC服务的核心是“相互互连的服务器集合。您可以调用该虚拟计算基础设施,它能够在您提出问题时,使得许多不同的服务器并行工作来解决问题。” [][2] Sounds simple in theory. But making it viable in practice required some chipping away at technical problems, according to Theo Lynn, Professor of Digital Business at Dublin City University. What differentiates ordinary computing from HPC is those interconnects – high-speed, low-latency, and expensive – so those needed to be brought to the world of cloud infrastructure. Storage performance and data transport also needed to be brought up to a level at least in the same ballpark as on-prem HPC before HPC services could be viable. -理论上听起来很简单。都柏林城市大学数字业务教授西奥·林恩(Theo Lynn)表示,但要使其在实践中可行,需要解决一些技术问题。普通计算与HPC的区别在于那些互连-高速,低延迟和昂贵-因此需要将这些互连引入云基础架构领域。在HPC服务可行之前,还至少需要将存储性能和数据传输提升到与本地HPC相同的水平。 +理论上听起来很简单。但都柏林城市大学数字业务教授西奥·林恩(Theo Lynn)表示,要使其在实践中可行,需要解决一些技术问题。普通计算与HPC的区别在于那些互连-高速的,低延时的而且昂贵的-因此需要将这些互连引入云基础设施领域。在HPC服务可行之前,至少需要将存储性能和数据传输也提升到与本地HPC相同的水平。 But Lynn says that some of the innovations that have helped HPC services take off have been more institutional than technological. In particular, "we are now seeing more and more traditional HPC applications adopting cloud-friendly licensing models – a barrier to adoption in the past." -但是林恩说,一些帮助高性能计算服务起飞的创新比技术更具有制度性。特别是,“我们现在看到越来越多的传统HPC应用程序采用云友好型许可模式-过去是采用这种模式的障碍。” +但是林恩说,一些制度创新相比技术更好的帮助了HPC服务的起飞。特别是,“我们现在看到越来越多的传统HPC应用采用云友好的许可模式-过去是采用这种模式的障碍。” And the economics have also shifted the potential customer base, he says. "Cloud service providers have opened up the market more by targeting low-end HPC buyers who couldn’t afford the capex associated with traditional HPC and opening up the market to new users. As the markets open up, the hyperscale economic model becomes more and more feasible, costs start coming down." -他说,经济也改变了潜在的客户群。 “云服务提供商通过针对那些负担不起与传统HPC相关的资本支出的低端HPC买家,并向新用户开放市场,进一步开放了市场。随着市场的开放,超大规模经济模型变得越来越多,更可行,成本开始下降。” +他说,经济也改变了潜在的客户群。 “云服务提供商通过向那些负担不起传统HPC所需的投资成本的低端HPC买家开放,进一步开放了市场。随着市场的开放,超大规模经济模型变得越来越多,更可行,成本开始下降。” -Avoid on-premises CAPEX** 避免内部资本支出** +Avoid on-premises CAPEX** 避免本地资本支出** ** HPC services are attractive to private-sector customers in the same fields where traditional supercomputing has long held sway. These include sectors that rely heavily on complex mathematical modeling, including defense contractors like McCormick Stevenson, along with oil and gas companies, financial services firms, and biotech companies. Dublin City University's Lynn adds that loosely coupled workloads are a particularly good use case, which meant that many early adopters used it for 3D image rendering and related applications. -在传统超级计算长期占据主导地位的相同领域,HPC服务对私营部门客户具有吸引力。这些行业包括严重依赖复杂数学模型的行业,包括麦考密克·史蒂文森(McCormick Stevenson)等国防承包商,以及石油和天然气公司,金融服务公司和生物技术公司。都柏林城市大学的Lynn补充说,松散耦合的工作负载是一个特别好的用例,这意味着许多早期采用者将其用于3D图像渲染和相关应用程序。 +HPC服务对有志于传统超级计算长期把持的领域的私营行业客户具有吸引力。这些客户包括严重依赖复杂数学模型的行业,包括麦考密克·史蒂文森(McCormick Stevenson)等国防承包商,以及油气公司,金融服务公司和生物技术公司。都柏林城市大学的Lynn补充说,松耦合的工作负载是一个特别好的用例,这意味着许多早期采用者将其用于3D图像渲染和相关应用。 But when does it make sense to consider HPC services over on-premises HPC? For hhpberlin, a German company that simulates smoke propagation in and fire damage to structural components of buildings, the move came as it outgrew its current resources. -但是,何时在本地HPC上考虑HPC服务才有意义?对于德国的hhpberlin公司,该公司模拟烟雾在建筑物中的传播和火灾对建筑物结构部件的破坏,此举是因为它超出了其现有资源。 +但是,何时考虑HPC服务而不是本地HPC才有意义?对于德国的模拟烟雾在建筑物中的蔓延和火灾对建筑物结构部件的破坏的hhpberlin公司来说,答案是在它超出了其现有资源时。 "For several years, we had run our own small cluster with up to 80 processor cores," says Susanne Kilian, hhpberlin's scientific head of numerical simulation. "With the rise in application complexity, however, this constellation has increasingly proven to be inadequate; the available capacity was not always sufficient to handle projects promptly." -hhpberlin数值模拟的科学负责人Susanne Kilian说:“几年来,我们一直在运行自己的小型集群,该集群具有多达80个处理器内核。” “但是,随着应用程序复杂性的提高,这种架构已经越来越不足够;可用容​​量并不总是足够迅速地处理项目。” +Hpberlin公司数值模拟的科学负责人Susanne Kilian说:“几年来,我们一直在运行自己的小型集群,该集群具有多达80个处理器核。” “但是,随着应用复杂性的提高,这种架构(constellation)已经越来越不足以支撑;可用容量并不总是够快速地处理项目。” But just spending money on a new cluster wasn't an ideal solution, she says: "In view of the size and administrative environment of our company, the necessity of constant maintenance of this cluster (regular software and hardware upgrades) turned out to be impractical. Plus, the number of required simulation projects is subject to significant fluctuations, such that the utilization of the cluster was not really predictable. Typically, phases with very intensive use alternate with phases with little to no use." By moving to an HPC service model, hhpberlin shed that excess capacity and the need to pay up front for upgrades. -她说:“但是,仅仅花钱买一个新的集群并不是一个理想的解决方案:鉴于我们公司的规模和管理环境,持续维护该集群(定期进行软件和硬件升级)的必要性非常明显。另外,所需的模拟项目的数量会出现很大的波动,因此群集的使用情况并不是真正可预测的。通常,使用率很高的阶段与很少使用或不使用的阶段交替出现。”通过转换为HPC服务模式,hhpberlin消除了过剩的容量,无需支付升级费用。 +她说:“但是,仅仅花钱买一个新的集群并不是一个理想的解决方案:鉴于我们公司的规模和管理环境,强制持续维护该集群(定期进行软件和硬件升级)是不现实的。另外,需要模拟的项目数量会出现很大的波动,因此集群的利用率并不是真正可预测的。通常,使用率很高的阶段与很少使用或不使用的阶段交替出现。”通过转换为HPC服务模式,hhpberlin释放了过剩的容量,并无需支付升级费用。 IBM's Turek explains the calculus that different companies go through while assessing their needs. For a biosciences startup with 30 people, "you need computing, but you really can't afford to have 15% of your staff dedicated to it. It's just like you might also say you don't want to have on-staff legal representation, so you'll get that as a service as well." For a bigger company, though, it comes down to weighing the operational expense of an HPC service against the capacity expense of buying an in-house supercomputer or HPC cluster. -IBM的Turek解释了不同公司在评估其需求时所经历的计算过程。对于拥有30名员工的生物科学初创公司来说,“您需要计算,但您实在负担不起15%的员工专心致志。这就像您可能还说过,您不想拥有在职法律代表,因此您也可以将其作为服务获得。”但是,对于一家较大的公司而言,归结为权衡HPC服务的运营费用与购买内部超级计算机或HPC集群的容量费用。 +IBM的Turek解释了不同公司在评估其需求时所经历的计算过程。对于拥有30名员工的生物科学初创公司来说,“您需要计算,但您实在负担不起15%的员工专门从事它。这就像您可能也说过,您不想拥有在职法律代表,因此您也可以通过服务获得它。”但是,对于一家较大的公司而言,最终归结为权衡HPC服务的运营费用与购买内部超级计算机或HPC集群的费用。 So far, those are the same sorts of arguments you'd have over adopting any cloud service. But the opex vs. capex dilemma can be weighted towards the former by some of the specifics of the HPC market. Supercomputers aren't commodity hardware like storage or x86 servers; they're very expensive, and technological advances can swiftly render them obsolete. As McCormick Stevenson's Krawczyk puts it, "It's like buying a car: as soon as you drive off the lot it starts to depreciate." And for many companies –especially larger and less nimble ones – the process of buying a supercomputer can get hopelessly bogged down. "You're caught up in planning issues, building issues, construction issues, training issues, and then you have to execute an RFP," says IBM's Turek. "You have to work through the CIO. You have to work with your internal customers to make sure there's continuity of service. It's a very, very complex process and not something that a lot of institutions are really excellent at executing." -到目前为止,这些都是您采用任何云服务时都会遇到的相同类型的争论。但是,可以通过HPC市场的某些细节将运营支出与资本支出的困境加权为前者。超级计算机不是诸如存储或x86服务器之类的商用硬件;它们非常昂贵,技术进步会很快使其过时。正如麦考密克·史蒂文森(McCormick Stevenson)的克拉维奇(Krawczyk)所说,“这就像在买车:开车一走,它就会开始贬值。”对于许多公司,尤其是规模较大,灵活性较差的公司,购买超级计算机的过程可能会陷入无望的泥潭。 IBM的Turek说:“您陷入了计划问题,建筑问题,施工问题,培训问题,然后必须执行RFP。” “您必须通过CIO进行工作。您必须与内部客户合作以确保服务的连续性。这是一个非常非常复杂的过程,并不是很多机构在执行方面都非常出色。” +到目前为止,这些都是您采用任何云服务时都会遇到的类似的争论。但是,可以HPC市场的某些特点将使得衡量运营支出与资本支出时选择前者。超级计算机不是诸如存储或x86服务器之类的商用硬件;它们非常昂贵,技术进步很快会使其过时。正如麦考密克·史蒂文森(McCormick Stevenson)的克拉维奇(Krawczyk)所说,“这就像买车:只要车一开走,它就会开始贬值。”对于许多公司,尤其是规模较大,灵活性较差的公司,购买超级计算机的过程可能会陷入无望的泥潭。 IBM的Turek说:“您陷入了计划问题,建筑问题,施工问题,培训问题,然后必须执行RFP。” “您必须得到CIO的支持。您必须与内部客户合作以确保服务的连续性。这是一个非常非常复杂的过程,并没有很多机构有非常出色的执行力。” -Once you choose to go down the services route for HPC, you'll find you get many of the advantages you expect from cloud services, particularly the ability to pay only for HPC power when you need it, which results in an efficient use of resources. Chirag Dekate, Senior Director and Analyst at Gartner, says bursty workloads, when you have short-term needs for high-performance computing, are a key use case driving adoption of HPC  services. -选择了HPC的服务路线后,您会发现您将从云服务中获得了许多期望,特别是仅在需要时才需要为HPC功能付费的能力,从而可以有效利用资源。 Gartner高级总监兼分析师Chirag Dekate表示,当您对高性能计算有短期需求时,突发性工作负载是推动HPC服务采用的关键用例。 +Once you choose to go down the services route for HPC, you'll find you get many of the advantages you expect from cloud services, particularly the ability to pay only for HPC power when you need it, which results in an efficient use of resources. Chirag Dekate, Senior Director and Analyst at Gartner, says bursty workloads, when you have short-term needs for high-performance computing, are a key use case driving adoption of HPC services. +一旦您选择了HPC服务的路线后,您会发现您会得到您期望从云服务中得到的许多好处,特别是仅在业务需要时才需付费的能力,从而可以带来资源的高效利用。 Gartner高级总监兼分析师Chirag Dekate表示,当您对高性能计算有短期需求时的突发性负载是推动选择HPC服务的关键用例。 "In the manufacturing industry, you tend to have a high peak of HPC activity around the product design stage," he says. "But once the product is designed, HPC resources are less utilized during the rest of the product-development cycle." In contrast, he says, "when you have large, long-running jobs, the economics of the cloud wear down." 他说:“在制造业中,在产品设计阶段,HPC活动往往会达到很高的峰值。” “但是,一旦产品设计完成,在其余产品开发周期中,HPC资源的利用率就会降低。” 相比之下,他说:“当您拥有大量长期运行的工作时,云的经济就会逐渐减弱。” With clever system design, you can integrate those HPC-services bursts of activity with your own in-house conventional computing. Teresa Tung, managing director in Accenture Labs, gives an example: "Accessing HPC via APIs makes it seamless to mix with traditional computing. A traditional AI pipeline might have its training done on a high-end supercomputer at the stage when the model is being developed, but then the resulting trained model that runs predictions over and over would be deployed on other services in the cloud or even devices at the edge." -通过巧妙的系统设计,您可以将这些HPC服务突发事件与您自己的内部常规计算集成在一起。 埃森哲实验室常务董事董德丽举了一个例子:“通过API访问HPC可以无缝地与传统计算混合。在模型构建阶段,传统的AI管道可能会在高端超级计算机上进行培训。 开发出来的软件,但是最终生成的经过反复训练的模型将部署在云中的其他服务上,甚至部署在边缘设备上。” +通过巧妙的系统设计,您可以将这些HPC服务突发活动与您自己的内部常规计算集成在一起。 埃森哲(Accenture)实验室常务董事Teresa Tung举了一个例子:“通过API访问HPC可以无缝地与传统计算混合。在模型构建阶段,传统的AI流水线可能会在高端超级计算机上进行训练,但是最终经过反复按预期运行的训练好的模型将部署在云中的其他服务上,甚至部署在边缘设备上。” -### It's not for all use cases** +### It's not for all use cases** 它并不适合所有的应用场景 ** From e241cfe3b2eae7841b3adb1014e6cf9820b77c75 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 1 May 2020 19:37:10 +0800 Subject: [PATCH 362/394] PRF @wxy --- ...ython to visualize COVID-19 projections.md | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/translated/tech/20200421 Using Python to visualize COVID-19 projections.md b/translated/tech/20200421 Using Python to visualize COVID-19 projections.md index 3768686e8c..af82cbd349 100644 --- a/translated/tech/20200421 Using Python to visualize COVID-19 projections.md +++ b/translated/tech/20200421 Using Python to visualize COVID-19 projections.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Using Python to visualize COVID-19 projections) @@ -10,11 +10,11 @@ 使用 Python 来可视化 COVID-19 预测 ====== -> 我将演示如何使用开源库利用提供的全球病毒传播的开放数据来创建两个可视效果。 +> 我将演示如何利用提供的全球病毒传播的开放数据,使用开源库来创建两个可视效果。 -![Colorful sound wave graph][1] +![](https://img.linux.net.cn/data/attachment/album/202005/01/193624a2p2osojyf0yg4go.jpg) -使用 [Python][2] 和一些图形库,你可以预测出 COVID-19 确诊病例的总数,也可以显示一个国家(本文以印度为例)在给定日期的死亡总数。人们有时需要帮助解释和处理数据的意义,所以本文还演示了如何为五个国家创建一个动画横条形图,以显示按日期显示病例的变化。 +使用 [Python][2] 和一些图形库,你可以预测 COVID-19 确诊病例总数,也可以显示一个国家(本文以印度为例)在给定日期的死亡总数。人们有时需要帮助解释和处理数据的意义,所以本文还演示了如何为五个国家创建一个动画横条形图,以显示按日期显示病例的变化。 ### 印度的确诊病例和死亡人数预测 @@ -28,7 +28,6 @@ 直接将数据加载到 Pandas `DataFrame` 中。Pandas 提供了一个函数 `read_csv()`,它可以获取一个 URL 并返回一个 `DataFrame` 对象,如下所示。 - ``` import pycountry import plotly.express as px @@ -87,8 +86,8 @@ print(df_india.head(3)) 在这里,我们创建一个条形图。我们将把日期放在 X 轴上,把确诊的病例数和死亡人数放在 Y 轴上。这一部分的脚本有以下几个值得注意的地方。 - * `plt.rcParams["_figure.figure.figsize"_]=20,20` 这一行代码只适用于 Jupyter。所以如果你使用其他 IDE,请删除它。 - * 注意这行代码:`ax1 = plt.gca()`。为了确保两个图,即确诊病例和死亡病例的图都被绘制在同一个图上,我们需要给第二个图的 `ax` 对象。所以我们使用 `gca()` 来完成这个任务。(顺便说一下,`gca` 代表“get current axis”) + * `plt.rcParams["figure.figsize"]=20,20` 这一行代码只适用于 Jupyter。所以如果你使用其他 IDE,请删除它。 + * 注意这行代码:`ax1 = plt.gca()`。为了确保两个图,即确诊病例和死亡病例的图都被绘制在同一个图上,我们需要给第二个图的 `ax` 对象。所以我们使用 `gca()` 来完成这个任务。(顺便说一下,`gca` 代表 “获取当前坐标轴get current axis”) 完整的脚本如下所示。 @@ -120,9 +119,9 @@ plt.show() 整个脚本[可在 GitHub 上找到][4]。 -#### 为五个国家创建一个动画水平条形图 +### 为五个国家创建一个动画水平条形图 -关于 Jupyter 的注意事项:要在 Jupyter 中以动态动画的形式运行,而不是静态 png 的形式,你需要在单元格的开头添加一个神奇的命令,即: `%matplotlib notebook`。这将使图形保持动态,而不是显示静态的 png 文件,因此也可以显示动画。如果你在其他 IDE 上,请删除这一行。 +关于 Jupyter 的注意事项:要在 Jupyter 中以动态动画的形式运行,而不是静态 png 的形式,你需要在单元格的开头添加一个神奇的命令,即: `%matplotlib notebook`。这将使图形保持动态,而不是显示为静态的 png 文件,因此也可以显示动画。如果你在其他 IDE 上,请删除这一行。 #### 1、下载数据 @@ -130,11 +129,11 @@ plt.show() #### 2、创建一个所有日期的列表 -如果你检查你下载的数据,你会发现它有一列 `Date`。现在,这一列对每个国家都有一个日期值。因此,同一个日期会出现多次。我们需要创建一个只具有唯一值的日期列表。这会用在我们条形图的 X 轴上。我们有一行代码,如 `list_dates = df[_'Date'_].unique()`。`unique()` 方法将只提取每个日期的唯一值。 +如果你检查你下载的数据,你会发现它有一列 `Date`。现在,这一列对每个国家都有一个日期值。因此,同一个日期会出现多次。我们需要创建一个只具有唯一值的日期列表。这会用在我们条形图的 X 轴上。我们有一行代码,如 `list_dates = df[‘Date’].unique()`。`unique()` 方法将只提取每个日期的唯一值。 #### 3、挑选五个国家并创建一个 `ax` 对象。 -做一个五个国家的名单。(你可以选择你喜欢的国家,甚至可以增加或减少国家的数量。)我也做了一个五个颜色的列表,每个国家的条形图的颜色对应一种。(如果你喜欢的话,也可以改一下。)这里有一行重要的代码是:`fig, ax = plt.subplots(figsize=(15, 8))`。这是创建一个 `ax` 对象所需要的。 +做一个五个国家的名单。(你可以选择你喜欢的国家,也可以增加或减少国家的数量。)我也做了一个五个颜色的列表,每个国家的条形图的颜色对应一种。(如果你喜欢的话,也可以改一下。)这里有一行重要的代码是:`fig, ax = plt.subplots(figsize=(15, 8))`。这是创建一个 `ax` 对象所需要的。 #### 4、编写回调函数 @@ -148,7 +147,7 @@ plt.show() ``` my_anim = animation.FuncAnimation(fig = fig, func = plot_bar, - frames= list_dates, blit=True, + frames = list_dates, blit = True, interval=20) ``` @@ -226,7 +225,7 @@ via: https://opensource.com/article/20/4/python-data-covid-19 作者:[AnuragGupta][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 47b50990ea772269e11c728ad114ba528ce89b0c Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 1 May 2020 19:39:56 +0800 Subject: [PATCH 363/394] PUB @wxy https://linux.cn/article-12172-1.html --- ...20200421 Using Python to visualize COVID-19 projections.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200421 Using Python to visualize COVID-19 projections.md (99%) diff --git a/translated/tech/20200421 Using Python to visualize COVID-19 projections.md b/published/20200421 Using Python to visualize COVID-19 projections.md similarity index 99% rename from translated/tech/20200421 Using Python to visualize COVID-19 projections.md rename to published/20200421 Using Python to visualize COVID-19 projections.md index af82cbd349..aaf5fc72d0 100644 --- a/translated/tech/20200421 Using Python to visualize COVID-19 projections.md +++ b/published/20200421 Using Python to visualize COVID-19 projections.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12172-1.html) [#]: subject: (Using Python to visualize COVID-19 projections) [#]: via: (https://opensource.com/article/20/4/python-data-covid-19) [#]: author: (AnuragGupta https://opensource.com/users/999anuraggupta) From bdaa3f168a7d09f38a496e2e09ccb4c277109d6a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 1 May 2020 23:19:22 +0800 Subject: [PATCH 364/394] PRF @geekpi --- ... Free and Open Source Editor Pixelorama.md | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md b/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md index 530517a482..93fa31a461 100644 --- a/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md +++ b/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md @@ -1,52 +1,50 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Create Stunning Pixel Art With Free and Open Source Editor Pixelorama) [#]: via: (https://itsfoss.com/pixelorama/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -使用免费和开源编辑器 Pixelorama 创建令人惊叹的像素艺术 +使用 Pixelorama 创建令人惊叹的像素艺术 ====== -_**简介:Pixelorama 是一个跨平台、免费和开源的 2D Sprite 编辑器。它在干净的用户界面中提供了创建像素艺术所有必要工具。**_ +> Pixelorama 是一个跨平台、自由开源的 2D 精灵编辑器。它在一个整洁的用户界面中提供了创建像素艺术所有必要工具。 ### Pixelorama:开源 Sprite 编辑器 -[Pixelorama][1] 是年轻游戏开发人员在 [Orama 互动][2]创建的工具。他们已经开发了一些 2D 游戏,其中一些使用了像素艺术。 +[Pixelorama][1] 是 [Orama 互动][2]公司的年轻游戏开发人员创建的一个工具。他们已经开发了一些 2D 游戏,其中一些使用了像素艺术。 -虽然 Orama 主要投入游戏开发,但开发人员也在创建实用工具,帮助他们(和其他人)创建这些游戏。 +虽然 Orama 主要从事于游戏开发,但开发人员也创建实用工具,帮助他们(和其他人)创建这些游戏。 -免费开源的 Sprite 编辑器,Pixelorama 是这样一个实用工具。它构建在 [Godot 引擎][3]之上,非常适合创作像素艺术。 +自由开源的精灵Sprite编辑器 Pixelorama 就是这样一个实用工具。它构建在 [Godot 引擎][3]之上,非常适合创作像素艺术。 ![Pixelorama screenshot][4] -你在上面的截图中看到像素艺术了吗?它是使用 Pixelorama 创建的。此视频显示创建上面图像的延时视频。 +你看到上面截图中的像素艺术了吗?它是使用 Pixelorama 创建的。这段视频展示了制作上述图片的时间推移视频。 ### Pixelorama 的功能 以下是 Pixelorama 提供的主要功能: - * 多种工具,如铅笔,擦除,填充桶颜色选择器等 - * 多层系统,你可以根据需要添加、删除、上下移动、克隆和合并尽可能多的层 + * 多种工具,如铅笔、橡皮擦、填充桶、取色器等 + * 多层系统,你可以根据需要添加、删除、上下移动、克隆和合并多个层 * 支持 Spritesheets * 导入图像并在 Pixelorama 中编辑它们 * 带有 [Onion Skinning][5] 的动画时间线 * 自定义画笔 * 以 Pixelorama 的自定义文件格式 .pxo 保存并打开你的项目 * 水平和垂直镜像绘图 - * 用于图样创建的磁贴模式 + * 用于创建图样的磁贴模式 * 拆分屏幕模式和迷你画布预览 * 使用鼠标滚轮缩放 - * 无限撤消和重做 + * 无限次撤消和重做 * 缩放、裁剪、翻转、旋转、颜色反转和去饱和图像 * 键盘快捷键 * 提供多种语言 * 支持 Linux、Windows 和 macOS - - ### 在 Linux 上安装 Pixelorama Pixelorama 提供 Snap 应用,如果你使用的是 Ubuntu,那么可以在软件中心找到它。 @@ -59,33 +57,33 @@ Pixelorama 提供 Snap 应用,如果你使用的是 Ubuntu,那么可以在 sudo snap install pixelorama ``` -如果你不想使用 Snap,不用担心。你可以从[他们的 GitHub 仓库]下载最新版本的 Pixelorama,[解压 zip 文件][9],你会看到一个可执行文件。授予此文件执行权限,并双击它运行应用。 +如果你不想使用 Snap,不用担心。你可以从[他们的 GitHub 仓库][8]下载最新版本的 Pixelorama,[解压 zip 文件][9],你会看到一个可执行文件。授予此文件执行权限,并双击它运行应用。 -[下载 Pixelorama][10] +- [下载 Pixelorama][10] -**总结** +### 总结 ![Pixelorama Welcome Screen][11] 在 Pixeloaram 的功能中,它说你可以导入图像并对其进行编辑。我想,这只是对某些类型的文件,因为当我尝试导入 PNG 或 JPEG 文件,程序崩溃了。 -然而,我可以像一个 3 岁的孩子那样随意涂鸦并制作像素艺术。我并没有深入艺术,但我认为这是一个[在 Linux 上对数字艺术家有用的工具][12]。 +然而,我可以像一个 3 岁的孩子那样随意涂鸦并制作像素艺术。我对艺术不是很感兴趣,但我认为这[对 Linux 上的数字艺术家是个有用的工具][12]。 我喜欢这样的想法:尽管是游戏开发人员,但他们创建的工具,可以帮助其他游戏开发人员和艺术家。这就是开源的精神。 -如果你喜欢这个项目,并且会使用它,请考虑通过捐赠来支持他们。[FOSS 捐赠了][13] 25 美元,以感谢他们的努力。 +如果你喜欢这个项目,并且会使用它,请考虑通过捐赠来支持他们。[It’s FOSS 捐赠了][13] 25 美元,以感谢他们的努力。 -[向 Pixelorama 捐赠(主要开发者的个人 Paypal 账户)][14] +- [向 Pixelorama 捐赠(主要开发者的个人 Paypal 账户)][14] -你喜欢 Pixelorama 吗?你是否使用其他开源 Sprite 编辑器?请随时在评论栏分享你的观点。 +你喜欢 Pixelorama 吗?你是否使用其他开源精灵编辑器?请随时在评论栏分享你的观点。 -------------------------------------------------------------------------------- - +via: https://itsfoss.com/pixelorama/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] 译者:[geekpi](https://github.com/geekpi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 8cc7dc8871ef32efb5770a18c488daf23bda8448 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Fri, 1 May 2020 23:22:46 +0800 Subject: [PATCH 365/394] PUB @geekpi https://linux.cn/article-12173-1.html --- ...g Pixel Art With Free and Open Source Editor Pixelorama.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md (98%) diff --git a/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md b/published/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md similarity index 98% rename from translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md rename to published/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md index 93fa31a461..7a267a672e 100644 --- a/translated/tech/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md +++ b/published/20200317 Create Stunning Pixel Art With Free and Open Source Editor Pixelorama.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (geekpi) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12173-1.html) [#]: subject: (Create Stunning Pixel Art With Free and Open Source Editor Pixelorama) [#]: via: (https://itsfoss.com/pixelorama/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) From c7d4f93bfee652f09c6696f133f19ea562d97917 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 2 May 2020 00:52:31 +0800 Subject: [PATCH 366/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200501=20Using?= =?UTF-8?q?=20mergerfs=20to=20increase=20your=20virtual=20storage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200501 Using mergerfs to increase your virtual storage.md --- ...rgerfs to increase your virtual storage.md | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 sources/tech/20200501 Using mergerfs to increase your virtual storage.md diff --git a/sources/tech/20200501 Using mergerfs to increase your virtual storage.md b/sources/tech/20200501 Using mergerfs to increase your virtual storage.md new file mode 100644 index 0000000000..06f26abf51 --- /dev/null +++ b/sources/tech/20200501 Using mergerfs to increase your virtual storage.md @@ -0,0 +1,147 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Using mergerfs to increase your virtual storage) +[#]: via: (https://fedoramagazine.org/using-mergerfs-to-increase-your-virtual-storage/) +[#]: author: (Curt Warfield https://fedoramagazine.org/author/rcurtiswarfield/) + +Using mergerfs to increase your virtual storage +====== + +![][1] + +What happens if you have multiple disks or partitions that you’d like to use for a media project and you don’t want to lose any of your existing data, but you’d like to have everything located or mounted under one drive. That’s where mergerfs can come to your rescue! + +[mergerfs][2] is a union filesystem geared towards simplifying storage and management of files across numerous commodity storage devices. + +You will need to grab the latest RPM from their github page [here][3]. The releases for Fedora have _**fc**_ and the version number in the name. For example here is the version for Fedora 31: + +[mergerfs-2.29.0-1.fc31.x86_64.rpm][4] + +### Installing and configuring mergerfs + +Install the mergerfs package that you’ve downloaded using sudo: + +``` +$ sudo dnf install mergerfs-2.29.0-1.fc31.x86_64.rpm +``` + +You will now be able to mount multiple disks as one drive. This comes in handy if you have a media server and you’d like all of your media files to show up under one location. If you upload new files to your system, you can copy them to your mergerfs directory and mergerfs will automatically copy them to which ever drive has enough free space available. + +Here is an example to make it easier to understand: + +``` +$ df -hT | grep disk +/dev/sdb1 ext4 23M 386K 21M 2% /disk1 +/dev/sdc1 ext4 44M 1.1M 40M 3% /disk2 + +$ ls -l /disk1/Videos/ +total 1 +-rw-r--r--. 1 curt curt 0 Mar 8 17:17 Our Wedding.mkv + +$ ls -l /disk2/Videos/ +total 2 +-rw-r--r--. 1 curt curt 0 Mar 8 17:17 Baby's first Xmas.mkv +-rw-rw-r--. 1 curt curt 0 Mar 8 17:21 Halloween hijinks.mkv +``` + +In this example there are two disks mounted as _disk1_ and _disk2_. Both drives have a _**Videos**_ directory with existing files. + +Now we’re going to mount those drives using mergerfs to make them appear as one larger drive. + +``` +$ sudo mergerfs -o defaults,allow_other,use_ino,category.create=mfs,moveonenospc=true,minfreespace=1M /disk1:/disk2 /media +``` + +The mergerfs man page is quite extensive and complex so we’ll break down the options that were specified. + + * _defaults_: This will use the default settings unless specified. + * _allow_other_: allows users besides sudo or root to see the filesystem. + * _use_ino_: Causes mergerfs to supply file/directory inodes rather than libfuse. While not a default it is recommended it be enabled so that linked files share the same inode value. + * _category.create=mfs_: Spreads files out across your drives based on available space. + * _moveonenospc=true_: If enabled, if writing fails, a scan will be done looking for the drive with the most free space. + * _minfreespace=1M_: The minimum space value used. + * _disk1_: First hard drive. + * _disk2_: Second hard drive. + * _/media_: The directory folder where the drives are mounted. + + + +Here is what it looks like: + +``` +$ df -hT | grep disk +/dev/sdb1 ext4 23M 386K 21M 2% /disk1 +/dev/sdc1 ext4 44M 1.1M 40M 3% /disk2 + +$ df -hT | grep media +1:2 fuse.mergerfs 66M 1.4M 60M 3% /media +``` + +You can see that the mergerfs mount now shows a total capacity of 66M which is the combined total of the two hard drives. + +Continuing with the example: + +There is a 30Mb video called _Baby’s second Xmas.mkv_. Let’s copy it to the _/media_ folder which is the mergerfs mount. + +``` +$ ls -lh "Baby's second Xmas.mkv" +-rw-rw-r--. 1 curt curt 30M Apr 20 08:45 Baby's second Xmas.mkv +$ cp "Baby's second Xmas.mkv" /media/Videos/ +``` + +Here is the end result: + +``` +$ df -hT | grep disk +/dev/sdb1 ext4 23M 386K 21M 2% /disk1 +/dev/sdc1 ext4 44M 31M 9.8M 76% /disk2 + +$ df -hT | grep media +1:2 fuse.mergerfs 66M 31M 30M 51% /media +``` + +You can see from the disk space utilization that mergerfs automatically copied the file to disk2 because disk1 did not have enough free space. + +Here is a breakdown of all of the files: + +``` +$ ls -l /disk1/Videos/ +total 1 +-rw-r--r--. 1 curt curt 0 Mar 8 17:17 Our Wedding.mkv + +$ ls -l /disk2/Videos/ +total 30003 +-rw-r--r--. 1 curt curt 0 Mar 8 17:17 Baby's first Xmas.mkv +-rw-rw-r--. 1 curt curt 30720000 Apr 20 08:47 Baby's second Xmas.mkv +-rw-rw-r--. 1 curt curt 0 Mar 8 17:21 Halloween hijinks.mkv + +$ ls -l /media/Videos/ +total 30004 +-rw-r--r--. 1 curt curt 0 Mar 8 17:17 Baby's first Xmas.mkv +-rw-rw-r--. 1 curt curt 30720000 Apr 20 08:47 Baby's second Xmas.mkv +-rw-rw-r--. 1 curt curt 0 Mar 8 17:21 Halloween hijinks.mkv +-rw-r--r--. 1 curt curt 0 Mar 8 17:17 Our Wedding.mkv +``` + +When you copy files to your mergerfs mount, it will always copy the files to the hard disk that has enough free space. If none of the drives in the pool have enough free space, then you won’t be able to copy them. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/using-mergerfs-to-increase-your-virtual-storage/ + +作者:[Curt Warfield][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://fedoramagazine.org/author/rcurtiswarfield/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/mergerfs-816x346.png +[2]: https://github.com/trapexit/mergerfs +[3]: https://github.com/trapexit/mergerfs/releases +[4]: https://github.com/trapexit/mergerfs/releases/download/2.29.0/mergerfs-2.29.0-1.fc31.x86_64.rpm From ebf9e99900df30f8e0718e4808baca61585d9ae3 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 2 May 2020 00:57:44 +0800 Subject: [PATCH 367/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200430=20Linux?= =?UTF-8?q?=20and=20Kubernetes:=20Serving=20The=20Common=20Goals=20of=20En?= =?UTF-8?q?terprises?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md --- ...Serving The Common Goals of Enterprises.md | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md diff --git a/sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md b/sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md new file mode 100644 index 0000000000..c3c0c36b66 --- /dev/null +++ b/sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md @@ -0,0 +1,77 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Linux and Kubernetes: Serving The Common Goals of Enterprises) +[#]: via: (https://www.linux.com/articles/linux-and-kubernetes-serving-the-common-goals-of-enterprises/) +[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) + +Linux and Kubernetes: Serving The Common Goals of Enterprises +====== + +[![][1]][2] + +For [Stefanie Chiras,][3] VP & GM, Red Hat Enterprise Linux (RHEL) Business Unit at [Red Hat][4], aspects such as security and resiliency have always been important for Red Hat. More so, in the current situation when everyone has gone fully remote and it’s much harder to get people in front of the hardware for carrying out updates, patching, etc. + +“As we look at our current situation, never has it been more important to have an operating system that is resilient and secure, and we’re focused on that,” she said. + +The recently released version of [Red Hat Enterprise Linux (RHEL) 8.2][5] inadvertently address these challenge as it makes it easier for technology leaders to embrace the latest, production-ready innovations swiftly which offering security and resilience that their IT teams need. + +RHEL’s embrace of a predictable 6-month minor release cycle also helped customers plan upgrades more efficiently. + +“There is value for customers in having predictability of minor releases on a six-month cycle. Without knowing when they were coming was causing disruptions for them. The launch of 8.2 is now the second time we have delivered on our commitment of having minor releases every six months,” said Stefanie Chiras. + +In addition to offering security updates, the new version adds insights capabilities and forays into newer areas of innovation. + +The upgrade has expanded the earlier capability called ‘Adviser’ dramatically. Additional functionalities such as drift monitoring and CVE coverage allow for a much deeper granularity into how the infrastructure is running. + +“It really amplifies the skills that are already present in ops and sysadmin teams, and this provides a Red Hat consultation, if you will, directly into the data center,” claimed Charis. + +As containers are increasingly being leveraged for digital transformation, RHEL 8.2 offers an updated application stream of Red Hat’s container tools. It also has new, containerized versions of Buildah and Skopeo. + +[Skopeo][6] is an open-source image copying tool, while Buildah is a tool for building Docker- and Kubernetes-compatible images easily and quickly. + +RHEL has also ensured in-place upgrades in the new version. Customers can now directly in-place upgrade from version 7 to version 8.2. + +Chiras believes Linux has emerged as the go-to-platform for innovations such as Machine Learning, Deep Learning, and Artificial Intelligence. + +“Linux has now become the springboard of innovation,” she argued. “AI, machine learning, and deep learning are driving a real change in not just the software but also the hardware. In the context of these emerging technologies, it’s all about making them consumable into an enterprise.” + +“We’re very focused on our ecosystem, making sure that we’re working in the right upstream communities with the right ISVs, with the right hardware partners to make all of that magic come together,” Chiras said. + +Towards this end, Red Hat has been partnering with multiple architectures for a long time — be it an x86 architecture, ARM, Power, or mainframe with IBM Z. Its partnership with Nvidia pulls in capabilities such as FPGAs, and GPU. + +**Synergizing Kubernetes and Linux ** + +Kubernetes is fast finding favor in enterprises.  So how do Linux and Kubernetes serve the common goals of enterprises? + +“Kubernetes is a new way to deploy Linux. We’re very focused on providing operational consistency by leveraging our technology in RHEL and then bringing in that incredible capability of Kubernetes within our OpenShift product line,” Chiras said. + +The deployment of Linux within a Kubernetes environment is much more complicated than in a traditional deployment. RHEL, therefore, made some key changes. The company created Red Hat Enterprise Linux CoreOS — an optimized version of RHEL for the OpenShift experience. + +“It’s deployed as an immutable. It’s tailored, narrow, and gets updated as part of your OpenShift update to provide consistent user experience and comprehensive security. + +The launch of the Red Hat Universal Base Image (UBI) offers users greater security, reliability, and performance of official Red Hat container images where OCI-compliant Linux containers run. + +“Kubernetes is a new way to deploy Linux. It really is a tight collaboration but what we’re really focused on is the customer experience. We want them to get easy updates with consistency and reliability, resilience and security. We’re pulling all of that together. With such advancements going on, it’s a fascinating space to watch,” added Chiras. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/articles/linux-and-kubernetes-serving-the-common-goals-of-enterprises/ + +作者:[Swapnil Bhartiya][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.linux.com/author/swapnil/ +[b]: https://github.com/lujun9972 +[1]: https://www.linux.com/wp-content/uploads/2019/12/computer-2930704_1280-1068x634.jpg (computer-2930704_1280) +[2]: https://www.linux.com/wp-content/uploads/2019/12/computer-2930704_1280.jpg +[3]: https://www.linkedin.com/in/stefanie-chiras-9022144/ +[4]: https://www.redhat.com/en +[5]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/8.2_release_notes/index +[6]: https://github.com/containers/skopeo From 19fc1b2822309a15529af2bf18f3bde65eeee79d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 2 May 2020 00:58:34 +0800 Subject: [PATCH 368/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200502=20Pop=20?= =?UTF-8?q?OS=2020.04=20Review:=20Best=20Ubuntu-based=20Distribution=20Jus?= =?UTF-8?q?t=20Got=20Better?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md --- ...untu-based Distribution Just Got Better.md | 232 ++++++++++++++++++ 1 file changed, 232 insertions(+) create mode 100644 sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md diff --git a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md b/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md new file mode 100644 index 0000000000..760307eeb1 --- /dev/null +++ b/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md @@ -0,0 +1,232 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Pop OS 20.04 Review: Best Ubuntu-based Distribution Just Got Better) +[#]: via: (https://itsfoss.com/pop-os-20-04-review/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +Pop OS 20.04 Review: Best Ubuntu-based Distribution Just Got Better +====== + +_**Brief: Pop OS 20.04 is an impressive Linux distribution based on Ubuntu. I review the major new features in this review and share my experience with the latest release.**_ + +Now that Ubuntu 20.04 LTS and its official flavours are here – it’s time to take a look at one of best Ubuntu-based distro i.e Pop!_OS 20.04 by [System76][1]. + +To be honest, Pop!_OS is my favorite Linux distro that I primarily use for everything I do. + +Now that Pop!_OS 20.04 has finally arrived. It’s time to take a look at what it offers and whether you should upgrade or not? + +### What’s New In Pop!_OS 20.04 LTS? + +![][2] + +Visually, Pop!_OS 20.04 LTS isn’t really very different from Pop!_OS 19.10. However, you can find several new features and improvements. + +But, if you were using **Pop!_OS 18.04 LTS**, you have a lot of things to try. + +With [GNOME 3.36][3] onboard along with some newly added features, Pop!_OS 20.04 is an exciting release. + +Overall, to give you an overview here are some key highlights: + + * Automatic Window Tiling + * New Application Switcher and Launcher + * Flatpack support added in Pop!_Shop + * GNOME 3.36 + * Linux Kernel 5.4 + * Improved hybrid graphics support + + + +While this sounds fun, let us take a look at a detailed look on what has changed and how’s the experience of Pop!_OS 20.04 so far. + +### User Experience Improvements in Pop OS 20.04 + +Undoubtedly, a lot of Linux distros offer a pleasant user experience out of the box. Likewise, [Ubuntu 20.04 LTS has had top-notch improvements and features][4] as well. + +And, when it comes to Pop!_OS by System 76, they always try to go a mile further. And, the majority of new features aim to improve the user experience by providing useful functionalities. + +Here, I’m going to take a look at some of the improvements that include [GNOME 3.36][3] and Pop!_OS-specific features. + +#### Support For System Tray Icons + +Finally! This may not be a big change – but Pop!_OS did not have the support for system tray icons (or applet icons). + +![][5] + +With 20.04 LTS release, it’s here by default. No need of any extension. + +There may not be a whole lot of programs depending on system tray icons – but it is still something important to have. + +In my case, I wasn’t able to use [ActivityWatch][6] on Pop!_OS 19.10 – but now I can. + +#### Automatic Window Tiling + +![][7] + +**Automatic Window Tiling** is something I always wanted to try – but never invested any time to set it up using a [tiling window manager][8] like [i3][9], not even with [Regolith Desktop][10]. + +With Pop!_OS 20.04, you don’t need to do that anyway. The automatic window tiling feature comes baked in without needing you to set it up. + +It also features an option to **Show Active Hint** i.e it will highlight the active window to avoid confusion. And, you can also adjust the gap between the windows. + +![][11] + +You can see it in action in their official video: + +[Subscribe to our YouTube channel for more Linux videos][12] + +And, I must say that it is one of the biggest additions on Pop!_OS 20.04 that could potentially help you multi-task more efficiently. + +Even though the feature comes in handy everytime you use it. To make the most out of it, a display screen bigger than 21-inches (at least) should be the best way to go! And, for this reason – I’m really tempted to upgrade my monitor as well! + +#### New Extensions App + +![][13] + +Pop!_OS comes baked in with some unique GNOME extensions. But, you don’t need GNOME Tweaks the manage the extension anymore. + +The newly added **Extensions** app lets you configure and manage the extensions on Pop!_OS 20.04. + +#### Improved Notification Center + +![][14] + +With the new GNOME 3.36 release, the notification center includes a revamped look. Here, I have the dark mode enabled. + +#### New Application Switcher & Launcher + +![][15] + +You can still **ALT+TAB** or **Super key + TAB** to go through the running applications. + +But, that’s time-consuming when you have a lot of things going on. So, on Pop!_OS 20.04, you get an application switcher and launcher which you can activate using **Super key + /** + +Once you get used to the keyboard shortcut, it will be very convenient thing to have. + +In addition to this, you may find numerous other subtle improvements visually with the icons/windows on Pop!_OS 20.04. + +#### New Login Screen + +Well, with GNOME 3.36, it’s an obvious change. But, it does look good! + +![][16] + +### Flatpak Support on Pop!_Shop + +Normally, Pop!_Shop is already something useful with a huge repository along with [Pop!_OS’s own repositories.][17] + +Now, with Pop!_OS 20.04, you can choose to install either Flatpak (via Flathub) or the Debian package of any available software on Pop!_Shop. Of course, only if a Flatpak package exists for the particular software. + +You might want to check [how to use Flatpak on Linux][18] if you don’t have Pop!_OS 20.04. + +![][19] + +Personally, I’m not a fan of Flatpak but some applications like GIMP requires you to install the Flatpak package to get the latest version. So, it is definitely a good thing to have the support for Flatpak on Pop!_Shop baked right into it. + +### Keyboard Shortcut Changes + +This can be annoying if you’re comfortable with the existing keyboard shortcuts on Pop!_OS 19.10 or older. + +In either case, there are a few important keyboard shortcut changes to potentially improve your experience, here they are: + + * Lock Screen: **Super + L** _changed to_ **Super + Escape** + * Move Workspace: **Super + Up/Down Arrow** _changed to_ **Super + CTRL + Up/Down Arrow** + * Close Window: **Super + W** _changed_ to **Super + Q** + * Toggle Maximize: **Super + Up Arrow** _changed to_ **Super + M** + + + +### Linux Kernel 5.4 + +Similar to most of the other latest Linux distros, Pop!_OS 20.04 comes loaded with [Linux Kernel 5.4][20]. + +So, obviously, you can expect the [exFAT support][21] and an improved AMD graphics compatibility along with all the other features that come with it. + +### Performance Improvements + +Even though Pop!_OS doesn’t pitch itself as a lightweight Linux distro, it is still a resource-efficient distro. And, with GNOME 3.36 onboard, it should be fast enough. + +Considering that I’ve been using Pop!_OS as my primary distro for about a year, I’ve never had any performance issues. And, this is how the resource usage will probably look like (depending on your system configuration) after you install Pop!_OS 20.04. + +![][22] + +To give you an idea, my desktop configuration involves an i5-7400 processor, 16 GB RAM (2400 MHz), NVIDIA GTX 1050ti graphics card, and an SSD. + +I’m not really a fan of system benchmarks because it does not really give you the idea of how a specific application or a game would perform unless you try it. + +You can try the [Phoronix Test Suite][23] to analyze how your system performs. But, Pop!_OS 20.04 LTSshould be a snappy experience! + +### Package Updates & Other Improvements + +While every Ubuntu-based distro benefits from the [improvements in Ubuntu 20.04 LTS][4], there are some Pop OS specific bug fixes and improvements as well. + +In addition to it, some major apps/packages like **Firefox 75.0** have been updated to their latest version. + +As of now, there should be no critical bugs present and at least none for me. + +You can check out their [development progress on GitHub][24] to check the details of issues they’ve already fixed during the beta testing and the issues they will be fixing right after the release. + +### Download & Support Pop!_OS 20.04 + +![][25] + +With this release, System76 has finally added a subscription model (optional) to support Pop!_OS development. + +You can download **Pop!_OS 20.04** for free – but if you want to support them I’d suggest you go for the subscription with just **$1/month**. + +[Pop!_OS 20.04][26] + +### My Thoughts on Pop OS 20.04 + +I must mention that I was rooting for a fresh new wallpaper with the latest 20.04 release. But, that’s not a big deal. + +With the window tiling feature, flatpak support, and numerous other improvements, my experience with Pop!_OS 20.04 has been top-notch so far. Also, it’s great to see that they are highlighting their focus on creative professionals with out-of-the-box support for some popular software. + +![][27] + +All the good things about Ubuntu 20.04 and some extra toppings on it by System76, I’m impressed! + +_**Have you tried the Pop!_OS 20.04 yet? Let me know your thoughts in the comments below.**_ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/pop-os-20-04-review/ + +作者:[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://system76.com +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/pop_os_20_04_review.jpg?ssl=1 +[3]: https://itsfoss.com/gnome-3-36-release/ +[4]: https://itsfoss.com/ubuntu-20-04-release-features/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/system-tray-icons-pop-os.jpg?ssl=1 +[6]: https://activitywatch.net/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-automatic-screen-tiling.png?ssl=1 +[8]: https://en.wikipedia.org/wiki/Tiling_window_manager +[9]: https://i3wm.org/ +[10]: https://itsfoss.com/regolith-linux-desktop/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/tile-feature-options-popos.jpg?ssl=1 +[12]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-extensions.jpg?ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/notification-center-pop-os.jpg?ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-application-launcher.jpg?ssl=1 +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-20-04-lock-screen.jpg?ssl=1 +[17]: https://launchpad.net/~system76/+archive/ubuntu/pop +[18]: https://itsfoss.com/flatpak-guide/ +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-flatpak-deb.jpg?ssl=1 +[20]: https://itsfoss.com/linux-kernel-5-4/ +[21]: https://itsfoss.com/mount-exfat/ +[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/pop-os-20-04-performance.jpg?ssl=1 +[23]: https://www.phoronix-test-suite.com/ +[24]: https://github.com/orgs/pop-os/projects/13 +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/support-pop-os.jpg?ssl=1 +[26]: https://pop.system76.com/ +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/pop-os-stem-focus.jpg?ssl=1 From 432ad8d1c6a54c315091b14fbb7d5e88afc5272d Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 2 May 2020 01:00:57 +0800 Subject: [PATCH 369/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200501=20Transp?= =?UTF-8?q?arent,=20open=20source=20alternative=20to=20Google=20Analytics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200501 Transparent, open source alternative to Google Analytics.md --- ... source alternative to Google Analytics.md | 123 ++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 sources/tech/20200501 Transparent, open source alternative to Google Analytics.md diff --git a/sources/tech/20200501 Transparent, open source alternative to Google Analytics.md b/sources/tech/20200501 Transparent, open source alternative to Google Analytics.md new file mode 100644 index 0000000000..d4ce222a39 --- /dev/null +++ b/sources/tech/20200501 Transparent, open source alternative to Google Analytics.md @@ -0,0 +1,123 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Transparent, open source alternative to Google Analytics) +[#]: via: (https://opensource.com/article/20/5/plausible-analytics) +[#]: author: (Marko Saric https://opensource.com/users/markosaric) + +Transparent, open source alternative to Google Analytics +====== +Plausible Analytics is a leaner, more transparent option, with the +essential data you need but without all the privacy baggage. +![Digital creative of a browser on the internet][1] + +Google Analytics is the most popular website analytics tool. Millions of developers and creators turn to it to collect and analyze their website statistics. + +More than 53% of all sites on the web track their visitors using Google Analytics. [84%][2] of sites that do use a known analytics script use Google Analytics. + +Google Analytics has, for years, been one of the first tools I installed on a newly launched site. It is a powerful and useful analytics tool. Installing Google Analytics was a habit I didn't think much about until the introduction of the [GDPR][3] (General Data Protection Regulation) and other privacy regulations. + +Using Google Analytics these days comes with several pitfalls, including the need for a privacy policy, the need for cookie banners, and the need for a GDPR consent prompt. All these may negatively impact the site loading time and visitor experience. + +This has made me try to [de-Google-ify websites][4] that I work on, and it's made me start working on independent solutions that are open source and more privacy-friendly. This is where Plausible Analytics enters the story. + +[Plausible Analytics][5] is an open source and lightweight alternative to Google Analytics. It doesn't use cookies and it doesn't collect any personal data, so you don't need to show any cookie banners or get GDPR or CCPA consent. Let's take a closer look. + +### Main differences between Google Analytics and Plausible + +Plausible Analytics is not designed to be a clone of Google Analytics. It is meant as a simple-to-use replacement and a privacy-friendly alternative. Here are the main differences between the two web analytics tools: + +#### Open source vs. closed source + +Google Analytics may be powerful and useful, but it is closed source. It is a proprietary tool run by one of the largest companies in the world, a company that is a key player in the ad-tech industry. There's simply no way of knowing what's going on behind the scenes. You have to put your trust in Google. + +Plausible is a fully open source tool. You can read our code [on GitHub][6]. We're "open" in other ways, too, such as our [public roadmap][7], which is based around the feedback and features submitted by the members of our community. + +#### Privacy of your website visitors + +Google Analytics places [several cookies][8] on the devices of your visitors, and it tracks and collects a lot of data. This means that there are several requirements if you want to use Google Analytics and be compliant with the different regulations: + + * You need to have a privacy policy about analytics + * You need to show a cookie banner + * You need to obtain a GDPR/CCPA consent + + + +Plausible is made to be fully compliant with the privacy regulations. No cookies are used, and no personal data is collected. This means that you don't need to display the cookie banner, you don't need a privacy policy, and you don't need to ask for the GDPR/CCPA consent when using Plausible. + +#### Page weight and loading time + +The recommended way of installing Google Analytics is to use the Google Tag Manager. Google Tag Manager script weights 28 KB, and it downloads another JavaScript file called the Google Analytics tag, which adds an additional 17.7 KB to your page size. That's 45.7 KB of page weight combined. + +Plausible script weights only 1.4 KB. That's 33 times smaller than the Google Analytics Global Site Tag. Every KB matters when you want to keep your site fast to load. + +#### Accuracy of visitor stats + +Google Analytics is being blocked by an increasing number of web users. It's blocked by those who use open source browsers such as [Firefox][9] and [Brave][10]. It's also blocked by those who use open source browser add-ons such as the [uBlock Origin][11]. It's not uncommon to see 40% or more of the audience on a tech site blocking Google Analytics. + +Plausible is a new player on this market and it's privacy-friendly by default, so it doesn't see the same level of blockage. + +#### Simple vs. complex web analytics + +[Google Analytics is overkill][12] for many website owners. It's a complex tool that takes time to understand and requires training. Google Analytics presents hundreds of different reports and metrics for you to get insights from. Many users end up creating custom dashboards while ignoring all the rest. + +Plausible cuts through all the noise that Google Analytics creates. It presents everything you need to know on one single page—all the most valuable metrics at a glance. You can get an overview of the most actionable insights about your website in one minute. + +### A guided tour of Plausible Analytics + +Plausible Analytics is not a full-blown replacement and a feature-by-feature reproduction of Google Analytics. It's not designed for all the different use-cases of Google Analytics. + +It's built with simplicity and speed in mind. There is no navigational menu. There are no additional sub-menus. There is no need to create custom reports. You get one simple and useful web analytics dashboard out of the box. + +Rather than tracking every metric imaginable, many of them that you will never find a use for, Plausible focuses on the essential website stats only. It is easy to use and understand with no training or prior experience: + +![Plausible analytics in action][13] + + * Choose the time range that you want to analyze. The visitor numbers are automatically presented on an hourly, daily, or monthly graph. The default time frame is set at the last 30 days. + * See the number of unique visitors, total page views, and the bounce rate. These metrics include a percentage comparison to the previous time period, so you understand if the trends are going up or down. + * See all the referral sources of traffic and all the most visited pages on your site. Bounce rates of the individual referrals and pages are included too. + * See the list of countries your traffic is coming from. You can also see the device, browser, and operating system your visitors are using. + * Track events and goals to identify the number of converted visitors, the conversion rate, and the referral sites that send the best quality traffic. + + + +Take a look at the [live demo][14] where you can follow the traffic to the Plausible website. + +### Give Plausible Analytics a chance + +With Plausible Analytics, you get all the important web analytics at a glance so you can focus on creating a better site without needing to annoy your visitors with all the different banners and prompts. + +You can try Plausible Analytics on your site alongside Google Analytics. [Register today][15] to try it out, and see what you like and what you don't. Share your feedback with the community. This helps us learn and improve. We'd love to hear from you. + +Take a look at five great open source alternatives to Google Docs. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/5/plausible-analytics + +作者:[Marko Saric][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/markosaric +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://w3techs.com/technologies/details/ta-googleanalytics +[3]: https://gdpr-info.eu/ +[4]: https://markosaric.com/degoogleify/ +[5]: https://plausible.io/ +[6]: https://github.com/plausible-insights/plausible +[7]: https://feedback.plausible.io/roadmap +[8]: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage +[9]: https://www.mozilla.org/en-US/firefox/new/ +[10]: https://brave.com/ +[11]: https://github.com/gorhill/uBlock +[12]: https://plausible.io/vs-google-analytics +[13]: https://opensource.com/sites/default/files/plausible-analytics.png (Plausible analytics in action) +[14]: https://plausible.io/plausible.io +[15]: https://plausible.io/register From b994526987b2789220543819caf9c654ce35110a Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sat, 2 May 2020 01:04:15 +0800 Subject: [PATCH 370/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200501=20Red=20?= =?UTF-8?q?Hat=20Summit=202020=20virtual=20experience?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/talk/20200501 Red Hat Summit 2020 virtual experience.md --- ... Red Hat Summit 2020 virtual experience.md | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 sources/talk/20200501 Red Hat Summit 2020 virtual experience.md diff --git a/sources/talk/20200501 Red Hat Summit 2020 virtual experience.md b/sources/talk/20200501 Red Hat Summit 2020 virtual experience.md new file mode 100644 index 0000000000..334c52c1f9 --- /dev/null +++ b/sources/talk/20200501 Red Hat Summit 2020 virtual experience.md @@ -0,0 +1,64 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Red Hat Summit 2020 virtual experience) +[#]: via: (https://www.networkworld.com/article/3541289/red-hat-summit-2020-virtual-experience.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +Red Hat Summit 2020 virtual experience +====== + +[Virginiambe][1] [(CC BY-SA 3.0)][2] + +In the last couple days, Red Hat was able to demonstrate that an online technical conference can succeed. The Summit, normally held in Boston or San Francisco, was held online thanks to the Covid-19 pandemic still gripping the world. + +The fact that 80,000 people attended the online event warrants a huge applause. By comparison, last year’s in-person conference broke the record with only 8,900 attendees. + +[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] + +### **Being “there”** + +The experience of attending the conference was in many ways what you would expect when attending a large conference in person. There were keynotes, general sessions and breakout sessions. There were many opportunities to ask questions. And it was often difficult but necessary to choose between parallel sessions. I attended both days and was very impressed. + +I also enjoyed some nostalgia about how we’ve all arrived at the places we are today with respect to Linux. It was clear that many attendees were overwhelmed by the progress that has been made just since last year. Linux, and [RHEL][4] in particular, is becoming more innovative, more clever in the ways that it can detect and respond to problems and yet in some important ways easier to manage because of the way the tools have evolved. + +Announcements at the conference included Red Hat OpenShift 4.4, OpenShift virtualization and Red Hat Advanced Container Management for Kubernetes. + +What was novel about attending a technical conference online was that we didn’t have to leave our home or office and that we could review sessions that we missed by selecting them later from the session layout pages. In fact, the sessions are still online and may well be for the coming year. If you didn’t participate in Red Hat Summit 2020, you can still sign up and you can still watch the sessions at your convenience. Just go to the [summit site][5]. And, did I mention, that it's free? + +### Catching up + +Once you’re signed up, you can click on the Watch and Learn at the top of the page and choose General Sessions or Sessions and Labs. The presentations will now all be labeled On Demand though they once displayed upcoming time slots. The individuals presenting information are excellent and the material is exciting. Even if you’re not working with Red Hat Enterprise Linux, you will learn a lot about Linux in general and how open source has evolved over the decades and is still evolving in important and critical ways. + +Topics covered at the conference include OpenShift, open hybrid cloud, future technologies, robotics and automation, advances on the edge and the power of open source. Red Hat Summit also includes joint sessions with both Red Hat and technology collaborators such as Ford, Verizon, Intel, Microsoft and Credit Suisse. + +### What’s next? + +Watching the conference online at a time when I can't leave my home was informative, but also encouraging and comforting. Linux has been an important part of my life for decades. It felt good to be connected to the larger community and to sense the currents of progress through my desktop system. + +While there’s no way to know at this point whether future Red Hat Summits or other Linux conferences will be held or made available online, the fact that Red Hat Summit 2020 was available online when so many of us are still huddled up at home wondering when our world will reopen was a testament not just to great technology but to the deep-seated conviction that it is critical that we work together and that open source can make that happen in ways that nothing else can. + +Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3541289/red-hat-summit-2020-virtual-experience.html + +作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://commons.wikimedia.org/wiki/File:Red_hat_with_bow2.JPG +[2]: https://creativecommons.org/licenses/by-sa/3.0/legalcode +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html +[5]: https://www.redhat.com/summit +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world From 374267ef01a8658d23a722ab96b6a0a88c4f90d8 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sat, 2 May 2020 10:08:12 +0800 Subject: [PATCH 371/394] Almost done --- ...high-performance computing as a service.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md index fc36ff7082..cb7e33856a 100644 --- a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md +++ b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md @@ -83,42 +83,42 @@ With clever system design, you can integrate those HPC-services bursts of activi ** Use of HPC services lends itself to batch-processing and loosely-coupled use cases. That ties into a common HPC downside: data transfer issues. High-performance computing by its very nature often involves huge data sets, and sending all that information over the internet to a cloud service provider is no simple thing. "We have clients I talk to in the biotech industry who spend $10 million a month on just the data charges," says IBM's Turek. -HPC服务的使用适合批处理和松散耦合的用例。这与HPC的常见缺点有关:数据传输问题。从本质上讲,高性能计算通常涉及庞大的数据集,而将所有这些信息通过Internet发送到云服务提供商并不是一件容易的事。 IBM的Turek说:“我们与生物技术行业的客户交流,他们每月仅在数据费用上就花费1000万美元。” +HPC服务适合批处理和松耦合的场景。这与HPC的普遍缺点有关:数据传输问题。高性能计算本身通常涉及庞大的数据集,而将所有这些信息通过Internet发送到云服务提供商并不容易。IBM的Turek说:“我们与生物技术行业的客户交流,他们每月仅在数据费用上就花费1000万美元。” And money isn't the only potential problem. Building a workflow that makes use of your data can challenge you to work around the long times required for data transfer. "When we had our own HPC cluster, local access to the simulation results already produced – and thus an interactive interim evaluation — was of course possible at any time," says hhpberlin's Kilian. "We're currently working on being able to access and evaluate the data produced in the cloud even more efficiently and interactively at any desired time of the simulation without the need to download large amounts of simulation data." -金钱并不是唯一的潜在问题。建立一个利用您的数据的工作流程可能会挑战您在数据传输所需的长时间内工作。 hhpberlin的Kilian说:“当我们拥有自己的HPC集群时,当然可以随时本地访问已经产生的仿真结果,从而进行交互式的临时评估。” “我们目前正在努力,能够在任何所需的模拟时间更高效,交互地访问和评估云中生成的数据,而无需下载大量的模拟数据。” +钱并不是唯一的潜在问题。已制定的需要使用数据的工作流可能会使您在数据传输所需的时间内无法工作。hhpberlin的Kilian说:“当我们拥有自己的HPC集群时,当然可以随时访问已经产生的仿真结果,从而进行交互式的临时评估。” “我们目前正努力达到在仿真的任意时刻都可以更高效地,交互地访问和评估云中生成的数据,而无需下载大量的模拟数据。” Mike Krawczyk cites another stumbling block: compliance issues. Any service a defense contractor uses needs to be complaint with the International Traffic in Arms Regulations (ITAR), and McCormick Stevenson went with Rescale in part because it was the only vendor they found that checked that box. While more do today, any company looking to use cloud services should be aware of the legal and data-protection issues involved in living on someone else's infrastructure, and the sensitive nature of many of HPC's use cases makes this doubly true for HPC as a service. -Mike Krawczyk提到了另一个绊脚石:合规性问题。国防承包商使用的任何服务都需要向《国际武器交易条例》(ITAR)进行投诉,麦考密克·史蒂文森(McCormick Stevenson)之所以选择Rescale,部分原因是这是他们发现该复选框的唯一供应商。如今,尽管有更多的公司这样做,但任何希望使用云服务的公司都应该意识到生活在其他人的基础架构上所涉及的法律和数据保护问题,而且许多HPC用例的敏感性质使得这对于HPC即服务而言是双重事实。 。 +Mike Krawczyk提到了另一个绊脚石:合规性问题。国防承包商使用的任何服务都需要遵从(原文是complaint, 应该是笔误)《国际武器交易条例》(ITAR),麦考密克·史蒂文森(McCormick Stevenson)之所以选择Rescale,部分原因是因为这是他们发现的唯一符合的供应商。如今,尽管有更多的公司(使用云服务),但任何希望使用云服务的公司都应该意识到使用其他人的基础设施时所涉及的法律和数据保护问题,而且许多HPC场景的敏感性使得更HPC即服务的这个问题更加突出。 In addition, the IT governance that HPC services require goes beyond regulatory needs. For instance, you'll need to keep track of whether your software licenses permit cloud use ­– especially with specialized software packages written to run on an on-premises HPC cluster. And in general, you need to keep track of how you use HPC services, which can be a tempting resource, especially if you've transitioned from in-house systems where staff was used to having idle HPC capabilities available. For instance, Ron Gilpin, senior director and Azure Platform Services global lead at Avanade, suggests dialing back how many processing cores you use for tasks that aren't time sensitive. "If a job only needs to be completed in an hour instead of ten minutes," he says, "that might use 165 processors instead of 1,000, a savings of thousands of dollars." -此外,HPC服务所需的IT治理超出了监管需求。例如,您需要跟踪您的软件许可证是否允许云使用­ –尤其是针对专门编写在本地HPC群集上运行的软件包。通常,您需要跟踪HPC服务的使用方式,这可能是一个诱人的资源,尤其是当您从习惯于工作人员的内部系统过渡到具有可用的空闲HPC功能时。例如,Avanade全球平台高级主管兼Azure平台服务全球负责人Ron Gilpin建议,回拨您用于非时间敏感任务的处理核心数量。他说:“如果一项工作只需要一个小时而不是十分钟就可以完成,那么它可以使用165个处理器而不是1,000个,从而节省了数千美元。” +此外,HPC服务所需的IT治理超出了目前的监管范围。例如,您需要跟踪您的软件许可证是否允许云使用­ –尤其是专门为本地HPC群集上运行而编写的软件包。通常,您需要跟踪HPC服务的使用方式,它可能是一个诱人的资源,尤其是当您从员工习惯的内部系统过渡到有可用的空闲的HPC能力时。例如,Avanade全球平台高级主管兼Azure平台服务全球负责人Ron Gilpin建议,回调您用于时间不敏感任务的处理核心数量。他说:“如果一项工作只需要用一小时来完成而不需要在十分钟内就完成,那么它可以使用165个处理器而不是1,000个,从而节省了数千美元。” -### A premium on HPC skills** +### A premium on HPC skills** 独特的HPC技能 ** One of the biggest barriers to HPC adoption has always been the unique in-house skills it requires, and HPC services don't magically make that barrier vanish. "Many CIOs have migrated a lot of their workloads into the cloud and they have seen cost savings and increased agility and efficiency, and believe that they can achieve similar results in HPC ecosystems," says Gartner's Dekate. "And a common misperception is that they can somehow optimize human resource cost by essentially moving away from system admins and hiring new cloud experts who can solve their HPC workloads." -一直以来,采用HPC的最大障碍之一就是其所需的独特内部技能,而HPC服务并不能使这种障碍消失。 Gartner的Dekate表示:“许多CIO将许多工作负载迁移到了云中,他们看到了节省成本,提高敏捷性和效率的信念,并且相信他们可以在HPC生态系统中实现类似的结果。” “一个普遍的误解是,他们可以从本质上远离系统管理员,并聘用可以解决其HPC工作负载的新云专家,从而以某种方式优化人力资源成本。” +一直以来,采用HPC的最大障碍之一就是其所需的独特的内部技能,而HPC服务并不能使这种障碍消失。Gartner的Dekate表示:“许多CIO将许多工作负载迁移到了云上,他们看到了成本的节约,敏捷性和效率的提升,因此相信在HPC生态中也可以达成类似的效果。” “一个普遍的误解是,他们可以通过彻底地免去系统管理员,并聘用能解决其HPC工作负载的新的云专家,从而以某种方式优化人力成本。” "But HPC is not one of the main enterprise environments," he says. "You're dealing with high-end compute nodes interconnected with high-bandwidth, low-latency networking stacks, along with incredibly complicated application and middleware stacks. Even the filesystem layers in many cases are unique to HPC environments. Not having the right skills can be destabilizing." -他说:“但是HPC并不是主要的企业环境之一。” “您正在处理与高带宽,低延迟网络堆栈以及难以置信的复杂应用程序和中间件堆栈互连的高端计算节点。在许多情况下,甚至文件系统层也是HPC环境所独有的。没有适当的技能 可能会破坏稳定。” +“但是HPC并不是主流的企业环境之一。” 他说。“您正在处理通过高带宽,低延迟的网络互联的高端计算节点,以及相当复杂的应用和中间件技术栈。许多情况下,甚至连文件系统层也是HPC环境所独有的。没有对应的技能可能会破坏稳定性。” But supercomputing skills are in shortening supply, something Dekate refers to as the workforce "greying," in the wake of a generation of developers going to splashy startups rather than academia or the more staid firms where HPC is in use. As a result, vendors of HPC services are doing what they can to bridge the gap. IBM's Turek says that many HPC vets will always want to roll their own exquisitely fine-tuned code and will need specialized debuggers and other tools to help them do that for the cloud. But even HPC newbies can make calls to code libraries built by vendors to exploit supercomputing's parallel processing. And third-party software providers sell turnkey software packages that abstract away much of HPC's complication. -但是超级计算技术却在缩短供应,Dekate将其称为劳动力“灰色”,这是因为一代开发人员将目光投向了新兴的初创公司,而不是学术界或使用HPC的更老套的公司。结果,HPC服务的供应商正在尽其所能弥合差距。 IBM的Turek表示,许多HPC兽医将始终希望推出他们自己精心调整过的代码,并且将需要专门的调试器和其他工具来帮助他们在云中实现这一目标。但是,即使是HPC新手也可以调用供应商构建的代码库,以利用超级计算的并行处理。第三方软件提供商出售的交钥匙软件包可以消除许多HPC复杂性。 +但是超级计算技能的供给却在减少,Dekate将其称为劳动力“灰化”,这是因为一代开发人员将目光投向了新兴的初创公司,而不是学术界或使用HPC的更老套的公司。因此,HPC服务供应商正在尽其所能地弥补差距。 IBM的Turek表示,许多HPC老手将总是想运行他们自己精心调整过的代码,将需要专门的调试器和其他工具来帮助他们在云上实现这一目标。但是,即使是HPC新手也可以调用供应商构建的代码库,以利用超级计算的并行处理能力。第三方软件提供商出售的交钥匙软件包可以减少HPC的许多复杂性。 Accenture's Tung says the sector needs to lean further into this in order to truly prosper. "HPCaaS has created dramatically impactful new capability, but what needs to happen is making this easy to apply for the data scientist, the enterprise architect, or the software developer," she says. "This includes easy to use APIs, documentation, and sample code. It includes user support to answer questions. It’s not enough to provide an API; that API needs to be fit-for-purpose. For a data scientist this should likely be in Python and easily change out for the frameworks she is already using. The value comes from enabling these users who ultimately will have their jobs improved through new efficiencies and performance, if only they can access the new capabilities." If vendors can pull that off, HPC services might truly bring supercomputing to the masses. -埃森哲的董先生表示,该行业需要进一步倾斜才能真正繁荣。她说:“ ​​HPCaaS已经创建了具有重大影响力的新功能,但是需要做的是使它易于应用于数据科学家,企业架构师或软件开发人员。” “这包括易于使用的API,文档和示例代码。它包含用户回答问题的支持。仅提供API是不够的; API需要适合特定用途。对于数据科学家而言,这可能应该包含在其中。使用Python并轻松地更改她已经在使用的框架。其价值来自使这些用户能够获得新的效率和性能,只要他们能够使用新功能,他们最终将通过新的效率和性能来改善他们的工作。”如果供应商能够做到这一点,那么HPC服务可能真正将超级计算带入大众。 +埃森哲的Tung表示,该行业需要进一步加大投入才能真正繁荣。她说:“HPCaaS已经创建了具有重大影响力的新功能,但还需要做的是使它易于被数据科学家,企业架构师或软件开发人员使用。这包括易用的API,文档和示例代码。它包括用户支持来解答问题。仅仅提供API是不够的,API需要适合特定的用途。对于数据科学家而言,这可能是以python形式提供,并容易更换她已经在使用的框架。其价值来自使这些用户最综只有在使用新功能时才能够改进效率和性能。” 如果供应商能够做到这一点,那么HPC服务才能真正将超级计算带给大众。 Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. -加入[Facebook] [3]和[LinkedIn] [4]上的Network World社区,以评论最重要的主题。 +加入[Facebook][3]和[LinkedIn][4]上的Network World社区,探讨最前沿的话题。 -------------------------------------------------------------------------------- via: https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html 作者:[Josh Fruhlinger][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[messon007](https://github.com/messon007) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 251b38d0bbfe2711b498dfd2832e7dfd7756f2a7 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sat, 2 May 2020 10:15:45 +0800 Subject: [PATCH 372/394] Remove original --- ...high-performance computing as a service.md | 54 +++++-------------- 1 file changed, 12 insertions(+), 42 deletions(-) diff --git a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md index cb7e33856a..df2c6debd3 100644 --- a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md +++ b/sources/talk/20200401 The ins and outs of high-performance computing as a service.md @@ -7,110 +7,80 @@ [#]: via: (https://www.networkworld.com/article/3534725/the-ins-and-outs-of-high-performance-computing-as-a-service.html) [#]: author: (Josh Fruhlinger https://www.networkworld.com/author/Josh-Fruhlinger/) -The ins and outs of high-performance computing as a service 高性能计算即服务的来龙去脉 +高性能计算即服务的来龙去脉 ====== -HPC services can be a way to meet expanding supercomputing needs, but depending on the use case, they’re not necessarily better than on-premises supercomputers. -Dell EMC 高性能计算(HPC)服务可能是一种满足不断增长的超级计算需求的方式,但依赖于使用场景,它们不一定比使用本地超级计算机好。 -Electronics on missiles and military helicopters need to survive extreme conditions. Before any of that physical hardware can be deployed, defense contractor McCormick Stevenson Corp. simulates the real-world conditions it will endure, relying on finite element analysis software like Ansys, which requires significant computing power. + 戴尔EMC 导弹和军用直升机上的电子设备需要工作在极端条件下。国防承包商麦考密克·史蒂文森公司(McCormick Stevenson Corp.)在部署任何物理设备之前都会事先模拟它所能承受的真实条件。模拟依赖于像Ansys这样的有限元素分析软件,该软件需要强大的算力。 -Then one day a few years ago, it unexpectedly ran up against its computing limits. 几年前的一天,它出乎意料地超出了计算极限。 -[10 of the world's fastest supercomputers][1] [世界上最快的10个超级计算机][1] -"We had some jobs that would have overwhelmed the computers that we had in office," says Mike Krawczyk, principal engineer at McCormick Stevenson. "It did not make economic or schedule sense to buy a machine and install software." Instead, the company contracted with Rescale, which could sell them cycles on a supercomputer-class system for a tiny fraction of what they would've spent on new hardware. 麦考密克·史蒂文森(McCormick Stevenson)的首席工程师迈克·克劳奇奇(Mike Krawczyk)说:“我们的一些工作会使办公室的计算机不堪重负。” “购买机器并安装软件在经济上或计划上都不划算。” 相反,该公司与Rescale签约,从其购买在超级计算机系统上运行的周期(cycles),而这只花费了他们购买新硬件上所需的一小部分。 -McCormick Stevenson had become an early adopter in a market known as supercomputing as a service or high-performance computing (HPC) as a service – two terms that are closely related. HPC is the application of supercomputers to computationally complex problems, while supercomputers are those computers at the cutting edge of processing capacity, according to the National Institute for Computational Sciences. 麦考密克·史蒂文森(McCormick Stevenson)已成为被称为超级计算即服务或高性能计算(HPC)即服务(两个紧密相关的术语)市场的早期采用者之一。根据国家计算科学研究所(的定义),HPC是超级计算机在计算复杂问题上的应用,而超级计算机是处理能力最先进的那些计算机。 -Whatever it's called, these services are upending the traditional supercomputing market and bringing HPC power to customers who could never afford it before. But it's no panacea, and it's definitely not plug-and-play – at least not yet. 无论叫它什么,这些服务都在颠覆传统的超级计算市场,并将HPC能力带给以前买不起的客户。但这不是万能的,而且绝对不是即插即用的,至少现在还不是。 -### HPC services in practice HPC服务实践 +### HPC服务实践 -From the end user's perspective, HPC as a service resembles the batch-processing model that dates back to the early mainframe era. "We create an Ansys batch file and send that up, and after it runs, we pull down the result files and import them locally here," Krawczyk says. 从最终用户的角度来看,HPC即服务类似于早期大型机时代的批处理模型。 “我们创建一个Ansys批处理文件并将其发送过去,运行它,然后将结果文件取下来并在本地导入它们,” Krawczyk说。 -Behind the scenes, cloud providers are running the supercomputing infrastructure in their own data centers – though that doesn't necessarily imply the sort of cutting-edge hardware you might be visualizing when you hear "supercomputer." As Dave Turek, Vice President of Technical Computing at IBM OpenPOWER, explains it, HPC services at their core are "a collection of servers that are strung together with an interconnect. You have the ability to invoke this virtual computing infrastructure that allows you to bring a lot of different servers to work together in a parallel construct to solve the problem when you present it." 在HPC服务背后,云提供商在其自己的数据中心中运行超级计算基础设施,尽管这不一定意味着当您听到“超级计算机”时你就会看到最先进的硬件。正如IBM OpenPOWER计算技术副总裁Dave Turek解释的那样,HPC服务的核心是“相互互连的服务器集合。您可以调用该虚拟计算基础设施,它能够在您提出问题时,使得许多不同的服务器并行工作来解决问题。” [][2] -Sounds simple in theory. But making it viable in practice required some chipping away at technical problems, according to Theo Lynn, Professor of Digital Business at Dublin City University. What differentiates ordinary computing from HPC is those interconnects – high-speed, low-latency, and expensive – so those needed to be brought to the world of cloud infrastructure. Storage performance and data transport also needed to be brought up to a level at least in the same ballpark as on-prem HPC before HPC services could be viable. -理论上听起来很简单。但都柏林城市大学数字业务教授西奥·林恩(Theo Lynn)表示,要使其在实践中可行,需要解决一些技术问题。普通计算与HPC的区别在于那些互连-高速的,低延时的而且昂贵的-因此需要将这些互连引入云基础设施领域。在HPC服务可行之前,至少需要将存储性能和数据传输也提升到与本地HPC相同的水平。 +理论听起来很简单。但都柏林城市大学数字业务教授西奥·林恩(Theo Lynn)表示,要使其在实践中可行,需要解决一些技术问题。普通计算与HPC的区别在于那些互连-高速的,低延时的而且昂贵的-因此需要将这些互连引入云基础设施领域。在HPC服务可行之前,至少需要将存储性能和数据传输也提升到与本地HPC相同的水平。 -But Lynn says that some of the innovations that have helped HPC services take off have been more institutional than technological. In particular, "we are now seeing more and more traditional HPC applications adopting cloud-friendly licensing models – a barrier to adoption in the past." 但是林恩说,一些制度创新相比技术更好的帮助了HPC服务的起飞。特别是,“我们现在看到越来越多的传统HPC应用采用云友好的许可模式-过去是采用这种模式的障碍。” -And the economics have also shifted the potential customer base, he says. "Cloud service providers have opened up the market more by targeting low-end HPC buyers who couldn’t afford the capex associated with traditional HPC and opening up the market to new users. As the markets open up, the hyperscale economic model becomes more and more feasible, costs start coming down." 他说,经济也改变了潜在的客户群。 “云服务提供商通过向那些负担不起传统HPC所需的投资成本的低端HPC买家开放,进一步开放了市场。随着市场的开放,超大规模经济模型变得越来越多,更可行,成本开始下降。” -Avoid on-premises CAPEX** 避免本地资本支出** +避免本地资本支出** ** -HPC services are attractive to private-sector customers in the same fields where traditional supercomputing has long held sway. These include sectors that rely heavily on complex mathematical modeling, including defense contractors like McCormick Stevenson, along with oil and gas companies, financial services firms, and biotech companies. Dublin City University's Lynn adds that loosely coupled workloads are a particularly good use case, which meant that many early adopters used it for 3D image rendering and related applications. HPC服务对有志于传统超级计算长期把持的领域的私营行业客户具有吸引力。这些客户包括严重依赖复杂数学模型的行业,包括麦考密克·史蒂文森(McCormick Stevenson)等国防承包商,以及油气公司,金融服务公司和生物技术公司。都柏林城市大学的Lynn补充说,松耦合的工作负载是一个特别好的用例,这意味着许多早期采用者将其用于3D图像渲染和相关应用。 -But when does it make sense to consider HPC services over on-premises HPC? For hhpberlin, a German company that simulates smoke propagation in and fire damage to structural components of buildings, the move came as it outgrew its current resources. 但是,何时考虑HPC服务而不是本地HPC才有意义?对于德国的模拟烟雾在建筑物中的蔓延和火灾对建筑物结构部件的破坏的hhpberlin公司来说,答案是在它超出了其现有资源时。 -"For several years, we had run our own small cluster with up to 80 processor cores," says Susanne Kilian, hhpberlin's scientific head of numerical simulation. "With the rise in application complexity, however, this constellation has increasingly proven to be inadequate; the available capacity was not always sufficient to handle projects promptly." Hpberlin公司数值模拟的科学负责人Susanne Kilian说:“几年来,我们一直在运行自己的小型集群,该集群具有多达80个处理器核。” “但是,随着应用复杂性的提高,这种架构(constellation)已经越来越不足以支撑;可用容量并不总是够快速地处理项目。” -But just spending money on a new cluster wasn't an ideal solution, she says: "In view of the size and administrative environment of our company, the necessity of constant maintenance of this cluster (regular software and hardware upgrades) turned out to be impractical. Plus, the number of required simulation projects is subject to significant fluctuations, such that the utilization of the cluster was not really predictable. Typically, phases with very intensive use alternate with phases with little to no use." By moving to an HPC service model, hhpberlin shed that excess capacity and the need to pay up front for upgrades. 她说:“但是,仅仅花钱买一个新的集群并不是一个理想的解决方案:鉴于我们公司的规模和管理环境,强制持续维护该集群(定期进行软件和硬件升级)是不现实的。另外,需要模拟的项目数量会出现很大的波动,因此集群的利用率并不是真正可预测的。通常,使用率很高的阶段与很少使用或不使用的阶段交替出现。”通过转换为HPC服务模式,hhpberlin释放了过剩的容量,并无需支付升级费用。 -IBM's Turek explains the calculus that different companies go through while assessing their needs. For a biosciences startup with 30 people, "you need computing, but you really can't afford to have 15% of your staff dedicated to it. It's just like you might also say you don't want to have on-staff legal representation, so you'll get that as a service as well." For a bigger company, though, it comes down to weighing the operational expense of an HPC service against the capacity expense of buying an in-house supercomputer or HPC cluster. IBM的Turek解释了不同公司在评估其需求时所经历的计算过程。对于拥有30名员工的生物科学初创公司来说,“您需要计算,但您实在负担不起15%的员工专门从事它。这就像您可能也说过,您不想拥有在职法律代表,因此您也可以通过服务获得它。”但是,对于一家较大的公司而言,最终归结为权衡HPC服务的运营费用与购买内部超级计算机或HPC集群的费用。 -So far, those are the same sorts of arguments you'd have over adopting any cloud service. But the opex vs. capex dilemma can be weighted towards the former by some of the specifics of the HPC market. Supercomputers aren't commodity hardware like storage or x86 servers; they're very expensive, and technological advances can swiftly render them obsolete. As McCormick Stevenson's Krawczyk puts it, "It's like buying a car: as soon as you drive off the lot it starts to depreciate." And for many companies –especially larger and less nimble ones – the process of buying a supercomputer can get hopelessly bogged down. "You're caught up in planning issues, building issues, construction issues, training issues, and then you have to execute an RFP," says IBM's Turek. "You have to work through the CIO. You have to work with your internal customers to make sure there's continuity of service. It's a very, very complex process and not something that a lot of institutions are really excellent at executing." -到目前为止,这些都是您采用任何云服务时都会遇到的类似的争论。但是,可以HPC市场的某些特点将使得衡量运营支出与资本支出时选择前者。超级计算机不是诸如存储或x86服务器之类的商用硬件;它们非常昂贵,技术进步很快会使其过时。正如麦考密克·史蒂文森(McCormick Stevenson)的克拉维奇(Krawczyk)所说,“这就像买车:只要车一开走,它就会开始贬值。”对于许多公司,尤其是规模较大,灵活性较差的公司,购买超级计算机的过程可能会陷入无望的泥潭。 IBM的Turek说:“您陷入了计划问题,建筑问题,施工问题,培训问题,然后必须执行RFP。” “您必须得到CIO的支持。您必须与内部客户合作以确保服务的连续性。这是一个非常非常复杂的过程,并没有很多机构有非常出色的执行力。” +到目前为止,这些都是您采用任何云服务时都会遇到的类似的争论。但是,可以HPC市场的某些特点将使得衡量运营支出与资本支出时选择前者。超级计算机不是诸如存储或x86服务器之类的商用硬件;它们非常昂贵,技术进步很快会使其过时。正如麦考密克·史蒂文森(McCormick Stevenson)的克拉维奇(Krawczyk)所说,“这就像买车:只要车一开走,它就会开始贬值。”对于许多公司,尤其是规模较大,灵活性较差的公司,购买超级计算机的过程可能会陷入无望的泥潭。 IBM的Turek说:“您陷入了计划问题,建筑问题,施工问题,培训问题,然后必须执行RFP。您必须得到CIO的支持。您必须与内部客户合作以确保服务的连续性。这是一个非常非常复杂的过程,并没有很多机构有非常出色的执行力。” -Once you choose to go down the services route for HPC, you'll find you get many of the advantages you expect from cloud services, particularly the ability to pay only for HPC power when you need it, which results in an efficient use of resources. Chirag Dekate, Senior Director and Analyst at Gartner, says bursty workloads, when you have short-term needs for high-performance computing, are a key use case driving adoption of HPC services. 一旦您选择了HPC服务的路线后,您会发现您会得到您期望从云服务中得到的许多好处,特别是仅在业务需要时才需付费的能力,从而可以带来资源的高效利用。 Gartner高级总监兼分析师Chirag Dekate表示,当您对高性能计算有短期需求时的突发性负载是推动选择HPC服务的关键用例。 -"In the manufacturing industry, you tend to have a high peak of HPC activity around the product design stage," he says. "But once the product is designed, HPC resources are less utilized during the rest of the product-development cycle." In contrast, he says, "when you have large, long-running jobs, the economics of the cloud wear down." -他说:“在制造业中,在产品设计阶段,HPC活动往往会达到很高的峰值。” “但是,一旦产品设计完成,在其余产品开发周期中,HPC资源的利用率就会降低。” 相比之下,他说:“当您拥有大量长期运行的工作时,云的经济就会逐渐减弱。” +他说:“在制造业中,在产品设计阶段,HPC活动往往会达到很高的峰值。但是,一旦产品设计完成,在其余产品开发周期中,HPC资源的利用率就会降低。” 相比之下,他说:“当您拥有大量长期运行的工作时,云的经济性就会逐渐减弱。” -With clever system design, you can integrate those HPC-services bursts of activity with your own in-house conventional computing. Teresa Tung, managing director in Accenture Labs, gives an example: "Accessing HPC via APIs makes it seamless to mix with traditional computing. A traditional AI pipeline might have its training done on a high-end supercomputer at the stage when the model is being developed, but then the resulting trained model that runs predictions over and over would be deployed on other services in the cloud or even devices at the edge." 通过巧妙的系统设计,您可以将这些HPC服务突发活动与您自己的内部常规计算集成在一起。 埃森哲(Accenture)实验室常务董事Teresa Tung举了一个例子:“通过API访问HPC可以无缝地与传统计算混合。在模型构建阶段,传统的AI流水线可能会在高端超级计算机上进行训练,但是最终经过反复按预期运行的训练好的模型将部署在云中的其他服务上,甚至部署在边缘设备上。” -### It's not for all use cases** 它并不适合所有的应用场景 +### 它并不适合所有的应用场景 ** ** -Use of HPC services lends itself to batch-processing and loosely-coupled use cases. That ties into a common HPC downside: data transfer issues. High-performance computing by its very nature often involves huge data sets, and sending all that information over the internet to a cloud service provider is no simple thing. "We have clients I talk to in the biotech industry who spend $10 million a month on just the data charges," says IBM's Turek. HPC服务适合批处理和松耦合的场景。这与HPC的普遍缺点有关:数据传输问题。高性能计算本身通常涉及庞大的数据集,而将所有这些信息通过Internet发送到云服务提供商并不容易。IBM的Turek说:“我们与生物技术行业的客户交流,他们每月仅在数据费用上就花费1000万美元。” -And money isn't the only potential problem. Building a workflow that makes use of your data can challenge you to work around the long times required for data transfer. "When we had our own HPC cluster, local access to the simulation results already produced – and thus an interactive interim evaluation — was of course possible at any time," says hhpberlin's Kilian. "We're currently working on being able to access and evaluate the data produced in the cloud even more efficiently and interactively at any desired time of the simulation without the need to download large amounts of simulation data." -钱并不是唯一的潜在问题。已制定的需要使用数据的工作流可能会使您在数据传输所需的时间内无法工作。hhpberlin的Kilian说:“当我们拥有自己的HPC集群时,当然可以随时访问已经产生的仿真结果,从而进行交互式的临时评估。” “我们目前正努力达到在仿真的任意时刻都可以更高效地,交互地访问和评估云中生成的数据,而无需下载大量的模拟数据。” +钱并不是唯一的潜在问题。已制定的需要使用数据的工作流可能会使您在数据传输所需的时间内无法工作。hhpberlin的Kilian说:“当我们拥有自己的HPC集群时,当然可以随时访问已经产生的仿真结果,从而进行交互式的临时评估。我们目前正努力达到在仿真的任意时刻都可以更高效地,交互地访问和评估云中生成的数据,而无需下载大量的模拟数据。” -Mike Krawczyk cites another stumbling block: compliance issues. Any service a defense contractor uses needs to be complaint with the International Traffic in Arms Regulations (ITAR), and McCormick Stevenson went with Rescale in part because it was the only vendor they found that checked that box. While more do today, any company looking to use cloud services should be aware of the legal and data-protection issues involved in living on someone else's infrastructure, and the sensitive nature of many of HPC's use cases makes this doubly true for HPC as a service. Mike Krawczyk提到了另一个绊脚石:合规性问题。国防承包商使用的任何服务都需要遵从(原文是complaint, 应该是笔误)《国际武器交易条例》(ITAR),麦考密克·史蒂文森(McCormick Stevenson)之所以选择Rescale,部分原因是因为这是他们发现的唯一符合的供应商。如今,尽管有更多的公司(使用云服务),但任何希望使用云服务的公司都应该意识到使用其他人的基础设施时所涉及的法律和数据保护问题,而且许多HPC场景的敏感性使得更HPC即服务的这个问题更加突出。 -In addition, the IT governance that HPC services require goes beyond regulatory needs. For instance, you'll need to keep track of whether your software licenses permit cloud use ­– especially with specialized software packages written to run on an on-premises HPC cluster. And in general, you need to keep track of how you use HPC services, which can be a tempting resource, especially if you've transitioned from in-house systems where staff was used to having idle HPC capabilities available. For instance, Ron Gilpin, senior director and Azure Platform Services global lead at Avanade, suggests dialing back how many processing cores you use for tasks that aren't time sensitive. "If a job only needs to be completed in an hour instead of ten minutes," he says, "that might use 165 processors instead of 1,000, a savings of thousands of dollars." 此外,HPC服务所需的IT治理超出了目前的监管范围。例如,您需要跟踪您的软件许可证是否允许云使用­ –尤其是专门为本地HPC群集上运行而编写的软件包。通常,您需要跟踪HPC服务的使用方式,它可能是一个诱人的资源,尤其是当您从员工习惯的内部系统过渡到有可用的空闲的HPC能力时。例如,Avanade全球平台高级主管兼Azure平台服务全球负责人Ron Gilpin建议,回调您用于时间不敏感任务的处理核心数量。他说:“如果一项工作只需要用一小时来完成而不需要在十分钟内就完成,那么它可以使用165个处理器而不是1,000个,从而节省了数千美元。” -### A premium on HPC skills** 独特的HPC技能 +### 独特的HPC技能** ** -One of the biggest barriers to HPC adoption has always been the unique in-house skills it requires, and HPC services don't magically make that barrier vanish. "Many CIOs have migrated a lot of their workloads into the cloud and they have seen cost savings and increased agility and efficiency, and believe that they can achieve similar results in HPC ecosystems," says Gartner's Dekate. "And a common misperception is that they can somehow optimize human resource cost by essentially moving away from system admins and hiring new cloud experts who can solve their HPC workloads." -一直以来,采用HPC的最大障碍之一就是其所需的独特的内部技能,而HPC服务并不能使这种障碍消失。Gartner的Dekate表示:“许多CIO将许多工作负载迁移到了云上,他们看到了成本的节约,敏捷性和效率的提升,因此相信在HPC生态中也可以达成类似的效果。” “一个普遍的误解是,他们可以通过彻底地免去系统管理员,并聘用能解决其HPC工作负载的新的云专家,从而以某种方式优化人力成本。” +一直以来,采用HPC的最大障碍之一就是其所需的独特的内部技能,而HPC服务并不能使这种障碍消失。Gartner的Dekate表示:“许多CIO将许多工作负载迁移到了云上,他们看到了成本的节约,敏捷性和效率的提升,因此相信在HPC生态中也可以达成类似的效果。一个普遍的误解是,他们可以通过彻底地免去系统管理员,并聘用能解决其HPC工作负载的新的云专家,从而以某种方式优化人力成本。” -"But HPC is not one of the main enterprise environments," he says. "You're dealing with high-end compute nodes interconnected with high-bandwidth, low-latency networking stacks, along with incredibly complicated application and middleware stacks. Even the filesystem layers in many cases are unique to HPC environments. Not having the right skills can be destabilizing." -“但是HPC并不是主流的企业环境之一。” 他说。“您正在处理通过高带宽,低延迟的网络互联的高端计算节点,以及相当复杂的应用和中间件技术栈。许多情况下,甚至连文件系统层也是HPC环境所独有的。没有对应的技能可能会破坏稳定性。” +“但是HPC并不是一个主流的企业环境。” 他说。“您正在处理通过高带宽,低延迟的网络互联的高端计算节点,以及相当复杂的应用和中间件技术栈。许多情况下,甚至连文件系统层也是HPC环境所独有的。没有对应的技能可能会破坏稳定性。” -But supercomputing skills are in shortening supply, something Dekate refers to as the workforce "greying," in the wake of a generation of developers going to splashy startups rather than academia or the more staid firms where HPC is in use. As a result, vendors of HPC services are doing what they can to bridge the gap. IBM's Turek says that many HPC vets will always want to roll their own exquisitely fine-tuned code and will need specialized debuggers and other tools to help them do that for the cloud. But even HPC newbies can make calls to code libraries built by vendors to exploit supercomputing's parallel processing. And third-party software providers sell turnkey software packages that abstract away much of HPC's complication. 但是超级计算技能的供给却在减少,Dekate将其称为劳动力“灰化”,这是因为一代开发人员将目光投向了新兴的初创公司,而不是学术界或使用HPC的更老套的公司。因此,HPC服务供应商正在尽其所能地弥补差距。 IBM的Turek表示,许多HPC老手将总是想运行他们自己精心调整过的代码,将需要专门的调试器和其他工具来帮助他们在云上实现这一目标。但是,即使是HPC新手也可以调用供应商构建的代码库,以利用超级计算的并行处理能力。第三方软件提供商出售的交钥匙软件包可以减少HPC的许多复杂性。 -Accenture's Tung says the sector needs to lean further into this in order to truly prosper. "HPCaaS has created dramatically impactful new capability, but what needs to happen is making this easy to apply for the data scientist, the enterprise architect, or the software developer," she says. "This includes easy to use APIs, documentation, and sample code. It includes user support to answer questions. It’s not enough to provide an API; that API needs to be fit-for-purpose. For a data scientist this should likely be in Python and easily change out for the frameworks she is already using. The value comes from enabling these users who ultimately will have their jobs improved through new efficiencies and performance, if only they can access the new capabilities." If vendors can pull that off, HPC services might truly bring supercomputing to the masses. 埃森哲的Tung表示,该行业需要进一步加大投入才能真正繁荣。她说:“HPCaaS已经创建了具有重大影响力的新功能,但还需要做的是使它易于被数据科学家,企业架构师或软件开发人员使用。这包括易用的API,文档和示例代码。它包括用户支持来解答问题。仅仅提供API是不够的,API需要适合特定的用途。对于数据科学家而言,这可能是以python形式提供,并容易更换她已经在使用的框架。其价值来自使这些用户最综只有在使用新功能时才能够改进效率和性能。” 如果供应商能够做到这一点,那么HPC服务才能真正将超级计算带给大众。 -Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. 加入[Facebook][3]和[LinkedIn][4]上的Network World社区,探讨最前沿的话题。 -------------------------------------------------------------------------------- From f087cd01bb522381699f6168319653c51b3983f3 Mon Sep 17 00:00:00 2001 From: messon007 <306809057@qq.com> Date: Sat, 2 May 2020 10:17:29 +0800 Subject: [PATCH 373/394] Done --- ...e ins and outs of high-performance computing as a service.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => translated}/talk/20200401 The ins and outs of high-performance computing as a service.md (97%) diff --git a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md b/translated/talk/20200401 The ins and outs of high-performance computing as a service.md similarity index 97% rename from sources/talk/20200401 The ins and outs of high-performance computing as a service.md rename to translated/talk/20200401 The ins and outs of high-performance computing as a service.md index df2c6debd3..948d985765 100644 --- a/sources/talk/20200401 The ins and outs of high-performance computing as a service.md +++ b/translated/talk/20200401 The ins and outs of high-performance computing as a service.md @@ -17,7 +17,7 @@ 几年前的一天,它出乎意料地超出了计算极限。 [世界上最快的10个超级计算机][1] -麦考密克·史蒂文森(McCormick Stevenson)的首席工程师迈克·克劳奇奇(Mike Krawczyk)说:“我们的一些工作会使办公室的计算机不堪重负。” “购买机器并安装软件在经济上或计划上都不划算。” 相反,该公司与Rescale签约,从其购买在超级计算机系统上运行的周期(cycles),而这只花费了他们购买新硬件上所需的一小部分。 +麦考密克·史蒂文森(McCormick Stevenson)的首席工程师迈克·克劳奇奇(Mike Krawczyk)说:“我们的一些工作会使办公室的计算机不堪重负。购买机器并安装软件在经济上或计划上都不划算。” 相反,该公司与Rescale签约,从其购买在超级计算机系统上运行的周期(cycles),而这只花费了他们购买新硬件上所需的一小部分。 麦考密克·史蒂文森(McCormick Stevenson)已成为被称为超级计算即服务或高性能计算(HPC)即服务(两个紧密相关的术语)市场的早期采用者之一。根据国家计算科学研究所(的定义),HPC是超级计算机在计算复杂问题上的应用,而超级计算机是处理能力最先进的那些计算机。 From 1eed92f4ad672398553c5375dba27f35e63d39d5 Mon Sep 17 00:00:00 2001 From: Brooke Lau Date: Sat, 2 May 2020 11:48:40 +0800 Subject: [PATCH 374/394] TSL 20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode --- ...OS-RHEL 7-8 Systems in Single User Mode.md | 159 ------------------ ...OS-RHEL 7-8 Systems in Single User Mode.md | 159 ++++++++++++++++++ 2 files changed, 159 insertions(+), 159 deletions(-) delete mode 100644 sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md create mode 100644 translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md diff --git a/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md b/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md deleted file mode 100644 index 5e2fb84c2b..0000000000 --- a/sources/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md +++ /dev/null @@ -1,159 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode) -[#]: via: (https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode -====== - -Single user mode, also referred to as maintenance mode, which allows a single super user to recover/repair system problems. - -Generally, these problems cannot be solved in a multi-user environment. The system can boot but will not function properly or you will not be able to log in. - -It uses `runlevel1.target` or `rescue.target` on **[Red Hat][1]** (RHEL) 7/8 based systems. - -In this mode, the system mount all local file systems, but does not activate network interfaces. - -It only enables certain services and minimal functionality to repair the system. - -This method is mostly useful when you want to run fsck to fix corrupted file systems, or to reset a forgotten root password, or to fix a mount point issue on the system. - -You can boot **[CentOS][2]**/**[RHEL][3]** 7/8 systems in single user mode using the below three methods. - - * **Method-1:** Boot CentOS/RHEL 7/8 systems in single user mode by adding the “rd.break” parameter to the kernel - * **Method-2:** Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “rhgb quiet” word with the “init=/bin/bash or init=/bin/sh” parameter in the kernel - * **Method-3:** Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “ro” word with the “rw init=/sysroot/bin/sh” parameter in the kernel - - - -### Method-1: Boot CentOS/RHEL 7/8 systems in single user mode by adding the “rd.break” parameter to the kernel - -Reboot your system, on the GRUB2 boot screen, press the `"e"` key to edit the selected kernel. You need to select the first line, the first one is the latest kernel whereas you can select the different one if you would like to boot your system with the older kernel. - -![][4] - -Depending on your RHEL/CentOS version, find the word **“linux16”** or **“linux”**, press the “End” button on the keyboard, go to the end of the line, and add the keyword **“rd.break”** as shown below in the screenshot, then press **“Ctrl+x”** or **“F10”** to boot into single-user mode. - -You need to find the word **`linux16`** for RHEL/CentOS 7 systems, while **`linux`** for RHEL/CentOS 8 systems. - -![][4] - -This change mount your root file system into **“read only (RO)”** mode. You can check this by running the command below. Also, the output below clearly shows that you are in **“Emergency Mode”**. - -``` -# mount | grep root -``` - -![][4] - -To make changes to the **“sysroot”** file system you need to remount it with READ and WRITE (RW) mode. - -``` -# mount -o remount,rw /sysroot -``` - -Run the below command to change the environment, commonly known as “jailed directory” or “chroot jail”. - -``` -# chroot /sysroot -``` - -![][4] - -Now, single-user mode is completely ready for use. Once you have fixed your problem to exit single user mode, perform the following steps. - -CentOS/RHEL 7/8 uses SELinux by default, so create the following hidden file, which will automatically perform a relabel of all files on next boot. - -``` -# touch /.autorelabel -``` - -Finally, run the below command to restart the system. Alternatively, type “exit” command twice to restart your system. - -``` -# reboot -f -``` - -### Method-2: Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “rhgb quiet” word with the “init=/bin/bash or init=/bin/sh” parameters in the kernel - -Reboot your system, on the GRUB2 boot screen, press the `"e"` key to edit the selected kernel parameters. - -![][4] - -Find the word **“rhgb quiet”** and replace it with **“init=/bin/bash”** or **“init=/bin/sh”**, then press **“Ctrl+x”** or **“F10”** to boot in single user mode. - -Screenshot for **`init=/bin/bash`**. - -![][4] - -Screenshot for **`init=/bin/sh`**. - -![][4] - -By default, this will mount your “/” partition in read-only (RO) mode, so you will need to remount the “/” file system with READ and WRITE (RW) mode to make changes. - -``` -# mount -o remount,rw / -``` - -![][4] - -You can now perform any task that you want. When you are done, run the following command to enable SELinux relabeling on reboot. - -``` -# touch /.autorelabel -``` - -Finally reboot the system. - -``` -# exec /sbin/init 6 -``` - -### Method-3: Boot CentOS/RHEL 7/8 systems in single user mode by replacing the “ro” word with the “rw init=/sysroot/bin/sh” parameter in the kernel - -To interrupt the automatic boot, reboot your system and press any key on the GRUB2 splash screen. - -This will display the list of kernels available on your system and select the latest kernel and press the **`"e"`** key to edit the selected kernel parameters. - -Find the line that starts with the word **“linux”** or **“linux16”** and replace **“ro”** with **“rw init=/sysroot/bin/sh”**. When finished, press **“Ctrl+x”** or **“F10”** to boot in single user mode. - -Change the environment to “chroot jail” by running the below command. - -``` -# chroot /sysroot -``` - -Make any necessary changes to the system. Once done, run the below command to enable SELinux relabeling on reboot. - -``` -# touch /.autorelabel -``` - -Finally reboot the system. - -``` -# reboot -f -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/ - -作者:[Magesh Maruthamuthu][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.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/category/red-hat/ -[2]: https://www.2daygeek.com/category/centos/ -[3]: https://www.2daygeek.com/category/rhel/ -[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 diff --git a/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md b/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md new file mode 100644 index 0000000000..c5eaa1dc84 --- /dev/null +++ b/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md @@ -0,0 +1,159 @@ +[#]: collector: (lujun9972) +[#]: translator: (lxbwolf) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode) +[#]: via: (https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/) +[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) + +在单用户模式下启动 CentOS/RHEL 7/8 的三种方法 +====== + +单用户模式,也被称为维护模式,超级用户可以在此模式下恢复/修复系统问题。 + +通常情况下,这些问题在多用户环境中修复不了。系统可以启动但功能不能正常运行或者你登录不了系统。 + +在基于 **[Red Hat][1]** (RHEL) 7/8 的系统中,使用 `runlevel1.target` 或 `rescue.target` 来实现。 + +在此模式下,系统会挂载所有的本地文件系统,但不开启网络接口。 + +系统仅启动特定的几个服务和修复系统必要的尽可能少的功能。 + +当你想运行文件系统一致性检查来修复损坏的文件系统,或忘记 root 密码后重置密码,或修复系统上的一个挂载点问题时,这个方法会很有用。 + +你可以用下面三种方法以单用户模式启动 **[CentOS][2]**/**[RHEL][3]** 7/8 系统。 + + * **方法 1:** 通过向内核添加 “rd.break” 参数来以单用户模式启动 CentOS/RHEL 7/8 系统 + * **方法 2:** 通过用 “init=/bin/bash“ 或 ”init=/bin/sh” 替换内核中的 “rhgb quiet” 语句来以单用户模式启动 CentOS/RHEL 7/8 系统 + * **方法 3:** 通过用 “rw init=/sysroot/bin/sh” 参数替换内核中的 “ro” 语句以单用户模式启动 CentOS/RHEL 7/8 系统 + + + +### 方法 1: 通过向内核添加 “rd.break” 参数来以单用户模式启动 CentOS/RHEL 7/8 系统 + +重启你的系统,在 GRUB2 启动界面,按下 `e` 键来编辑选中的内核。你需要选中第一行,第一个是最新的内核,然而如果你想用旧的内核启动系统你也可以选择其他的行。 + +![][4] + +根据你的 RHEL/CentOS 版本,找到 **“linux16”** 或 **“linux”** 语句,按下键盘上的 ”End“ 按钮,跳到行末,像下面截图中展示的那样添加关键词 **“rd.break”**,按下 **“Ctrl+x”** 或 **“F10”** 来进入单用户模式。 + +如果你的系统是 RHEL/CentOS 7,你需要找 **`linux16`**,如果你的系统是 RHEL/CentOS 8,那么你需要找 **`linux`**。 + +![][4] + +这个修改会让你的 root 文件系统以 **“只读 (RO)”** 模式挂载。你可以用下面的命令来验证下。下面的输出也明确地告诉你当前是在 **“紧急模式”**。 + +``` +# mount | grep root +``` + +![][4] + +为了修改 **“sysroot”** 文件系统,你需要用 RW 模式重新挂载它。 + +``` +# mount -o remount,rw /sysroot +``` + +运行下面的命令修改环境,这就是大家熟知的 “jailed directory” 或 “chroot jail”。 + +``` +# chroot /sysroot +``` + +![][4] + +现在,单用户模式的前期准备已经完成了。当你修复了你的问题要退出单用户模式时,执行下面的步骤。 + +CentOS/RHEL 7/8 默认使用 SELinux,因此创建下面的隐藏文件,这个文件会在下一次启动时重新确认所有文件。 + +``` +# touch /.autorelabel +``` + +最后,用下面的命令重启系统。你也可以输入两次 “exit” 命令来重启你的系统。 + +``` +# reboot -f +``` + +### 方法 2: 通过用 “init=/bin/bash“ 或 ”init=/bin/sh” 替换内核中的 “rhgb quiet” 语句来以单用户模式启动 CentOS/RHEL 7/8 系统 + +重启你的系统,在 GRUB2 启动界面,按下 `e` 键来编辑选中的内核。 + +![][4] + +找到语句 **“rhgb quiet”**,用 **“init=/bin/bash”** 或 **“init=/bin/sh”** 替换它,然后按下 **“Ctrl+x”** 或 **“F10”** 来进入单用户模式。 + +**`init=/bin/bash`** 的截图。 + +![][4] + +**`init=/bin/sh`** 的截图。 + +![][4] + +默认情况下,上面的操作会以只读(RO)模式挂载你的 “/” 分区,因此你需要以读写(RW)模式重新挂载 “/” 文件系统,这样才能修改它。 + +``` +# mount -o remount,rw / +``` + +![][4] + +现在你可以执行你的任务了。当结束时,执行下面的命令来开启重启时的 SELinux 重新确认。 + +``` +# touch /.autorelabel +``` + +最后,重启系统。 + +``` +# exec /sbin/init 6 +``` + +### 方法 3: 通过用 “rw init=/sysroot/bin/sh” 参数替换内核中的 “ro” 语句以单用户模式启动 CentOS/RHEL 7/8 系统 + +为了中断自动启动的过程,重启你的系统并在 GRUB2 启动界面按下任意键。 + +现在会展示你系统上所有可用的内核,选择最新的内核,按下 `e` 键来编辑选中的内核参数。 + +找到以 **“linux”** 或 **“linux16”** 开头的语句,用 **“rw init=/sysroot/bin/sh”** 替换 **“ro”**。替换完后按下 **“Ctrl+x”** 或 **“F10”** 来进入单用户模式。 + +运行下面的命令把环境切换为 “chroot jail”。 + +``` +# chroot /sysroot +``` + +如果需要,做出必要的修改。修改完后,执行下面的命令来开启重启时的 SELinux 重新确认。 + +``` +# touch /.autorelabel +``` + +最后,重启系统。 + +``` +# reboot -f +``` + +-------------------------------------------------------------------------------- + +via: https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/ + +作者:[Magesh Maruthamuthu][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.2daygeek.com/author/magesh/ +[b]: https://github.com/lujun9972 +[1]: https://www.2daygeek.com/category/red-hat/ +[2]: https://www.2daygeek.com/category/centos/ +[3]: https://www.2daygeek.com/category/rhel/ +[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 From 4595af0d9587cfd3a9b133598a0dbb66ce1c54d1 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 12:49:09 +0800 Subject: [PATCH 375/394] APL --- ...04 Review- Best Ubuntu-based Distribution Just Got Better.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md b/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md index 760307eeb1..acba85fe58 100644 --- a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md +++ b/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (wxy) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From 841f19a2d63a81b2bc303fb896b6cdeeab5bc8d3 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 20:14:02 +0800 Subject: [PATCH 376/394] TSL&PRF --- ...untu-based Distribution Just Got Better.md | 168 +++++++++--------- 1 file changed, 82 insertions(+), 86 deletions(-) diff --git a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md b/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md index acba85fe58..1760e313d1 100644 --- a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md +++ b/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md @@ -7,188 +7,184 @@ [#]: via: (https://itsfoss.com/pop-os-20-04-review/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -Pop OS 20.04 Review: Best Ubuntu-based Distribution Just Got Better +Pop!_OS 20.04 点评:最好的基于 Ubuntu 的发行版越来越好了 ====== -_**Brief: Pop OS 20.04 is an impressive Linux distribution based on Ubuntu. I review the major new features in this review and share my experience with the latest release.**_ +> Pop!_OS 20.04 是一款令人印象深刻的基于 Ubuntu 的 Linux 发行版。我在这篇评论中回顾了其主要的新功能,并分享了我对最新版本的体验。 -Now that Ubuntu 20.04 LTS and its official flavours are here – it’s time to take a look at one of best Ubuntu-based distro i.e Pop!_OS 20.04 by [System76][1]. +现在,Ubuntu 20.04 LTS 及其官方变体版本已经发布了 - 是时候看看 [System76][1] 的 Pop!_OS 20.04 了,这是基于 Ubuntu 的最好的发行版之一。 -To be honest, Pop!_OS is my favorite Linux distro that I primarily use for everything I do. +老实说,Pop!_OS 是我最喜欢的 Linux 发行版,主要用于我做的所有事情。 -Now that Pop!_OS 20.04 has finally arrived. It’s time to take a look at what it offers and whether you should upgrade or not? +现在,Pop!_OS 20.04 终于来了。是时候来看看它提供了哪些功能,以及你是否应该升级? -### What’s New In Pop!_OS 20.04 LTS? +### Pop!_OS 20.04 LTS 中有什么新东西? ![][2] -Visually, Pop!_OS 20.04 LTS isn’t really very different from Pop!_OS 19.10. However, you can find several new features and improvements. +从视觉上看,Pop!\_OS 20.04 LTS 与 Pop!\_OS 19.10 并没有太大的区别。然而,你可以发现几个新功能和改进。 -But, if you were using **Pop!_OS 18.04 LTS**, you have a lot of things to try. +但是,如果你之前使用的是 Pop!_OS 18.04 LTS,则可以发现有很多东西可以尝试。 -With [GNOME 3.36][3] onboard along with some newly added features, Pop!_OS 20.04 is an exciting release. +随着 [GNOME 3.36][3] 的到来,及其带来的一些新功能,Pop!_OS 20.04 成为了一个令人激动的版本。 -Overall, to give you an overview here are some key highlights: +总的来说,以下是一些主要的亮点。 - * Automatic Window Tiling - * New Application Switcher and Launcher - * Flatpack support added in Pop!_Shop + * 自动窗口平铺 + * 新的应用程序切换器和启动器 + * 在 Pop!_Shop 中增加了对 Flatpack 的支持。 * GNOME 3.36 - * Linux Kernel 5.4 - * Improved hybrid graphics support + * Linux 内核 5.4 + * 改进的混合图形支持 +虽然听起来很有趣,但我们还是来了解一下详细的变化,以及到目前为止 Pop!_OS 20.04 的体验如何。 +#### Pop!_OS 20.04 中的用户体验提升 -While this sounds fun, let us take a look at a detailed look on what has changed and how’s the experience of Pop!_OS 20.04 so far. +毫无疑问,很多 Linux 发行版都提供了开箱即用的用户体验。同样的,[Ubuntu 20.04 LTS 也有一流的改进和功能][4]。 -### User Experience Improvements in Pop OS 20.04 +而对于 System76 的 Pop!_OS,他们总是试图更进一步。并且,大多数新功能旨在通过提供有用的功能来改善用户体验。 -Undoubtedly, a lot of Linux distros offer a pleasant user experience out of the box. Likewise, [Ubuntu 20.04 LTS has had top-notch improvements and features][4] as well. +在这里,我将介绍一些改进,其中包括 [GNOME 3.36][3] 和 Pop!_OS 特有的一些功能。 -And, when it comes to Pop!_OS by System 76, they always try to go a mile further. And, the majority of new features aim to improve the user experience by providing useful functionalities. +#### 支持系统托盘图标 -Here, I’m going to take a look at some of the improvements that include [GNOME 3.36][3] and Pop!_OS-specific features. - -#### Support For System Tray Icons - -Finally! This may not be a big change – but Pop!_OS did not have the support for system tray icons (or applet icons). +总算是有了!这可能不是什么大的改变 —— 但 Pop!_OS 以前没有支持系统托盘图标(或小程序图标)。 ![][5] -With 20.04 LTS release, it’s here by default. No need of any extension. +随着 20.04 LTS 的发布,默认情况就有了系统托盘,不需要任何扩展。 -There may not be a whole lot of programs depending on system tray icons – but it is still something important to have. +依靠系统托盘图标的程序可能并不多 —— 但它仍然是重要的东西。 -In my case, I wasn’t able to use [ActivityWatch][6] on Pop!_OS 19.10 – but now I can. +就我而言,我以前无法在 Pop!_OS 19.10 上使用 [ActivityWatch][6] —— 但现在可以了。 -#### Automatic Window Tiling +#### 自动窗口平铺 ![][7] -**Automatic Window Tiling** is something I always wanted to try – but never invested any time to set it up using a [tiling window manager][8] like [i3][9], not even with [Regolith Desktop][10]. +自动窗口平铺是我一直想尝试的东西 —— 但从来没花时间使用过 [i3][9] 这样的[平铺窗口管理器][8]来设置它,更别说是 [Regolith 桌面][10]了。 -With Pop!_OS 20.04, you don’t need to do that anyway. The automatic window tiling feature comes baked in without needing you to set it up. +在 Pop!_OS 20.04 中,你就不需要这样做了。自动窗口平铺功能已经内置,无需设置。 -It also features an option to **Show Active Hint** i.e it will highlight the active window to avoid confusion. And, you can also adjust the gap between the windows. +它还提供了“显示活动提示”的选项,也就是说,它将高亮显示活动窗口以避免混淆。而且,你还可以调整窗口之间的间隙。 ![][11] -You can see it in action in their official video: +你可以在他们的官方视频中看到它是如何工作的: -[Subscribe to our YouTube channel for more Linux videos][12] +- [System76 Pop!_OS 20.04 - Auto Tiling](https://youtu.be/-fltwBKsMY0) -And, I must say that it is one of the biggest additions on Pop!_OS 20.04 that could potentially help you multi-task more efficiently. +而且,我得说,这是 Pop!_OS 20.04 上最大的新增功能之一,有可能帮助你更有效地进行多任务处理。 -Even though the feature comes in handy everytime you use it. To make the most out of it, a display screen bigger than 21-inches (at least) should be the best way to go! And, for this reason – I’m really tempted to upgrade my monitor as well! +即使每次使用该功能都很方便,但为了最大程度地利用它,最好是使用一个大于 21 英寸的显示屏(至少)! 而且,因为这个原因 —— 我真的很想把我的显示器也升级一下! -#### New Extensions App +#### 新的扩展应用 ![][13] -Pop!_OS comes baked in with some unique GNOME extensions. But, you don’t need GNOME Tweaks the manage the extension anymore. +Pop!_OS 内置了一些独特的 GNOME 扩展。但是,你不需要用 GNOME Tweaks 来管理扩展。 -The newly added **Extensions** app lets you configure and manage the extensions on Pop!_OS 20.04. +新增加的 “Extensions” 应用可以让你在 Pop!_OS 20.04 上配置和管理扩展程序。 -#### Improved Notification Center +#### 改进的通知中心 ![][14] -With the new GNOME 3.36 release, the notification center includes a revamped look. Here, I have the dark mode enabled. +在新的 GNOME 3.36 中,通知中心的外观经过了改进。这里,我启用了黑暗模式。 -#### New Application Switcher & Launcher +#### 新的应用程序切换器 & 启动器 ![][15] -You can still **ALT+TAB** or **Super key + TAB** to go through the running applications. +你仍然可以用 `ALT+TAB` 或 `Super+TAB` 来浏览正在运行的应用程序。 -But, that’s time-consuming when you have a lot of things going on. So, on Pop!_OS 20.04, you get an application switcher and launcher which you can activate using **Super key + /** +但是,当你有很多事情要做的时候,这很耗时。所以,在 Pop!_OS 20.04上,你可以使用 `Super+ /` 激活应用程序切换器和启动器。 -Once you get used to the keyboard shortcut, it will be very convenient thing to have. +一旦你习惯了这个快捷键,它将是非常方便的东西。 -In addition to this, you may find numerous other subtle improvements visually with the icons/windows on Pop!_OS 20.04. +除此以外,你可能会发现 Pop!_OS 20.04 上的图标/窗口在视觉上有许多其它细微的改进。 -#### New Login Screen +#### 新的登录界面 -Well, with GNOME 3.36, it’s an obvious change. But, it does look good! +嗯,这是 GNOME 3.36 带来的一个明显的变化。但是,它看起来确实很不错! ![][16] -### Flatpak Support on Pop!_Shop +#### Pop!_Shop 支持 Flatpak -Normally, Pop!_Shop is already something useful with a huge repository along with [Pop!_OS’s own repositories.][17] +通常,Pop!_Shop 已经是一个非常有用的东西了,包括它自有的在内,它带有一个巨大的软件仓库。 -Now, with Pop!_OS 20.04, you can choose to install either Flatpak (via Flathub) or the Debian package of any available software on Pop!_Shop. Of course, only if a Flatpak package exists for the particular software. +现在,在 Pop!\_OS 20.04 中,你可以用 Pop!_Shop 安装任何可用软件的 Debian 包或 Flatpak(通过 Flathub) —— 当然,前提是某个软件有 Flatpak 软件包。 -You might want to check [how to use Flatpak on Linux][18] if you don’t have Pop!_OS 20.04. +如果你没有使用 Pop!_OS 20.04,你可能要看看[如何在 Linux 上使用 Flatpak][18]。 ![][19] -Personally, I’m not a fan of Flatpak but some applications like GIMP requires you to install the Flatpak package to get the latest version. So, it is definitely a good thing to have the support for Flatpak on Pop!_Shop baked right into it. +就我个人而言,我并不是 Flatpak 的粉丝,但有些应用如 GIMP 需要你安装 Flatpak 包才能获得最新版本。所以,在 Pop!_Shop 上直接支持了 Flatpak 绝对是一件好事。 -### Keyboard Shortcut Changes +#### 键盘快捷键更改 -This can be annoying if you’re comfortable with the existing keyboard shortcuts on Pop!_OS 19.10 or older. +如果你习惯了 Pop!_OS 19.10 或更早的版本上现有的键盘快捷键,这可能会让你很烦。 -In either case, there are a few important keyboard shortcut changes to potentially improve your experience, here they are: +不管是哪种情况,有几个重要的键盘快捷键变化可能会改善你的体验,如下: - * Lock Screen: **Super + L** _changed to_ **Super + Escape** - * Move Workspace: **Super + Up/Down Arrow** _changed to_ **Super + CTRL + Up/Down Arrow** - * Close Window: **Super + W** _changed_ to **Super + Q** - * Toggle Maximize: **Super + Up Arrow** _changed to_ **Super + M** + * 锁定屏幕:`Super + L` 改为 `Super + Escape`。 + * 移动工作区:`Super + 上/下箭头键` 改为 `Super + CTRL + 上/下箭头键`。 + * 关闭窗口:`Super + W` 变更为 `Super + Q`。 + * 切换最大化:`Super +向上箭头` 改为 `Super + M`。 +#### Linux 内核 5.4 +与其他大多数最新的 Linux 发行版相似,Pop!_OS 20.04 搭载了 [Linux 内核 5.4][20]。 -### Linux Kernel 5.4 +所以,很明显,你可以期望获得对 [exFAT 支持][21]、改进的 AMD 图形兼容性以及它附带所有其他功能。 -Similar to most of the other latest Linux distros, Pop!_OS 20.04 comes loaded with [Linux Kernel 5.4][20]. +#### 性能提升 -So, obviously, you can expect the [exFAT support][21] and an improved AMD graphics compatibility along with all the other features that come with it. +尽管 Pop!_OS 并不称自己是轻量级的 Linux 发行版,但它仍然是一个资源节约型的发行版。而且,有了 GNOME 3.36 的支持,它的速度应该足够快了。 -### Performance Improvements - -Even though Pop!_OS doesn’t pitch itself as a lightweight Linux distro, it is still a resource-efficient distro. And, with GNOME 3.36 onboard, it should be fast enough. - -Considering that I’ve been using Pop!_OS as my primary distro for about a year, I’ve never had any performance issues. And, this is how the resource usage will probably look like (depending on your system configuration) after you install Pop!_OS 20.04. +考虑到我已经将 Pop!\_OS 作为主要发行版使用已经一年多了,我从来没有遇到过性能问题。这就是你安装了 Pop!_OS 20.04 之后的资源使用情况(取决于你的系统配置)。 ![][22] -To give you an idea, my desktop configuration involves an i5-7400 processor, 16 GB RAM (2400 MHz), NVIDIA GTX 1050ti graphics card, and an SSD. +给你一个作为参考,我的台式机配置包括 i5-7400 处理器、16GB 内存(2400MHz)、NVIDIA GTX 1050ti 显卡和 SSD。 -I’m not really a fan of system benchmarks because it does not really give you the idea of how a specific application or a game would perform unless you try it. +我不是一个系统基准测试的忠实拥护者,因为除非你去尝试,否则它并不能让你知道特定的应用或游戏的性能。 -You can try the [Phoronix Test Suite][23] to analyze how your system performs. But, Pop!_OS 20.04 LTSshould be a snappy experience! +你可以试试 [Phoronix 测试套件][23]来分析你的系统表现。但是,Pop!_OS 20.04 LTS 应该是一个很爽快的体验! -### Package Updates & Other Improvements +#### 软件包更新 & 其他改进 -While every Ubuntu-based distro benefits from the [improvements in Ubuntu 20.04 LTS][4], there are some Pop OS specific bug fixes and improvements as well. +尽管每个基于Ubuntu的发行版都受益于Ubuntu 20.04 LTS的改进,但也有一些 Pop!_OS 特有的错误修复和改进。 -In addition to it, some major apps/packages like **Firefox 75.0** have been updated to their latest version. +除此之外,一些主要的应用程序/包(如 Firefox 75.0)也已经更新到了最新版本。 -As of now, there should be no critical bugs present and at least none for me. +到现在为止,应该没有任何严重的错误,至少对我来说没有。 -You can check out their [development progress on GitHub][24] to check the details of issues they’ve already fixed during the beta testing and the issues they will be fixing right after the release. +你可以在 [GitHub 上查看他们的开发进度][24],以了解他们在测试期间已经修复的问题和发布后即将修复的问题。 -### Download & Support Pop!_OS 20.04 +### 下载 & 支持 Pop!_OS 20.04 ![][25] -With this release, System76 has finally added a subscription model (optional) to support Pop!_OS development. +在这个版本中,System76 终于增加了一个可选的订阅模式来支持 Pop!_OS 的开发。 -You can download **Pop!_OS 20.04** for free – but if you want to support them I’d suggest you go for the subscription with just **$1/month**. +你可以免费下载 Pop!_OS 20.04 —— 但如果你想支持他们,我建议你只需要 \$1/月就可以订阅。 -[Pop!_OS 20.04][26] +- [Pop!_OS 20.04][26] -### My Thoughts on Pop OS 20.04 +### 我对 Pop OS 20.04 的看法 -I must mention that I was rooting for a fresh new wallpaper with the latest 20.04 release. But, that’s not a big deal. +我必须提到的是,我正在为最新的 20.04 版本提供全新的墙纸。但是,这没什么大不了的。 -With the window tiling feature, flatpak support, and numerous other improvements, my experience with Pop!_OS 20.04 has been top-notch so far. Also, it’s great to see that they are highlighting their focus on creative professionals with out-of-the-box support for some popular software. +有了窗口平铺功能、支持 flatpak,以及众多其他改进,到目前为止,我对 Pop!_OS 20.04 的体验是一流的。另外,很高兴看到他们在一些流行软件的开箱即用支持上突出了他们对创意专业人士的关注。 ![][27] -All the good things about Ubuntu 20.04 and some extra toppings on it by System76, I’m impressed! +Ubuntu 20.04 的所有优点,再加上 System76 的一些额外的加料,让我印象深刻! -_**Have you tried the Pop!_OS 20.04 yet? Let me know your thoughts in the comments below.**_ +你试过 Pop!_OS 20.04 吗?请在下面的评论中告诉我你的想法。 -------------------------------------------------------------------------------- @@ -196,8 +192,8 @@ via: https://itsfoss.com/pop-os-20-04-review/ 作者:[Ankush Das][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From bc9b9b48abfb8de73106ba25975db4b800ce1fbf Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 20:16:44 +0800 Subject: [PATCH 377/394] PRF --- ...eview- Best Ubuntu-based Distribution Just Got Better.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename {sources => translated}/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md (99%) diff --git a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md b/translated/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md similarity index 99% rename from sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md rename to translated/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md index 1760e313d1..731c14fa0b 100644 --- a/sources/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md +++ b/translated/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12175-1.html) [#]: subject: (Pop OS 20.04 Review: Best Ubuntu-based Distribution Just Got Better) [#]: via: (https://itsfoss.com/pop-os-20-04-review/) [#]: author: (Ankush Das https://itsfoss.com/author/ankush/) From c8edffef9b6330dfe962050897db8b12d699ce1a Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 20:18:30 +0800 Subject: [PATCH 378/394] PUB @wxy https://linux.cn/article-12175-1.html --- ...0.04 Review- Best Ubuntu-based Distribution Just Got Better.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {translated/tech => published}/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md (100%) diff --git a/translated/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md b/published/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md similarity index 100% rename from translated/tech/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md rename to published/20200502 Pop OS 20.04 Review- Best Ubuntu-based Distribution Just Got Better.md From 2178dc85001508a499ad94941a34e5c53617ed26 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 20:53:34 +0800 Subject: [PATCH 379/394] =?UTF-8?q?=E5=BD=92=E6=A1=A3=20202004?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20190107 Different Ways To Update Linux Kernel For Ubuntu.md | 0 published/{ => 202004}/20190116 Best Audio Editors For Linux.md | 0 ... Installing Kali Linux on VirtualBox- Quickest - Safest Way.md | 0 .../{ => 202004}/20190429 10 moments that shaped Linux history.md | 0 .../20190523 Run your blog on GitHub Pages with Python.md | 0 published/{ => 202004}/20190605 What is GraphQL.md | 0 published/{ => 202004}/20190612 How to write a loop in Bash.md | 0 published/{ => 202004}/20190612 Why use GraphQL.md | 0 published/{ => 202004}/20190712 What is Silverblue.md | 0 .../20190814 9 open source cloud native projects to consider.md | 0 .../{ => 202004}/20190822 How the Linux desktop has grown.md | 0 .../20191014 How to make a Halloween lantern with Inkscape.md | 0 ...191209 Use the Fluxbox Linux desktop as your window manager.md | 0 .../20191216 Relive Linux history with the ROX desktop.md | 0 ... Difference Between DNF and YUM, Why is Yum Replaced by DNF.md | 0 .../20191224 Why your Python code should be flat and sparse.md | 0 published/{ => 202004}/20200211 Navigating man pages in Linux.md | 0 ...Manage complex Git workspaces with Great Teeming Workspaces.md | 0 .../{ => 202004}/20200228 Getting started with Linux firewalls.md | 0 .../{ => 202004}/20200309 Fish - A Friendly Interactive Shell.md | 0 .../20200311 Directing Kubernetes traffic with Traefik.md | 0 .../20200311 What you need to know about variables in Emacs.md | 0 published/{ => 202004}/20200312 Make SSL certs easy with k3s.md | 0 .../20200313 What is the internet backbone and how it works.md | 0 ...20200320 Build a private social network with a Raspberry Pi.md | 0 .../20200320 Control the firewall at the command line.md | 0 ...ow to Check Password Expiration Date for All Users on Linux.md | 0 .../{ => 202004}/20200323 Don-t love diff- Use Meld instead.md | 0 published/{ => 202004}/20200325 Linux firewall basics with ufw.md | 0 .../20200326 3 open source tools for sticking to a budget.md | 0 ...d a private chat server with a Raspberry Pi and Rocket.Chat.md | 0 ...tall Microsoft TrueType Fonts on Ubuntu-based Distributions.md | 0 ...Oracle Announces Java 14- How to Install it on Ubuntu Linux.md | 0 ...The Keyring Concept in Ubuntu- What is It and How to Use it.md | 0 ...n Your Regular TV into a Smart TV With KDE Plasma Bigscreen.md | 0 ...20200330 Using data from spreadsheets in Fedora with Python.md | 0 .../{ => 202004}/20200331 5 ways to level up your Vim skills.md | 0 ...200401 How to Find Which Graphics Card do You Have in Linux.md | 0 ... Association Launches an Open Source Collaboration Platform.md | 0 ...0402 How to Upgrade to Ubuntu 20.04 Beta from 18.04 - 19.10.md | 0 .../20200403 Scheduling tasks on Linux using the at command.md | 0 .../{ => 202004}/20200403 Take back your dotfiles with Chezmoi.md | 0 ...odhi Linux 5.1 Review- Slightly Different Lightweight Linux.md | 0 ... Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md | 0 ... 15 years of Git- How to get started or learn something new.md | 0 .../20200407 Bitwarden- A Free - Open Source Password Manager.md | 0 ...ion UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md | 0 .../20200408 Create web tutorials with Reveal.js and Git.md | 0 ...lates in LibreOffice to Save Time and Increase Productivity.md | 0 ...e-s How to Find Out Which Desktop Environment You are Using.md | 0 ...-m using AI to translate -wash your hands- in 500 languages.md | 0 .../20200410 How to Go Full Dark Mode in Ubuntu 20.04.md | 0 ...13 A handy utility for creating Raspberry Pi SD card images.md | 0 .../20200413 How to Add Multiple Time Zones in Ubuntu.md | 0 published/{ => 202004}/20200413 How to install Python on Linux.md | 0 ... Folders as Administrator in Nautilus File Manager in Linux.md | 0 .../20200416 How to package Python applications for Linux.md | 0 ...20200417 12 Linux Commands to Have Some Fun in the Terminal.md | 0 ...418 Ethernet consortium announces completion of 800GbE spec.md | 0 ...200421 MystiQ- A Free and Open Source Audio-Video Converter.md | 0 ...d IP Addresses, MAC Addresses, and Interface Speed on Linux.md | 0 .../20200422 Things You Should Know About Ubuntu 20.04.md | 0 .../20200424 Ubuntu 20.04 LTS Released. Download Now.md | 0 ...0200424 What you need to know about open source ad blockers.md | 0 ... What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md | 0 published/{ => 202004}/20200428 Fedora 32 is officially here.md | 0 ...20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md | 0 67 files changed, 0 insertions(+), 0 deletions(-) rename published/{ => 202004}/20190107 Different Ways To Update Linux Kernel For Ubuntu.md (100%) rename published/{ => 202004}/20190116 Best Audio Editors For Linux.md (100%) rename published/{ => 202004}/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md (100%) rename published/{ => 202004}/20190429 10 moments that shaped Linux history.md (100%) rename published/{ => 202004}/20190523 Run your blog on GitHub Pages with Python.md (100%) rename published/{ => 202004}/20190605 What is GraphQL.md (100%) rename published/{ => 202004}/20190612 How to write a loop in Bash.md (100%) rename published/{ => 202004}/20190612 Why use GraphQL.md (100%) rename published/{ => 202004}/20190712 What is Silverblue.md (100%) rename published/{ => 202004}/20190814 9 open source cloud native projects to consider.md (100%) rename published/{ => 202004}/20190822 How the Linux desktop has grown.md (100%) rename published/{ => 202004}/20191014 How to make a Halloween lantern with Inkscape.md (100%) rename published/{ => 202004}/20191209 Use the Fluxbox Linux desktop as your window manager.md (100%) rename published/{ => 202004}/20191216 Relive Linux history with the ROX desktop.md (100%) rename published/{ => 202004}/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md (100%) rename published/{ => 202004}/20191224 Why your Python code should be flat and sparse.md (100%) rename published/{ => 202004}/20200211 Navigating man pages in Linux.md (100%) rename published/{ => 202004}/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md (100%) rename published/{ => 202004}/20200228 Getting started with Linux firewalls.md (100%) rename published/{ => 202004}/20200309 Fish - A Friendly Interactive Shell.md (100%) rename published/{ => 202004}/20200311 Directing Kubernetes traffic with Traefik.md (100%) rename published/{ => 202004}/20200311 What you need to know about variables in Emacs.md (100%) rename published/{ => 202004}/20200312 Make SSL certs easy with k3s.md (100%) rename published/{ => 202004}/20200313 What is the internet backbone and how it works.md (100%) rename published/{ => 202004}/20200320 Build a private social network with a Raspberry Pi.md (100%) rename published/{ => 202004}/20200320 Control the firewall at the command line.md (100%) rename published/{ => 202004}/20200320 How to Check Password Expiration Date for All Users on Linux.md (100%) rename published/{ => 202004}/20200323 Don-t love diff- Use Meld instead.md (100%) rename published/{ => 202004}/20200325 Linux firewall basics with ufw.md (100%) rename published/{ => 202004}/20200326 3 open source tools for sticking to a budget.md (100%) rename published/{ => 202004}/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md (100%) rename published/{ => 202004}/20200329 How to install Microsoft TrueType Fonts on Ubuntu-based Distributions.md (100%) rename published/{ => 202004}/20200329 Oracle Announces Java 14- How to Install it on Ubuntu Linux.md (100%) rename published/{ => 202004}/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md (100%) rename published/{ => 202004}/20200329 Turn Your Regular TV into a Smart TV With KDE Plasma Bigscreen.md (100%) rename published/{ => 202004}/20200330 Using data from spreadsheets in Fedora with Python.md (100%) rename published/{ => 202004}/20200331 5 ways to level up your Vim skills.md (100%) rename published/{ => 202004}/20200401 How to Find Which Graphics Card do You Have in Linux.md (100%) rename published/{ => 202004}/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md (100%) rename published/{ => 202004}/20200402 How to Upgrade to Ubuntu 20.04 Beta from 18.04 - 19.10.md (100%) rename published/{ => 202004}/20200403 Scheduling tasks on Linux using the at command.md (100%) rename published/{ => 202004}/20200403 Take back your dotfiles with Chezmoi.md (100%) rename published/{ => 202004}/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md (100%) rename published/{ => 202004}/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md (100%) rename published/{ => 202004}/20200407 15 years of Git- How to get started or learn something new.md (100%) rename published/{ => 202004}/20200407 Bitwarden- A Free - Open Source Password Manager.md (100%) rename published/{ => 202004}/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md (100%) rename published/{ => 202004}/20200408 Create web tutorials with Reveal.js and Git.md (100%) rename published/{ => 202004}/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md (100%) rename published/{ => 202004}/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md (100%) rename published/{ => 202004}/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md (100%) rename published/{ => 202004}/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md (100%) rename published/{ => 202004}/20200413 A handy utility for creating Raspberry Pi SD card images.md (100%) rename published/{ => 202004}/20200413 How to Add Multiple Time Zones in Ubuntu.md (100%) rename published/{ => 202004}/20200413 How to install Python on Linux.md (100%) rename published/{ => 202004}/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md (100%) rename published/{ => 202004}/20200416 How to package Python applications for Linux.md (100%) rename published/{ => 202004}/20200417 12 Linux Commands to Have Some Fun in the Terminal.md (100%) rename published/{ => 202004}/20200418 Ethernet consortium announces completion of 800GbE spec.md (100%) rename published/{ => 202004}/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md (100%) rename published/{ => 202004}/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md (100%) rename published/{ => 202004}/20200422 Things You Should Know About Ubuntu 20.04.md (100%) rename published/{ => 202004}/20200424 Ubuntu 20.04 LTS Released. Download Now.md (100%) rename published/{ => 202004}/20200424 What you need to know about open source ad blockers.md (100%) rename published/{ => 202004}/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md (100%) rename published/{ => 202004}/20200428 Fedora 32 is officially here.md (100%) rename published/{ => 202004}/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md (100%) diff --git a/published/20190107 Different Ways To Update Linux Kernel For Ubuntu.md b/published/202004/20190107 Different Ways To Update Linux Kernel For Ubuntu.md similarity index 100% rename from published/20190107 Different Ways To Update Linux Kernel For Ubuntu.md rename to published/202004/20190107 Different Ways To Update Linux Kernel For Ubuntu.md diff --git a/published/20190116 Best Audio Editors For Linux.md b/published/202004/20190116 Best Audio Editors For Linux.md similarity index 100% rename from published/20190116 Best Audio Editors For Linux.md rename to published/202004/20190116 Best Audio Editors For Linux.md diff --git a/published/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md b/published/202004/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md similarity index 100% rename from published/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md rename to published/202004/20190205 Installing Kali Linux on VirtualBox- Quickest - Safest Way.md diff --git a/published/20190429 10 moments that shaped Linux history.md b/published/202004/20190429 10 moments that shaped Linux history.md similarity index 100% rename from published/20190429 10 moments that shaped Linux history.md rename to published/202004/20190429 10 moments that shaped Linux history.md diff --git a/published/20190523 Run your blog on GitHub Pages with Python.md b/published/202004/20190523 Run your blog on GitHub Pages with Python.md similarity index 100% rename from published/20190523 Run your blog on GitHub Pages with Python.md rename to published/202004/20190523 Run your blog on GitHub Pages with Python.md diff --git a/published/20190605 What is GraphQL.md b/published/202004/20190605 What is GraphQL.md similarity index 100% rename from published/20190605 What is GraphQL.md rename to published/202004/20190605 What is GraphQL.md diff --git a/published/20190612 How to write a loop in Bash.md b/published/202004/20190612 How to write a loop in Bash.md similarity index 100% rename from published/20190612 How to write a loop in Bash.md rename to published/202004/20190612 How to write a loop in Bash.md diff --git a/published/20190612 Why use GraphQL.md b/published/202004/20190612 Why use GraphQL.md similarity index 100% rename from published/20190612 Why use GraphQL.md rename to published/202004/20190612 Why use GraphQL.md diff --git a/published/20190712 What is Silverblue.md b/published/202004/20190712 What is Silverblue.md similarity index 100% rename from published/20190712 What is Silverblue.md rename to published/202004/20190712 What is Silverblue.md diff --git a/published/20190814 9 open source cloud native projects to consider.md b/published/202004/20190814 9 open source cloud native projects to consider.md similarity index 100% rename from published/20190814 9 open source cloud native projects to consider.md rename to published/202004/20190814 9 open source cloud native projects to consider.md diff --git a/published/20190822 How the Linux desktop has grown.md b/published/202004/20190822 How the Linux desktop has grown.md similarity index 100% rename from published/20190822 How the Linux desktop has grown.md rename to published/202004/20190822 How the Linux desktop has grown.md diff --git a/published/20191014 How to make a Halloween lantern with Inkscape.md b/published/202004/20191014 How to make a Halloween lantern with Inkscape.md similarity index 100% rename from published/20191014 How to make a Halloween lantern with Inkscape.md rename to published/202004/20191014 How to make a Halloween lantern with Inkscape.md diff --git a/published/20191209 Use the Fluxbox Linux desktop as your window manager.md b/published/202004/20191209 Use the Fluxbox Linux desktop as your window manager.md similarity index 100% rename from published/20191209 Use the Fluxbox Linux desktop as your window manager.md rename to published/202004/20191209 Use the Fluxbox Linux desktop as your window manager.md diff --git a/published/20191216 Relive Linux history with the ROX desktop.md b/published/202004/20191216 Relive Linux history with the ROX desktop.md similarity index 100% rename from published/20191216 Relive Linux history with the ROX desktop.md rename to published/202004/20191216 Relive Linux history with the ROX desktop.md diff --git a/published/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md b/published/202004/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md similarity index 100% rename from published/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md rename to published/202004/20191220 The Difference Between DNF and YUM, Why is Yum Replaced by DNF.md diff --git a/published/20191224 Why your Python code should be flat and sparse.md b/published/202004/20191224 Why your Python code should be flat and sparse.md similarity index 100% rename from published/20191224 Why your Python code should be flat and sparse.md rename to published/202004/20191224 Why your Python code should be flat and sparse.md diff --git a/published/20200211 Navigating man pages in Linux.md b/published/202004/20200211 Navigating man pages in Linux.md similarity index 100% rename from published/20200211 Navigating man pages in Linux.md rename to published/202004/20200211 Navigating man pages in Linux.md diff --git a/published/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md b/published/202004/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md similarity index 100% rename from published/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md rename to published/202004/20200213 Manage complex Git workspaces with Great Teeming Workspaces.md diff --git a/published/20200228 Getting started with Linux firewalls.md b/published/202004/20200228 Getting started with Linux firewalls.md similarity index 100% rename from published/20200228 Getting started with Linux firewalls.md rename to published/202004/20200228 Getting started with Linux firewalls.md diff --git a/published/20200309 Fish - A Friendly Interactive Shell.md b/published/202004/20200309 Fish - A Friendly Interactive Shell.md similarity index 100% rename from published/20200309 Fish - A Friendly Interactive Shell.md rename to published/202004/20200309 Fish - A Friendly Interactive Shell.md diff --git a/published/20200311 Directing Kubernetes traffic with Traefik.md b/published/202004/20200311 Directing Kubernetes traffic with Traefik.md similarity index 100% rename from published/20200311 Directing Kubernetes traffic with Traefik.md rename to published/202004/20200311 Directing Kubernetes traffic with Traefik.md diff --git a/published/20200311 What you need to know about variables in Emacs.md b/published/202004/20200311 What you need to know about variables in Emacs.md similarity index 100% rename from published/20200311 What you need to know about variables in Emacs.md rename to published/202004/20200311 What you need to know about variables in Emacs.md diff --git a/published/20200312 Make SSL certs easy with k3s.md b/published/202004/20200312 Make SSL certs easy with k3s.md similarity index 100% rename from published/20200312 Make SSL certs easy with k3s.md rename to published/202004/20200312 Make SSL certs easy with k3s.md diff --git a/published/20200313 What is the internet backbone and how it works.md b/published/202004/20200313 What is the internet backbone and how it works.md similarity index 100% rename from published/20200313 What is the internet backbone and how it works.md rename to published/202004/20200313 What is the internet backbone and how it works.md diff --git a/published/20200320 Build a private social network with a Raspberry Pi.md b/published/202004/20200320 Build a private social network with a Raspberry Pi.md similarity index 100% rename from published/20200320 Build a private social network with a Raspberry Pi.md rename to published/202004/20200320 Build a private social network with a Raspberry Pi.md diff --git a/published/20200320 Control the firewall at the command line.md b/published/202004/20200320 Control the firewall at the command line.md similarity index 100% rename from published/20200320 Control the firewall at the command line.md rename to published/202004/20200320 Control the firewall at the command line.md diff --git a/published/20200320 How to Check Password Expiration Date for All Users on Linux.md b/published/202004/20200320 How to Check Password Expiration Date for All Users on Linux.md similarity index 100% rename from published/20200320 How to Check Password Expiration Date for All Users on Linux.md rename to published/202004/20200320 How to Check Password Expiration Date for All Users on Linux.md diff --git a/published/20200323 Don-t love diff- Use Meld instead.md b/published/202004/20200323 Don-t love diff- Use Meld instead.md similarity index 100% rename from published/20200323 Don-t love diff- Use Meld instead.md rename to published/202004/20200323 Don-t love diff- Use Meld instead.md diff --git a/published/20200325 Linux firewall basics with ufw.md b/published/202004/20200325 Linux firewall basics with ufw.md similarity index 100% rename from published/20200325 Linux firewall basics with ufw.md rename to published/202004/20200325 Linux firewall basics with ufw.md diff --git a/published/20200326 3 open source tools for sticking to a budget.md b/published/202004/20200326 3 open source tools for sticking to a budget.md similarity index 100% rename from published/20200326 3 open source tools for sticking to a budget.md rename to published/202004/20200326 3 open source tools for sticking to a budget.md diff --git a/published/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md b/published/202004/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md similarity index 100% rename from published/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md rename to published/202004/20200327 Build a private chat server with a Raspberry Pi and Rocket.Chat.md diff --git a/published/20200329 How to install Microsoft TrueType Fonts on Ubuntu-based Distributions.md b/published/202004/20200329 How to install Microsoft TrueType Fonts on Ubuntu-based Distributions.md similarity index 100% rename from published/20200329 How to install Microsoft TrueType Fonts on Ubuntu-based Distributions.md rename to published/202004/20200329 How to install Microsoft TrueType Fonts on Ubuntu-based Distributions.md diff --git a/published/20200329 Oracle Announces Java 14- How to Install it on Ubuntu Linux.md b/published/202004/20200329 Oracle Announces Java 14- How to Install it on Ubuntu Linux.md similarity index 100% rename from published/20200329 Oracle Announces Java 14- How to Install it on Ubuntu Linux.md rename to published/202004/20200329 Oracle Announces Java 14- How to Install it on Ubuntu Linux.md diff --git a/published/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md b/published/202004/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md similarity index 100% rename from published/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md rename to published/202004/20200329 The Keyring Concept in Ubuntu- What is It and How to Use it.md diff --git a/published/20200329 Turn Your Regular TV into a Smart TV With KDE Plasma Bigscreen.md b/published/202004/20200329 Turn Your Regular TV into a Smart TV With KDE Plasma Bigscreen.md similarity index 100% rename from published/20200329 Turn Your Regular TV into a Smart TV With KDE Plasma Bigscreen.md rename to published/202004/20200329 Turn Your Regular TV into a Smart TV With KDE Plasma Bigscreen.md diff --git a/published/20200330 Using data from spreadsheets in Fedora with Python.md b/published/202004/20200330 Using data from spreadsheets in Fedora with Python.md similarity index 100% rename from published/20200330 Using data from spreadsheets in Fedora with Python.md rename to published/202004/20200330 Using data from spreadsheets in Fedora with Python.md diff --git a/published/20200331 5 ways to level up your Vim skills.md b/published/202004/20200331 5 ways to level up your Vim skills.md similarity index 100% rename from published/20200331 5 ways to level up your Vim skills.md rename to published/202004/20200331 5 ways to level up your Vim skills.md diff --git a/published/20200401 How to Find Which Graphics Card do You Have in Linux.md b/published/202004/20200401 How to Find Which Graphics Card do You Have in Linux.md similarity index 100% rename from published/20200401 How to Find Which Graphics Card do You Have in Linux.md rename to published/202004/20200401 How to Find Which Graphics Card do You Have in Linux.md diff --git a/published/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md b/published/202004/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md similarity index 100% rename from published/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md rename to published/202004/20200401 IEEE Standards Association Launches an Open Source Collaboration Platform.md diff --git a/published/20200402 How to Upgrade to Ubuntu 20.04 Beta from 18.04 - 19.10.md b/published/202004/20200402 How to Upgrade to Ubuntu 20.04 Beta from 18.04 - 19.10.md similarity index 100% rename from published/20200402 How to Upgrade to Ubuntu 20.04 Beta from 18.04 - 19.10.md rename to published/202004/20200402 How to Upgrade to Ubuntu 20.04 Beta from 18.04 - 19.10.md diff --git a/published/20200403 Scheduling tasks on Linux using the at command.md b/published/202004/20200403 Scheduling tasks on Linux using the at command.md similarity index 100% rename from published/20200403 Scheduling tasks on Linux using the at command.md rename to published/202004/20200403 Scheduling tasks on Linux using the at command.md diff --git a/published/20200403 Take back your dotfiles with Chezmoi.md b/published/202004/20200403 Take back your dotfiles with Chezmoi.md similarity index 100% rename from published/20200403 Take back your dotfiles with Chezmoi.md rename to published/202004/20200403 Take back your dotfiles with Chezmoi.md diff --git a/published/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md b/published/202004/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md similarity index 100% rename from published/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md rename to published/202004/20200404 Bodhi Linux 5.1 Review- Slightly Different Lightweight Linux.md diff --git a/published/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md b/published/202004/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md similarity index 100% rename from published/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md rename to published/202004/20200404 What is Arch User Repository (AUR)- How to Use AUR on Arch and Manjaro Linux.md diff --git a/published/20200407 15 years of Git- How to get started or learn something new.md b/published/202004/20200407 15 years of Git- How to get started or learn something new.md similarity index 100% rename from published/20200407 15 years of Git- How to get started or learn something new.md rename to published/202004/20200407 15 years of Git- How to get started or learn something new.md diff --git a/published/20200407 Bitwarden- A Free - Open Source Password Manager.md b/published/202004/20200407 Bitwarden- A Free - Open Source Password Manager.md similarity index 100% rename from published/20200407 Bitwarden- A Free - Open Source Password Manager.md rename to published/202004/20200407 Bitwarden- A Free - Open Source Password Manager.md diff --git a/published/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md b/published/202004/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md similarity index 100% rename from published/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md rename to published/202004/20200407 New Linux Distribution UbuntuDDE Brings The Beautiful Deepin Desktop to Ubuntu.md diff --git a/published/20200408 Create web tutorials with Reveal.js and Git.md b/published/202004/20200408 Create web tutorials with Reveal.js and Git.md similarity index 100% rename from published/20200408 Create web tutorials with Reveal.js and Git.md rename to published/202004/20200408 Create web tutorials with Reveal.js and Git.md diff --git a/published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md b/published/202004/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md similarity index 100% rename from published/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md rename to published/202004/20200408 How to Create Templates in LibreOffice to Save Time and Increase Productivity.md diff --git a/published/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md b/published/202004/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md similarity index 100% rename from published/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md rename to published/202004/20200409 Here-s How to Find Out Which Desktop Environment You are Using.md diff --git a/published/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md b/published/202004/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md similarity index 100% rename from published/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md rename to published/202004/20200410 How I-m using AI to translate -wash your hands- in 500 languages.md diff --git a/published/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md b/published/202004/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md similarity index 100% rename from published/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md rename to published/202004/20200410 How to Go Full Dark Mode in Ubuntu 20.04.md diff --git a/published/20200413 A handy utility for creating Raspberry Pi SD card images.md b/published/202004/20200413 A handy utility for creating Raspberry Pi SD card images.md similarity index 100% rename from published/20200413 A handy utility for creating Raspberry Pi SD card images.md rename to published/202004/20200413 A handy utility for creating Raspberry Pi SD card images.md diff --git a/published/20200413 How to Add Multiple Time Zones in Ubuntu.md b/published/202004/20200413 How to Add Multiple Time Zones in Ubuntu.md similarity index 100% rename from published/20200413 How to Add Multiple Time Zones in Ubuntu.md rename to published/202004/20200413 How to Add Multiple Time Zones in Ubuntu.md diff --git a/published/20200413 How to install Python on Linux.md b/published/202004/20200413 How to install Python on Linux.md similarity index 100% rename from published/20200413 How to install Python on Linux.md rename to published/202004/20200413 How to install Python on Linux.md diff --git a/published/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md b/published/202004/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md similarity index 100% rename from published/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md rename to published/202004/20200415 How to Open Files and Folders as Administrator in Nautilus File Manager in Linux.md diff --git a/published/20200416 How to package Python applications for Linux.md b/published/202004/20200416 How to package Python applications for Linux.md similarity index 100% rename from published/20200416 How to package Python applications for Linux.md rename to published/202004/20200416 How to package Python applications for Linux.md diff --git a/published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md b/published/202004/20200417 12 Linux Commands to Have Some Fun in the Terminal.md similarity index 100% rename from published/20200417 12 Linux Commands to Have Some Fun in the Terminal.md rename to published/202004/20200417 12 Linux Commands to Have Some Fun in the Terminal.md diff --git a/published/20200418 Ethernet consortium announces completion of 800GbE spec.md b/published/202004/20200418 Ethernet consortium announces completion of 800GbE spec.md similarity index 100% rename from published/20200418 Ethernet consortium announces completion of 800GbE spec.md rename to published/202004/20200418 Ethernet consortium announces completion of 800GbE spec.md diff --git a/published/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md b/published/202004/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md similarity index 100% rename from published/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md rename to published/202004/20200421 MystiQ- A Free and Open Source Audio-Video Converter.md diff --git a/published/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md b/published/202004/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md similarity index 100% rename from published/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md rename to published/202004/20200422 How to Check the Available Network Interfaces, Associated IP Addresses, MAC Addresses, and Interface Speed on Linux.md diff --git a/published/20200422 Things You Should Know About Ubuntu 20.04.md b/published/202004/20200422 Things You Should Know About Ubuntu 20.04.md similarity index 100% rename from published/20200422 Things You Should Know About Ubuntu 20.04.md rename to published/202004/20200422 Things You Should Know About Ubuntu 20.04.md diff --git a/published/20200424 Ubuntu 20.04 LTS Released. Download Now.md b/published/202004/20200424 Ubuntu 20.04 LTS Released. Download Now.md similarity index 100% rename from published/20200424 Ubuntu 20.04 LTS Released. Download Now.md rename to published/202004/20200424 Ubuntu 20.04 LTS Released. Download Now.md diff --git a/published/20200424 What you need to know about open source ad blockers.md b/published/202004/20200424 What you need to know about open source ad blockers.md similarity index 100% rename from published/20200424 What you need to know about open source ad blockers.md rename to published/202004/20200424 What you need to know about open source ad blockers.md diff --git a/published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md b/published/202004/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md similarity index 100% rename from published/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md rename to published/202004/20200425 What Happened to IPv5- Why there is IPv4, IPv6 but no IPv5.md diff --git a/published/20200428 Fedora 32 is officially here.md b/published/202004/20200428 Fedora 32 is officially here.md similarity index 100% rename from published/20200428 Fedora 32 is officially here.md rename to published/202004/20200428 Fedora 32 is officially here.md diff --git a/published/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md b/published/202004/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md similarity index 100% rename from published/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md rename to published/202004/20200429 Manjaro 20 Lysia Arrives with ZFS and Snap Support.md From 992c5660edc8f257524e87dce01515310ed3cb22 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 22:23:20 +0800 Subject: [PATCH 380/394] PRF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @lxbwolf 这篇翻译的不错。 --- .../20200425 Inlining optimisations in Go.md | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/translated/tech/20200425 Inlining optimisations in Go.md b/translated/tech/20200425 Inlining optimisations in Go.md index dc13968c1d..0e28421308 100644 --- a/translated/tech/20200425 Inlining optimisations in Go.md +++ b/translated/tech/20200425 Inlining optimisations in Go.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Inlining optimisations in Go) @@ -10,33 +10,35 @@ Go 中的内联优化 ====== -本文讨论 Go 编译器是如何实现内联的以及这种优化方法如何影响你的 Go 代码。 +> 本文讨论 Go 编译器是如何实现内联的,以及这种优化方法如何影响你的 Go 代码。 -*请注意:*本文重点讨论 *gc*,实际上是 [golang.org](https://github.com/golang/go) 的 Go 编译器。讨论到的概念可以广泛用于其他 Go 编译器,如 gccgo 和 llgo,但它们在实现方式和功能上可能有所差异。 +![](https://img.linux.net.cn/data/attachment/album/202005/02/222202e3v3pppkhnndpbpn.jpg) + +*请注意:*本文重点讨论 *gc*,这是来自 [golang.org](https://github.com/golang/go) 的事实标准的 Go 编译器。讨论到的概念可以广泛适用于其它 Go 编译器,如 gccgo 和 llgo,但它们在实现方式和功效上可能有所差异。 ### 内联是什么? -内联就是把简短的函数在调用它的地方展开。在计算机发展历程的早期,这个优化是由程序员手动实现的。现在,内联已经成为编译过程中自动实现的基本优化过程的其中一步。 +内联inlining就是把简短的函数在调用它的地方展开。在计算机发展历程的早期,这个优化是由程序员手动实现的。现在,内联已经成为编译过程中自动实现的基本优化过程的其中一步。 ### 为什么内联很重要? -有两个原因。第一个是它消除了函数调用本身的虚耗。第二个是它使得编译器能更高效地执行其他的优化策略。 +有两个原因。第一个是它消除了函数调用本身的开销。第二个是它使得编译器能更高效地执行其他的优化策略。 -#### 函数调用的虚耗 +#### 函数调用的开销 -在任何语言中,调用一个函数 [1][2] 都会有消耗。把参数编组进寄存器或放入栈中(取决于 ABI),在返回结果时倒序取出时会有虚耗。引入一次函数调用会导致程序计数器从指令流的一点跳到另一点,这可能导致管道阻塞。函数内部通常有前置处理,需要为函数执行准备新的栈帧,还有与前置相似的后续处理,需要在返回给调用方之前释放栈帧空间。 +在任何语言中,调用一个函数 [^1] 都会有消耗。把参数编组进寄存器或放入栈中(取决于 ABI),在返回结果时的逆反过程都会有开销。引入一次函数调用会导致程序计数器从指令流的一点跳到另一点,这可能导致管道滞后。函数内部通常有前置处理preamble,需要为函数执行准备新的栈帧,还有与前置相似的后续处理epilogue,需要在返回给调用方之前释放栈帧空间。 -在 Go 中函数调用会消耗额外的资源来支持栈的动态增长。在进入函数时,goroutine 可用的栈空间与函数需要的空间大小相等。如果可用空间不同,前置处理就会跳到把数据复制到一块新的、更大的空间的运行时逻辑,而这会导致栈空间变大。当这个复制完成后,运行时跳回到原来的函数入口,再执行栈空间检查,函数调用继续执行。这种方式下,goroutine 开始时可以申请很小的栈空间,在有需要时再申请更大的空间。[2][3] +在 Go 中函数调用会消耗额外的资源来支持栈的动态增长。在进入函数时,goroutine 可用的栈空间与函数需要的空间大小进行比较。如果可用空间不同,前置处理就会跳到运行时runtime的逻辑中,通过把数据复制到一块新的、更大的空间的来增长栈空间。当这个复制完成后,运行时就会跳回到原来的函数入口,再执行栈空间检查,现在通过了检查,函数调用继续执行。这种方式下,goroutine 开始时可以申请很小的栈空间,在有需要时再申请更大的空间。[^2] -这个检查消耗很小 — 只有几个指令 — 而且由于 goroutine 是成几何级数增长的,因此这个检查很少失败。这样,现代处理器的分支预测单元会通过假定检查肯定会成功来隐藏栈空间检查的消耗。当处理器预测错了栈空间检查,必须要抛弃它推测性执行的操作时,与为了增加 goroutine 的栈空间运行时所需的操作消耗的资源相比,管道阻塞的代价更小。 +这个检查消耗很小,只有几个指令,而且由于 goroutine 的栈是成几何级数增长的,因此这个检查很少失败。这样,现代处理器的分支预测单元可以通过假定检查肯定会成功来隐藏栈空间检查的消耗。当处理器预测错了栈空间检查,不得不放弃它在推测性执行所做的操作时,与为了增加 goroutine 的栈空间运行时所需的操作消耗的资源相比,管道滞后的代价更小。 -虽然现代处理器可以用预测性执行技术优化每次函数调用中的泛型和 Go 特定的元素的虚耗,但那些虚耗不能被完全消除,因此在每次函数调用执行必要的工作过程中都会有性能消耗。一次函数调用本身的虚耗是固定的,与更大的函数相比,调用小函数的代价更大,因为在每次调用过程中它们做的有用的工作更少。 +虽然现代处理器可以用预测性执行技术优化每次函数调用中的泛型和 Go 特定的元素的开销,但那些开销不能被完全消除,因此在每次函数调用执行必要的工作过程中都会有性能消耗。一次函数调用本身的开销是固定的,与更大的函数相比,调用小函数的代价更大,因为在每次调用过程中它们做的有用的工作更少。 -消除这些虚耗的方法必须是要消除函数调用本身,Go 的编译器就是这么做的,在某些条件下通过用函数的内容来替换函数调用来实现。这个过程被称为*内联*,因为它在函数调用处把函数体展开了。 +因此,消除这些开销的方法必须是要消除函数调用本身,Go 的编译器就是这么做的,在某些条件下通过用函数的内容来替换函数调用来实现。这个过程被称为*内联*,因为它在函数调用处把函数体展开了。 #### 改进的优化机会 -Cliff Click 博士把内联描述为现代编译器做的优化措施,像常量传播(译注:此处作者笔误,原文为 constant proportion,修正为 constant propagation)和死码消除一样,都是编译器的基本优化方法。实际上,内联可以让编译器看得更深,使编译器可以观察调用的特定函数的上下文内容,可以看到能继续简化或彻底消除的逻辑。由于可以递归地执行内联,因此不仅可以在每个独立的函数上下文处进行这种优化,也可以在整个函数调用链中进行。 +Cliff Click 博士把内联描述为现代编译器做的优化措施,像常量传播(LCTT 译注:此处作者笔误,原文为 constant proportion,修正为 constant propagation)和死代码消除一样,都是编译器的基本优化方法。实际上,内联可以让编译器看得更深,使编译器可以观察调用的特定函数的上下文内容,可以看到能继续简化或彻底消除的逻辑。由于可以递归地执行内联,因此不仅可以在每个独立的函数上下文处进行这种优化决策,也可以在整个函数调用链中进行。 ### 实践中的内联 @@ -66,14 +68,14 @@ func BenchmarkMax(b *testing.B) { } ``` -运行这个基准,会得到如下结果:[3][4] +运行这个基准,会得到如下结果:[^3] ```bash % go test -bench=. BenchmarkMax-4 530687617 2.24 ns/op ``` -在我的 2015 MacBook Air 上 `max(-1, i)` 的耗时约为 2.24 纳秒。现在去掉 `//go:noinline` 编译指令,再看下结果: +在我的 2015 MacBook Air 上 `max(-1, i)` 的耗时约为 2.24 纳秒。现在去掉 `//go:noinline` 编译指令,再看下结果: ```bash % go test -bench=. @@ -90,7 +92,7 @@ Max-4 2.21ns ± 1% 0.49ns ± 6% -77.96% (p=0.000 n=18+19) 这个提升是从哪儿来的呢? -首先,移除掉函数调用以及与之关联的前置处理 [4][5] 是主要因素。把 `max` 函数的函数体在调用处展开,减少了处理器执行的指令数量并且消除了一些分支。 +首先,移除掉函数调用以及与之关联的前置处理 [^4] 是主要因素。把 `max` 函数的函数体在调用处展开,减少了处理器执行的指令数量并且消除了一些分支。 现在由于编译器优化了 `BenchmarkMax`,因此它可以看到 `max` 函数的内容,进而可以做更多的提升。当 `max` 被内联后,`BenchmarkMax` 呈现给编译器的样子,看起来是这样的: @@ -116,7 +118,7 @@ name old time/op new time/op delta Max-4 2.21ns ± 1% 0.48ns ± 3% -78.14% (p=0.000 n=18+18) ``` -现在编译器能看到在 `BenchmarkMax` 里内联 `max` 的结果,可以执行以前不能执行的优化措施。例如,编译器注意到 `i` 初始值为 `0`,仅做自增操作,因此所有与 `i` 的比较都可以假定 `i` 不是负值。这样条件表达式 `-1 > i` 永远不是 true。[5][6] +现在编译器能看到在 `BenchmarkMax` 里内联 `max` 的结果,可以执行以前不能执行的优化措施。例如,编译器注意到 `i` 初始值为 `0`,仅做自增操作,因此所有与 `i` 的比较都可以假定 `i` 不是负值。这样条件表达式 `-1 > i` 永远不是 `true`。[^5] 证明了 `-1 > i` 永远不为 true 后,编译器可以把代码简化为: @@ -150,7 +152,7 @@ func BenchmarkMax(b *testing.B) { ### 内联的限制 -本文中我论述的内联称作*叶子*内联;把函数调用栈中最底层的函数在调用它的函数处展开的行为。内联是个递归的过程,当把函数内联到调用它的函数 A 处后,编译器会把内联后的结果代码再内联到 A 的调用方,这样持续内联下去。例如,下面的代码: +本文中我论述的内联称作叶子内联leaf inlining:把函数调用栈中最底层的函数在调用它的函数处展开的行为。内联是个递归的过程,当把函数内联到调用它的函数 A 处后,编译器会把内联后的结果代码再内联到 A 的调用方,这样持续内联下去。例如,下面的代码: ```go func BenchmarkMaxMaxMax(b *testing.B) { @@ -166,11 +168,11 @@ func BenchmarkMaxMaxMax(b *testing.B) { 下一篇文章中,我会论述当 Go 编译器想要内联函数调用栈中间的某个函数时选用的另一种内联策略。最后我会论述编译器为了内联代码准备好要达到的极限,这个极限 Go 现在的能力还达不到。 -1. 在 Go 中,一个方法就是一个有预先定义的形参和接受者的函数。假设这个方法不是通过接口调用的,调用一个无消耗的函数所消耗的代价与引入一个方法是相同的。[][7] -2. 在 Go 1.14 以前,栈检查的前置处理也被 gc 用于 STW,通过把所有活跃的 goroutine 栈空间设为 0,来强制它们切换为下一次函数调用时的运行时状态。这个机制[最近被替换][8]为一种新机制,新机制下运行时可以不用等 goroutine 进行函数调用就可以暂停 goroutine。[][9] -3. 我用 `//go:noinline` 编译指令来阻止编译器内联 `max`。这是因为我想把内联 `max` 的影响与其他影响隔离开,而不是用 `-gcflags='-l -N'` 选项在全局范围内禁止优化。关于 `//go:` 注释在[这篇文章][10]中详细论述。[][11] -4. 你可以自己通过比较 `go test -bench=. -gcflags=-S`有无 `//go:noinline` 注释时的不同结果来验证一下。[][12] -5. 你可以用 `-gcflags=-d=ssa/prove/debug=on` 选项来自己验证一下。[][13] +[^1]: 在 Go 中,一个方法就是一个有预先定义的形参和接受者的函数。假设这个方法不是通过接口调用的,调用一个无消耗的函数所消耗的代价与引入一个方法是相同的。 +[^2]: 在 Go 1.14 以前,栈检查的前置处理也被垃圾回收器用于 STW,通过把所有活跃的 goroutine 栈空间设为 0,来强制它们切换为下一次函数调用时的运行时状态。这个机制[最近被替换][8]为一种新机制,新机制下运行时可以不用等 goroutine 进行函数调用就可以暂停 goroutine。 +[^3]: 我用 `//go:noinline` 编译指令来阻止编译器内联 `max`。这是因为我想把内联 `max` 的影响与其他影响隔离开,而不是用 `-gcflags='-l -N'` 选项在全局范围内禁止优化。关于 `//go:` 注释在[这篇文章][10]中详细论述。 +[^4]: 你可以自己通过比较 `go test -bench=. -gcflags=-S` 有无 `//go:noinline` 注释时的不同结果来验证一下。 +[^5]: 你可以用 `-gcflags=-d=ssa/prove/debug=on` 选项来自己验证一下。 #### 相关文章: @@ -186,7 +188,7 @@ via: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go 作者:[Dave Cheney][a] 选题:[lujun9972][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 748e253520ef62031e1dd71cd2925bededaebf2f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sat, 2 May 2020 22:24:03 +0800 Subject: [PATCH 381/394] PUB @lxbwolf https://linux.cn/article-12176-1.html --- .../20200425 Inlining optimisations in Go.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200425 Inlining optimisations in Go.md (99%) diff --git a/translated/tech/20200425 Inlining optimisations in Go.md b/published/20200425 Inlining optimisations in Go.md similarity index 99% rename from translated/tech/20200425 Inlining optimisations in Go.md rename to published/20200425 Inlining optimisations in Go.md index 0e28421308..12f1cb67b7 100644 --- a/translated/tech/20200425 Inlining optimisations in Go.md +++ b/published/20200425 Inlining optimisations in Go.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12176-1.html) [#]: subject: (Inlining optimisations in Go) [#]: via: (https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go) [#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) From b87a3977819e510ed01b8289ed34442498420839 Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 3 May 2020 00:58:43 +0800 Subject: [PATCH 382/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200502=20Mid-st?= =?UTF-8?q?ack=20inlining=20in=20Go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200502 Mid-stack inlining in Go.md --- .../tech/20200502 Mid-stack inlining in Go.md | 211 ++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 sources/tech/20200502 Mid-stack inlining in Go.md diff --git a/sources/tech/20200502 Mid-stack inlining in Go.md b/sources/tech/20200502 Mid-stack inlining in Go.md new file mode 100644 index 0000000000..e6172566ab --- /dev/null +++ b/sources/tech/20200502 Mid-stack inlining in Go.md @@ -0,0 +1,211 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mid-stack inlining in Go) +[#]: via: (https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go) +[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) + +Mid-stack inlining in Go +====== + +In the [previous post][1] I discussed how leaf inlining allows the Go compiler to reduce the overhead of function calls and extend optimisation opportunities across function boundaries. In this post I’ll discuss the limits of inlining and leaf vs mid-stack inlining. + +### The limits of inlining + +Inlining a function into its caller removes the call’s overhead and increases the opportunity for the compiler to apply additional optimisations so the question should be asked, if some inlining is good, would more be better, _why not inline as much as possible?_ + +Inlining trades possibly larger program sizes for potentially faster execution time. The main reason to limit inlining is creating many inlined copies of a function can increase compile time and result in larger binaries for marginal gain. Even taking into account the opportunities for further optimisation, aggressive inlining tends to increase the size of, and the time too compile, the resulting binary. + +Inlining works best for [small functions][2] that do relatively little work compared to the overhead of calling them. As the size of a function grows, the time saved avoiding the call’s overhead diminishes relative to the work done inside the function. Larger functions tend to be more complex, thus the benefits of optimising their inlined forms vs in situ are reduced. + +### Inlining budget + +During compilation each function’s inlineabilty is calculated using what is known as the _inlining budget_[1][3]. The cost calculation can tricky too internalise but is broadly one unit per node in the AST for simple things like unary and binary operations but can be higher for complex operations like `make`. Consider this example: + +``` +package main + +func small() string { + s := "hello, " + "world!" + return s +} + +func large() string { + s := "a" + s += "b" + s += "c" + s += "d" + s += "e" + s += "f" + s += "g" + s += "h" + s += "i" + s += "j" + s += "k" + s += "l" + s += "m" + s += "n" + s += "o" + s += "p" + s += "q" + s += "r" + s += "s" + s += "t" + s += "u" + s += "v" + s += "w" + s += "x" + s += "y" + s += "z" + return s +} + +func main() { + small() + large() +} +``` + +Compiling this function with `-gcflags=-m=2` allows us to see the cost the compiler assigns to each function. + +``` +% go build -gcflags=-m=2 inl.go +# command-line-arguments +./inl.go:3:6: can inline small with cost 7 as: func() string { s := "hello, world!"; return s } +./inl.go:8:6: cannot inline large: function too complex: cost 82 exceeds budget 80 +./inl.go:38:6: can inline main with cost 68 as: func() { small(); large() } +./inl.go:39:7: inlining call to small func() string { s := "hello, world!"; return s } +``` + +The compiler determined that `func small()` can be inlined due to its cost of 7. `func large()` was determined to be too expensive. `func main()`has been marked as eligable and assigned a cost of 68; 7 from the body of `small`, 57 from the function call to `small` and the remainder in its own overhead. + +The inlining budget can be controlled to some degree with the `-gcflag=-l` flag. Currently the values that apply are: + + * `-gcflags=-l=0` is the default level of inlining. + * `-gcflags=-l` (or `-gcflags=-l=1`) disables inlining. + * `-gcflags=-l=2` and `-gcflags=-l=3` are currently unused and have no effect over `-gcflags=-l=0` + * `-gcflags=-l=4` reduces the cost for inlining non-leaf functions and calls through interfaces.[2][4] + + + +#### Hairy optimisations + +Some functions with a relatively low inlining cost may be ineligible because of their complexity. This is known as the function’s hairiness as the semantics of some operations are hard to reason about once inlined, for example `recover`, `break`. Others, like `select` and `go`, involve co-ordination with the runtime so the extra effort of inlining doesn’t pay for itself. + +The list of hairy statements also includes things like `for `and `range` which don’t have an inherently large cost, but simply haven’t been optimised yet. + +### Mid stack inlining + +Historically the Go compiler only performed leaf inlining–only functions which did not call other functions were eligible. In the context of the hairiness discussion previously, a function call would disqualify the function from being inlined. + +Enter mid stack inlining which, as its name implies, allows functions in the middle of a call stack to be inlined without requiring everything below them to be eligible. Mid stack inlining was introduced by David Lazar in Go 1.9 and improved in subsequent releases. [This presentation][5] goes into some of the difficulties with retaining the behaviour of stack traces and `runtime.Callers` in code paths that had been heavily inlined. + +We see an example of mid-stack inlining in the previous example. After inlining, `func main()` contains the body of `func small()` and a call to `func large()`, thus it is considered a non-leaf function. Historically this would have prevented it from being further inlined even though its combined cost was less than the inlining budget. + +The primary use case for mid stack inlining is to reduce the overhead of a path through the call stack. Consider this example: + +``` +package main + +import ( + "fmt" + "strconv" +) + +type Rectangle struct {} + +//go:noinline +func (r *Rectangle) Height() int { + h, _ := strconv.ParseInt("7", 10, 0) + return int(h) +} + +func (r *Rectangle) Width() int { + return 6 +} + +func (r *Rectangle) Area() int { return r.Height() * r.Width() } + +func main() { + var r Rectangle + fmt.Println(r.Area()) +} +``` + +In this example `r.Area()` is a simple function which calls two others. `r.Width()` can be inlined while `r.Height()`, simulated here with the `//go:noinline` annotation, cannot. [3][6] + +``` +% go build -gcflags='-m=2' square.go +# command-line-arguments +./square.go:12:6: cannot inline (*Rectangle).Height: marked go:noinline +./square.go:17:6: can inline (*Rectangle).Width with cost 2 as: method(*Rectangle) func() int { return 6 } +./square.go:21:6: can inline (*Rectangle).Area with cost 67 as: method(*Rectangle) func() int { return r.Height() * r.Width() } ./square.go:21:61: inlining call to (*Rectangle).Width method(*Rectangle) func() int { return 6 } +./square.go:23:6: cannot inline main: function too complex: cost 150 exceeds budget 80 +./square.go:25:20: inlining call to (*Rectangle).Area method(*Rectangle) func() int { return r.Height() * r.Width() } +./square.go:25:20: inlining call to (*Rectangle).Width method(*Rectangle) func() int { return 6 } +``` + +As the multiplication performed by `r.Area()` is cheap compared to the overhead of calling it, inlining `r.Area()`‘s single expression is a net win even if its downstream caller to `r.Height()` remains ineligible. + +#### Fast path inlining + +The most startling example of the power of mid-stack inlining comes from 2019 when [Carlo Alberto Ferraris improved the performance][7] of `sync.Mutex.Lock()` by allowing the fast path of the lock–the uncontended case–to be inlined into its caller. Prior to this change `sync.Mutex.Lock()` was a large function containing many hairy conditions which made it ineligible to be inlined. Even in the case where the lock was available, the caller had to pay the overhead of calling `sync.Mutex.Lock()`. + +Carlo’s change split `sync.Mutex.Lock()` into two functions (a process he dubbed _outlining_). The outer `sync.Mutex.Lock()` method now calls `sync/atomic.CompareAndSwapInt32()` and returns to the caller immediately if the CAS succeeds. If not, the function falls through to `sync.Mutex.lockSlow()` which handles the slow path required to register interest on the lock and park the goroutine.[4][8] + +``` +% go build -gcflags='-m=2 -l=0' sync 2>&1 | grep '(*Mutex).Lock' +../go/src/sync/mutex.go:72:6: can inline (*Mutex).Lock with cost 69 as: method(*Mutex) func() { if "sync/atomic".CompareAndSwapInt32(&m.state, 0, mutexLocked) { if race.Enabled {  }; return  }; m.lockSlow() } +``` + +By splitting the function into an easily inalienable outer function, falling through to a complex inner function to handle the slow path Carlo’s combined mid stack inlining and the [compiler’s support for intrinsic operations][9] to reduce the cost of an uncontended lock by 14%. Then he repeated the trick for an additional 9% saving in `sync.RWMutex.Unlock()`. + + 1. The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release.[][10] + 2. Keep in mind that the compiler authors warn that “[Additional levels of inlining (beyond -l) may be buggy and are not supported”][11]. Caveat emptor.[][12] + 3. The compiler is powerful enough that it can inline complex functions like `strconv.ParseInt`. As a experiment, try removing the `//go:noinline` annotation and observe the result with `-gcflags=-m=2`.[][13] + 4. The expression `race.Enable` is a constant controlled by the `-race` flag passed to the `go` tool. It is `false` for normal builds which allows the compiler to elide those code paths entirely.[][14] + + + +#### Related posts: + + 1. [Inlining optimisations in Go][15] + 2. [Why is a Goroutine’s stack infinite ?][16] + 3. [Stack traces and the errors package][17] + 4. [What is the zero value, and why is it useful?][18] + + + +-------------------------------------------------------------------------------- + +via: https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go + +作者:[Dave Cheney][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://dave.cheney.net/author/davecheney +[b]: https://github.com/lujun9972 +[1]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go +[2]: https://medium.com/@joshsaintjacque/small-functions-considered-awesome-c95b3fd1812f +[3]: tmp.FyRthF1bbF#easy-footnote-bottom-1-4076 (The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release.) +[4]: tmp.FyRthF1bbF#easy-footnote-bottom-2-4076 (Keep in mind that the compiler authors warn that “Additional levels of inlining (beyond -l) may be buggy and are not supported”. Caveat emptor.) +[5]: https://docs.google.com/presentation/d/1Wcblp3jpfeKwA0Y4FOmj63PW52M_qmNqlQkNaLj0P5o/edit#slide=id.p +[6]: tmp.FyRthF1bbF#easy-footnote-bottom-3-4076 (The compiler is powerful enough that it can inline complex functions like strconv.ParseInt. As a experiment, try removing the //go:noinline annotation and observe the result with -gcflags=-m=2.) +[7]: https://go-review.googlesource.com/c/go/+/148959 +[8]: tmp.FyRthF1bbF#easy-footnote-bottom-4-4076 (The expression race.Enable is a constant controlled by the -race flag passed to the go tool. It is false for normal builds which allows the compiler to elide those code paths entirely.) +[9]: https://dave.cheney.net/2019/08/20/go-compiler-intrinsics +[10]: tmp.FyRthF1bbF#easy-footnote-1-4076 +[11]: https://github.com/golang/go/blob/be08e10b3bc07f3a4e7b27f44d53d582e15fd6c7/src/cmd/compile/internal/gc/inl.go#L11 +[12]: tmp.FyRthF1bbF#easy-footnote-2-4076 +[13]: tmp.FyRthF1bbF#easy-footnote-3-4076 +[14]: tmp.FyRthF1bbF#easy-footnote-4-4076 +[15]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go (Inlining optimisations in Go) +[16]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?) +[17]: https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package (Stack traces and the errors package) +[18]: https://dave.cheney.net/2013/01/19/what-is-the-zero-value-and-why-is-it-useful (What is the zero value, and why is it useful?) From 7d57f4e9f2ccc8a4f4ccb3f475230eb9c675056b Mon Sep 17 00:00:00 2001 From: DarkSun Date: Sun, 3 May 2020 01:04:28 +0800 Subject: [PATCH 383/394] =?UTF-8?q?=E9=80=89=E9=A2=98:=2020200502=20The=20?= =?UTF-8?q?real=20impact=20of=20canceling=20PyCon=20due=20to=20COVID-19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md --- ...pact of canceling PyCon due to COVID-19.md | 129 ++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md diff --git a/sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md b/sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md new file mode 100644 index 0000000000..aebbbf28c4 --- /dev/null +++ b/sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md @@ -0,0 +1,129 @@ +[#]: collector: (lujun9972) +[#]: translator: ( ) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (The real impact of canceling PyCon due to COVID-19) +[#]: via: (https://opensource.com/article/20/5/pycon-covid-19) +[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg) + +The real impact of canceling PyCon due to COVID-19 +====== +An interview with Ewa Jodlowska on how the Python Software Foundation is +responding to the cancelation of in-person events. +![A dollar sign in a network][1] + +The Python Software Foundation (PSF) had to [cancel its popular PyCon US][2] event in response to COVID-19. I interviewed [Ewa Jodlowska][3], Executive Director of the PSF, to talk about the experience and see what we all can learn, and how we can be supportive of the non-profit that supports one of my favorite programming languages. + +### The impact on PSF employees + +I asked Jodlowska "how have you had to adjust your work in light of COVID-19?" + +In her response, the day-to-day didn't sound like much of a change. PSF staff "have always worked remotely." The organization practices a [fully remote work][4] culture and doesn’t have an office. The small staff of seven employees is well versed in collaborating outside of an office. + +Familiarity aside, the emotional impact of needing to cancel an event they put a year’s worth of planning into hurt. + +> **"We all believe in what we do. Which is particularly why we’re such a great small team. So it really impacted us emotionally and mentally. And it continues to."** + +We spoke about how the team is reliving what the days would have looked like if PyCon wasn't interrupted by COVID-19–keynotes would start _now_, the sponsor booths would be in full motion right _now_–and just how emotionally taxing it all was. Throughout the discussion, Jodlowska always came back to recognizing the staff for their resiliency and energy to pivot the event online. + +### The cascading impact of event cancellation + +Jodlowska has been incredibly transparent about the experience. In her March 31st [article on the financial outcome][5], she outlines it clearly: the Python Software Foundation would take a hit from the event cancelation.  + +Jodlowska notes that part of the challenge is that PyCon accounts for too much of the organization’s financial health. About 63% of the 2020 revenue was projected to come from the show. While that number is down from the [2017 estimate of 80%][6], it’s still a concern when in-person events will remain limited to keep attendees safe during the COVID-19 outbreak. + +> **"We don’t want to rely on one event**–**or events in general**–**to operate and provide community support."** + +The PSF board of directors is hard at work to look into the diversification of funding. In the meantime, PyCon remains essential to sustainability running the organization. + +### Community support makes all the difference + +It's at this point that Jodlowska again recognizes the incredible work of the PSF staff. They quickly pivoted the vision of the event, and the community of attendees, sponsors, and speakers were all supportive of the move. + +> **"[We] have been brought to tears many times by the generosity of our sponsors and our individual donors."** + +Jodlowska noted that the generosity of so many resulted in reducing the financial impact on the PSF. An incredible amount of Individual attendees are donating their registration costs to the PSF. They are also showing up across social media sites to participate in their own distributed virtual experience of PyCon.  + +Another important part of the community, the corporate sponsors of the show, are also showing up to support the non-profit. Many sponsors had already canceled physical presence at the show before the event was officially moved online. Some of them were kind enough, as Jodlowska noted, to donate the cost of sponsorship to the PSF. In a huge turn of events, the list of sponsors **grew** as the online event came together. + +> **[M]any sponsors have opted into participating in PyCon 2020 online. Because of this we have decreased the amount needed from our reserve by 77%! The PSF will now only need $141,713 from its financial reserve to get through 2020.** + +For more on the data side, see Jodlowska’s article _[Thank you to donors & sponsors][7]_. + +Support in all its forms led to the conference feeling like it is well on its way. Some sponsors are even moving to a virtual booth experience. + +> Since our sponsors can’t be with you in person, we’ve created a place to provide their content online - . [#PyCon2020][8] Gold Sponsor Weekly Python Exercise shared this video to introduce you to their offerings: . +> +> — PyCon US (@pycon) [April 18, 2020][9] + +Maybe most impressively, many speakers and tutorial instructors made the effort of recording their sessions. That’s helped PyCon to [gradually unfold online][10] with incredible educational content. The audience is still able to interact as well: YouTube comments are open for moderation so speakers can interact with their audience. + +Lastly, there remains an army of volunteers who shifted their in-person plans online and continue to help in any way possible. + +### Some of the surprising positives from this difficult change + +While it is without a doubt a challenging time for the organization, Jodlowska noted a number of positives that are unfolding due to this move to virtual. + +To start, the staff of the PSF “have never been closer,” as they bond over the experience and spend more time getting to know each other through weekly video calls and baking competitions. + +Jodlowska was inspired to get involved in another open source effort, [FOSS responders][11], who are helping organizations respond to the cancelation of events due to COVID-19. (If you’ve been affected as well, they are there to help.) + +The generosity mentioned above is a silver lining to the experience and encouraging to the hardworking team that uplifts the popular Python programming language. + +There is also a broader impact on participation in PyCon. While the final numbers are not in yet, an international audience has access to all of PyCon as it unfolds, which gives the entire world a chance to be part of an excellent event [I got to attend][12] last year. On the development side, Jodlowska mentioned that the [core-dev team][13] that maintains Python, who would normally meet in person, shifted to a virtual meeting. As a result of that shift, some participants got to attend that otherwise would not have had the opportunity to join in person. + +### How you can help the Python Software Foundation + +I reached out to Jodlowska because I am impressed with and supportive of their mission to support the Python community. If you want to support them as well, you have options: + + * Become a [free or supporting member][14] of the PSF to get involved in our future. + * [Sign up for the PSF’s free newsletter][15] to stay up to date. + * [Donate][16] directly to the PSF (and thank you to those that already have). + * Ask your employer to [sponsor the PSF][17]. + * Ask your employer if they match donations to 501(c)(3) non-profits, and ask for your donations to the PSF to be matched. + + + +Last but not least, participate in PyCon over the next few weeks. You can learn from all kinds of smart people on a range of topics like [Matt Harrison][18]’s [Hands-on Python for Programmers][19] that guides attendees through analyzing COVID-19 data to [Katie McLaughlin][20]’s thoughtful talk on [What is deployment, anyway?][21] + +Be sure to [review the full][10] list and engage with the amazing lineup of speakers. + +* * * + +_Are you part of a non-profit looking to connect with your open source community at this time of social distancing? Let me know at matt @ opensource.com._ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/5/pycon-covid-19 + +作者:[Matthew Broberg][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/mbbroberg +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_whitehurst_money.png?itok=ls-SOzM0 (A dollar sign in a network) +[2]: https://pycon.blogspot.com/2020/03/pycon-us-2020-in-pittsburgh.html +[3]: https://www.python.org/psf/records/staff/ +[4]: https://opensource.com/tags/wfh +[5]: http://pyfound.blogspot.com/2020/03/psfs-projected-2020-financial-outcome.html +[6]: https://www.youtube.com/watch?v=79AIzbjLzdk +[7]: http://pyfound.blogspot.com/2020/04/thank-you-to-donors-sponsors.html +[8]: https://twitter.com/hashtag/PyCon2020?src=hash&ref_src=twsrc%5Etfw +[9]: https://twitter.com/pycon/status/1251563142641000455?ref_src=twsrc%5Etfw +[10]: https://us.pycon.org/2020/online/ +[11]: https://fossresponders.com/ +[12]: https://opensource.com/article/19/5/jupyterlab-python-developers-magic +[13]: https://devguide.python.org/coredev/ +[14]: https://www.python.org/psf/membership/ +[15]: https://www.python.org/psf/newsletter/ +[16]: https://www.python.org/psf/donations/ +[17]: https://www.python.org/psf/sponsorship/ +[18]: https://us.pycon.org/2020/speaker/profile/454/ +[19]: https://youtu.be/fuJcSNUMrW0 +[20]: https://opensource.com/users/glasnt +[21]: https://youtu.be/8vstov3Y7uE From 7b0dc6070f908efb5f530ff0402f989e22e18701 Mon Sep 17 00:00:00 2001 From: "Xingyu.Wang" Date: Sun, 3 May 2020 08:05:15 +0800 Subject: [PATCH 384/394] Rename sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md to sources/talk/20200502 The real impact of canceling PyCon due to COVID-19.md --- ...20200502 The real impact of canceling PyCon due to COVID-19.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sources/{tech => talk}/20200502 The real impact of canceling PyCon due to COVID-19.md (100%) diff --git a/sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md b/sources/talk/20200502 The real impact of canceling PyCon due to COVID-19.md similarity index 100% rename from sources/tech/20200502 The real impact of canceling PyCon due to COVID-19.md rename to sources/talk/20200502 The real impact of canceling PyCon due to COVID-19.md From a1263fe89a6e2cfe11ad0b23b16a9a5a50f1818c Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sun, 3 May 2020 09:41:50 +0800 Subject: [PATCH 385/394] APL --- sources/tech/20200502 Mid-stack inlining in Go.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20200502 Mid-stack inlining in Go.md b/sources/tech/20200502 Mid-stack inlining in Go.md index e6172566ab..f34c7070d5 100644 --- a/sources/tech/20200502 Mid-stack inlining in Go.md +++ b/sources/tech/20200502 Mid-stack inlining in Go.md @@ -1,5 +1,5 @@ [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (lxbwolf) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) From de32773584c1cb37a129e405535b809a46b87bfb Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sun, 3 May 2020 14:27:03 +0800 Subject: [PATCH 386/394] TSL --- .../tech/20200502 Mid-stack inlining in Go.md | 211 ------------------ .../tech/20200502 Mid-stack inlining in Go.md | 211 ++++++++++++++++++ 2 files changed, 211 insertions(+), 211 deletions(-) delete mode 100644 sources/tech/20200502 Mid-stack inlining in Go.md create mode 100644 translated/tech/20200502 Mid-stack inlining in Go.md diff --git a/sources/tech/20200502 Mid-stack inlining in Go.md b/sources/tech/20200502 Mid-stack inlining in Go.md deleted file mode 100644 index f34c7070d5..0000000000 --- a/sources/tech/20200502 Mid-stack inlining in Go.md +++ /dev/null @@ -1,211 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (lxbwolf) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Mid-stack inlining in Go) -[#]: via: (https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go) -[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) - -Mid-stack inlining in Go -====== - -In the [previous post][1] I discussed how leaf inlining allows the Go compiler to reduce the overhead of function calls and extend optimisation opportunities across function boundaries. In this post I’ll discuss the limits of inlining and leaf vs mid-stack inlining. - -### The limits of inlining - -Inlining a function into its caller removes the call’s overhead and increases the opportunity for the compiler to apply additional optimisations so the question should be asked, if some inlining is good, would more be better, _why not inline as much as possible?_ - -Inlining trades possibly larger program sizes for potentially faster execution time. The main reason to limit inlining is creating many inlined copies of a function can increase compile time and result in larger binaries for marginal gain. Even taking into account the opportunities for further optimisation, aggressive inlining tends to increase the size of, and the time too compile, the resulting binary. - -Inlining works best for [small functions][2] that do relatively little work compared to the overhead of calling them. As the size of a function grows, the time saved avoiding the call’s overhead diminishes relative to the work done inside the function. Larger functions tend to be more complex, thus the benefits of optimising their inlined forms vs in situ are reduced. - -### Inlining budget - -During compilation each function’s inlineabilty is calculated using what is known as the _inlining budget_[1][3]. The cost calculation can tricky too internalise but is broadly one unit per node in the AST for simple things like unary and binary operations but can be higher for complex operations like `make`. Consider this example: - -``` -package main - -func small() string { - s := "hello, " + "world!" - return s -} - -func large() string { - s := "a" - s += "b" - s += "c" - s += "d" - s += "e" - s += "f" - s += "g" - s += "h" - s += "i" - s += "j" - s += "k" - s += "l" - s += "m" - s += "n" - s += "o" - s += "p" - s += "q" - s += "r" - s += "s" - s += "t" - s += "u" - s += "v" - s += "w" - s += "x" - s += "y" - s += "z" - return s -} - -func main() { - small() - large() -} -``` - -Compiling this function with `-gcflags=-m=2` allows us to see the cost the compiler assigns to each function. - -``` -% go build -gcflags=-m=2 inl.go -# command-line-arguments -./inl.go:3:6: can inline small with cost 7 as: func() string { s := "hello, world!"; return s } -./inl.go:8:6: cannot inline large: function too complex: cost 82 exceeds budget 80 -./inl.go:38:6: can inline main with cost 68 as: func() { small(); large() } -./inl.go:39:7: inlining call to small func() string { s := "hello, world!"; return s } -``` - -The compiler determined that `func small()` can be inlined due to its cost of 7. `func large()` was determined to be too expensive. `func main()`has been marked as eligable and assigned a cost of 68; 7 from the body of `small`, 57 from the function call to `small` and the remainder in its own overhead. - -The inlining budget can be controlled to some degree with the `-gcflag=-l` flag. Currently the values that apply are: - - * `-gcflags=-l=0` is the default level of inlining. - * `-gcflags=-l` (or `-gcflags=-l=1`) disables inlining. - * `-gcflags=-l=2` and `-gcflags=-l=3` are currently unused and have no effect over `-gcflags=-l=0` - * `-gcflags=-l=4` reduces the cost for inlining non-leaf functions and calls through interfaces.[2][4] - - - -#### Hairy optimisations - -Some functions with a relatively low inlining cost may be ineligible because of their complexity. This is known as the function’s hairiness as the semantics of some operations are hard to reason about once inlined, for example `recover`, `break`. Others, like `select` and `go`, involve co-ordination with the runtime so the extra effort of inlining doesn’t pay for itself. - -The list of hairy statements also includes things like `for `and `range` which don’t have an inherently large cost, but simply haven’t been optimised yet. - -### Mid stack inlining - -Historically the Go compiler only performed leaf inlining–only functions which did not call other functions were eligible. In the context of the hairiness discussion previously, a function call would disqualify the function from being inlined. - -Enter mid stack inlining which, as its name implies, allows functions in the middle of a call stack to be inlined without requiring everything below them to be eligible. Mid stack inlining was introduced by David Lazar in Go 1.9 and improved in subsequent releases. [This presentation][5] goes into some of the difficulties with retaining the behaviour of stack traces and `runtime.Callers` in code paths that had been heavily inlined. - -We see an example of mid-stack inlining in the previous example. After inlining, `func main()` contains the body of `func small()` and a call to `func large()`, thus it is considered a non-leaf function. Historically this would have prevented it from being further inlined even though its combined cost was less than the inlining budget. - -The primary use case for mid stack inlining is to reduce the overhead of a path through the call stack. Consider this example: - -``` -package main - -import ( - "fmt" - "strconv" -) - -type Rectangle struct {} - -//go:noinline -func (r *Rectangle) Height() int { - h, _ := strconv.ParseInt("7", 10, 0) - return int(h) -} - -func (r *Rectangle) Width() int { - return 6 -} - -func (r *Rectangle) Area() int { return r.Height() * r.Width() } - -func main() { - var r Rectangle - fmt.Println(r.Area()) -} -``` - -In this example `r.Area()` is a simple function which calls two others. `r.Width()` can be inlined while `r.Height()`, simulated here with the `//go:noinline` annotation, cannot. [3][6] - -``` -% go build -gcflags='-m=2' square.go -# command-line-arguments -./square.go:12:6: cannot inline (*Rectangle).Height: marked go:noinline -./square.go:17:6: can inline (*Rectangle).Width with cost 2 as: method(*Rectangle) func() int { return 6 } -./square.go:21:6: can inline (*Rectangle).Area with cost 67 as: method(*Rectangle) func() int { return r.Height() * r.Width() } ./square.go:21:61: inlining call to (*Rectangle).Width method(*Rectangle) func() int { return 6 } -./square.go:23:6: cannot inline main: function too complex: cost 150 exceeds budget 80 -./square.go:25:20: inlining call to (*Rectangle).Area method(*Rectangle) func() int { return r.Height() * r.Width() } -./square.go:25:20: inlining call to (*Rectangle).Width method(*Rectangle) func() int { return 6 } -``` - -As the multiplication performed by `r.Area()` is cheap compared to the overhead of calling it, inlining `r.Area()`‘s single expression is a net win even if its downstream caller to `r.Height()` remains ineligible. - -#### Fast path inlining - -The most startling example of the power of mid-stack inlining comes from 2019 when [Carlo Alberto Ferraris improved the performance][7] of `sync.Mutex.Lock()` by allowing the fast path of the lock–the uncontended case–to be inlined into its caller. Prior to this change `sync.Mutex.Lock()` was a large function containing many hairy conditions which made it ineligible to be inlined. Even in the case where the lock was available, the caller had to pay the overhead of calling `sync.Mutex.Lock()`. - -Carlo’s change split `sync.Mutex.Lock()` into two functions (a process he dubbed _outlining_). The outer `sync.Mutex.Lock()` method now calls `sync/atomic.CompareAndSwapInt32()` and returns to the caller immediately if the CAS succeeds. If not, the function falls through to `sync.Mutex.lockSlow()` which handles the slow path required to register interest on the lock and park the goroutine.[4][8] - -``` -% go build -gcflags='-m=2 -l=0' sync 2>&1 | grep '(*Mutex).Lock' -../go/src/sync/mutex.go:72:6: can inline (*Mutex).Lock with cost 69 as: method(*Mutex) func() { if "sync/atomic".CompareAndSwapInt32(&m.state, 0, mutexLocked) { if race.Enabled {  }; return  }; m.lockSlow() } -``` - -By splitting the function into an easily inalienable outer function, falling through to a complex inner function to handle the slow path Carlo’s combined mid stack inlining and the [compiler’s support for intrinsic operations][9] to reduce the cost of an uncontended lock by 14%. Then he repeated the trick for an additional 9% saving in `sync.RWMutex.Unlock()`. - - 1. The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release.[][10] - 2. Keep in mind that the compiler authors warn that “[Additional levels of inlining (beyond -l) may be buggy and are not supported”][11]. Caveat emptor.[][12] - 3. The compiler is powerful enough that it can inline complex functions like `strconv.ParseInt`. As a experiment, try removing the `//go:noinline` annotation and observe the result with `-gcflags=-m=2`.[][13] - 4. The expression `race.Enable` is a constant controlled by the `-race` flag passed to the `go` tool. It is `false` for normal builds which allows the compiler to elide those code paths entirely.[][14] - - - -#### Related posts: - - 1. [Inlining optimisations in Go][15] - 2. [Why is a Goroutine’s stack infinite ?][16] - 3. [Stack traces and the errors package][17] - 4. [What is the zero value, and why is it useful?][18] - - - --------------------------------------------------------------------------------- - -via: https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go - -作者:[Dave Cheney][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://dave.cheney.net/author/davecheney -[b]: https://github.com/lujun9972 -[1]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go -[2]: https://medium.com/@joshsaintjacque/small-functions-considered-awesome-c95b3fd1812f -[3]: tmp.FyRthF1bbF#easy-footnote-bottom-1-4076 (The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release.) -[4]: tmp.FyRthF1bbF#easy-footnote-bottom-2-4076 (Keep in mind that the compiler authors warn that “Additional levels of inlining (beyond -l) may be buggy and are not supported”. Caveat emptor.) -[5]: https://docs.google.com/presentation/d/1Wcblp3jpfeKwA0Y4FOmj63PW52M_qmNqlQkNaLj0P5o/edit#slide=id.p -[6]: tmp.FyRthF1bbF#easy-footnote-bottom-3-4076 (The compiler is powerful enough that it can inline complex functions like strconv.ParseInt. As a experiment, try removing the //go:noinline annotation and observe the result with -gcflags=-m=2.) -[7]: https://go-review.googlesource.com/c/go/+/148959 -[8]: tmp.FyRthF1bbF#easy-footnote-bottom-4-4076 (The expression race.Enable is a constant controlled by the -race flag passed to the go tool. It is false for normal builds which allows the compiler to elide those code paths entirely.) -[9]: https://dave.cheney.net/2019/08/20/go-compiler-intrinsics -[10]: tmp.FyRthF1bbF#easy-footnote-1-4076 -[11]: https://github.com/golang/go/blob/be08e10b3bc07f3a4e7b27f44d53d582e15fd6c7/src/cmd/compile/internal/gc/inl.go#L11 -[12]: tmp.FyRthF1bbF#easy-footnote-2-4076 -[13]: tmp.FyRthF1bbF#easy-footnote-3-4076 -[14]: tmp.FyRthF1bbF#easy-footnote-4-4076 -[15]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go (Inlining optimisations in Go) -[16]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?) -[17]: https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package (Stack traces and the errors package) -[18]: https://dave.cheney.net/2013/01/19/what-is-the-zero-value-and-why-is-it-useful (What is the zero value, and why is it useful?) diff --git a/translated/tech/20200502 Mid-stack inlining in Go.md b/translated/tech/20200502 Mid-stack inlining in Go.md new file mode 100644 index 0000000000..3d5bb1ee15 --- /dev/null +++ b/translated/tech/20200502 Mid-stack inlining in Go.md @@ -0,0 +1,211 @@ +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +[#]: subject: "Mid-stack inlining in Go" +[#]: via: "https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go" +[#]: author: "Dave Cheney https://dave.cheney.net/author/davecheney" + +Go 中对栈中函数进行内联 +====== + +[上一篇文章][1]中我论述了叶子内联是怎样让 Go 编译器减少函数调用的开销的,以及延伸出了跨函数边界的优化的机会。本文中,我要论述内联的限制以及叶子与栈中内联的对比。 + +### 内联的限制 + +把函数内联到它的调用处消除了调用的开销,为编译器进行其他的优化提供了更好的机会,那么问题来了,既然内联这么好,内联得越多开销就越少,_为什么不尽可能多地内联呢?_ + +内联用可能的增加程序大小换来了更快的执行时间。限制内联的最主要原因是,创建太多的函数内联的备份会增加编译时间,并且作为边际效应会增加生成的二进制文件的大小。即使把内联带来的进一步的优化机会考虑在内,太激进的内联也可能会增加生成的二进制文件的大小和编译时间。 + +内联收益最大的是[小函数][2],相对于调用它们的开销来说,这些函数做很少的工作。随着函数大小的增长,函数内部做的工作与函数调用的开销相比省下的时间越来越少。函数越大通常越复杂,因此对它们内联后进行优化与不内联相比的收益没有(对小函数进行内联)那么大。 + +### 内联预算 + +在编译过程中,每个函数的内联能力是用_内联预算_计算的。开销的计算过程可以巧妙地内化,像一元和二元等简单操作,在抽象语法数(Abstract Syntax Tree,AST)中通常是每个节点一个单元,更复杂的操作如 `make` 可能单元更多。考虑下面的例子: + +```go +package main + +func small() string { + s := "hello, " + "world!" + return s +} + +func large() string { + s := "a" + s += "b" + s += "c" + s += "d" + s += "e" + s += "f" + s += "g" + s += "h" + s += "i" + s += "j" + s += "k" + s += "l" + s += "m" + s += "n" + s += "o" + s += "p" + s += "q" + s += "r" + s += "s" + s += "t" + s += "u" + s += "v" + s += "w" + s += "x" + s += "y" + s += "z" + return s +} + +func main() { + small() + large() +} +``` + +使用 `-gcflags=-m=2` 参数编译这个函数能让我们看到编译器分配给每个函数的开销: + +```bash +% go build -gcflags=-m=2 inl.go +# command-line-arguments +./inl.go:3:6: can inline small with cost 7 as: func() string { s := "hello, world!"; return s } +./inl.go:8:6: cannot inline large: function too complex: cost 82 exceeds budget 80 +./inl.go:38:6: can inline main with cost 68 as: func() { small(); large() } +./inl.go:39:7: inlining call to small func() string { s := "hello, world!"; return s } +``` + +编译器根据函数 `func small()` 的开销(7)决定可以对它内联,而`func large()` 的开销太大,编译器决定不进行内联。`func main()` 被标记为适合内联的,分配了 68 的开销;其中 `small` 占用 7,调用 `small` 函数占用 57,剩余的(4)是它自己的开销。 + +可以用 `-gcflag=-l` 参数控制内联预算的等级。下面是可使用的值: + + * `-gcflags=-l=0` 默认的内联等级。 + * `-gcflags=-l` (或 `-gcflags=-l=1`) 取消内联。 + * `-gcflags=-l=2` 和 `-gcflags=-l=3` 现在已经不使用了。不影响 `-gcflags=-l=0` + * `-gcflags=-l=4` 减少非叶子函数和通过接口调用的函数的开销。[2][4] + + + +#### 难以理解的优化 + +一些函数虽然内联的开销很小,但由于太复杂它们仍不适合进行内联。这就是函数的不确定性,因为一些操作的语义在内联后很难去推导,如 `recover`,`break`。其他的操作,如 `select` 和 `go` 涉及运行时的协调,因此内联后引入的额外的开销不能抵消内联带来的收益。 + +难理解的语句也包括 `for` 和 `range`,这些语句不一定开销很大,但目前为止还没有对它们进行优化。 + +### 栈中函数优化 + +在过去,Go 编译器只对叶子函数进行内联 — 只有那些不调用其他函数的函数才有资格。在上一段难以理解的的语句的探讨内容中,一次函数调用会让这个函数失去内联的资格。 + +进入栈中进行内联,就像它的名字一样,能内联在函数调用栈中间的函数,不需要先让它下面的所有的函数都被标记为有资格内联的。栈中内联是 David Lazar 在 Go 1.9 中引入的,并在随后的版本中做了改进。[这篇文章][5]深入探究保留栈追踪的表现和被深度内联后的代码路径里的 `runtime.Caller` 们的难点。 + +在前面的例子中我们看到了栈中函数内联。内联后,`func main()` 包含了 `func small()` 的函数体和对 `func large()` 的一次调用,因此它被判定为非叶子函数。在过去,这会阻止它被继续内联,虽然它的联合开销小于内联预算。 + +栈中内联的最主要的应用案例就是减少贯穿函数调用栈的开销。考虑下面的例子: + +```go +package main + +import ( + "fmt" + "strconv" +) + +type Rectangle struct {} + +//go:noinline +func (r *Rectangle) Height() int { + h, _ := strconv.ParseInt("7", 10, 0) + return int(h) +} + +func (r *Rectangle) Width() int { + return 6 +} + +func (r *Rectangle) Area() int { return r.Height() * r.Width() } + +func main() { + var r Rectangle + fmt.Println(r.Area()) +} +``` + +在这个例子中, `r.Area()` 是个简单的函数,调用了两个函数。`r.Width()` 可以被内联,`r.Height()` 这里用 `//go:noinline` 指令标注了,不能被内联。[3][6] + +```bash +% go build -gcflags='-m=2' square.go +# command-line-arguments +./square.go:12:6: cannot inline (*Rectangle).Height: marked go:noinline +./square.go:17:6: can inline (*Rectangle).Width with cost 2 as: method(*Rectangle) func() int { return 6 } +./square.go:21:6: can inline (*Rectangle).Area with cost 67 as: method(*Rectangle) func() int { return r.Height() * r.Width() } ./square.go:21:61: inlining call to (*Rectangle).Width method(*Rectangle) func() int { return 6 } +./square.go:23:6: cannot inline main: function too complex: cost 150 exceeds budget 80 +./square.go:25:20: inlining call to (*Rectangle).Area method(*Rectangle) func() int { return r.Height() * r.Width() } +./square.go:25:20: inlining call to (*Rectangle).Width method(*Rectangle) func() int { return 6 } +``` + +由于 `r.Area()` 中的乘法与调用它的开销相比并不大,因此内联它的表达式是纯收益,即使它的调用的下游 `r.Height()` 仍是没有内联资格的。 + +#### 快速路径内联 + +关于栈中内联的效果最令人吃惊的例子是 2019 年 [Carlo Alberto Ferraris][7] 通过允许把 `sync.Mutex.Lock()` 的快速路径,非竞争的情况,内联到它的调用方来[提升它的性能][7]。在这个修改之前,`sync.Mutex.Lock()` 是个很大的函数,包含很多难以理解的条件,使得它没有资格被内联。即使锁可用时,调用者也要付出调用 `sync.Mutex.Lock()` 的代价。 + +Carlo 把 `sync.Mutex.Lock()` 分成了两个函数(他自己称为*外联*)。外部的 `sync.Mutex.Lock()` 方法现在调用 `sync/atomic.CompareAndSwapInt32()` 且如果 CAS(Compare and Swap)成功了之后立即返回给调用者。如果 CAS 失败,函数会走到 `sync.Mutex.lockSlow()` 慢速路径,需要对锁进行注册,暂停 goroutine。[4][8] + +```bash +% go build -gcflags='-m=2 -l=0' sync 2>&1 | grep '(*Mutex).Lock' +../go/src/sync/mutex.go:72:6: can inline (*Mutex).Lock with cost 69 as: method(*Mutex) func() { if "sync/atomic".CompareAndSwapInt32(&m.state, 0, mutexLocked) { if race.Enabled {  }; return  }; m.lockSlow() } +``` + +通过把函数分割成一个简单的不能再被分割的外部函数,和(如果没走到外部函数就走到的)一个处理慢速路径的复杂的内部函数,Carlo 组合了栈中函数内联和[编译器对基础操作的支持][9],减少了非竞争锁 14% 的开销。之后他在 `sync.RWMutex.Unlock()` 重复这个技巧,节省了另外 9% 的开销。 + + 1. 不同发布版本中,在考虑该函数是否适合内联时,Go 编译器对同一函数的预算是不同的。[][10] + 2. 时刻记着编译器的作者警告过[“更高的内联等级(比 -l 更高)可能导致 bug 或不被支持”][11]。 Caveat emptor。[][12] + 3. 编译器有足够的能力来内联像 `strconv.ParseInt` 的复杂函数。作为一个实验,你可以尝试去掉 `//go:noinline` 注释,使用 `-gcflags=-m=2` 编译后观察。[][13] + 4. `race.Enable` 表达式是通过传递给 `go` 工具的 `-race` 参数控制的一个常量。对于普通编译,它的值是 `false`,此时编译器可以完全省略代码路径。[][14] + + + +#### 相关文章: + + 1. [Go 中的内联优化][15] + 2. [goroutine 的栈为什么会无限增长?][16] + 3. [栈追踪和 errors 包][17] + 4. [零值是什么,为什么它很有用?][18] + + + +-------------------------------------------------------------------------------- + +via: https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go + +作者:[Dave Cheney][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://dave.cheney.net/author/davecheney +[b]: https://github.com/lujun9972 +[1]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go +[2]: https://medium.com/@joshsaintjacque/small-functions-considered-awesome-c95b3fd1812f +[3]: tmp.FyRthF1bbF#easy-footnote-bottom-1-4076 "The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release." +[4]: tmp.FyRthF1bbF#easy-footnote-bottom-2-4076 "Keep in mind that the compiler authors warn that “Additional levels of inlining (beyond -l) may be buggy and are not supported”. Caveat emptor." +[5]: https://docs.google.com/presentation/d/1Wcblp3jpfeKwA0Y4FOmj63PW52M_qmNqlQkNaLj0P5o/edit#slide=id.p +[6]: tmp.FyRthF1bbF#easy-footnote-bottom-3-4076 "The compiler is powerful enough that it can inline complex functions like strconv.ParseInt. As a experiment, try removing the //go:noinline annotation and observe the result with -gcflags=-m=2." +[7]: https://go-review.googlesource.com/c/go/+/148959 +[8]: tmp.FyRthF1bbF#easy-footnote-bottom-4-4076 "The expression race.Enable is a constant controlled by the -race flag passed to the go tool. It is false for normal builds which allows the compiler to elide those code paths entirely." +[9]: https://dave.cheney.net/2019/08/20/go-compiler-intrinsics +[10]: tmp.FyRthF1bbF#easy-footnote-1-4076 +[11]: https://github.com/golang/go/blob/be08e10b3bc07f3a4e7b27f44d53d582e15fd6c7/src/cmd/compile/internal/gc/inl.go#L11 +[12]: tmp.FyRthF1bbF#easy-footnote-2-4076 +[13]: tmp.FyRthF1bbF#easy-footnote-3-4076 +[14]: tmp.FyRthF1bbF#easy-footnote-4-4076 +[15]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go "Inlining optimisations in Go" +[16]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite "Why is a Goroutine’s stack infinite ?" +[17]: https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package "Stack traces and the errors package" +[18]: https://dave.cheney.net/2013/01/19/what-is-the-zero-value-and-why-is-it-useful "What is the zero value, and why is it useful?" From 3af05630e965137ceec70d80d00915149c699e41 Mon Sep 17 00:00:00 2001 From: "Xiaobin.Liu" Date: Sun, 3 May 2020 14:29:59 +0800 Subject: [PATCH 387/394] TSL --- .../tech/20200502 Mid-stack inlining in Go.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/translated/tech/20200502 Mid-stack inlining in Go.md b/translated/tech/20200502 Mid-stack inlining in Go.md index 3d5bb1ee15..9d8edcab43 100644 --- a/translated/tech/20200502 Mid-stack inlining in Go.md +++ b/translated/tech/20200502 Mid-stack inlining in Go.md @@ -1,11 +1,11 @@ -[#]: collector: "lujun9972" -[#]: translator: "lxbwolf" -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " -[#]: subject: "Mid-stack inlining in Go" -[#]: via: "https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go" -[#]: author: "Dave Cheney https://dave.cheney.net/author/davecheney" +[#]: collector: (lujun9972) +[#]: translator: (lxbwolf) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Mid-stack inlining in Go) +[#]: via: (https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go) +[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) Go 中对栈中函数进行内联 ====== @@ -184,7 +184,7 @@ via: https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go 作者:[Dave Cheney][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[lxbwolf](https://github.com/lxbwolf) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 @@ -193,19 +193,19 @@ via: https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go [b]: https://github.com/lujun9972 [1]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go [2]: https://medium.com/@joshsaintjacque/small-functions-considered-awesome-c95b3fd1812f -[3]: tmp.FyRthF1bbF#easy-footnote-bottom-1-4076 "The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release." -[4]: tmp.FyRthF1bbF#easy-footnote-bottom-2-4076 "Keep in mind that the compiler authors warn that “Additional levels of inlining (beyond -l) may be buggy and are not supported”. Caveat emptor." +[3]: tmp.FyRthF1bbF#easy-footnote-bottom-1-4076 (The budget the Go compiler applies to each function when considering if it is eligible for inlining changes release to release.) +[4]: tmp.FyRthF1bbF#easy-footnote-bottom-2-4076 (Keep in mind that the compiler authors warn that “Additional levels of inlining (beyond -l) may be buggy and are not supported”. Caveat emptor.) [5]: https://docs.google.com/presentation/d/1Wcblp3jpfeKwA0Y4FOmj63PW52M_qmNqlQkNaLj0P5o/edit#slide=id.p -[6]: tmp.FyRthF1bbF#easy-footnote-bottom-3-4076 "The compiler is powerful enough that it can inline complex functions like strconv.ParseInt. As a experiment, try removing the //go:noinline annotation and observe the result with -gcflags=-m=2." +[6]: tmp.FyRthF1bbF#easy-footnote-bottom-3-4076 (The compiler is powerful enough that it can inline complex functions like strconv.ParseInt. As a experiment, try removing the //go:noinline annotation and observe the result with -gcflags=-m=2.) [7]: https://go-review.googlesource.com/c/go/+/148959 -[8]: tmp.FyRthF1bbF#easy-footnote-bottom-4-4076 "The expression race.Enable is a constant controlled by the -race flag passed to the go tool. It is false for normal builds which allows the compiler to elide those code paths entirely." +[8]: tmp.FyRthF1bbF#easy-footnote-bottom-4-4076 (The expression race.Enable is a constant controlled by the -race flag passed to the go tool. It is false for normal builds which allows the compiler to elide those code paths entirely.) [9]: https://dave.cheney.net/2019/08/20/go-compiler-intrinsics [10]: tmp.FyRthF1bbF#easy-footnote-1-4076 [11]: https://github.com/golang/go/blob/be08e10b3bc07f3a4e7b27f44d53d582e15fd6c7/src/cmd/compile/internal/gc/inl.go#L11 [12]: tmp.FyRthF1bbF#easy-footnote-2-4076 [13]: tmp.FyRthF1bbF#easy-footnote-3-4076 [14]: tmp.FyRthF1bbF#easy-footnote-4-4076 -[15]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go "Inlining optimisations in Go" -[16]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite "Why is a Goroutine’s stack infinite ?" -[17]: https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package "Stack traces and the errors package" -[18]: https://dave.cheney.net/2013/01/19/what-is-the-zero-value-and-why-is-it-useful "What is the zero value, and why is it useful?" +[15]: https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go (Inlining optimisations in Go) +[16]: https://dave.cheney.net/2013/06/02/why-is-a-goroutines-stack-infinite (Why is a Goroutine’s stack infinite ?) +[17]: https://dave.cheney.net/2016/06/12/stack-traces-and-the-errors-package (Stack traces and the errors package) +[18]: https://dave.cheney.net/2013/01/19/what-is-the-zero-value-and-why-is-it-useful (What is the zero value, and why is it useful?) From 6fbca396bde6e561ed89989d89194f3b424f3188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91?= Date: Sun, 3 May 2020 14:50:41 +0800 Subject: [PATCH 388/394] Translated --- ...7 How to compress files on Linux 5 ways.md | 207 ------------------ ...7 How to compress files on Linux 5 ways.md | 207 ++++++++++++++++++ 2 files changed, 207 insertions(+), 207 deletions(-) delete mode 100644 sources/tech/20200417 How to compress files on Linux 5 ways.md create mode 100644 translated/tech/20200417 How to compress files on Linux 5 ways.md diff --git a/sources/tech/20200417 How to compress files on Linux 5 ways.md b/sources/tech/20200417 How to compress files on Linux 5 ways.md deleted file mode 100644 index f71e90f9fc..0000000000 --- a/sources/tech/20200417 How to compress files on Linux 5 ways.md +++ /dev/null @@ -1,207 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to compress files on Linux 5 ways) -[#]: via: (https://www.networkworld.com/article/3538471/how-to-compress-files-on-linux-5-ways.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -How to compress files on Linux 5 ways -====== -There are a number of tools that you use to compress files on Linux systems, but they don't all behave the same way or yield the same level of compression. In this post, we compare five of them. -Getty Images - -There are quite a few commands on Linux for compressing files. One of the newest and most effective is **xz**, but they all have advantages for both saving disk space and preserving files for later use. In this post, we compare the compression commands and point out the significant differences. - -### tar - -The tar command is not specifically a compression command. It’s generally used to pull a number of files into a single file for easy transport to another system or to back the files up as a related group. It also provides compression as a feature, which makes a lot of sense, and the addition of the **z** compression option is available to make this happen. - -When compression is added to a **tar** command with the **z** option, tar uses **gzip** to do the compressing. - -You can use **tar** to compress a single file as easily as a group though this offers no particular advantage over using **gzip** directly. To use **tar** for this, just identify the file as you would a group of files with a “tar cfz newtarfile filename” command like this: - -``` -$ tar cfz bigfile.tgz bigfile - ^ ^ - | | - +- new file +- file to be compressed - -$ ls -l bigfile* --rw-rw-r-- 1 shs shs 103270400 Apr 16 16:09 bigfile --rw-rw-r-- 1 shs shs 21608325 Apr 16 16:08 bigfile.tgz -``` - -Note the significant reduction in the file size. - -If you prefer, you can use the **tar.gz** extension which might make the character of the file a bit more obvious, but most Linux users will probably recognize **tgz** as meaning the same thing – the combination of **tar** and **gz** to indicate that the file is a compressed tar file. You will be left with both the original file and the compressed file once the compression is complete. - -To collect a number of files together and compress the resultant “tar ball” in one command, use the same basic syntax, but specify the files to be included as a group in place of the single file. Here’s an example: - -[][1] - -``` -$ tar cfz bin.tgz bin/* - ^ ^ - | +-- files to include - + new file -``` - -### zip - -The **zip** command creates a compressed file while leaving the original file intact. The syntax is straightforward except that, as with **tar**, you have to remember that your original file should be the last argument on the command line. - -``` -$ zip ./bigfile.zip bigfile -updating: bigfile (deflated 79%) -$ ls -l bigfile bigfile.zip --rw-rw-r-- 1 shs shs 103270400 Apr 16 11:18 bigfile --rw-rw-r-- 1 shs shs 21606889 Apr 16 11:19 bigfile.zip -``` - -### gzip - -The **gzip** command is very simple to use. You just type "gzip" followed by the name of the file you want to compress. Unlike the commands described above, **gzip** will encrypt the files "in place". In other words, the original file will be replaced by the encrypted file. - -``` -$ gzip bigfile -$ ls -l bigfile* --rw-rw-r-- 1 shs shs 21606751 Apr 15 17:57 bigfile.gz -``` - -### bzip2 - -As with the **gzip** command, **bzip2** will compress the file that you select "in place", leaving only the original file. - -``` -$ bzip bigfile -$ ls -l bigfile* --rw-rw-r-- 1 shs shs 18115234 Apr 15 17:57 bigfile.bz2 -``` - -### xz - -A relative newcomer to the compression command team, **xz** is a front runner in terms of how well it compresses files. Like the two previous commands, you only need to supply the file name to the command. Again, the original file is compressed in place. - -``` -$ xz bigfile -$ ls -l bigfile* --rw-rw-r-- 1 shs shs 13427236 Apr 15 17:30 bigfile.xz -``` - -For large files, you are likely to notice that **xz** takes longer to run than other compression commands, but the compression results are very impressive. - -### Comparisons to consider - -Most people have heard it said that "size isn't everything". So, let's compare file size as well as some other issues to be considered when you make plans for how you want to compress your files. - -The stats shown below all relate to compressing the single file – bigfile – used in the example commands shown above. This file is a large and fairly random text file. Compression rates will depend to some extent on the content of the files. - -#### Size reduction - -When compared, the various compression commands shown above yielded the following results. The percentages represent how the compressed files compare with the original file. - -``` --rw-rw-r-- 1 shs shs 103270400 Apr 16 14:01 bigfile ------------------------------------------------------- --rw-rw-r-- 1 shs shs 18115234 Apr 16 13:59 bigfile.bz2 ~17% --rw-rw-r-- 1 shs shs 21606751 Apr 16 14:00 bigfile.gz ~21% --rw-rw-r-- 1 shs shs 21608322 Apr 16 13:59 bigfile.tgz ~21% --rw-rw-r-- 1 shs shs 13427236 Apr 16 14:00 bigfile.xz ~13% --rw-rw-r-- 1 shs shs 21606889 Apr 16 13:59 bigfile.zip ~21% -``` - -The **xz** commands wins, ending up at only 13% the size of the original file, but all of these compression commands reduced the original file size quite significantly. - -#### Whether the original files are replaced - -The **bzip2**, **gzip** and **xz** commands all replace the original files with compressed versions. The **tar** and **zip** commands to not. - -#### Run time - -The **xz** command seems to take more time than the other commands to encrypt the files. For bigfile, the approximate times were: - -``` -command run-time -tar 4.9 seconds -zip 5.2 seconds -bzip2 22.8 seconds -gzip 4.8 seconds -xz 50.4 seconds -``` - -Decompression times are likely to be considerably smaller than compression times. - -#### File permissions - -Regardless of what permissions you have set on your original file, permissions for the compressed file will be based on your **umask** setting, except for **bzip2** which retains the original file's permissions. - -#### Compatibility with Windows - -The **zip** command creates a file which can be used (i.e., decompressed) on Windows systems as well as Linux and other Unix systems without having to install other tools which may or may not be available. - -### Decompressing files - -The commands for decompressing files are similar to those used to compress the files. These commands would work for decompressing bigfile after the compression commands shown above were run. - - * tar: **tar xf bigfile.tgz** - * zip: **unzip bigfile.zip** - * gzip: **gunzip bigfile.gz** - * bzip2: **bunzip2 bigfile.gz2** - * xz: **xz -d bigfile.xz** or **unxz bigfile.xz** - - - -### Running your own compression comparisons - -If you'd like to run some tests on your own, grab a large but replaceable file and compress it using each of the commands shown above – preferably using a new subdirectory. You might have to first install **xz** if you want to include it in the tests.This script can make the comparison easier, but will likely take a few minutes to complete. - -``` -#!/bin/bash - -# ask user for filename -echo -n "filename> " -read filename - -# you need this because some commands will replace the original file -cp $filename $filename-2 - -# clean up first (in case previous results are still available) -rm $filename.* - -tar cvfz ./$filename.tgz $filename > /dev/null -zip $filename.zip $filename > /dev/null -bzip2 $filename -# recover original file -cp $filename-2 $filename -gzip $filename -# recover original file -cp $filename-2 $filename -xz $filename - -# show results -ls -l $filename.* - -# replace the original file -mv $filename-2 $filename -``` - -Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3538471/how-to-compress-files-on-linux-5-ways.html - -作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[2]: https://www.facebook.com/NetworkWorld/ -[3]: https://www.linkedin.com/company/network-world diff --git a/translated/tech/20200417 How to compress files on Linux 5 ways.md b/translated/tech/20200417 How to compress files on Linux 5 ways.md new file mode 100644 index 0000000000..e9ef6af572 --- /dev/null +++ b/translated/tech/20200417 How to compress files on Linux 5 ways.md @@ -0,0 +1,207 @@ +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (How to compress files on Linux 5 ways) +[#]: via: (https://www.networkworld.com/article/3538471/how-to-compress-files-on-linux-5-ways.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +在 Linux 上压缩文件的 5 种方法 +====== +在 Linux 系统上有很多可以用于压缩文件的工具,但是它们表现的行为或产生相同程度的压缩等级并不相同,在这篇文章中,我们比较其中的五个工具。 +Getty Images + +在 Linux 上有不少用于压缩文件的命令。最新最有效的一个方法是 **xz** ,但是所有的方法都有节省磁盘空间和为后期使用维护备份文件的优点。在这篇文章中,我们将比较压缩命令并指出显著的不同 。 + +### tar + +tar 命令不是专门的压缩命令。它通常用于将多个文件拉入一单个文件中,以便容易地传输到另一个系统,或者备份文件为一个相关的组。它也提供压缩作为一个功能,这是很明智的,附加的 **z** 压缩选项能够实现压缩文件。 + +当压缩过程被附加到一个使用 **z** 选项的 **tar** 命令时,tar 使用 **gzip** 来进行压缩。 + +你可以使用 **tar** 来压缩一个单个文件,就像压缩一个组一样容易,尽管这种操作与直接使用 **gzip** 相比没有特别的优势。为此,要使用 **tar** ,只需要使用一个 “tar cfz newtarfile filename” 命令来像你标识一个组一样标识文件,像这样: + +``` +$ tar cfz bigfile.tgz bigfile + ^ ^ + | | + +- 新的文件 +- 将被压缩的文件 + +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 103270400 Apr 16 16:09 bigfile +-rw-rw-r-- 1 shs shs 21608325 Apr 16 16:08 bigfile.tgz +``` + +注意,文件的大小显著减少。 + +如果你喜欢,你可以使用 **tar.gz** 扩展名,这可能会使文件的特征更加明显,但是大多数的 Linux 用户将很可能会意识到与 **tgz** 的意思是相同的东西 – **tar** 和 **gz** 的组合来显示文件是一个压缩的 tar 文件。在压缩完成后,将留下原始文件和压缩文件。 + +为收集很多文件在一起并在一个命令中压缩生成的 “tar ball” ,使用相同的语法,但是要指明将要被包含的文件来作为一个组,而不是单个文件。这里有一个示例: + +[][1] + +``` +$ tar cfz bin.tgz bin/* + ^ ^ + | +-- 将被包含的文件 + + 新的文件 +``` + +### zip + +**zip** 命令创建一个压缩文件,与此同时保留原始文件的完整性。语法像使用 **tar** 一样简单,只是你必需记住,你的原始文件名称应该是命令行上的最后一个参数。 + +``` +$ zip ./bigfile.zip bigfile +updating: bigfile (deflated 79%) +$ ls -l bigfile bigfile.zip +-rw-rw-r-- 1 shs shs 103270400 Apr 16 11:18 bigfile +-rw-rw-r-- 1 shs shs 21606889 Apr 16 11:19 bigfile.zip +``` + +### gzip + +**gzip** 命令非常容易使用。你只需要键入 "gzip" ,紧随其后的是你想要压缩的文件名称。不像上述描述的命令,**gzip** 将“就地”加密文件。换句话说,原始文件将被加密文件替换。 + +``` +$ gzip bigfile +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 21606751 Apr 15 17:57 bigfile.gz +``` + +### bzip2 + +像使用 **gzip** 命令一样,**bzip2** 将在你选的“合适位置”压缩文件,只留下原始文件保持原样离开。 + +``` +$ bzip bigfile +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 18115234 Apr 15 17:57 bigfile.bz2 +``` + +### xz + +压缩命令组中的一个相对较新的成员,**xz** 就如何更好的压缩文件而言是领跑者。像先前的两个命令一样,你只需要将文件名称补给到命令中。再强调一次,原始文件被就地压缩。 + +``` +$ xz bigfile +$ ls -l bigfile* +-rw-rw-r-- 1 shs shs 13427236 Apr 15 17:30 bigfile.xz +``` + +对于大文件来说,你可能会注意到 **xz** 将比其它的压缩命令花费更多的运行时间,但是压缩的结果却是非常令人赞叹的。 + +### 考虑对比性 + +大多数人都听说过 "文件大小不是万能的"。所以,让我们比较一下文件大小以及一些当你计划如何压缩文件时的问题。 + +下面显示的统计数据都与压缩单个文件相关,在上面显示的示例中使用 – bigfile – 。这个文件是一个大的且相当随机的文本文件。压缩率在一定程度上取决于文件的内容。 + +#### 大小减缩率 + +在比较期间,上面显示的各种压缩命产生下面的结果。百分比表示压缩文件对比原始文件。 + +``` +-rw-rw-r-- 1 shs shs 103270400 Apr 16 14:01 bigfile +------------------------------------------------------ +-rw-rw-r-- 1 shs shs 18115234 Apr 16 13:59 bigfile.bz2 ~17% +-rw-rw-r-- 1 shs shs 21606751 Apr 16 14:00 bigfile.gz ~21% +-rw-rw-r-- 1 shs shs 21608322 Apr 16 13:59 bigfile.tgz ~21% +-rw-rw-r-- 1 shs shs 13427236 Apr 16 14:00 bigfile.xz ~13% +-rw-rw-r-- 1 shs shs 21606889 Apr 16 13:59 bigfile.zip ~21% +``` + +**xz** 命令获胜,最终只有压缩文件大小的13%,但是这些所有的压缩命令都相当显著地减少原始文件的大小。 + +#### 是否替换原始文件 + +**bzip2**,**gzip** 和 **xz** 命令都将使用压缩文件替换原始文件。**tar** 和 **zip** 命令不替换。 + +#### 运行时间 + +**xz** 命令似乎比其它命令需要花费更多的时间来加密文件。对于 bigfile 来说,近似时间是: + +``` +命令 运行时间 +tar 4.9 秒 +zip 5.2 秒 +bzip2 22.8 秒 +gzip 4.8 秒 +xz 50.4 秒 +``` + +解压缩文件很可能比压缩时间要短得多。 + +#### 文件权限 + +不管你对压缩文件设置什么权限,压缩文件的权限将基于你的 **umask** 设置,除 **bzip2** 维持原始文件的权限外。 + +#### 与 Windows 的兼容性 + +**zip** 命令将创建一个可被使用的文件(例如,解压缩),在 Windows 系统上以及 Linux 和其它 Unix 系统上,无需安装其它可能可用或不可用的工具。 + +### 解压缩文件 + +解压缩文件的命令类似于这些压缩文件的命令。这些命令将在我们运行上述压缩命令后用于解压缩 bigfile 。 + + * tar: **tar xf bigfile.tgz** + * zip: **unzip bigfile.zip** + * gzip: **gunzip bigfile.gz** + * bzip2: **bunzip2 bigfile.gz2** + * xz: **xz -d bigfile.xz** 或 **unxz bigfile.xz** + + + +### 对比你自己运行的压缩 + +如果你想自己运行一些测试,抓取一个大的且可以替换的文件,并使用上面显示的每个命令来压缩它 – 最好使用一个新的子目录。你可能必需先安装 **xz** ,如果你想在测试中包含它的话。这个脚本可能更容易地压缩,但是将可能花费几分钟来完成。 + +``` +#!/bin/bash + +# 询问用户文件名称 +echo -n "filename> " +read filename + +# 你需要这个,因为一些命令将替换原始文件 +cp $filename $filename-2 + +# 先清理(以免先前的结果仍然可用) +rm $filename.* + +tar cvfz ./$filename.tgz $filename > /dev/null +zip $filename.zip $filename > /dev/null +bzip2 $filename +# 恢复原始文件 +cp $filename-2 $filename +gzip $filename +# 恢复原始文件 +cp $filename-2 $filename +xz $filename + +# 显示结果 +ls -l $filename.* + +# 替换原始文件 +mv $filename-2 $filename +``` + +加入 [Facebook][2] 和 [LinkedIn][3] 网络世界社区来评论那些最重要的话题。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3538471/how-to-compress-files-on-linux-5-ways.html + +作者:[Sandra Henry-Stocker][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.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) +[2]: https://www.facebook.com/NetworkWorld/ +[3]: https://www.linkedin.com/company/network-world From 8e065c91dc13e4121408bfd8e1dcf28ee04bf11f Mon Sep 17 00:00:00 2001 From: "qfzy1233@163.com" Date: Sun, 3 May 2020 16:32:03 +0800 Subject: [PATCH 389/394] Update 20200424 16 Things to do After Installing Ubuntu 20.04.md --- ...ngs to do After Installing Ubuntu 20.04.md | 196 +++++++++--------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md index 5637651850..1b5d5ef5c3 100644 --- a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md +++ b/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md @@ -7,218 +7,218 @@ [#]: via: (https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -16 Things to do After Installing Ubuntu 20.04 +安装完 Ubuntu 20.04 后要做的 16 件事 ====== -_**Here is a list of tweaks and things to do after installing Ubuntu 20.04, to get a smoother and better desktop Linux experience.**_ +_**以下是安装 Ubuntu 20.04 之后需要做的一些调整和事情,它将使你获得更流畅、更好的桌面 Linux 体验。**_ -[Ubuntu 20.04 LTS brings plenty of new features][1] and visual changes. If you choose to install Ubuntu 20.04, let me show you a few recommended steps that you can follow to get started with it. +[Ubuntu 20.04 LTS (长期支持版)带来了许多新的特性][1] 和观感上的变化。 如果你要安装 Ubuntu 20.04 ,让我向你展示一些推荐步骤便于你的使用。 -### 16 Things to do after installing Ubuntu 20.04 LTS “Focal Fossa” +### 安装完 Ubuntu 20.04 LTS “Focal Fossa”后要做的 16 件事 ![][2] -The steps I am going to mention here are my recommendation. You may ignore a few customization or tweaks if they don’t suit your need and interest. +我在这里要提到的步骤仅是我的建议。如果一些定制或调整不适合你的需要和兴趣,你可以忽略它们。 -Similarly, some steps may seem too simple but essential for someone completely new to Ubuntu. +同样的,有些步骤看起来很简单,但是对于一个 Ubuntu 新手来说是必要的。 -A number of suggestions here are suited for the default Ubuntu 20.04 with GNOME desktop. So please check [which Ubuntu version][3] and [which desktop environment][4] you are using. +这里的一些建议适用于启用 GNOME 作为默认桌面Ubuntu 20.04。所以请检查[Ubuntu版本][3]和[桌面环境][4]。 -Let’s get started with the list of things to do after installing Ubuntu 20.04 LTS codenamed Focal Fossa. +以下列表便是安装了代号为 Focal Fossa 的 Ubuntu 20.04 LTS 之后要做的事。 -#### 1\. Get your system ready by updating and enabling additional repos +#### 1\. 通过更新和启用额外的 repos 来准备您的系统 -The first thing you should do after installing Ubuntu or any other Linux distribution is to update it. Linux works on a local database of available packages. And this cache needs to be synced in order for you to be able to install any software. +安装Ubuntu或任何其他Linux发行版之后,你应该做的第一件事就是更新它。Linux 的可用包数据库工作于本地。这个缓存需要同步以便你能够安装任何软件。 -It is very easy to update Ubuntu. You can run the software updater from the menu (press Windows key and search for software updater): +升级Ubuntu非常简单。你可以运行软件更新从菜单( 按 Win 键并搜索软件更新): -![Software Updater in Ubuntu 20.04][5] +![Ubuntu 20.04 的软件升级中心][5] -You may also use the following command in the terminal to update your system: +你也可以在终端使用以下命令更新你的系统: ``` sudo apt update && sudo apt upgrade ``` -Next, you should make sure that you have [universe and multiverse repositories enabled][6]. You’ll have access to a lot more software with these repositories. I also recommend reading about [Ubuntu repositories][6] to learn the basic concept behind it. +接下来,您应该确保启用了[universe和multiverse存储库][6]。使用这些存储库,你可以访问更多的软件。我还推荐阅读关于[Ubuntu软件库][6]的书籍,以了解它背后的基本概念。 -Search for Software & Updates in the menu: +搜索软件和放大器;更新菜单: -![Software & Updates Settings][7] +![软件及更新设置项][7] -Make sure to check the boxes in front of the repositories: +请务必选中存储库前面的方框: -![Enable additional repositories][8] +![启用额外的存储库][8] -#### 2\. Install media codecs to play MP3, MPEG4 and other media files +#### 2\. 安装媒体解码器来播放MP3、MPEG4和其他格式媒体文件 -If you want to play media files like MP3, MPEG4, AVI etc, you’ll need to install media codecs. Ubuntu doesn’t install it by default because of copyright issues in various countries. +如果你想播放媒体文件,如MP3, MPEG4, AVI等,你需要安装媒体解码器。由于不同国家的版权问题,Ubuntu在默认情况下不会安装它。 -As an individual, you can install these media codecs easily [using the Ubuntu Restricted Extra package][9]. This will install media codecs, Adobe Flash player and [Microsoft True Type Fonts in your Ubuntu system][10]. +作为个人,你可以很容易地安装这些媒体编解码器[使用 Ubuntu 额外安装包][9]。这将安装媒体编解码器,Adobe Flash播放器和[微软 True Type 字体在您的Ubuntu系统][10]。 -You can install it by [clicking this link][11] (it will asked to be open in software center) or use this command: +你可以通过[点击这个链接][11](它将要求打开软件中心)来安装它,或者使用以下命令: ``` sudo apt install ubuntu-restricted-extras ``` -If you encounter the EULA or the license screen, remember to use the tab key to select between the options and then hit enter to confirm your choice. +如果遇到EULA或许可证界面,请记住使用tab键在选项之间进行选择,然后按enter键确认你的选择。 -![Press tab to select OK and press enter][12] +![按tab键选择OK并按enter键][12] -#### 3\. Install software from the software center or the web +#### 3\. 从软件中心或网络上安装软件 -Now that you have set up the repositories and updated the package cache, you should start installing software that you need. +现在已经设置了存储库并更新了包缓存,应该开始安装所需的软件了。 -There are several ways of [installing applications in Ubuntu][13]. The easiest and the official way is to use the Software Center. +有几种方法可以在Ubuntu中安装应用程序。最简单和正式的方法是使用软件中心。 -![Ubuntu Software Center][14] +![Ubuntu 软件中心][14] -If you want some recommendation about software, please refer to this extensive [list of Ubuntu applications for different purposes][15]. +如果你想要一些关于软件的建议,请参考这个扩展的[不同用途的Ubuntu应用程序列表][15]。 -Some software vendors provide .deb files to easily install their application. You may get the deb files from their website. For example, to [install Google Chrome on Ubuntu][16], you can get the deb file from its website and double click on it to start the installation. +一些软件供应商提供 .deb 文件来方便地安装他们的应用程序。你可以从他们的网站获得 deb 文件。例如,要[在 Ubuntu 上安装谷歌 Chrome ][16],你可以从它的网站上获得 deb 文件,双击它开始安装。 -#### 4\. Enjoy gaming with Steam Proton and GameMode +#### 4\. 享受 Steam Proton 和 GameModeEnjoy 上的游戏 -[Gaming on Linux][17] has come a long way. You are not restricted to a handful of games included by default. You can [install Steam on Ubuntu][18] and enjoy a good number of games. +[ Linux 上的游戏][17] 已经有了长足的发展。你不受限于自带的少数游戏。你可以[在 Ubuntu 上安装 Steam ][18]并享受许多游戏。 -[Steam’s new P][19][r][19][oton project][19] enables you to play a number of Windows-only games on Linux. In addition to that, Ubuntu 20.04 comes with [Feral Interactive’s GameMode][20] installed by default. +[Steam 新的 Proton 项目][19]可以让你在Linux上玩许多只适用于windows的游戏。除此之外,Ubuntu 20.04还默认安装了[Feral Interactive的游戏][20]。 -The GameMode automatically adjust Linux system performance to give more priority to games than other background processes. +游戏模式会自动调整Linux系统的性能,使游戏具有比其他后台进程更高的优先级。 -This means some games that support the GameMode (like [Rise of Tomb Raiders][21]) should have improved performance on Ubuntu. +这意味着一些支持游戏模式的游戏(如[古墓丽影崛起][21])在 Ubuntu 上的性能应该有所提高。 -#### 5\. Manage auto-updates (for intermediate and experts) +#### 5\. 管理自动更新(适用于进阶和专家) -Recently, Ubuntu has started to automatically download and install security updates that are essential to your system. This is a security feature as a regular user, you should leave it as it is, +最近,Ubuntu 已经开始自动下载和安装对你的系统至关重要的安全更新。这是一个安全功能,作为一个普通用户,你应该让它保持默认, -But if you like to do everything on your own and this auto-update is frequently leading you to [“Unable to lock the administration directory” error][22], maybe you can change the auto updates behavior. +但是,如果你喜欢自己进行配置更新,而这个自动更新经常导致你[“无法锁定管理目录”错误][22],也许你可以改变自动更新行为。 -You can opt for the Show immediately so that it notifies you of security updates as soon as they are available instead of automatically installing. +你可以选择更新是提示,以便它通知你的安全更新是否可用,而不是自动安装。 -![Control the auto updates settings][23] +![管理自动更新设置][23] -#### 6\. Control automatic suspend and screenlock for laptops +#### 6\. 控制电脑的自动挂起和屏幕锁定 -If you are using Ubuntu 20.04 on a laptop then you may want to pay attention to a few power and screenlock settings. +如果你在笔记本电脑上使用Ubuntu 20.04,那么你可能需要注意一些电源和屏幕锁定设置。 -If your laptop is on battery mode, Ubuntu will suspend the system after 20 minutes of inactivity. This is done to save battery power. Personally, I don’t like it and thus I disable it. +如果你的笔记本电脑是电池模式,Ubuntu会在20分钟不工作后休眠系统。这样做是为了节省电池电量。就我个人而言,我不喜欢它,因此我禁用了它。 -Similarly, if you leave your system for a few minutes, it automatically locks the screen. I don’t like this behavior as well so I prefer disabling it. +类似地,如果您离开系统几分钟,它会自动锁定屏幕。我也不喜欢这种行为,所以我宁愿禁用它。 -![Power Settings in Ubuntu 20.04][24] +![Ubuntu 20.04的电源设置][24] -#### 7\. Enjoy dark mode +#### 7\. 享受夜间模式 -One of the [most talked about features of Ubuntu 20.04][25] is the dark mode. You can enable the dark mode by going into Settings and selecting it under Appearance section. +一个[谈论最多的 Ubuntu 20.04 特性][25]是夜间模式。你可以通过进入设置并在外观部分中选择它来启用夜间模式。 -![Enable Dark Theme Ubuntu][26] +![开启夜间主题 Ubuntu ][26] -You may have to do some [additional tweaking to get full dark mode in Ubuntu 20.04][27]. +你可能需要做一些额外的调整来启用 Ubuntu 20.04 的深度夜间模式。 -#### 8\. Control desktop icons and launcher +#### 8\. 控制桌面图标和启动程序 -If you want a minimal looking desktop, you can disable the icons on the desktop. You can also disable the launcher from the left side and the appindicators in the top panel. +如果你想要一个最简的桌面,你可以禁用桌面上的图标。您还可以从左侧禁用启动程序,并在顶部面板中禁用软件状态栏。 -All this can be controlled via the new GNOME Extensions that is already available by default. +所有这些都可以通过默认的新 GNOME 扩展来控制。 ![][28] -By the way, you can also change the position of the launcher to the bottom or to the right by going to the Settings->Appearance. +顺便说一下,你也可以通过设置-外观来改变启动栏的位置到底部或者右边。 -#### 9\. Use emojis (smileys) and special characters or disable it from the search +#### 9\. 使用emojis(表情)和特殊字符,或从搜索中禁用它 -Ubuntu provides an easy way to use smiley or the emoticons. There is a dedicated application called Characters installed by default. It basically gives you [Unicode][29] of the emojis. +Ubuntu提供了一个使用 emojis 或表情符号的简单方法。在默认情况下,有一个专用的应用程序叫做 Characters。它可以给你基本表情符号的[Unicode][29]码。 -Not only emojis, you can use it to get the unicode for French, German, Russian and Latin characters. Clicking on the symbol gives you the opportunity to copy the unicode and when you paste this code, your chosen symbol should be typed. +不仅是表情符号,你还可以使用它来获得法语、德语、俄语和拉丁语字符的 unicode 。单击符号你可以复制 unicode ,当你粘贴这段代码时,你所选择的符号便被插入。 -![Emoji Ubuntu][30] +! [Emoji Ubuntu] [30] -You’ll find these special characters and emoticons appearing in the desktop search as well. You can copy them from the search results as well. +你也能在桌面搜索中找到这些特殊的字符和表情符号。也可以从搜索结果中复制它们。 -![Emojis appear in desktop search][31] +![Emojis 出现在桌面搜索中][31] -If you don’t want to see them in search results, you should disable their access to the search feature. The next section discuss how to do that. +如果你不想在搜索结果中看到它们,你应该禁用搜索功能对它们的访问。下一节将讨论如何做到这一点。 -#### 10\. Master the desktop search +#### 10\. 掌握桌面搜索 -The GNOME desktop has a powerful search feature. Most people use it for searching installed applications but it is more than just that. +GNOME桌面拥有强大的搜索功能。大多数人使用它来搜索已安装的应用程序,但它不仅限于此。 -Press the super key (Windows key) and search for something. It will show any applications that matches that search term, followed by system settings and matching applications available in the software center. +按超级键(Win键)并搜索一些东西。它将显示与搜索词匹配的任何应用程序,然后是系统设置和软件中心提供的匹配应用程序。 -![Desktop search][32] +![桌面搜索][32] -Not only that, the search can also find text inside files. If you are using the calendar, it can also find your meetings and reminders. You can even do quick calculations in the search and copy its result. +不仅如此,搜索还可以找到文件中的文本。如果你正在使用日历,它也可以找到你的会议和提醒。你甚至可以在搜索中进行快速计算并复制其结果。 -![Quick Calculations Ubuntu Search][33] +![Ubuntu搜索的快速计算][33] -You can control what can be searched and in which order by going into Settings. +你可以通过进入设置来控制搜索的内容和顺序。 ![][34] -#### 11\. Use nightlight feature to reduce eye strain at night +#### 11\. 使用夜灯功能,减少夜间眼睛疲劳 -If you use your computer or smartphone at night, you should use the night light feature to reduce eye strain. I feel that it helps a lot. +如果你在晚上使用电脑或智能手机,你应该使用夜灯功能来减少眼睛疲劳。我觉得这很有帮助。 -The night light feature adds a yellow tint to the screen which is less pinching than the white light. +夜灯的特点是在屏幕上增加了一种黄色的色调,比白光少了一些挤压感。 -You can enable night light in the Settings -> Displays and switching to Night Light tab. You can set the ‘yellowness’ as per your liking. +你可以在设置->显示并切换到夜灯选项卡。你可以根据自己的喜好设置“黄色”。 -![Nightlight feature][35] +![夜灯功能][35] -#### 12\. Got a 2K/4K screen? Use fractional scaling to get bigger icons and fonts +#### 12\.使用 2K/4K 显示器? 使用分辨率缩放得到更大的图标和字体 -If you feel that the icons, fonts, folders everything looks too small on your HiDPI screen, you can take advantage of the fractional scaling. +如果你觉得图标、字体、文件夹在你的高分辨率屏幕上看起来都太小了,你可以利用分辨率缩放。 -Enabling fractional scaling gives you more options to increase the size between 100% to 200%. You can choose the scaling size that suits your preference. +启用分级缩放可以让你有更多的选项来从100%增加到200%。你可以选择适合自己喜好的缩放尺寸。 -![Enable fractional scaling from Settings -> Displays][36] +![启用高分缩放从设置->显示][36] -#### 13\. Explore GNOME Extensions to extend the usability of GNOME desktop +#### 13\. 探索GNOME扩展以扩展GNOME桌面的可用性 -The GNOME desktop has tiny plugins or add-ons called Extensions. You should [learn to use GNOME extensions][37] to extend the usability of your system. +GNOME桌面有称为扩展的小插件或附加组件。你应该[学习使用 GNOM E扩展][37]来扩展系统的可用性。 -As you can see in the image below, the weather extension shows the weather information in the top panel. A tiny but useful thing. You may also take a look at some of [best GNOME extensions][38] here. Don’t install all of them, use only those that are useful to you. +如下图所示,天气扩展顶部面板中显示了天气信息。不起眼但十分有用。您也可以在这里查看一些[最佳 GNOME 扩展][38]。不要全部安装,只使用那些对你有用的。 -![Weather Extension][39] +![天气 扩展][39] -#### 14\. Enable ‘do not disturb’ mode and focus on work +#### 14\.启用“勿扰”模式,专注于工作 -If you want to concentrate on work, disabling desktop notifications would come handy. You can easily enable ‘do not disturb’ mode and mute all notifications. +如果你想专注于工作,禁用桌面通知会很方便。你可以轻松地启用“勿扰”模式,并静音所有通知。 -![Enable ‘Do Not Disturb’ to get rid of desktop notifications][40] +![启用“请勿打扰”清除桌面通知][40] -These notifications will still be in the message tray so that you can read them later but they won’t pop up on the desktop anymore. +这些通知仍然会在消息栏中,以便您以后可以阅读它们,但是它们不会在桌面上弹出。 -#### 15\. Clean your system +#### 15\. 清理你的系统 -This is something you don’t need to do right after installing Ubuntu. But keeping it in mind will help you. +这是你安装Ubuntu后不需要马上做的事情。但是记住它会对你有帮助。 -Over the time, your system will have significant amount of packages that won’t be needed anymore. You can remove them all in one go with this command: +随着时间的推移,你的系统将有大量不再需要的包。你可以用这个命令一次性删除它们: ``` sudo apt autoremove ``` -There are other [ways to clean Ubuntu to free disk space][41] but this is the easiest and safest. +还有其他[清理 Ubuntu 以释放磁盘空间的方法][41],但这是最简单和最安全的。 -#### 16\. Tweak and customize the GNOME desktop to your liking +#### 16\. 根据您的喜好调整和定制 GNOME 桌面 -I highly recommend [installing GNOME Tweaks tool][42]. This will give you access to a few additional settings to tweak. +我强烈推荐[安装 GNOME 设置工具][42]。这将让你可以通过额外的设置来进行定制。 -![Gnome Tweaks Tool][43] +![Gnome 设置工具][43] -For example, you can [display battery percentage][44], [fix right click in touchpad issue][45], change shell theme, change mouse pointer speed, display date and week numbers, change application window behavior etc. +比如,你可以[以百分比形式显示电池容量][44],[修正在touchpad中右键问题][45],改变 Shell 主题,改变鼠标指针速度,显示日期和星期数,改变应用程序窗口行为等。 -There is no end to customization and I cannot probably most of them here. This is why I recommend [reading these articles][42] about [customizing GNOME desktop][46]. +定制是没有尽头的,我可能仅使用了它的一小部分功能。这就是为什么我推荐[阅读这些文章]关于[自定义GNOME桌面][46]的[42]。 -You can also [install new themes in Ubuntu][47] though personally, I like the default theme in this release. This is the first time that I have stuck with the default icons and theme in an Ubuntu release. +你也可以[在Ubuntu中安装新主题][47],不过就我个人而言,我喜欢这个版本的默认主题。这是我第一次在Ubuntu发行版中使用默认的图标和主题。 -#### What do you do after installing Ubuntu? +#### 安装 Ubuntu 之后你会做什么? -If you are an Ubuntu beginner, I recommend [going through this collection of Ubuntu tutorials][48] to get started with it. +如果你是Ubuntu的初学者,我建议你[阅读这一系列Ubuntu教程][48]开始学习。 -So these were my recommendations. What are the steps you follow after installing Ubuntu? Share your favorite things and I might update this article with your suggestions. +这就是我的建议。安装Ubuntu之后你要做什么?分享你最喜欢的东西,我可能根据你的建议来更新这篇文章。 -------------------------------------------------------------------------------- @@ -226,7 +226,7 @@ via: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/ 作者:[Abhishek Prakash][a] 选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) +译者:[qfzy1233](https://github.com/qfzy1233) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From c837414cf1a1b6b87613972a6ee083d4c736410d Mon Sep 17 00:00:00 2001 From: qfzy1233 Date: Sun, 3 May 2020 16:33:20 +0800 Subject: [PATCH 390/394] Update and rename sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md to translated/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md --- .../20200424 16 Things to do After Installing Ubuntu 20.04.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename {sources => translated}/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md (99%) diff --git a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md b/translated/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md similarity index 99% rename from sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md rename to translated/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md index 1b5d5ef5c3..a221ef6a34 100644 --- a/sources/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md +++ b/translated/tech/20200424 16 Things to do After Installing Ubuntu 20.04.md @@ -10,7 +10,7 @@ 安装完 Ubuntu 20.04 后要做的 16 件事 ====== -_**以下是安装 Ubuntu 20.04 之后需要做的一些调整和事情,它将使你获得更流畅、更好的桌面 Linux 体验。**_ +_**以下是安装 Ubuntu 20.04 之后需要做的一些调整和事项,它将使你获得更流畅、更好的桌面 Linux 体验。**_ [Ubuntu 20.04 LTS (长期支持版)带来了许多新的特性][1] 和观感上的变化。 如果你要安装 Ubuntu 20.04 ,让我向你展示一些推荐步骤便于你的使用。 From 81ee0f92303689fbaea59804ae2df4567a44af24 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 3 May 2020 21:15:13 +0800 Subject: [PATCH 391/394] PRF @wxy --- ...0420 4 Git scripts I can-t live without.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/translated/tech/20200420 4 Git scripts I can-t live without.md b/translated/tech/20200420 4 Git scripts I can-t live without.md index 089c81e20f..782cb082ce 100644 --- a/translated/tech/20200420 4 Git scripts I can-t live without.md +++ b/translated/tech/20200420 4 Git scripts I can-t live without.md @@ -1,6 +1,6 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (4 Git scripts I can't live without) @@ -12,11 +12,11 @@ > Git Extras 版本库包含了 60 多个脚本,它们是 Git 基本功能的补充。以下是如何安装、使用和贡献的方法。 -![Person using a laptop][1] +![](https://img.linux.net.cn/data/attachment/album/202005/03/211446dshwbzoh235b3gre.jpg) -2005 年,[Linus Torvalds][2] 创建了 [Git][3],以取代他之前用于维护 Linux 内核的专有的分布式源码控制管理解决方案。从那时起,Git 已经成为开源和云原生开发团队的主流版本控制解决方案。 +2005 年,[Linus Torvalds][2] 创建了 [Git][3],以取代他之前用于维护 Linux 内核的分布式源码控制管理的专有解决方案。从那时起,Git 已经成为开源和云原生开发团队的主流版本控制解决方案。 -但即使是像 Git 这样功能丰富的应用程序,也没有人们想要或需要的每个功能,所以人们会花大力气去创建这些功能。就 Git 而言,这个人就是 [TJ Holowaychuk][4]。他的 [Git Extras][5] 项目承载了 60 多个“附加功能”,这些功能扩展了 Git 的基本功能。 +但即使是像 Git 这样功能丰富的应用程序,也没有人们想要或需要的每个功能,所以会有人花大力气去创建这些缺少的功能。就 Git 而言,这个人就是 [TJ Holowaychuk][4]。他的 [Git Extras][5] 项目承载了 60 多个“附加功能”,这些功能扩展了 Git 的基本功能。 ### 使用 Git 附加功能 @@ -24,9 +24,9 @@ #### git-ignore -`git ignore` 是一个方便的附加功能,它可以让你手动添加文件类型和注释到 `.git-ignore` 文件中,而不需要打开文本编辑器。它可以操作你的个人用户帐户的全局忽略文件和单独用于你正在工作的版本库的忽略文件。 +`git ignore` 是一个方便的附加功能,它可以让你手动添加文件类型和注释到 `.git-ignore` 文件中,而不需要打开文本编辑器。它可以操作你的个人用户帐户的全局忽略文件和单独用于你正在工作的版本库中的忽略文件。 -在没有参数的情况下执行 `git ignore` 会先列出全局忽略文件,然后是本地的忽略文件。 +在不提供参数的情况下执行 `git ignore` 会先列出全局忽略文件,然后是本地的忽略文件。 ``` $ git ignore @@ -105,7 +105,7 @@ branch.master.merge=refs/heads/master * `git mr` 检出来自 GitLab 的合并请求。 * `git pr` 检出来自 GitHub 的拉取请求。 -无论是哪种情况,你只需要合并请求号、拉取请求号或完整的 URL,它就会抓取远程引用,检出分支,并调整配置,这样 Git 就知道要替换哪个分支了。 +无论是哪种情况,你只需要合并请求号/拉取请求号或完整的 URL,它就会抓取远程引用,检出分支,并调整配置,这样 Git 就知道要替换哪个分支了。 ``` $ git mr 51 @@ -142,7 +142,7 @@ $ git extras --help $ brew install git-extras ``` -在 Linux 上,每个平台的原生包管理器中都有 Git Extras。有时,你需要启用一个额外的仓库,比如在 CentOS 上的 [EPEL][10],然后运行一条命令。 +在 Linux 上,每个平台原生的包管理器中都包含有 Git Extras。有时,你需要启用额外的仓库,比如在 CentOS 上的 [EPEL][10],然后运行一条命令。 ``` $ sudo yum install git-extras @@ -152,9 +152,9 @@ $ sudo yum install git-extras ### 贡献 -你是否你认为 Git 中有缺少的功能,并且已经构建了一个脚本来处理它?为什么不把它作为 Git Extras 发布版的一部分,与全世界分享呢? +你是否认为 Git 中有缺少的功能,并且已经构建了一个脚本来处理它?为什么不把它作为 Git Extras 发布版的一部分,与全世界分享呢? -要做到这一点,请将该功能贡献到 Git Extras 仓库中。更多具体细节请参见仓库中的 [CONTRIBUTING.md][12] 文件,但基本的操作方法很简单。 +要做到这一点,请将该功能贡献到 Git Extras 仓库中。更多具体细节请参见仓库中的 [CONTRIBUTING.md][12] 文件,但基本的操作方法很简单: 1. 创建一个处理该功能的 Bash 脚本。 2. 创建一个基本的 man 文件,让大家知道如何使用它。 @@ -171,7 +171,7 @@ via: https://opensource.com/article/20/4/git-extras 作者:[Vince Power][a] 选题:[lujun9972][b] 译者:[wxy](https://github.com/wxy) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 2790846b4c68ca7550819e9432138e464190ffc7 Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 3 May 2020 21:16:14 +0800 Subject: [PATCH 392/394] PUB @wxy https://linux.cn/article-12180-1.html --- .../20200420 4 Git scripts I can-t live without.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200420 4 Git scripts I can-t live without.md (98%) diff --git a/translated/tech/20200420 4 Git scripts I can-t live without.md b/published/20200420 4 Git scripts I can-t live without.md similarity index 98% rename from translated/tech/20200420 4 Git scripts I can-t live without.md rename to published/20200420 4 Git scripts I can-t live without.md index 782cb082ce..43102c69e6 100644 --- a/translated/tech/20200420 4 Git scripts I can-t live without.md +++ b/published/20200420 4 Git scripts I can-t live without.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12180-1.html) [#]: subject: (4 Git scripts I can't live without) [#]: via: (https://opensource.com/article/20/4/git-extras) [#]: author: (Vince Power https://opensource.com/users/vincepower) From 4ad888c0c2ddebd6c0e809238c4f950d3a9d8f5e Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 3 May 2020 23:04:49 +0800 Subject: [PATCH 393/394] PRF @lxbwolf --- ...OS-RHEL 7-8 Systems in Single User Mode.md | 82 ++++++++++--------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md b/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md index c5eaa1dc84..a54892c575 100644 --- a/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md +++ b/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md @@ -1,108 +1,112 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) [#]: subject: (Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode) [#]: via: (https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) -在单用户模式下启动 CentOS/RHEL 7/8 的三种方法 +以单用户模式启动 CentOS/RHEL 7/8 的三种方法 ====== +![](https://img.linux.net.cn/data/attachment/album/202005/03/230109uw1f9zvv9upbhwv8.jpg) + 单用户模式,也被称为维护模式,超级用户可以在此模式下恢复/修复系统问题。 -通常情况下,这些问题在多用户环境中修复不了。系统可以启动但功能不能正常运行或者你登录不了系统。 +通常情况下,这类问题在多用户环境中修复不了。系统可以启动但功能不能正常运行或者你登录不了系统。 -在基于 **[Red Hat][1]** (RHEL) 7/8 的系统中,使用 `runlevel1.target` 或 `rescue.target` 来实现。 +在基于 [Red Hat][1](RHEL)7/8 的系统中,使用 `runlevel1.target` 或 `rescue.target` 来实现。 在此模式下,系统会挂载所有的本地文件系统,但不开启网络接口。 系统仅启动特定的几个服务和修复系统必要的尽可能少的功能。 -当你想运行文件系统一致性检查来修复损坏的文件系统,或忘记 root 密码后重置密码,或修复系统上的一个挂载点问题时,这个方法会很有用。 +当你想运行文件系统一致性检查来修复损坏的文件系统,或忘记 root 密码后重置密码,或要修复系统上的一个挂载点问题时,这个方法会很有用。 -你可以用下面三种方法以单用户模式启动 **[CentOS][2]**/**[RHEL][3]** 7/8 系统。 +你可以用下面三种方法以单用户模式启动 [CentOS][2]/[RHEL][3] 7/8 系统。 - * **方法 1:** 通过向内核添加 “rd.break” 参数来以单用户模式启动 CentOS/RHEL 7/8 系统 - * **方法 2:** 通过用 “init=/bin/bash“ 或 ”init=/bin/sh” 替换内核中的 “rhgb quiet” 语句来以单用户模式启动 CentOS/RHEL 7/8 系统 - * **方法 3:** 通过用 “rw init=/sysroot/bin/sh” 参数替换内核中的 “ro” 语句以单用户模式启动 CentOS/RHEL 7/8 系统 + * 方法 1:通过向内核添加 `rd.break` 参数来以单用户模式启动 CentOS/RHEL 7/8 系统 + * 方法 2:通过用 `init=/bin/bash` 或 `init=/bin/sh` 替换内核中的 `rhgb quiet` 语句来以单用户模式启动 CentOS/RHEL 7/8 系统 + * 方法 3:通过用 `rw init=/sysroot/bin/sh` 参数替换内核中的 `ro` 语句以单用户模式启动 CentOS/RHEL 7/8 系统 +### 方法 1 - -### 方法 1: 通过向内核添加 “rd.break” 参数来以单用户模式启动 CentOS/RHEL 7/8 系统 +通过向内核添加 `rd.break` 参数来以单用户模式启动 CentOS/RHEL 7/8 系统。 重启你的系统,在 GRUB2 启动界面,按下 `e` 键来编辑选中的内核。你需要选中第一行,第一个是最新的内核,然而如果你想用旧的内核启动系统你也可以选择其他的行。 -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-2.png) -根据你的 RHEL/CentOS 版本,找到 **“linux16”** 或 **“linux”** 语句,按下键盘上的 ”End“ 按钮,跳到行末,像下面截图中展示的那样添加关键词 **“rd.break”**,按下 **“Ctrl+x”** 或 **“F10”** 来进入单用户模式。 +根据你的 RHEL/CentOS 版本,找到 `linux16` 或 `linux` 语句,按下键盘上的 `End` 键,跳到行末,像下面截图中展示的那样添加关键词 `rd.break`,按下 `Ctrl+x` 或 `F10` 来进入单用户模式。 -如果你的系统是 RHEL/CentOS 7,你需要找 **`linux16`**,如果你的系统是 RHEL/CentOS 8,那么你需要找 **`linux`**。 +如果你的系统是 RHEL/CentOS 7,你需要找 `linux16`,如果你的系统是 RHEL/CentOS 8,那么你需要找 `linux`。 -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-3.png) -这个修改会让你的 root 文件系统以 **“只读 (RO)”** 模式挂载。你可以用下面的命令来验证下。下面的输出也明确地告诉你当前是在 **“紧急模式”**。 +这个修改会让你的 root 文件系统以 “只读(`ro`)” 模式挂载。你可以用下面的命令来验证下。下面的输出也明确地告诉你当前是在 “紧急模式Emergency Mode”。 ``` # mount | grep root ``` -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-5.png) -为了修改 **“sysroot”** 文件系统,你需要用 RW 模式重新挂载它。 +为了修改 `sysroot` 文件系统,你需要用读写模式(`rw`)重新挂载它。 ``` # mount -o remount,rw /sysroot ``` -运行下面的命令修改环境,这就是大家熟知的 “jailed directory” 或 “chroot jail”。 +运行下面的命令修改环境,这就是大家熟知的 “监禁目录” 或 “chroot 监狱”。 ``` # chroot /sysroot ``` -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-8.png) -现在,单用户模式的前期准备已经完成了。当你修复了你的问题要退出单用户模式时,执行下面的步骤。 +现在,单用户模式已经完全准备好了。当你修复了你的问题要退出单用户模式时,执行下面的步骤。 -CentOS/RHEL 7/8 默认使用 SELinux,因此创建下面的隐藏文件,这个文件会在下一次启动时重新确认所有文件。 +CentOS/RHEL 7/8 默认使用 SELinux,因此创建下面的隐藏文件,这个文件会在下一次启动时重新标记所有文件。 ``` # touch /.autorelabel ``` -最后,用下面的命令重启系统。你也可以输入两次 “exit” 命令来重启你的系统。 +最后,用下面的命令重启系统。你也可以输入两次 `exit` 命令来重启你的系统。 ``` # reboot -f ``` -### 方法 2: 通过用 “init=/bin/bash“ 或 ”init=/bin/sh” 替换内核中的 “rhgb quiet” 语句来以单用户模式启动 CentOS/RHEL 7/8 系统 +### 方法 2 + +通过用 `init=/bin/bash` 或 `init=/bin/sh` 替换内核中的 `rhgb quiet` 语句来以单用户模式启动 CentOS/RHEL 7/8 系统。 重启你的系统,在 GRUB2 启动界面,按下 `e` 键来编辑选中的内核。 -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-2.png) -找到语句 **“rhgb quiet”**,用 **“init=/bin/bash”** 或 **“init=/bin/sh”** 替换它,然后按下 **“Ctrl+x”** 或 **“F10”** 来进入单用户模式。 +找到语句 `rhgb quiet`,用 `init=/bin/bash` 或 `init=/bin/sh` 替换它,然后按下 `Ctrl+x` 或 `F10` 来进入单用户模式。 -**`init=/bin/bash`** 的截图。 +`init=/bin/bash` 的截图。 -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1.png) -**`init=/bin/sh`** 的截图。 +`init=/bin/sh` 的截图。 -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1a.png) -默认情况下,上面的操作会以只读(RO)模式挂载你的 “/” 分区,因此你需要以读写(RW)模式重新挂载 “/” 文件系统,这样才能修改它。 +默认情况下,上面的操作会以只读(`ro`)模式挂载你的 `/` 分区,因此你需要以读写(`rw`)模式重新挂载 `/` 文件系统,这样才能修改它。 ``` # mount -o remount,rw / ``` -![][4] +![](https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-4.png) -现在你可以执行你的任务了。当结束时,执行下面的命令来开启重启时的 SELinux 重新确认。 +现在你可以执行你的任务了。当结束时,执行下面的命令来开启重启时的 SELinux 重新标记。 ``` # touch /.autorelabel @@ -114,21 +118,23 @@ CentOS/RHEL 7/8 默认使用 SELinux,因此创建下面的隐藏文件,这 # exec /sbin/init 6 ``` -### 方法 3: 通过用 “rw init=/sysroot/bin/sh” 参数替换内核中的 “ro” 语句以单用户模式启动 CentOS/RHEL 7/8 系统 +### 方法 3 + +通过用 `rw init=/sysroot/bin/sh` 参数替换内核中的 `ro` 单词,以单用户模式启动 CentOS/RHEL 7/8 系统。 为了中断自动启动的过程,重启你的系统并在 GRUB2 启动界面按下任意键。 现在会展示你系统上所有可用的内核,选择最新的内核,按下 `e` 键来编辑选中的内核参数。 -找到以 **“linux”** 或 **“linux16”** 开头的语句,用 **“rw init=/sysroot/bin/sh”** 替换 **“ro”**。替换完后按下 **“Ctrl+x”** 或 **“F10”** 来进入单用户模式。 +找到以 `linux` 或 `linux16` 开头的语句,用 `rw init=/sysroot/bin/sh` 替换 `ro`。替换完后按下 `Ctrl+x` 或 `F10` 来进入单用户模式。 -运行下面的命令把环境切换为 “chroot jail”。 +运行下面的命令把环境切换为 “chroot 监狱”。 ``` # chroot /sysroot ``` -如果需要,做出必要的修改。修改完后,执行下面的命令来开启重启时的 SELinux 重新确认。 +如果需要,做出必要的修改。修改完后,执行下面的命令来开启重启时的 SELinux 重新标记。 ``` # touch /.autorelabel @@ -147,7 +153,7 @@ via: https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/ 作者:[Magesh Maruthamuthu][a] 选题:[lujun9972][b] 译者:[lxbwolf](https://github.com/lxbwolf) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 4e0e7c3ea7de5e9d00b0d76eeb3429669056f06f Mon Sep 17 00:00:00 2001 From: Xingyu Wang Date: Sun, 3 May 2020 23:09:22 +0800 Subject: [PATCH 394/394] PUB @lxbwolf https://linux.cn/article-12181-1.html --- ...ethods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename {translated/tech => published}/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md (98%) diff --git a/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md b/published/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md similarity index 98% rename from translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md rename to published/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md index a54892c575..4b7edb67e9 100644 --- a/translated/tech/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md +++ b/published/20200430 Three Methods Boot CentOS-RHEL 7-8 Systems in Single User Mode.md @@ -1,8 +1,8 @@ [#]: collector: (lujun9972) [#]: translator: (lxbwolf) [#]: reviewer: (wxy) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-12181-1.html) [#]: subject: (Three Methods Boot CentOS/RHEL 7/8 Systems in Single User Mode) [#]: via: (https://www.2daygeek.com/boot-centos-7-8-rhel-7-8-single-user-mode/) [#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)